13 <contact>Luka Santelj</contact>
14 <description>This is a steering file to generate and analyze 10000 events used for ARICH
17 <output>../ARICHEvents.root</output>
22 from optparse
import OptionParser
23 from simulation
import add_simulation
24 from reconstruction
import add_mc_reconstruction
27 parser = OptionParser()
28 parser.add_option(
'-n',
'--nevents', dest=
'nevents', default=10000,
29 help=
'Number of events to process')
30 parser.add_option(
'-f',
'--file', dest=
'filename',
31 default=
'../ARICHEvents.root')
32 parser.add_option(
'-d',
'--debug', dest=
'debugLevel', default=10)
33 (options, args) = parser.parse_args()
34 nevents = int(options.nevents)
35 filename = options.filename
36 debugLevel = int(options.debugLevel)
39 b2.set_log_level(b2.LogLevel.INFO)
42 main = b2.create_path()
45 eventinfosetter = b2.register_module(
'EventInfoSetter')
46 eventinfosetter.param({
'evtNumList': [nevents]})
47 main.add_module(eventinfosetter)
50 particlegun = b2.register_module(
'ParticleGun')
52 b2.set_random_seed(123456)
54 particlegun.param(
'pdgCodes', [-211, 211, 321, -321])
56 particlegun.param(
'nTracks', 1)
59 particlegun.param(
'momentumGeneration',
'uniform')
60 particlegun.param(
'momentumParams', [3.0, 3.5])
63 particlegun.param(
'thetaGeneration',
'uniformCos')
64 particlegun.param(
'thetaParams', [17.0, 35.0])
65 particlegun.param(
'vertexGeneration',
'fixed')
66 particlegun.param(
'xVertexParams', [0.0, 0.0])
67 particlegun.param(
'yVertexParams', [0.0, 0.0])
68 particlegun.param(
'zVertexParams', [0.0, 0.0])
69 particlegun.param(
'independentVertices',
False)
71 b2.print_params(particlegun)
72 main.add_module(particlegun)
80 add_mc_reconstruction(main)
83 arichEfficiency = b2.register_module(
'ARICHNtuple')
84 arichEfficiency.logging.log_level = b2.LogLevel.DEBUG
85 arichEfficiency.logging.debug_level = debugLevel
86 arichEfficiency.param(
'outputFile', filename)
87 main.add_module(arichEfficiency)
90 progress = b2.register_module(
'Progress')
91 main.add_module(progress)