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