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