30 : scalersSource_(ps.getParameter<edm::
InputTag>(
"scalersResults")),
31 verbose_(ps.getUntrackedParameter<bool>(
"verbose",
false)),
32 denomIsTech_(ps.getUntrackedParameter<bool>(
"denomIsTech",
true)),
33 denomBit_(ps.getUntrackedParameter<unsigned int>(
"denomBit", 40)),
34 muonBit_(ps.getUntrackedParameter<unsigned int>(
"muonBit", 55)),
35 egammaBit_(ps.getUntrackedParameter<unsigned int>(
"egammaBit", 46)),
36 jetBit_(ps.getUntrackedParameter<unsigned int>(
"jetBit", 15)) {
63 orbitNum = iBooker.
book1D(
"Orbit_Number",
"Orbit_Number", maxNbins, -0.5,
64 double(maxNbins) - 0.5);
66 iBooker.
book1D(
"Number_of_Triggers",
"Number_of_Triggers", 1000, 0, 4E4);
68 eventNum = iBooker.
book1D(
"Number_of_Events",
"Number_of_Events", maxNbins,
69 -0.5,
double(maxNbins) - 0.5);
71 physTrig = iBooker.
book1D(
"Physics_Triggers",
"Physics_Triggers", maxNbins,
72 -0.5,
double(maxNbins) - 0.5);
75 randTrig = iBooker.
book1D(
"Random_Triggers",
"Random_Triggers", maxNbins,
76 -0.5,
double(maxNbins) - 0.5);
79 -0.5,
double(maxNbins) - 0.5);
81 double(maxNbins) - 0.5);
83 maxNbins, -0.5,
double(maxNbins) - 0.5);
86 physRate = iBooker.
book1D(
"Physics_Trigger_Rate",
"Physics_Trigger_Rate",
87 maxNbins, -0.5,
double(maxNbins) - 0.5);
88 randRate = iBooker.
book1D(
"Random_Trigger_Rate",
"Random_Trigger_Rate",
89 maxNbins, -0.5,
double(maxNbins) - 0.5);
91 maxNbins, -0.5,
double(maxNbins) - 0.5);
93 iBooker.
book1D(
"Lost_Physics_Trigger_Rate",
"Lost_Physics_Trigger_Rate",
94 maxNbins, -0.5,
double(maxNbins) - 0.5);
96 iBooker.
book1D(
"Lost_Physics_Trigger_Rate_Beam_Active",
97 "Lost_Physics_Trigger_Rate_Beam_Active", maxNbins, -0.5,
98 double(maxNbins) - 0.5);
102 iBooker.
book1D(
"instEventRate",
"instEventRate", 1000, 0, 4E4);
109 "L1T/L1TScalersSCAL/Level1TriggerRates/AlgorithmRates");
111 sprintf(hname,
"Rate_AlgoBit_%03d",
i);
112 sprintf(mename,
"Rate_AlgoBit _%03d",
i);
114 iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
119 "L1T/L1TScalersSCAL/Level1TriggerRates/AlgorithmRates/Integrated");
121 sprintf(hname,
"Integral_AlgoBit_%03d",
i);
122 sprintf(mename,
"Integral_AlgoBit _%03d",
i);
124 iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
129 "L1T/L1TScalersSCAL/Level1TriggerRates/TechnicalRates");
131 sprintf(hname,
"Rate_TechBit_%03d",
i);
132 sprintf(mename,
"Rate_TechBit _%03d",
i);
134 iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
139 "L1T/L1TScalersSCAL/Level1TriggerRates/TechnicalRates/Integrated");
141 sprintf(hname,
"Integral_TechBit_%03d",
i);
142 sprintf(mename,
"Integral_TechBit _%03d",
i);
144 iBooker.
book1D(hname, mename, maxNbins, -0.5,
double(maxNbins) - 0.5);
148 "Integral_TechBit_042_OR_043",
"Integral_TechBit _042_OR_043", maxNbins,
149 -0.5,
double(maxNbins) - 0.5);
153 std::stringstream smu, seg, sjet, sdenom;
156 sdenom <<
"_TechBit_";
158 sdenom <<
"_AlgoBit_";
163 iBooker.
book1D(
"Rate_Ratio_mu_PhysBit_" + smu.str() + sdenom.str(),
164 "Rate_Ratio_mu_PhysBit_" + smu.str() + sdenom.str(),
165 maxNbins, -0.5, double(maxNbins) - 0.5);
170 iBooker.
book1D(
"Rate_Ratio_egamma_PhysBit_" + seg.str() + sdenom.str(),
171 "Rate_Ratio_egamma_PhysBit_" + seg.str() + sdenom.str(),
172 maxNbins, -0.5, double(maxNbins) - 0.5);
177 iBooker.
book1D(
"Rate_Ratio_jet_PhysBit_" + sjet.str() + sdenom.str(),
178 "Rate_Ratio_jet_PhysBit_" + sjet.str() + sdenom.str(),
179 maxNbins, -0.5, double(maxNbins) - 0.5);
184 "Rate_Ratio_TechBit_8" + sdenom.str(),
185 maxNbins, -0.5, double(maxNbins) - 0.5);
187 "Rate_Ratio_TechBit_9" + sdenom.str(),
188 maxNbins, -0.5, double(maxNbins) - 0.5);
190 "Rate_Ratio_TechBit_10" + sdenom.str(),
191 maxNbins, -0.5, double(maxNbins) - 0.5);
194 "Rate_Ratio_TechBits_33_over_32",
"Rate_Ratio_TechBits_33_over_32",
195 maxNbins, -0.5,
double(maxNbins) - 0.5);
197 "Rate_Ratio_TechBit_36" + sdenom.str(),
198 maxNbins, -0.5, double(maxNbins) - 0.5);
200 "Rate_Ratio_TechBit_37" + sdenom.str(),
201 maxNbins, -0.5, double(maxNbins) - 0.5);
203 "Rate_Ratio_TechBit_38" + sdenom.str(),
204 maxNbins, -0.5, double(maxNbins) - 0.5);
206 "Rate_Ratio_TechBit_39" + sdenom.str(),
207 maxNbins, -0.5, double(maxNbins) - 0.5);
209 "Rate_Ratio_TechBit_40" + sdenom.str(),
210 maxNbins, -0.5, double(maxNbins) - 0.5);
212 "Rate_Ratio_TechBit_41" + sdenom.str(),
213 maxNbins, -0.5, double(maxNbins) - 0.5);
215 "Rate_Ratio_TechBit_42" + sdenom.str(),
216 maxNbins, -0.5, double(maxNbins) - 0.5);
218 "Rate_Ratio_TechBit_43" + sdenom.str(),
219 maxNbins, -0.5, double(maxNbins) - 0.5);
222 instLumi = iBooker.
book1D(
"Instant_Lumi",
"Instant_Lumi", maxNbins, -0.5,
223 double(maxNbins) - 0.5);
225 -0.5,
double(maxNbins) - 0.5);
227 maxNbins, -0.5,
double(maxNbins) - 0.5);
229 -0.5,
double(maxNbins) - 0.5);
231 maxNbins, -0.5,
double(maxNbins) - 0.5);
233 iBooker.
book1D(
"Instant_Et_Lumi_Qlty",
"Instant_Et_Lumi_Qlty", maxNbins,
234 -0.5,
double(maxNbins) - 0.5);
236 double(maxNbins) - 0.5);
238 double(maxNbins) - 0.5);
241 for (
int i = 0;
i < 4;
i++) {
242 sprintf(hname,
"OrbitNumber_L1A_%d",
i + 1);
243 sprintf(mename,
"OrbitNumber_L1A_%d",
i + 1);
245 sprintf(hname,
"Bunch_Crossing_L1A_%d",
i + 1);
246 sprintf(mename,
"Bunch_Crossing_L1A_%d",
i + 1);
259 for (
int j = 0;
j < 3;
j++) {
260 sprintf(hname,
"BX_Correlation_%d",
j + 1);
261 sprintf(mename,
"BX_Correlation_%d",
j + 1);
263 iBooker.
book2D(hname, mename, 99, -0.5, 3563.5, 99, -0.5, 3563.5);
265 sprintf(hname,
"Bunch_Crossing_Diff_%d",
j + 1);
266 sprintf(mename,
"Bunch_Crossing_Diff_%d",
j + 1);
268 sprintf(hname,
"Bunch_Crossing_Diff_small_%d",
j + 1);
269 sprintf(mename,
"Bunch_Crossing_Diff_small_%d",
j + 1);
299 if (!(a && c && d)) {
302 Level1TriggerScalersCollection::const_iterator it = triggerScalers->begin();
303 if (triggerScalers->size()) {
304 unsigned int lumisection = it->lumiSegmentNr();
305 struct timespec thetime = it->collectionTime();
318 it->triggersPhysicsLost());
322 currenttime = thetime.tv_sec -
reftime_;
323 int timebin = (int)(currenttime / 30) + 1;
335 (evtLumi > 1 || evtLumi == lumisection + 1))) {
353 if ((i == 42 || i == 43))
434 LumiScalersCollection::const_iterator it3 = lumiScalers->begin();
435 if (lumiScalers->size()) {
436 unsigned int lumisection = it3->sectionNumber();
444 it3->instantETLumiQlty());
451 unsigned int bx_current = 0, orbitnumber_current = 0, bxdiff = 0;
453 for (L1AcceptBunchCrossingCollection::const_iterator it4 =
454 bunchCrossings->begin();
455 it4 != bunchCrossings->end(); ++it4) {
456 l1accept =
std::abs(it4->l1AcceptOffset());
458 orbitnumber_current = it4->orbitNumber();
461 bx_current = it4->bunchCrossing();
463 }
else if (l1accept == 1 || l1accept == 2 || l1accept == 3) {
467 bxdiff = 3564 * (orbitnumber_current - it4->orbitNumber()) +
468 bx_current - it4->bunchCrossing();
void setBinContent(int binx, double content)
set content of bin (1-D)
edm::LuminosityBlockNumber_t luminosityBlock() const
double l1AsRandomRate() const
double triggersPhysicsLostBeamActiveRate() const
std::vector< double > gtAlgoCountsRate() const
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
double deadtimePercent() const
double triggersPhysicsLostRate() const
volatile std::atomic< bool > shutdown_flag false
std::vector< double > gtTechCountsRate() const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double l1AsPhysicsRate() const