5 from optparse
import OptionParser
8 parser = OptionParser()
9 parser.add_option(
'-n',
'--nevents', dest=
'nevents', default=100,
10 help=
'Number of events to process')
11 parser.add_option(
'-f',
'--file', dest=
'filename', default=
'ARICHDQM.root')
12 parser.add_option(
'-d',
'--debug', dest=
'debugLevel', default=10)
13 parser.add_option(
'-s',
'--seed', dest=
'seed', default=111111)
14 (options, args) = parser.parse_args()
16 nevents = int(options.nevents)
17 debugLevel = int(options.debugLevel)
18 seed = int(options.seed)
20 set_log_level(LogLevel.INFO)
22 home = os.environ[
'BELLE2_LOCAL_DIR']
24 use_local_database(home +
"/arich/database/cosmicTest_payloads/cosmicTest_database.txt",
25 home +
"/arich/database/cosmicTest_payloads")
31 main.add_module(
'EventInfoSetter', evtNumList=nevents, logLevel=LogLevel.DEBUG)
34 histo = register_module(
'HistoManager')
35 histo.param(
'histoFileName', options.filename)
36 main.add_module(histo)
40 gearbox = register_module(
'Gearbox')
41 main.add_module(gearbox)
44 geometry = register_module(
'Geometry')
45 geometry.param(
'components', [
'ARICH'])
47 geometry.param(
'useDB', 1)
48 main.add_module(geometry)
51 particlegun = register_module(
'ParticleGun')
55 particlegun.param(
'pdgCodes', [11])
57 particlegun.param(
'nTracks', 1)
62 particlegun.param(
'momentumGeneration',
'fixed')
63 particlegun.param(
'momentumParams', [5.0])
65 particlegun.param(
'thetaGeneration',
'fixed')
66 particlegun.param(
'thetaParams', [95.])
67 particlegun.param(
'phiGeneration',
'fixed')
68 particlegun.param(
'phiParams', [270])
71 particlegun.param(
'vertexGeneration',
'fixed')
73 particlegun.param(
'xVertexParams', [-43.88])
74 particlegun.param(
'yVertexParams', [10.0])
75 particlegun.param(
'zVertexParams', [-40.0])
77 print_params(particlegun)
78 main.add_module(particlegun)
83 simulation = register_module(
'FullSim')
84 simulation.param(
'StoreOpticalPhotons',
True)
87 simulation.param(
'PhotonFraction', 0.45)
88 main.add_module(simulation)
91 arichDIGI = register_module(
'ARICHDigitizer')
92 arichDIGI.param(
'BackgroundHits', 0)
93 main.add_module(arichDIGI)
96 arichHits = register_module(
'ARICHFillHits')
97 main.add_module(arichHits)
100 arichDQM = register_module(
'ARICHDQM')
101 main.add_module(arichDQM)
118 progress = register_module(
'Progress')
119 main.add_module(progress)
128 com =
'root -l ' + options.filename +
' ' + home +
'/arich/utility/scripts/plotDQM.C'