28 b2.set_log_level(b2.LogLevel.ERROR)
31 basf2datadir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'data')
36 evtmetagen = b2.register_module(
'EventInfoSetter')
37 evtmetainfo = b2.register_module(
'Progress')
38 paramloader = b2.register_module(
'Gearbox')
39 geobuilder = b2.register_module(
'Geometry')
40 particlegun = b2.register_module(
'ParticleGun')
41 evtgeninput = b2.register_module(
'EvtGenInput')
42 kkgeninput = b2.register_module(
'KKGenInput')
43 mcparticleprinter = b2.register_module(
'PrintMCParticles')
44 g4sim = b2.register_module(
'FullSim')
45 bkgmixer = b2.register_module(
'BeamBkgMixer')
46 cdcdigitizer = b2.register_module(
'CDCDigitizer')
47 cdctrg = b2.register_module(
"TRGCDC")
48 rootOut = b2.register_module(
'RootOutput')
49 rootIn = b2.register_module(
'RootInput')
50 neuro = b2.register_module(
'NeuroTrigger')
57 simulatedComponents = [
'MagneticField',
'CDC',
'PXD',
'SVD',
'BeamPipe'
65 evtmetagen.param({
'evtNumList': [1000],
'runList': [1]})
69 geobuilder.param(
'components', simulatedComponents)
74 particlegun.param(
'pdgCodes', [13, -13])
75 particlegun.param(
'nTracks', 5)
76 particlegun.param(
'momentumGeneration',
'inversePt')
79 particlegun.param(
'momentumParams', [0.2, 8.0])
84 particlegun.param(
'phiGeneration',
'uniform')
85 particlegun.param(
'phiParams', [0, 360])
88 particlegun.param(
'vertexGeneration',
'uniform')
89 particlegun.param(
'xVertexParams', [0, 0])
90 particlegun.param(
'yVertexParams', [0, 0])
91 particlegun.param(
'zVertexParams', [-20.0, 20.0])
100 kkdir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'generators')
101 kkgeninput.param(
'tauinputFile', kkdir +
'kkmc/data/mu.input.dat')
102 kkgeninput.param(
'KKdefaultFile', kkdir +
'kkmc/data/KK2f_defaults.dat')
103 kkgeninput.param(
'taudecaytableFile',
'')
106 mcparticleprinter.param(
'maxLevel', -1)
118 dir =
'/sw/belle2/bkg/'
127 bkg_files = glob.glob(dir +
'/*.root')
129 bkgmixer.param(
'backgroundFiles', bkg_files)
130 bkgmixer.param(
'components', simulatedComponents)
131 bkgmixer.param(
'scaleFactors', [
132 (
'Coulomb_LER', bkgScaleFactor),
133 (
'Coulomb_HER', bkgScaleFactor),
134 (
'RBB_LER', bkgScaleFactor),
135 (
'RBB_HER', bkgScaleFactor),
136 (
'Touschek_LER', bkgScaleFactor),
137 (
'Touschek_HER', bkgScaleFactor)
153 cdctrg.param(
'ConfigFile', os.path.join(basf2datadir,
"trg/cdc/TRGCDCConfig_0_20101111.dat"))
155 cdctrg.param(
'CurlBackStop', 1)
156 cdctrg.param(
'SimulationMode', 1)
157 cdctrg.param(
'FastSimulationMode', 0)
163 cdctrg.param(
'InnerTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/innerLUT_v3.0.coe"))
164 cdctrg.param(
'OuterTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/outerLUT_v3.0.coe"))
169 cdctrg.param(
'HoughFinderMappingFileMinus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingMinus20160223.dat"))
170 cdctrg.param(
'HoughFinderMappingFilePlus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingPlus20160223.dat"))
189 neuro.param(
'filename', os.path.join(basf2datadir,
"trg/cdc/Neuro20160309Nonlin.root"))
196 rootOut.param(
'outputFileName',
'basf2.root')
199 rootIn.param(
'inputFileName',
'basf2.root')
207 fullMain = b2.create_path()
209 fullMain.add_module(evtmetagen)
210 fullMain.add_module(evtmetainfo)
211 fullMain.add_module(paramloader)
212 fullMain.add_module(geobuilder)
213 fullMain.add_module(particlegun)
216 fullMain.add_module(mcparticleprinter)
217 fullMain.add_module(g4sim)
218 fullMain.add_module(bkgmixer)
219 fullMain.add_module(cdcdigitizer)
220 fullMain.add_module(cdctrg)
221 fullMain.add_module(neuro)
224 g4SimMain = b2.create_path()
226 g4SimMain.add_module(evtmetagen)
227 g4SimMain.add_module(evtmetainfo)
228 g4SimMain.add_module(paramloader)
229 g4SimMain.add_module(geobuilder)
230 g4SimMain.add_module(particlegun)
233 g4SimMain.add_module(mcparticleprinter)
234 g4SimMain.add_module(g4sim)
235 g4SimMain.add_module(bkgmixer)
236 g4SimMain.add_module(cdcdigitizer)
237 g4SimMain.add_module(rootOut)
240 savedG4SimMain = b2.create_path()
242 savedG4SimMain.add_module(rootIn)
243 savedG4SimMain.add_module(evtmetainfo)
244 savedG4SimMain.add_module(paramloader)
245 savedG4SimMain.add_module(geobuilder)
246 savedG4SimMain.add_module(cdctrg)
249 generatorMain = b2.create_path()
251 generatorMain.add_module(evtmetagen)
252 generatorMain.add_module(evtmetainfo)
253 generatorMain.add_module(paramloader)
254 generatorMain.add_module(geobuilder)
255 generatorMain.add_module(particlegun)
258 generatorMain.add_module(mcparticleprinter)
259 generatorMain.add_module(g4sim)
260 generatorMain.add_module(rootOut)
263 savedGeneratorMain = b2.create_path()
265 savedGeneratorMain.add_module(rootIn)
266 savedGeneratorMain.add_module(evtmetainfo)
267 savedGeneratorMain.add_module(paramloader)
268 savedGeneratorMain.add_module(geobuilder)
269 savedGeneratorMain.add_module(bkgmixer)
270 savedGeneratorMain.add_module(cdcdigitizer)
271 savedGeneratorMain.add_module(cdctrg)