23outputFile =
'comparePDF.root'
26b2.set_log_level(b2.LogLevel.WARNING)
29main = b2.create_path()
32eventinfosetter = b2.register_module(
'EventInfoSetter')
33eventinfosetter.param(
'evtNumList', [1000])
34main.add_module(eventinfosetter)
37histo = b2.register_module(
'HistoManager')
38histo.param(
'histoFileName', outputFile)
42gearbox = b2.register_module(
'Gearbox')
43main.add_module(gearbox)
46geometry = b2.register_module(
'Geometry')
47geometry.param(
'useDB',
False)
48geometry.param(
'components', [
'MagneticField',
'TOP'])
49main.add_module(geometry)
52particlegun = b2.register_module(
'ParticleGun')
53particlegun.param(
'pdgCodes', [pdg])
54particlegun.param(
'nTracks', 1)
55particlegun.param(
'varyNTracks',
False)
56particlegun.param(
'momentumGeneration',
'fixed')
57particlegun.param(
'momentumParams', [p])
58particlegun.param(
'thetaGeneration',
'fixed')
59particlegun.param(
'thetaParams', [theta])
60particlegun.param(
'phiGeneration',
'fixed')
61particlegun.param(
'phiParams', [phi])
62particlegun.param(
'vertexGeneration',
'fixed')
63particlegun.param(
'xVertexParams', [0])
64particlegun.param(
'yVertexParams', [0])
65particlegun.param(
'zVertexParams', [0])
66particlegun.param(
'independentVertices',
False)
67main.add_module(particlegun)
70simulation = b2.register_module(
'FullSim')
71main.add_module(simulation)
74topdigi = b2.register_module(
'TOPDigitizer')
75topdigi.param(
'useWaveforms',
False)
76topdigi.param(
'simulateTTS',
False)
77topdigi.param(
'electronicJitter', 0.0)
78topdigi.param(
'timeZeroJitter', 0.0)
79main.add_module(topdigi)
82trackmaker = b2.register_module(
'TOPMCTrackMaker')
83main.add_module(trackmaker)
86toppdf = b2.register_module(
'TOPPDFChecker')
87main.add_module(toppdf)
90progress = b2.register_module(
'Progress')
91main.add_module(progress)