26from optparse
import OptionParser
27home = os.environ[
'BELLE2_LOCAL_DIR']
30parser = OptionParser()
31parser.add_option(
'-f',
'--file', dest=
'filename', default=
'ARICHHits.root')
32parser.add_option(
'-s',
'--display', dest=
'display', default=0)
33parser.add_option(
'-a',
'--arichtrk', dest=
'arichtrk', default=0)
34parser.add_option(
'-r',
'--recon', dest=
'recon', default=1)
35parser.add_option(
'-o',
'--output', dest=
'output', default=
'arich_recon_ntuple.root')
36(options, args) = parser.parse_args()
39main = b2.create_path()
40displ = b2.create_path()
43input_module = b2.register_module(
'RootInput')
44input_module.param(
'inputFileName', options.filename)
45main.add_module(input_module)
48histo = b2.register_module(
'HistoManager')
49histo.param(
'histoFileName',
"histograms.root")
53if int(options.display):
54 main.add_module(
'Gearbox')
55 geometry = b2.register_module(
'Geometry')
56 geometry.param(
'components', [
'ARICH',
'MagneticField'])
57 main.add_module(geometry)
60 arichHits = b2.register_module(
'ARICHFillHits')
61 arichHits.param(
'MagFieldCorrection', 1)
62 main.add_module(arichHits)
63 arichreco = b2.register_module(
'ARICHReconstructor')
64 arichreco.param(
'storePhotons', 1)
65 arichreco.param(
'useAlignment', 1)
66 main.add_module(arichreco)
67 arichNtuple = b2.register_module(
'ARICHNtuple')
68 arichNtuple.param(
'outputFile', options.output)
69 main.add_module(arichNtuple)
73arichHists = b2.register_module(
'ARICHDQM')
74arichHists.param(
'ArichEvents', bool(options.arichtrk))
76arichHists.param(
'MaxHits', 100)
77arichHists.param(
'MinHits', 0)
78main.add_module(arichHists)
81if int(options.display):
82 display = b2.register_module(
'Display')
84 display.param(
'showARICHHits',
True)
86 display.param(
'showRecoTracks',
True)
88 display.param(
'fullGeometry',
True)
89 displ.add_module(display)
93main.add_module(
'Progress')
95arichHists.if_value(
'==1', displ)
104if not int(options.display):
105 com =
'root -l histograms.root ' + home +
'/arich/utility/scripts/plotDQM.C'