13 from simulation
import add_simulation
14 from reconstruction
import add_reconstruction
16 import PXDROIUnpackerModule
20 parser = argparse.ArgumentParser(
21 description=
"VXD DQM Belle II for Phase 2 (Exp=1), Phase 3 Early (Exp=2) and Phase 3 regular (Exp=3), show all possible histos")
22 parser.add_argument(
'--experiment-type', dest=
'ExperimentType', action=
'store',
24 help=
'Set which experiment you want: 1 (Phase 2), 2 (Phase 3 Early) or 3 (Phase 3 regular), default = 2')
26 args = parser.parse_args()
28 print(
"Final setting of arguments: ")
29 print(
" ExperimentType: ", args.ExperimentType)
38 output_filename =
"RootOutput.root"
39 if (args.ExperimentType == 1):
40 output_filename =
"RootOutput_Phase2.root"
41 if (args.ExperimentType == 2):
42 output_filename =
"RootOutput_Phase3Early.root"
43 if (args.ExperimentType == 3):
44 output_filename =
"RootOutput_Phase3.root"
47 main = b2.create_path()
49 if (args.ExperimentType == 1):
51 main.add_module(
"EventInfoSetter", expList=1002, runList=1, evtNumList=num_events)
52 if (args.ExperimentType == 2):
54 main.add_module(
"EventInfoSetter", expList=1003, runList=1, evtNumList=num_events)
55 if (args.ExperimentType == 3):
57 main.add_module(
"EventInfoSetter", evtNumList=num_events)
63 main.add_module(
'EvtGenInput')
66 add_simulation(main, bkgfiles=bg)
72 PXDPACKER = b2.register_module(
'PXDPacker')
76 PXDPACKER.param(
'dhe_to_dhc', [
77 [0, 2, 4, 34, 36, 38],
78 [1, 6, 8, 40, 42, 44],
79 [2, 10, 12, 46, 48, 50],
80 [3, 14, 16, 52, 54, 56],
81 [4, 3, 5, 35, 37, 39],
82 [5, 7, 9, 41, 43, 45],
83 [6, 11, 13, 47, 49, 51],
84 [7, 15, 17, 53, 55, 57],
86 main.add_module(PXDPACKER)
88 main.add_module(
'PXDUnpacker')
89 '''Unpack ROIs from ONSEN output'''
91 '''Unpack ROIs from HLT Payload (depends if there are in the sroot file)'''
95 add_reconstruction(main)
99 Histos_filename =
"Histos_DQMVXD.root"
100 if (args.ExperimentType == 1):
101 Histos_filename =
"Histos_DQMVXD_Phase2.root"
102 if (args.ExperimentType == 2):
103 Histos_filename =
"Histos_DQMVXD_Phase3Early.root"
104 if (args.ExperimentType == 3):
105 Histos_filename =
"Histos_DQMVXD_Phase3.root"
106 main.add_module(
'HistoManager', histoFileName=Histos_filename)
108 main.add_module(
'PXDDAQDQM', histogramDirectoryName=
'PXDDAQ')
109 main.add_module(
'PXDDQMClusters', histogramDirectoryName=
'PXDCls')
110 main.add_module(
'PXDDQMCorr', histogramDirectoryName=
'PXDCor')
111 main.add_module(
'PXDDQMEfficiency', histogramDirectoryName=
'PXDEff')
113 main.add_module(
'PXDRawDQMChips', histogramDirectoryName=
'PXDRCh')
114 main.add_module(
'PXDRawDQMCorr', histogramDirectoryName=
'PXDRCo')
115 main.add_module(
'PXDRawDQM', histogramDirectoryName=
'PXDRaw')
116 main.add_module(
'PXDROIDQM', histogramDirectoryName=
'PXDROI')
118 pxddqmExpReco = b2.register_module(
'PXDDQMExpressReco')
119 svddqmExpReco = b2.register_module(
'SVDDQMExpressReco')
120 vxddqmExpReco = b2.register_module(
'VXDDQMExpressReco')
122 main.add_module(pxddqmExpReco)
123 main.add_module(svddqmExpReco)
124 main.add_module(vxddqmExpReco)
127 trackDQM = main.add_module(
'TrackDQM')