ATLAS Offline Software
Loading...
Searching...
No Matches
Lb2Lll.py
Go to the documentation of this file.
6
7#--------------------------------------------------------------
8# Global job-driving options
9#--------------------------------------------------------------
10
11EvtMax = 1000
12#EvtMax = MYNOEVENTS
13
14antiParticle = False
15
16filterLVL1trigger = True
17filterLVL2trigger = True
18pTcutLVL1trigger = 6000
19pTcutLVL2trigger = 4000
20filterHadrons = True
21bQuarksBSignalFilter = False
22
23fastGeneration = False
24doNotWritePOOL = False
25readRndFromFile = False
26outLevelBChains = DEBUG
27ntupleType = "AANT"
28bothLambdaBFinsel = False
29forceHadronization = False
30repeatHadronization = 20.
31oldTypeSetup = False
32
33#--------------------------------------------------------------
34# General application configuration options
35#--------------------------------------------------------------
36
37if oldTypeSetup:
38 theApp.setup( MONTECARLO )
39else:
40 import AthenaCommon.AtlasUnixGeneratorJob
41
42from PartPropSvc.PartPropSvcConf import PartPropSvc
43svcMgr += PartPropSvc()
44
45
46#--------------------------------------------------------------
47# Private application configuration options
48#--------------------------------------------------------------
49svcMgr.AuditorSvc.Auditors = [ "ChronoAuditor" ]
50
51#--------------------------------------------------------------
52# Algorithms
53#--------------------------------------------------------------
54from AthenaCommon.AlgSequence import AlgSequence
55topAlg=AlgSequence()
56
57from PythiaB.PythiaBConf import PythiaB
58topAlg += PythiaB()
59PythiaB = topAlg.PythiaB
60
61from EvtGen_i.EvtGen_iConf import EvtDecay
62topAlg += EvtDecay()
63EvtDecay = topAlg.EvtDecay
64
65from GeneratorFilters.GeneratorFiltersConf import BSignalFilter
66topAlg += BSignalFilter()
67BSignalFilter = topAlg.BSignalFilter
68
69#--------------------------------------------------------------
70# Number of events to be accepted,
71# rewritten if use B job submition script
72# RunNumber, FirstEvent rewritten if use B job submition script
73#--------------------------------------------------------------
74
75if oldTypeSetup:
76 EventSelector = Service ("EventSelector")
77
78theApp.EvtMax = EvtMax
79svcMgr.EventSelector.RunNumber = 18900
80#EventSelector.RunNumber = MYDSN
81svcMgr.EventSelector.FirstEvent = 1
82#EventSelector.FirstEvent = MYSKIP
83
84#--------------------------------------------------------------
85#User random number seeds - re-written if use B job submition script
86#--------------------------------------------------------------
87
88if readRndFromFile:
89 print("ERROR readRndFromFile not currently supported -- ignoring.")
90 pass
91
92#--------------------------------------------------------------
93# Output level (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
94#--------------------------------------------------------------
95
96svcMgr.MessageSvc.OutputLevel = INFO
97svcMgr.MessageSvc.defaultLimit = 9999999 # all messages
98
99#--------------------------------------------------------------
100# Parameters specific to PythiaB
101#--------------------------------------------------------------
102
103include( "EvtGen_i/StopPytWeakBdecays.py" )
104
105# Apply Lambda_b0 user-finsel selection
106PythiaB.ForceDecayChannel = "LambdabmumuLambda"
107if antiParticle:
108 PythiaB.DecayChannelParameters = [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
109else:
110 PythiaB.DecayChannelParameters = [+1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
111
112if bothLambdaBFinsel:
113 PythiaB.DecayChannelParameters = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
114
115#--------------------------------------------------------------
116# Pythia parameters optimal for beauty production
117#--------------------------------------------------------------
118
119#include( "PythiaB/Btune.py" )
120
121# 'msel 5' is only for fast tests! for correct b-producion you should use 'msel 1'
122if fastGeneration:
123 PythiaB.PythiaCommand += ["pysubs ckin 3 6.", "pysubs msel 5"]
124else:
125 PythiaB.PythiaCommand += ["pysubs ckin 3 6.", "pysubs msel 1"]
126
127# Ignore almost all pythia errors
128PythiaB.PythiaCommand += [ "pydat1 mstu 22 1000" ]
129
130# Selections on b quarks
131if antiParticle:
132 PythiaB.cutbq = ["0. 0. or 9. 3.5"]
133else:
134 PythiaB.cutbq = ["9. 3.5 or 0. 0."]
135#PythiaB.cutbq = ["0. 1000. or 0. 1000."]
136
137# Number of repeated hadronization mhadr
138PythiaB.mhadr = repeatHadronization
139
140# Forced hadronizaition to Lambda_b0
141if forceHadronization:
142 PythiaB.forceHadronization = "Lambdab"
143 if antiParticle:
144 PythiaB.HadronizationParameters = [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
145 else:
146 PythiaB.HadronizationParameters = [+1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
147
148# For how many events store B-chain in NTUPLE
149BSignalFilter.OutputLevel = outLevelBChains
150BSignalFilter.SignaltoNtup = EvtMax
151
152# Level 1 Muon Cuts
153BSignalFilter.LVL1MuonCutOn = False
154BSignalFilter.LVL1MuonCutPT = pTcutLVL1trigger
155BSignalFilter.LVL1MuonCutEta = 2.5
156
157# Level 2 lepton cuts - these will only function if LVL1 trigger used
158BSignalFilter.LVL2MuonCutOn = False
159BSignalFilter.LVL2MuonCutPT = pTcutLVL2trigger
160BSignalFilter.LVL2MuonCutEta = 2.5
161
162# Hadronic tracks cuts
163BSignalFilter.Cuts_Final_hadrons_switch = False
164BSignalFilter.Cuts_Final_hadrons_pT = 500.0
165BSignalFilter.Cuts_Final_hadrons_eta = 2.5
166
167# Switches for trigger levels
168if filterLVL1trigger:
169 BSignalFilter.LVL1MuonCutOn = True
170if filterLVL2trigger:
171 BSignalFilter.LVL2MuonCutOn = True
172if filterHadrons:
173 BSignalFilter.Cuts_Final_hadrons_switch = True
174 if antiParticle:
175 BSignalFilter.BParticle_cuts = -5122
176 else:
177 BSignalFilter.BParticle_cuts = 5122
178
179if bQuarksBSignalFilter:
180 BSignalFilter.StoreBQuarks = True
181
182#--------------------------------------------------------------
183# Your control of EvtGen
184#--------------------------------------------------------------
185
186# If you do not define a name to your Decay-table file here
187# then EvtGen will work with a default decay table DECAY.DEC
188EvtDecay.OutputLevel = outLevelBChains
189if antiParticle:
190 EvtDecay.userDecayTableName = "MYDECAY_antiLb2Lll.DEC"
191else:
192 EvtDecay.userDecayTableName = "MYDECAY_Lb2Lll.DEC"
193
194#--------------------------------------------------------------
195# Histogram & Ntuple Persistency
196#--------------------------------------------------------------
197
198if ntupleType == "ROOT":
199 theApp.HistogramPersistency = "ROOT"
200 svcMgr.NTupleSvc = Service( "NTupleSvc" )
201 svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='athena.evgen.ntup' OPT='NEW'" ]
202
203if ntupleType == "HBOOK":
204 theApp.Dlls += [ "HbookCnv" ]
205 theApp.HistogramPersistency = "HBOOK"
206 HbookHistSvc = Service( "HbookHistSvc" )
207 HbookHistSvc.NPAWC = 1500000
208 #HbookHistSvc.RecordLength = 1024
209 #HbookHistSvc.IQUEST10 = 65000
210 svcMgr.NTupleSvc = Service( "NTupleSvc" )
211 svcMgr.NTupleSvc.NPAWC = 15000000
212 svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='athena.evgen.ntup' OPT='NEW'" ]
213
214if ntupleType == "AANT":
215 theApp.Dlls += [ "AnalysisTools" ]
216 THistSvc = Service ( "THistSvc" )
217 THistSvc.Output = ["AANT DATAFILE='athena.evgen.ntup' OPT='NEW'"]
218 theApp.TopAlg += [ "AANTupleStream" ]
219 AANTupleStream = Algorithm( "AANTupleStream" )
220 AANTupleStream.ExtraRefNames = [ "" ]
221 AANTupleStream.OutputName = 'athena.evgen.ntup'
222 AANTupleStream.ExistDataHeader = False
223 AANTupleStream.OutputLevel = VERBOSE
224
225HistogramPersistencySvc = Service( "HistogramPersistencySvc" )
226HistogramPersistencySvc.OutputFile = "histo.root"
227
228#---------------------------------------------------------------
229# Pool Persistency
230#---------------------------------------------------------------
231
232if not doNotWritePOOL:
233 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
234 include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
235
236 Stream1 = AthenaPoolOutputStream( "Stream1" )
237 Stream1.OutputFile = "athena.evgen.root"
238 # 2101 = EventInfo
239 # 133273 = MCTruth (HepMC)
240 Stream1.ItemList += [ "2101#*", "133273#*" ]
241 Stream1.AcceptAlgs = [ "BSignalFilter" ]
242
243 include("AthenaSealSvc/AthenaSealSvc_joboptions.py" )
244 AthenaSealSvc.CheckDictionary = TRUE
245
246#==============================================================
247#
248# End of job options file
249#
250
void print(char *figname, TCanvas *c1)
PythiaB
Definition Lb2Lll.py:59
EvtDecay
Definition Lb2Lll.py:63