12from beamparameters
import add_beamparameters
16from VXDTF.setup_modules
import (setup_sim,
25b2.set_log_level(b2.LogLevel.ERROR)
29main = b2.create_path()
34eventinfosetter = b2.register_module(
'EventInfoSetter')
37eventinfoprinter = b2.register_module(
'EventInfoPrinter')
38progress = b2.register_module(
'Progress')
40main.add_module(eventinfosetter)
41main.add_module(eventinfoprinter)
42main.add_module(progress)
46beamparameters = add_beamparameters(main,
"Y4S")
47b2.print_params(beamparameters)
52 'pdgCodes': [13, -13],
54 'momentumGeneration':
'uniformPt',
55 'momentumParams': [0.1, 0.15],
56 'thetaGeneration':
'uniform',
57 'thetaParams': [60., 85.],
58 'phiGeneration':
'uniform',
59 'phiParams': [0., 90.],
60 'vertexGeneration':
'uniform',
61 'xVertexParams': [-0.1, 0.1],
62 'yVertexParams': [-0.1, 0.1],
63 'zVertexParams': [-0.5, 0.5],
66particlegun = b2.register_module(
'ParticleGun')
67particlegun.logging.log_level = b2.LogLevel.WARNING
68particlegun.param(param_pGun)
69main.add_module(particlegun)
73 evtgenInput = b2.register_module(
'EvtGenInput')
74 evtgenInput.logging.log_level = b2.LogLevel.WARNING
75 main.add_module(evtgenInput)
78gearbox = b2.register_module(
'Gearbox')
79main.add_module(gearbox)
81geometry = b2.register_module(
'Geometry')
82geometry.param(
'components', [
'BeamPipe',
'MagneticFieldConstant4LimitedRSVD',
84main.add_module(geometry)
94 setup_realClusters(main, usePXD=
True)
97 simpleClusterizer = b2.register_module(
'VXDSimpleClusterizer')
98 simpleClusterizer.param(
'setMeasSigma', 0)
99 simpleClusterizer.param(
'onlyPrimaries',
True)
101 if useEDeposit
is False:
102 simpleClusterizer.param(
'energyThresholdU', -0.0001)
103 simpleClusterizer.param(
'energyThresholdV', -0.0001)
104 simpleClusterizer.param(
'energyThreshold', -0.0001)
105 main.add_module(simpleClusterizer)
108setup_mcTF(path=main, nameOutput=
'mcTracks', usePXD=
False, logLevel=b2.LogLevel.INFO)
111rootOutput = b2.register_module(
'RootOutput')
112rootOutput.param(
'outputFileName',
"MyRootFile.root")
113main.add_module(rootOutput)
116b2.log_to_file(
'createSim.log', append=
False)