24 outputFile =
'comparePDF.root'
27 b2.set_log_level(b2.LogLevel.WARNING)
30 main = b2.create_path()
33 eventinfosetter = b2.register_module(
'EventInfoSetter')
34 eventinfosetter.param(
'evtNumList', [1000])
35 main.add_module(eventinfosetter)
38 histo = b2.register_module(
'HistoManager')
39 histo.param(
'histoFileName', outputFile)
40 main.add_module(histo)
43 gearbox = b2.register_module(
'Gearbox')
44 main.add_module(gearbox)
47 geometry = b2.register_module(
'Geometry')
48 geometry.param(
'useDB',
False)
49 geometry.param(
'components', [
'MagneticField',
'TOP'])
50 main.add_module(geometry)
53 particlegun = b2.register_module(
'ParticleGun')
54 particlegun.param(
'pdgCodes', [pdg])
55 particlegun.param(
'nTracks', 1)
56 particlegun.param(
'varyNTracks',
False)
57 particlegun.param(
'momentumGeneration',
'fixed')
58 particlegun.param(
'momentumParams', [p])
59 particlegun.param(
'thetaGeneration',
'fixed')
60 particlegun.param(
'thetaParams', [theta])
61 particlegun.param(
'phiGeneration',
'fixed')
62 particlegun.param(
'phiParams', [phi])
63 particlegun.param(
'vertexGeneration',
'fixed')
64 particlegun.param(
'xVertexParams', [0])
65 particlegun.param(
'yVertexParams', [0])
66 particlegun.param(
'zVertexParams', [0])
67 particlegun.param(
'independentVertices',
False)
68 main.add_module(particlegun)
71 simulation = b2.register_module(
'FullSim')
72 main.add_module(simulation)
75 topdigi = b2.register_module(
'TOPDigitizer')
76 topdigi.param(
'useWaveforms',
False)
77 topdigi.param(
'simulateTTS',
False)
78 topdigi.param(
'electronicJitter', 0.0)
79 topdigi.param(
'timeZeroJitter', 0.0)
80 main.add_module(topdigi)
83 trackmaker = b2.register_module(
'TOPMCTrackMaker')
84 main.add_module(trackmaker)
87 toppdf = b2.register_module(
'TOPPDFChecker')
88 main.add_module(toppdf)
91 progress = b2.register_module(
'Progress')
92 main.add_module(progress)