27b2.set_log_level(b2.LogLevel.ERROR)
30basf2datadir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'data')
35evtmetagen = b2.register_module(
'EventInfoSetter')
36evtmetainfo = b2.register_module(
'Progress')
37paramloader = b2.register_module(
'Gearbox')
38geobuilder = b2.register_module(
'Geometry')
39particlegun = b2.register_module(
'ParticleGun')
40evtgeninput = b2.register_module(
'EvtGenInput')
41kkgeninput = b2.register_module(
'KKGenInput')
42mcparticleprinter = b2.register_module(
'PrintMCParticles')
43g4sim = b2.register_module(
'FullSim')
44bkgmixer = b2.register_module(
'BeamBkgMixer')
45cdcdigitizer = b2.register_module(
'CDCDigitizer')
46cdctrg = b2.register_module(
"TRGCDC")
47rootOut = b2.register_module(
'RootOutput')
48rootIn = b2.register_module(
'RootInput')
49srootIn = b2.register_module(
'SeqRootInput')
50neuro = b2.register_module(
'NeuroTrigger')
61simulatedComponents = [
'MagneticFieldConstant4LimitedRCDC',
'CDC',
66evtmetagen.param({
'evtNumList': [1000],
'runList': [1]})
70geobuilder.param(
'components', simulatedComponents)
75particlegun.param(
'pdgCodes', [13, -13])
76particlegun.param(
'nTracks', 5)
77particlegun.param(
'momentumGeneration',
'inversePt')
80particlegun.param(
'momentumParams', [0.2, 8.0])
85particlegun.param(
'phiGeneration',
'uniform')
86particlegun.param(
'phiParams', [0, 360])
89particlegun.param(
'vertexGeneration',
'uniform')
90particlegun.param(
'xVertexParams', [0, 0])
91particlegun.param(
'yVertexParams', [0, 0])
92particlegun.param(
'zVertexParams', [-20.0, 20.0])
101kkdir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'generators')
102kkgeninput.param(
'tauinputFile', kkdir +
'kkmc/data/mu.input.dat')
103kkgeninput.param(
'KKdefaultFile', kkdir +
'kkmc/data/KK2f_defaults.dat')
104kkgeninput.param(
'taudecaytableFile',
'')
107mcparticleprinter.param(
'maxLevel', -1)
119dir =
'/sw/belle2/bkg/'
128bkg_files = glob.glob(dir +
'/*.root')
130bkgmixer.param(
'backgroundFiles', bkg_files)
131bkgmixer.param(
'components', simulatedComponents)
132bkgmixer.param(
'scaleFactors', [
133 (
'Coulomb_LER', bkgScaleFactor),
134 (
'Coulomb_HER', bkgScaleFactor),
135 (
'RBB_LER', bkgScaleFactor),
136 (
'RBB_HER', bkgScaleFactor),
137 (
'Touschek_LER', bkgScaleFactor),
138 (
'Touschek_HER', bkgScaleFactor)
154cdctrg.param(
'ConfigFile', os.path.join(basf2datadir,
"trg/cdc/TRGCDCConfig_0_20101111.dat"))
156cdctrg.param(
'CurlBackStop', 1)
157cdctrg.param(
'SimulationMode', 1)
158cdctrg.param(
'FastSimulationMode', 0)
164cdctrg.param(
'InnerTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/innerLUT_v3.0.coe"))
165cdctrg.param(
'OuterTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/outerLUT_v3.0.coe"))
170cdctrg.param(
'HoughFinderMappingFileMinus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingMinus20160223.dat"))
171cdctrg.param(
'HoughFinderMappingFilePlus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingPlus20160223.dat"))
187cdctrg.param(
'TRGCDCDataInputMode', 2)
191neuro.param(
'filename', os.path.join(basf2datadir,
"trg/cdc/Neuro20160309Nonlin.root"))
198rootOut.param(
'outputFileName',
'basf2.root')
201rootIn.param(
'inputFileName',
'basf2.root')
209fullMain = b2.create_path()
211fullMain.add_module(evtmetagen)
212fullMain.add_module(evtmetainfo)
213fullMain.add_module(paramloader)
214fullMain.add_module(geobuilder)
215fullMain.add_module(particlegun)
218fullMain.add_module(mcparticleprinter)
219fullMain.add_module(g4sim)
220fullMain.add_module(bkgmixer)
221fullMain.add_module(cdcdigitizer)
222fullMain.add_module(cdctrg)
223fullMain.add_module(neuro)
226g4SimMain = b2.create_path()
228g4SimMain.add_module(evtmetagen)
229g4SimMain.add_module(evtmetainfo)
230g4SimMain.add_module(paramloader)
231g4SimMain.add_module(geobuilder)
232g4SimMain.add_module(particlegun)
235g4SimMain.add_module(mcparticleprinter)
236g4SimMain.add_module(g4sim)
237g4SimMain.add_module(bkgmixer)
238g4SimMain.add_module(cdcdigitizer)
239g4SimMain.add_module(rootOut)
242savedG4SimMain = b2.create_path()
244savedG4SimMain.add_module(rootIn)
245savedG4SimMain.add_module(evtmetainfo)
246savedG4SimMain.add_module(paramloader)
247savedG4SimMain.add_module(geobuilder)
248savedG4SimMain.add_module(cdctrg)
251generatorMain = b2.create_path()
253generatorMain.add_module(evtmetagen)
254generatorMain.add_module(evtmetainfo)
255generatorMain.add_module(paramloader)
256generatorMain.add_module(geobuilder)
257generatorMain.add_module(particlegun)
260generatorMain.add_module(mcparticleprinter)
261generatorMain.add_module(g4sim)
262generatorMain.add_module(rootOut)
265savedGeneratorMain = b2.create_path()
267savedGeneratorMain.add_module(rootIn)
268savedGeneratorMain.add_module(evtmetainfo)
269savedGeneratorMain.add_module(paramloader)
270savedGeneratorMain.add_module(geobuilder)
271savedGeneratorMain.add_module(bkgmixer)
272savedGeneratorMain.add_module(cdcdigitizer)
273savedGeneratorMain.add_module(cdctrg)
276readB2LMain = b2.create_path()
278readB2LMain.add_module(srootIn)
279readB2LMain.add_module(paramloader)
280readB2LMain.add_module(geobuilder)
281readB2LMain.add_module(cdcdigitizer)
282readB2LMain.add_module(evtmetainfo)
283readB2LMain.add_module(cdctrg)
299b2.process(readB2LMain)