13 from beamparameters
import add_beamparameters
17 from VXDTF.setup_modules
import (setup_sim,
26 b2.set_log_level(b2.LogLevel.ERROR)
30 main = b2.create_path()
35 eventinfosetter = b2.register_module(
'EventInfoSetter')
38 eventinfoprinter = b2.register_module(
'EventInfoPrinter')
39 progress = b2.register_module(
'Progress')
41 main.add_module(eventinfosetter)
42 main.add_module(eventinfoprinter)
43 main.add_module(progress)
47 beamparameters = add_beamparameters(main,
"Y4S")
48 b2.print_params(beamparameters)
53 'pdgCodes': [13, -13],
55 'momentumGeneration':
'uniformPt',
56 'momentumParams': [0.1, 0.15],
57 'thetaGeneration':
'uniform',
58 'thetaParams': [60., 85.],
59 'phiGeneration':
'uniform',
60 'phiParams': [0., 90.],
61 'vertexGeneration':
'uniform',
62 'xVertexParams': [-0.1, 0.1],
63 'yVertexParams': [-0.1, 0.1],
64 'zVertexParams': [-0.5, 0.5],
67 particlegun = b2.register_module(
'ParticleGun')
68 particlegun.logging.log_level = b2.LogLevel.WARNING
69 particlegun.param(param_pGun)
70 main.add_module(particlegun)
74 evtgenInput = b2.register_module(
'EvtGenInput')
75 evtgenInput.logging.log_level = b2.LogLevel.WARNING
76 main.add_module(evtgenInput)
79 gearbox = b2.register_module(
'Gearbox')
80 main.add_module(gearbox)
82 geometry = b2.register_module(
'Geometry')
83 geometry.param(
'components', [
'BeamPipe',
'MagneticFieldConstant4LimitedRSVD',
85 main.add_module(geometry)
90 main.add_module(g4sim)
95 setup_realClusters(main, usePXD=
True)
98 simpleClusterizer = b2.register_module(
'VXDSimpleClusterizer')
99 simpleClusterizer.param(
'setMeasSigma', 0)
100 simpleClusterizer.param(
'onlyPrimaries',
True)
102 if useEDeposit
is False:
103 simpleClusterizer.param(
'energyThresholdU', -0.0001)
104 simpleClusterizer.param(
'energyThresholdV', -0.0001)
105 simpleClusterizer.param(
'energyThreshold', -0.0001)
106 main.add_module(simpleClusterizer)
109 setup_mcTF(path=main, nameOutput=
'mcTracks', usePXD=
False, logLevel=b2.LogLevel.INFO)
112 rootOutput = b2.register_module(
'RootOutput')
113 rootOutput.param(
'outputFileName',
"MyRootFile.root")
114 main.add_module(rootOutput)
117 b2.log_to_file(
'createSim.log', append=
False)