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')
49neuro = b2.register_module(
'NeuroTrigger')
56simulatedComponents = [
'MagneticField',
'CDC',
'PXD',
'SVD',
'BeamPipe'
64evtmetagen.param({
'evtNumList': [1000],
'runList': [1]})
68geobuilder.param(
'components', simulatedComponents)
73particlegun.param(
'pdgCodes', [13, -13])
74particlegun.param(
'nTracks', 5)
75particlegun.param(
'momentumGeneration',
'inversePt')
78particlegun.param(
'momentumParams', [0.2, 8.0])
83particlegun.param(
'phiGeneration',
'uniform')
84particlegun.param(
'phiParams', [0, 360])
87particlegun.param(
'vertexGeneration',
'uniform')
88particlegun.param(
'xVertexParams', [0, 0])
89particlegun.param(
'yVertexParams', [0, 0])
90particlegun.param(
'zVertexParams', [-20.0, 20.0])
99kkdir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'generators')
100kkgeninput.param(
'tauinputFile', kkdir +
'kkmc/data/mu.input.dat')
101kkgeninput.param(
'KKdefaultFile', kkdir +
'kkmc/data/KK2f_defaults.dat')
102kkgeninput.param(
'taudecaytableFile',
'')
105mcparticleprinter.param(
'maxLevel', -1)
117dir =
'/sw/belle2/bkg/'
126bkg_files = glob.glob(dir +
'/*.root')
128bkgmixer.param(
'backgroundFiles', bkg_files)
129bkgmixer.param(
'components', simulatedComponents)
130bkgmixer.param(
'scaleFactors', [
131 (
'Coulomb_LER', bkgScaleFactor),
132 (
'Coulomb_HER', bkgScaleFactor),
133 (
'RBB_LER', bkgScaleFactor),
134 (
'RBB_HER', bkgScaleFactor),
135 (
'Touschek_LER', bkgScaleFactor),
136 (
'Touschek_HER', bkgScaleFactor)
152cdctrg.param(
'ConfigFile', os.path.join(basf2datadir,
"trg/cdc/TRGCDCConfig_0_20101111.dat"))
154cdctrg.param(
'CurlBackStop', 1)
155cdctrg.param(
'SimulationMode', 1)
156cdctrg.param(
'FastSimulationMode', 0)
162cdctrg.param(
'InnerTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/innerLUT_v3.0.coe"))
163cdctrg.param(
'OuterTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/outerLUT_v3.0.coe"))
168cdctrg.param(
'HoughFinderMappingFileMinus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingMinus20160223.dat"))
169cdctrg.param(
'HoughFinderMappingFilePlus', os.path.join(basf2datadir,
"trg/cdc/HoughMappingPlus20160223.dat"))
188neuro.param(
'filename', os.path.join(basf2datadir,
"trg/cdc/Neuro20160309Nonlin.root"))
195rootOut.param(
'outputFileName',
'basf2.root')
198rootIn.param(
'inputFileName',
'basf2.root')
206fullMain = b2.create_path()
208fullMain.add_module(evtmetagen)
209fullMain.add_module(evtmetainfo)
210fullMain.add_module(paramloader)
211fullMain.add_module(geobuilder)
212fullMain.add_module(particlegun)
215fullMain.add_module(mcparticleprinter)
216fullMain.add_module(g4sim)
217fullMain.add_module(bkgmixer)
218fullMain.add_module(cdcdigitizer)
219fullMain.add_module(cdctrg)
220fullMain.add_module(neuro)
223g4SimMain = b2.create_path()
225g4SimMain.add_module(evtmetagen)
226g4SimMain.add_module(evtmetainfo)
227g4SimMain.add_module(paramloader)
228g4SimMain.add_module(geobuilder)
229g4SimMain.add_module(particlegun)
232g4SimMain.add_module(mcparticleprinter)
233g4SimMain.add_module(g4sim)
234g4SimMain.add_module(bkgmixer)
235g4SimMain.add_module(cdcdigitizer)
236g4SimMain.add_module(rootOut)
239savedG4SimMain = b2.create_path()
241savedG4SimMain.add_module(rootIn)
242savedG4SimMain.add_module(evtmetainfo)
243savedG4SimMain.add_module(paramloader)
244savedG4SimMain.add_module(geobuilder)
245savedG4SimMain.add_module(cdctrg)
248generatorMain = b2.create_path()
250generatorMain.add_module(evtmetagen)
251generatorMain.add_module(evtmetainfo)
252generatorMain.add_module(paramloader)
253generatorMain.add_module(geobuilder)
254generatorMain.add_module(particlegun)
257generatorMain.add_module(mcparticleprinter)
258generatorMain.add_module(g4sim)
259generatorMain.add_module(rootOut)
262savedGeneratorMain = b2.create_path()
264savedGeneratorMain.add_module(rootIn)
265savedGeneratorMain.add_module(evtmetainfo)
266savedGeneratorMain.add_module(paramloader)
267savedGeneratorMain.add_module(geobuilder)
268savedGeneratorMain.add_module(bkgmixer)
269savedGeneratorMain.add_module(cdcdigitizer)
270savedGeneratorMain.add_module(cdctrg)