37 larCollTimeMonAlg = helper.addAlgorithm(algoinstance,larColTime_hist_path+
'MonAlg')
39 collTimeGroupName=
"LArCollisionTimeMonGroup"
41 larCollTimeMonAlg.CollTimeGroupName=collTimeGroupName
45 timeUnit = Units.picosecond
46 larCollTimeMonAlg.TimeUnit = timeUnit
48 collTimeGroup = helper.addGroup(
55 from LArMonitoring.GlobalVariables
import lArDQGlobals
59 if timeUnit == Units.nanosecond:
63 collTimeGroup.defineHistogram(
'ecTimeDiff;LArCollTime',
64 title=
'LArCollisionTime - difference of avg time from ECC and ECA;<t_{C}> - <t_{A}> ('+timeUnitName+
');'+(
'Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.colTime_BinWidth/timeUnit))+timeUnitName,
66 path=larColTime_hist_path,
68 xbins=lArDQGlobals.colTime_Bins,xmin=lArDQGlobals.colTime_Min/timeUnit,xmax=lArDQGlobals.colTime_Max/timeUnit)
70 collTimeGroup.defineHistogram(
'ecTimeAvg;LArCollAvgTime',
71 title=
'LArCollisionAverageTime - avg time of ECC and ECA;(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+(
');Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.avgColTime_BinWidth/timeUnit))+timeUnitName,
73 path=larColTime_hist_path,
75 xbins=lArDQGlobals.avgColTime_Bins,xmin=lArDQGlobals.avgColTime_Min/timeUnit,xmax=lArDQGlobals.avgColTime_Max/timeUnit)
78 collTimeGroup.defineHistogram(
'ecTimeDiff;LArCollTimeLumiBlock',
79 title=
'LArCollisionTime - difference of avg time from ECC and ECA;<t_{C}> - <t_{A}> ('+timeUnitName+(
');Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.colTime_BinWidth/timeUnit))+timeUnitName,
81 path=larColTime_hist_path,
83 xbins=lArDQGlobals.colTime_Bins,xmin=lArDQGlobals.colTime_Min/timeUnit,xmax=lArDQGlobals.colTime_Max/timeUnit,
87 collTimeGroup.defineHistogram(
'lumi_block_timeWindow;LArCollTimeLumiBlockTimeCut',
88 title=
'Events with abs(<t_{C}> - <t_{A}>) < 10 ns as a function of LB;Luminosity Block Number;Number of events per LB',
90 path=larColTime_hist_path,
92 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
95 collTimeGroup.defineHistogram(
'lumi_block_singleBeam_timeWindow;LArCollTimeLumiBlockSingleBeamTimeCut',
96 title=
'Events with 20 ns < abs(<t_{C}> - <t_{A}>) < 30ns as a function of LB;Luminosity Block Number;Number of events per LB',
98 path=larColTime_hist_path,
100 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
103 collTimeGroup.defineHistogram(
'lumi_block,ecTimeDiff;LArCollTime_vs_LB',
104 title=
'LArCollisionTime Vs Luminosity Block - difference of avg time of ECC and ECA as a function of luminosity block;Luminosity Block Number;<t_{C}> - <t_{A}> ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
106 path=larColTime_hist_path,
108 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max,
109 ybins=lArDQGlobals.colTime_Bins,ymin=lArDQGlobals.colTime_Min/timeUnit,ymax=lArDQGlobals.colTime_Max/timeUnit)
112 collTimeGroup.defineHistogram(
'bunch_crossing_id,ecTimeDiff;LArCollTime_vs_BCID',
113 title=
'LArCollisionTime Vs BCID - difference of avg time of ECC and ECA as a function of BCID;Bunch Crossing Number;<t_{C}> - <t_{A}> ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
115 path=larColTime_hist_path,
117 xbins=lArDQGlobals.BCID_Bins,xmin=lArDQGlobals.BCID_Min,xmax=lArDQGlobals.BCID_Max,
118 ybins=lArDQGlobals.colTime_Bins,ymin=lArDQGlobals.colTime_Min/timeUnit,ymax=lArDQGlobals.colTime_Max/timeUnit)
120 collTimeGroup.defineHistogram(
'lumi_block,ecTimeAvg;LArCollAvgTime_vs_LB',
121 title=
'LArCollisionAvgTime Vs Luminosity Block - avg time of ECC and ECA as a function of luminosity block;Luminosity Block Number;(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
123 path=larColTime_hist_path,
125 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max,
126 ybins=lArDQGlobals.avgColTime_Bins,ymin=lArDQGlobals.avgColTime_Min/timeUnit,ymax=lArDQGlobals.avgColTime_Max/timeUnit)
128 collTimeGroup.defineHistogram(
'bunch_crossing_id,ecTimeAvg;LArCollAvgTime_vs_BCID',
129 title=
'LArCollisionAvgTime Vs BCID - avg time of ECC and ECA as a function of BCID;Bunch Crossing Number;(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
131 path=larColTime_hist_path,
133 xbins=lArDQGlobals.BCID_Bins,xmin=lArDQGlobals.BCID_Min,xmax=lArDQGlobals.BCID_Max,
134 ybins=lArDQGlobals.avgColTime_Bins,ymin=lArDQGlobals.avgColTime_Min/timeUnit,ymax=lArDQGlobals.avgColTime_Max/timeUnit)
138 if flags.Common.isOnline:
140 collTimeGroupName_intrain=collTimeGroupName+
"_intrain"
141 collTimeGroup_intrain = helper.addGroup(
143 collTimeGroupName_intrain,
146 larCollTimeMonAlg.InTrain_CollTimeGroupName=collTimeGroupName_intrain
148 intrain_title=
" inside the train"
149 intrain_name=
"_intrain"
151 collTimeGroup_intrain.defineHistogram(
'ecTimeDiff;LArCollTime'+intrain_name,
152 title=
'LArCollisionTime - difference of avg time from ECC and ECA'+intrain_title+
';<t_{C}> - <t_{A}> ('+timeUnitName+(
');Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.colTime_BinWidth/timeUnit))+timeUnitName,
154 path=larColTime_hist_path,
156 xbins=lArDQGlobals.colTime_Bins,xmin=lArDQGlobals.colTime_Min/timeUnit,xmax=lArDQGlobals.colTime_Max/timeUnit)
159 collTimeGroup_intrain.defineHistogram(
'ecTimeAvg;LArCollAvgTime'+intrain_name,
160 title=
'LArCollisionAverageTime - avg time of ECC and ECA'+intrain_title+
';(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+(
');Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.avgColTime_BinWidth/timeUnit))+timeUnitName,
162 path=larColTime_hist_path,
164 xbins=lArDQGlobals.avgColTime_Bins,xmin=lArDQGlobals.avgColTime_Min/timeUnit,xmax=lArDQGlobals.avgColTime_Max/timeUnit)
167 collTimeGroup_intrain.defineHistogram(
'ecTimeDiff;LArCollTimeLumiBlock'+intrain_name,
168 title=
'LArCollisionTime - difference of avg time from ECC and ECA;<t_{C}> - <t_{A}> ('+timeUnitName+
')'+intrain_title+(
';Number of events (weighted by energy/GeV) per %.2f ' % (lArDQGlobals.colTime_BinWidth/timeUnit))+timeUnitName,
170 path=larColTime_hist_path,
172 xbins=lArDQGlobals.colTime_Bins,xmin=lArDQGlobals.colTime_Min/timeUnit,xmax=lArDQGlobals.colTime_Max/timeUnit,
177 collTimeGroup_intrain.defineHistogram(
'(lumi_block_timeWindow);LArCollTimeLumiBlockTimeCut'+intrain_name,
178 title=
'Events with abs(<t_{C}> - <t_{A}>) < 10ns as a function of LB'+intrain_title+
';Luminosity Block Number;Number of events per LB',
179 path=larColTime_hist_path,
181 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
184 collTimeGroup_intrain.defineHistogram(
'(lumi_block_singleBeam_timeWindow);LArCollTimeLumiBlockSingleBeamTimeCut'+intrain_name,
185 title=
'Events with 20 ns < abs(<t_{C}> - <t_{A}>) < 30ns as a function of LB'+intrain_title+
';Luminosity Block Number;Number of events per LB',
187 path=larColTime_hist_path,
189 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
192 collTimeGroup_intrain.defineHistogram(
'lumi_block,ecTimeDiff;LArCollTime_vs_LB'+intrain_name,
193 title=
'LArCollisionTime Vs Luminosity Block - difference of avg time of ECC and ECA as a function of luminosity block;Luminosity Block Number'+intrain_title+
';<t_{C}> - <t_{A}> ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
195 path=larColTime_hist_path,
197 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max,
198 ybins=lArDQGlobals.colTime_Bins,ymin=lArDQGlobals.colTime_Min/timeUnit,ymax=lArDQGlobals.colTime_Max/timeUnit)
201 collTimeGroup_intrain.defineHistogram(
'bunch_crossing_id,ecTimeDiff;LArCollTime_vs_BCID'+intrain_name,
202 title=
'LArCollisionTime Vs BCID - difference of avg time of ECC and ECA as a function of BCID'+intrain_title+
';Bunch Crossing Number;<t_{C}> - <t_{A}> ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
204 path=larColTime_hist_path,
206 xbins=lArDQGlobals.BCID_Bins,xmin=lArDQGlobals.BCID_Min,xmax=lArDQGlobals.BCID_Max,
207 ybins=lArDQGlobals.colTime_Bins,ymin=lArDQGlobals.colTime_Min/timeUnit,ymax=lArDQGlobals.colTime_Max/timeUnit)
209 collTimeGroup_intrain.defineHistogram(
'lumi_block,ecTimeAvg;LArCollAvgTime_vs_LB'+intrain_name,
210 title=
'LArCollisionAvgTime Vs Luminosity Block - avg time of ECC and ECA as a function of luminosity block'+intrain_title+
';Luminosity Block Number;(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
212 path=larColTime_hist_path,
214 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max,
215 ybins=lArDQGlobals.avgColTime_Bins,ymin=lArDQGlobals.avgColTime_Min/timeUnit,ymax=lArDQGlobals.avgColTime_Max/timeUnit)
217 collTimeGroup_intrain.defineHistogram(
'bunch_crossing_id,ecTimeAvg;LArCollAvgTime_vs_BCID'+intrain_name,
218 title=
'LArCollisionAvgTime Vs BCID - avg time of ECC and ECA as a function of BCID'+intrain_title+
';Bunch Crossing Number;(<t_{C}> + <t_{A}>) / 2 ('+timeUnitName+
');Number of events (weighted by energy/GeV)',
220 path=larColTime_hist_path,
222 xbins=lArDQGlobals.BCID_Bins,xmin=lArDQGlobals.BCID_Min,xmax=lArDQGlobals.BCID_Max,
223 ybins=lArDQGlobals.avgColTime_Bins,ymin=lArDQGlobals.avgColTime_Min/timeUnit,ymax=lArDQGlobals.avgColTime_Max/timeUnit)