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