33 verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
34 denomIsTech_(ps.getUntrackedParameter<
bool>(
"denomIsTech",
true)),
35 denomBit_(ps.getUntrackedParameter<unsigned
int>(
"denomBit", 40)),
36 muonBit_(ps.getUntrackedParameter<unsigned
int>(
"muonBit", 55)),
37 egammaBit_(ps.getUntrackedParameter<unsigned
int>(
"egammaBit", 46)),
38 jetBit_(ps.getUntrackedParameter<unsigned
int>(
"jetBit", 15)) {
64 orbitNum = iBooker.
book1D(
"Orbit_Number",
"Orbit_Number", maxNbins, -0.5,
double(maxNbins) - 0.5);
65 trigNum = iBooker.
book1D(
"Number_of_Triggers",
"Number_of_Triggers", 1000, 0, 4E4);
67 eventNum = iBooker.
book1D(
"Number_of_Events",
"Number_of_Events", maxNbins, -0.5,
double(maxNbins) - 0.5);
69 physTrig = iBooker.
book1D(
"Physics_Triggers",
"Physics_Triggers", maxNbins, -0.5,
double(maxNbins) - 0.5);
72 randTrig = iBooker.
book1D(
"Random_Triggers",
"Random_Triggers", maxNbins, -0.5,
double(maxNbins) - 0.5);
74 numberResets = iBooker.
book1D(
"Number_Resets",
"Number_Resets", maxNbins, -0.5,
double(maxNbins) - 0.5);
75 deadTime = iBooker.
book1D(
"DeadTime",
"DeadTime", maxNbins, -0.5,
double(maxNbins) - 0.5);
77 iBooker.
book1D(
"Lost_Final_Trigger",
"Lost_Final_Trigger", maxNbins, -0.5,
double(maxNbins) - 0.5);
80 physRate = iBooker.
book1D(
"Physics_Trigger_Rate",
"Physics_Trigger_Rate", maxNbins, -0.5,
double(maxNbins) - 0.5);
81 randRate = iBooker.
book1D(
"Random_Trigger_Rate",
"Random_Trigger_Rate", maxNbins, -0.5,
double(maxNbins) - 0.5);
82 deadTimePercent = iBooker.
book1D(
"Deadtime_Percent",
"Deadtime_Percent", maxNbins, -0.5,
double(maxNbins) - 0.5);
84 iBooker.
book1D(
"Lost_Physics_Trigger_Rate",
"Lost_Physics_Trigger_Rate", maxNbins, -0.5,
double(maxNbins) - 0.5);
86 "Lost_Physics_Trigger_Rate_Beam_Active",
89 double(maxNbins) - 0.5);
98 iBooker.
setCurrentFolder(
"L1T/L1TScalersSCAL/Level1TriggerRates/AlgorithmRates");
100 sprintf(hname,
"Rate_AlgoBit_%03d",
i);
101 sprintf(mename,
"Rate_AlgoBit _%03d",
i);
102 algoRate[
i] = iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
106 iBooker.
setCurrentFolder(
"L1T/L1TScalersSCAL/Level1TriggerRates/AlgorithmRates/Integrated");
108 sprintf(hname,
"Integral_AlgoBit_%03d",
i);
109 sprintf(mename,
"Integral_AlgoBit _%03d",
i);
114 iBooker.
setCurrentFolder(
"L1T/L1TScalersSCAL/Level1TriggerRates/TechnicalRates");
116 sprintf(hname,
"Rate_TechBit_%03d",
i);
117 sprintf(mename,
"Rate_TechBit _%03d",
i);
118 techRate[
i] = iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
122 iBooker.
setCurrentFolder(
"L1T/L1TScalersSCAL/Level1TriggerRates/TechnicalRates/Integrated");
124 sprintf(hname,
"Integral_TechBit_%03d",
i);
125 sprintf(mename,
"Integral_TechBit _%03d",
i);
130 "Integral_TechBit_042_OR_043",
"Integral_TechBit _042_OR_043", maxNbins, -0.5,
double(maxNbins) - 0.5);
134 std::stringstream smu, seg, sjet, sdenom;
137 sdenom <<
"_TechBit_";
139 sdenom <<
"_AlgoBit_";
144 "Rate_Ratio_mu_PhysBit_" + smu.str() + sdenom.str(),
147 double(maxNbins) - 0.5);
152 "Rate_Ratio_egamma_PhysBit_" + seg.str() + sdenom.str(),
155 double(maxNbins) - 0.5);
160 "Rate_Ratio_jet_PhysBit_" + sjet.str() + sdenom.str(),
163 double(maxNbins) - 0.5);
168 "Rate_Ratio_TechBit_8" + sdenom.str(),
171 double(maxNbins) - 0.5);
173 "Rate_Ratio_TechBit_9" + sdenom.str(),
176 double(maxNbins) - 0.5);
178 "Rate_Ratio_TechBit_10" + sdenom.str(),
181 double(maxNbins) - 0.5);
184 "Rate_Ratio_TechBits_33_over_32",
"Rate_Ratio_TechBits_33_over_32", maxNbins, -0.5,
double(maxNbins) - 0.5);
186 "Rate_Ratio_TechBit_36" + sdenom.str(),
189 double(maxNbins) - 0.5);
191 "Rate_Ratio_TechBit_37" + sdenom.str(),
194 double(maxNbins) - 0.5);
196 "Rate_Ratio_TechBit_38" + sdenom.str(),
199 double(maxNbins) - 0.5);
201 "Rate_Ratio_TechBit_39" + sdenom.str(),
204 double(maxNbins) - 0.5);
206 "Rate_Ratio_TechBit_40" + sdenom.str(),
209 double(maxNbins) - 0.5);
211 "Rate_Ratio_TechBit_41" + sdenom.str(),
214 double(maxNbins) - 0.5);
216 "Rate_Ratio_TechBit_42" + sdenom.str(),
219 double(maxNbins) - 0.5);
221 "Rate_Ratio_TechBit_43" + sdenom.str(),
224 double(maxNbins) - 0.5);
227 instLumi = iBooker.
book1D(
"Instant_Lumi",
"Instant_Lumi", maxNbins, -0.5,
double(maxNbins) - 0.5);
228 instLumiErr = iBooker.
book1D(
"Instant_Lumi_Err",
"Instant_Lumi_Err", maxNbins, -0.5,
double(maxNbins) - 0.5);
229 instLumiQlty = iBooker.
book1D(
"Instant_Lumi_Qlty",
"Instant_Lumi_Qlty", maxNbins, -0.5,
double(maxNbins) - 0.5);
230 instEtLumi = iBooker.
book1D(
"Instant_Et_Lumi",
"Instant_Et_Lumi", maxNbins, -0.5,
double(maxNbins) - 0.5);
231 instEtLumiErr = iBooker.
book1D(
"Instant_Et_Lumi_Err",
"Instant_Et_Lumi_Err", maxNbins, -0.5,
double(maxNbins) - 0.5);
233 iBooker.
book1D(
"Instant_Et_Lumi_Qlty",
"Instant_Et_Lumi_Qlty", maxNbins, -0.5,
double(maxNbins) - 0.5);
234 startOrbit = iBooker.
book1D(
"Start_Orbit",
"Start_Orbit", maxNbins, -0.5,
double(maxNbins) - 0.5);
235 numOrbits = iBooker.
book1D(
"Num_Orbits",
"Num_Orbits", maxNbins, -0.5,
double(maxNbins) - 0.5);
238 for (
int i = 0;
i < 4;
i++) {
239 sprintf(hname,
"OrbitNumber_L1A_%d",
i + 1);
240 sprintf(mename,
"OrbitNumber_L1A_%d",
i + 1);
242 sprintf(hname,
"Bunch_Crossing_L1A_%d",
i + 1);
243 sprintf(mename,
"Bunch_Crossing_L1A_%d",
i + 1);
256 for (
int j = 0;
j < 3;
j++) {
257 sprintf(hname,
"BX_Correlation_%d",
j + 1);
258 sprintf(mename,
"BX_Correlation_%d",
j + 1);
261 sprintf(hname,
"Bunch_Crossing_Diff_%d",
j + 1);
262 sprintf(mename,
"Bunch_Crossing_Diff_%d",
j + 1);
264 sprintf(hname,
"Bunch_Crossing_Diff_small_%d",
j + 1);
265 sprintf(mename,
"Bunch_Crossing_Diff_small_%d",
j + 1);
291 double evtLumi =
iEvent.luminosityBlock();
294 if (!(
a &&
c &&
d)) {
295 LogInfo(
"Status") <<
"getByToken failed";
297 Level1TriggerScalersCollection::const_iterator it = triggerScalers->begin();
298 if (!triggerScalers->empty()) {
299 unsigned int lumisection = it->lumiSegmentNr();
300 struct timespec thetime = it->collectionTime();
317 currenttime = thetime.tv_sec -
reftime_;
318 int timebin = (
int)(currenttime / 30) + 1;
330 (evtLumi > 1 || evtLumi == lumisection + 1))) {
346 if ((
i == 42 ||
i == 43))
393 LumiScalersCollection::const_iterator it3 =
lumiScalers->begin();
395 unsigned int lumisection = it3->sectionNumber();
409 unsigned int bx_current = 0, orbitnumber_current = 0, bxdiff = 0;
411 for (L1AcceptBunchCrossingCollection::const_iterator it4 = bunchCrossings->begin(); it4 != bunchCrossings->end();
413 l1accept =
std::abs(it4->l1AcceptOffset());
415 orbitnumber_current = it4->orbitNumber();
418 bx_current = it4->bunchCrossing();
420 }
else if (l1accept == 1 || l1accept == 2 || l1accept == 3) {
424 bxdiff = 3564 * (orbitnumber_current - it4->orbitNumber()) + bx_current - it4->bunchCrossing();
double triggersPhysicsLostRate() const
virtual void setCurrentFolder(std::string const &fullpath)
double l1AsRandomRate() const
double deadtimePercent() const
Abs< T >::type abs(const T &t)
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
std::vector< double > gtAlgoCountsRate() const
Log< level::Info, false > LogInfo
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< Level1TriggerScalers > Level1TriggerScalersCollection
std::vector< double > gtTechCountsRate() const
double triggersPhysicsLostBeamActiveRate() const
std::vector< LumiScalers > LumiScalersCollection
double l1AsPhysicsRate() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)