13 SVD Local Calibration Monitor Script
15 > open this file and edit the file:
17 . you can add also a local database uncommenting the relative line
18 Then execute the script:
19 > basf2 SVDLocalCalibrationMonitor.py --exp EXP --run RUN --local --cluster --cog
21 local -> local calibration (from xml)
22 cluster -> cluster parameters
23 cog -> cog calibration parameters
30 parser = argparse.ArgumentParser(description=
"SVD Calibration Monitor")
31 parser.add_argument(
'--exp', metavar=
'expNumber', dest=
'exp', type=int, nargs=1, help=
'Experiment Number')
32 parser.add_argument(
'--run', metavar=
'runNumber', dest=
'run', type=int, nargs=1, help=
'Run Number')
33 parser.add_argument(
'--local', dest=
'doLocal', action=
'store_const', const=
True,
34 default=
False, help=
'produce Local Calibration Monitor plots')
35 parser.add_argument(
'--cog6', dest=
'doCoG6', action=
'store_const', const=
True,
36 default=
False, help=
'produce CoG6 Calibration Monitor plots')
37 parser.add_argument(
'--cog3', dest=
'doCoG3', action=
'store_const', const=
True,
38 default=
False, help=
'produce CoG3 Calibration Monitor plots')
39 parser.add_argument(
'--els3', dest=
'doELS3', action=
'store_const', const=
True,
40 default=
False, help=
'produce ELS3 Calibration Monitor plots')
41 parser.add_argument(
'--cluster', dest=
'doCluster', action=
'store_const', const=
True,
42 default=
False, help=
'produce Cluster Calibration Monitor plots')
45 args = parser.parse_args()
50 b2.conditions.prepend_globaltag(
"online")
51 b2.conditions.prepend_globaltag(
"svd_basic")
52 b2.conditions.prepend_globaltag(
"data_reprocessing_prompt")
53 b2.conditions.prepend_globaltag(
"svd_onlySVDinGeoConfiguration")
57 if myLocalDB
is not None:
58 b2.conditions.testing_payloads = [str(myLocalDB)]
60 b2.B2INFO(
"No local DB provided, monitoring payloads from GTs.")
62 if myLocalDB
is not None:
63 filenameLocal =
"SVDLocalCalibrationMonitor_experiment" + \
64 str(ExpList[0]) +
"_run" + str(RunList[0]) +
"_fromLocalDB" + str(myLocalDB) +
".root"
65 filenameCoG =
"SVDCoGTimeCalibrationMonitor_experiment" + \
66 str(ExpList[0]) +
"_run" + str(RunList[0]) +
"_fromLocalDB" + str(myLocalDB) +
".root"
67 filenameCluster =
"SVDClusterCalibrationMonitor_experiment" + \
68 str(ExpList[0]) +
"_run" + str(RunList[0]) +
"_fromLocalDB" + str(myLocalDB) +
".root"
70 filenameLocal =
"SVDLocalCalibrationMonitor_experiment" + str(ExpList[0]) +
"_run" + str(RunList[0]) +
".root"
71 filenameCoG6 =
"SVDCoG6TimeCalibrationMonitor_experiment" + str(ExpList[0]) +
"_run" + str(RunList[0]) +
".root"
72 filenameCoG3 =
"SVDCoG3TimeCalibrationMonitor_experiment" + str(ExpList[0]) +
"_run" + str(RunList[0]) +
".root"
73 filenameELS3 =
"SVDELS3TimeCalibrationMonitor_experiment" + str(ExpList[0]) +
"_run" + str(RunList[0]) +
".root"
74 filenameCluster =
"SVDClusterCalibrationMonitor_experiment" + str(ExpList[0]) +
"_run" + str(RunList[0]) +
".root"
76 main = b2.create_path()
78 eventinfosetter = b2.register_module(
'EventInfoSetter')
79 eventinfosetter.param({
'evtNumList': [1],
'expList': ExpList,
'runList': RunList})
80 main.add_module(eventinfosetter)
81 main.add_module(
"Gearbox")
82 main.add_module(
"Geometry")
86 local = b2.register_module(
'SVDLocalCalibrationsMonitor')
87 local. param(
'outputFileName', filenameLocal)
88 main.add_module(local)
91 time = b2.register_module(
'SVDTimeCalibrationsMonitor')
92 time.set_name(
"SVDTimeCalibrationsMonitor_CoG6")
93 time.param(
'outputFileName', filenameCoG6)
94 time.param(
'timeAlgo',
"CoG6")
98 time = b2.register_module(
'SVDTimeCalibrationsMonitor')
99 time.set_name(
"SVDTimeCalibrationsMonitor_CoG3")
100 time.param(
'outputFileName', filenameCoG3)
101 time.param(
'timeAlgo',
"CoG3")
102 main.add_module(time)
105 time = b2.register_module(
'SVDTimeCalibrationsMonitor')
106 time.set_name(
"SVDTimeCalibrationsMonitor_ELS3")
107 time.param(
'outputFileName', filenameELS3)
108 time.param(
'timeAlgo',
"ELS3")
109 main.add_module(time)
112 cluster = b2.register_module(
'SVDClusterCalibrationsMonitor')
113 cluster. param(
'outputFileName', filenameCluster)
114 main.add_module(cluster)