forked from lhcb/first-analysis-steps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathntuple_options_xmlcatalog.py
33 lines (29 loc) · 1.24 KB
/
ntuple_options_xmlcatalog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from Gaudi.Configuration import importOptions, FileCatalog
from Configurables import DaVinci, DecayTreeTuple
from DecayTreeTuple.Configuration import *
# Stream and stripping line we want to use
stream = 'AllStreams'
line = 'D2hhCompleteEventPromptDst2D2RSLine'
# Create an ntuple to capture D*+ decays from the StrippingLine line
dtt = DecayTreeTuple('TupleDstToD0pi_D0ToKpi')
dtt.Inputs = ['/Event/{0}/Phys/{1}/Particles'.format(stream, line)]
dtt.Decay = '[D*(2010)+ -> (D0 -> K- pi+) pi+]CC'
# Configure DaVinci
DaVinci().UserAlgorithms += [dtt]
DaVinci().InputType = 'DST'
DaVinci().TupleFile = 'DVntuple.root'
DaVinci().PrintFreq = 1000
DaVinci().DataType = '2012'
DaVinci().Simulation = True
# Only ask for luminosity information when not using simulated data
DaVinci().Lumi = not DaVinci().Simulation
DaVinci().EvtMax = -1
# Use input data from the bookkeeping query with XML catalog
importOptions(
"MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_"
"Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS"
".DST.py")
FileCatalog().Catalogs = [
"xmlcatalog_file:MC_2012_27163003_"
"Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_"
"Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.xml"]