-
Notifications
You must be signed in to change notification settings - Fork 0
/
dump.py
executable file
·72 lines (58 loc) · 2.41 KB
/
dump.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env gaudirun.py
########################################################################
from Gaudi.Configuration import *
from Configurables import DaVinci
from Configurables import GaudiSequencer, CombineParticles, FilterDesktop, DecayTreeTuple, CheckPV, SelDSTWriter
from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
from CommonMCParticles import StandardMCKaons, StandardMCPions
from DecayTreeTuple.Configuration import *
from Configurables import DumpAddr
GaudiPersistency()
importOptions("data_local.py")
#Truth matched commonparticles:
_kaons = DataOnDemand(Location='Phys/StdMCKaons/Particles')
_pions = DataOnDemand(Location='Phys/StdMCPions/Particles')
#
# MC matching
#
matchD2KKPi = "(mcMatch('[D_s+ ==> K- K+ pi+]CC'))"
#matchKaons = "(mcMatch('[K+]cc'))"
#matchPions = "(mcMatch('[pi+]cc'))"
_d2kkpi = CombineParticles("d2kkpi")
_d2kkpi.DecayDescriptor = "D_s- -> K- K+ pi-"
#_d2kkpi.DaughtersCuts = { "pi+" : matchPions, "K+" : matchKaons}
_d2kkpi.MotherCut = matchD2KKPi
_d2kkpi.Preambulo = [
"from LoKiPhysMC.decorators import *",
"from PartProp.Nodes import CC" ]
SelD2KKPi = Selection( "SelD2KKPi",
Algorithm = _d2kkpi,
RequiredSelections=[_kaons,_pions])
dumpAlg = DumpAddr(OutputFile='eventaddr.txt', ObjectPath='/Event')
SeqD2KKPi = SelectionSequence('MCFilter',TopSelection = SelD2KKPi, PostSelectionAlgs=[dumpAlg])
tuple = DecayTreeTuple("out")
tuple.Decay = "[D_s+ -> K- K+ pi+]CC"
tuple.Inputs = [SeqD2KKPi.outputLocation()]
mcTruth = tuple.addTupleTool("TupleToolMCTruth")
tuple.addTupleTool("TupleToolPropertime")
checkPV = CheckPV()
dstWriter = SelDSTWriter("MyDSTWriter",
SelectionSequences = [SeqD2KKPi],
OutputFileSuffix = 'EXTRA'
)
from Gaudi.Configuration import *
from Configurables import DaVinci
DaVinci().EvtMax = 10000
DaVinci().PrintFreq = 10
DaVinci().SkipEvents = 0
DaVinci().DataType = "2012"
DaVinci().DDDBtag = "MC11-20111102"
DaVinci().CondDBtag = "sim-20121025-vc-mu100"
DaVinci().HistogramFile = "meta.root"
DaVinci().Simulation = True
DaVinci().appendToMainSequence([dstWriter.sequence(), tuple])
DaVinci().TupleFile = "D_s_minus.root"
# Change the column size of Timing table
from Configurables import TimingAuditor, SequencerTimerTool
TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
TimingAuditor().TIMER.NameSize = 60