24from optparse
import OptionParser
25home = os.environ[
'BELLE2_LOCAL_DIR']
28b2.conditions.override_globaltags()
29b2.conditions.append_globaltag(
"332_COPY-OF_GT_gen_prod_004.11_Master-20171213-230000")
32parser = OptionParser()
37 default=
'/ghi/fs01/belle2/bdata/users/tkonno/cosmic/cosmic.0002.00951.HLT3.f00000.root')
38parser.add_option(
'-o',
'--output', dest=
'output', default=
'ARICHHits.root')
39parser.add_option(
'-d',
'--debug', dest=
'debug', default=0)
40parser.add_option(
'-s',
'--display', dest=
'display', default=0)
41(options, args) = parser.parse_args()
44main = b2.create_path()
45displ = b2.create_path()
49input_module = b2.register_module(
'RootInput')
50input_module.param(
'inputFileName', options.filename)
52main.add_module(input_module)
55histo = b2.register_module(
'HistoManager')
56histo.param(
'histoFileName',
"histograms.root")
61if int(options.display):
62 main.add_module(
'Gearbox')
63 geometry = b2.register_module(
'Geometry')
64 geometry.param(
'components', [
'ARICH'])
65 main.add_module(geometry)
68unPacker = b2.register_module(
'ARICHUnpacker')
69unPacker.param(
'debug', int(options.debug))
70main.add_module(unPacker)
73main.add_module(
'ARICHFillHits')
76arichHists = b2.register_module(
'ARICHDQM')
77arichHists.param(
'MaxHits', 40)
78arichHists.param(
'MinHits', 5)
79main.add_module(arichHists)
82if int(options.display):
83 display = b2.register_module(
'Display')
85 display.param(
'showARICHHits',
True)
87 display.param(
'fullGeometry',
True)
88 displ.add_module(display)
91output = b2.register_module(
'RootOutput')
92output.param(
'outputFileName', options.output)
93branches = [
'ARICHDigits',
'ARICHHits']
94output.param(
'branchNames', branches)
95main.add_module(output)
98main.add_module(
'Progress')
100arichHists.if_value(
'==1', displ)
109if not int(options.display):
110 com =
'root -l histograms.root ' + home +
'/arich/utility/scripts/plotDQM.C'