12from optparse
import OptionParser
13from tracking
import add_tracking_reconstruction
14from simulation
import add_simulation
21parser = OptionParser()
22parser.add_option(
'-n',
'--nevents', dest=
'nevents', default=1000,
23 help=
'Number of events to process')
24parser.add_option(
'-f',
'--file', dest=
'filename',
25 default=
'ARICHEvents.root')
26(options, args) = parser.parse_args()
28home = os.environ[
'BELLE2_LOCAL_DIR']
36b2.set_log_level(b2.LogLevel.ERROR)
39main = b2.create_path()
42eventinfosetter = b2.register_module(
'EventInfoSetter')
43eventinfosetter.param({
'evtNumList': [int(options.nevents)],
'runList': [1]})
44main.add_module(eventinfosetter)
47histo = b2.register_module(
'HistoManager')
48histo.param(
'histoFileName',
'DQMhistograms.root')
52particlegun = b2.register_module(
'ParticleGun')
53particlegun.param(
'pdgCodes', [211, -211, 321, -321])
54particlegun.param(
'nTracks', 1)
56particlegun.param(
'momentumGeneration',
'uniform')
57particlegun.param(
'momentumParams', [0.5, 4])
58particlegun.param(
'thetaGeneration',
'uniformCos')
59particlegun.param(
'thetaParams', [17, 35])
60particlegun.param(
'phiGeneration',
'uniform')
61particlegun.param(
'phiParams', [0, 360])
62particlegun.param(
'vertexGeneration',
'fixed')
63particlegun.param(
'xVertexParams', [0])
64particlegun.param(
'yVertexParams', [0])
65particlegun.param(
'zVertexParams', [0])
66particlegun.param(
'independentVertices',
False)
67main.add_module(particlegun)
70add_simulation(main, usePXDDataReduction=
False)
72add_tracking_reconstruction(main)
78main.add_module(
'ARICHFillHits')
82arichreco = b2.register_module(
'ARICHReconstructor')
84arichreco.param(
'storePhotons', 1)
85main.add_module(arichreco)
89arichNtuple = b2.register_module(
'ARICHNtuple')
90arichNtuple.param(
'outputFile', options.filename)
91main.add_module(arichNtuple)
95main.add_module(
'ARICHDQM')
109main.add_module(
'Progress')
118com =
'root -l ' + options.filename +
' ' + home +
'/arich/utility/scripts/plotEfficiency.C'