28 m_retrieveL1Extra(paramSet.getParameter<
edm::
ParameterSet>(
"L1ExtraInputTags"),consumesCollector()),
29 L1ExtraIsoTauJetSource(paramSet.getParameter<
edm::InputTag>(
"L1ExtraIsoTauJetSource_")),
30 m_dirName(paramSet.getParameter<
std::
string>(
"DirName")),
31 m_stage1_layer2_(paramSet.getParameter<
bool>(
"stage1_layer2_")),
33 m_nrBxInEventGmt(paramSet.getParameter<
int>(
"NrBxInEventGmt")),
34 m_nrBxInEventGct(paramSet.getParameter<
int>(
"NrBxInEventGct")),
36 m_resetModule(
true), m_currentRun(-99),
48 <<
"\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: " 50 <<
"\n The number must be an odd number!\n" 58 <<
"\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: " 60 <<
"\n The number must be an odd number!\n" 103 int bxInEvent = iBxInEvent + (m_nrBxInEventGmt + 1) / 2
112 isL1Coll, bxInEvent);
124 bool isL1Coll =
true;
128 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
137 isL1Coll, bxInEvent);
148 bool isL1Coll =
true;
152 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
161 isL1Coll, bxInEvent);
172 bool isL1Coll =
true;
176 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
185 isL1Coll, bxInEvent);
197 bool isL1Coll =
true;
201 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
210 isL1Coll, bxInEvent);
221 bool isL1Coll =
true;
225 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
234 isL1Coll, bxInEvent);
244 bool isL1Coll =
true;
246 bool m_validL1ExtraIsoTauJet;
253 if (collL1ExtraIsoTauJet.
isValid()) {
254 m_validL1ExtraIsoTauJet =
true;
255 m_l1ExtraIsoTauJet = collL1ExtraIsoTauJet.
product();
258 <<
"\n l1extra::L1JetParticleCollection with input tag \n " 259 <<
"m_tagL1ExtraIsoTauJet" <<
"\n not found in the event.\n" 260 <<
"\n Return pointer 0 and false validity tag." 263 m_validL1ExtraIsoTauJet =
false;
264 m_l1ExtraIsoTauJet =
nullptr;
268 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
270 (
m_meAnalysisL1ExtraIsoTauJet.at(iBxInEvent))->fillEtPhiEta(m_l1ExtraIsoTauJet,m_validL1ExtraIsoTauJet, bookPhi, bookEta,isL1Coll, bxInEvent);
277 bool isL1Coll =
true;
281 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
295 bool bookEta =
false;
297 bool isL1Coll =
true;
301 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
306 isL1Coll, bxInEvent);
315 bool isL1Coll =
true;
319 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
332 bool bookEta =
false;
334 bool isL1Coll =
true;
338 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
343 isL1Coll, bxInEvent);
351 bool isL1Coll =
true;
355 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
362 isL1Coll, bxInEvent);
371 bool isL1Coll =
true;
375 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
382 isL1Coll, bxInEvent);
397 std::vector<L1GtObject> l1Obj;
405 int nrMonElements = 5;
412 int bxInEventHex = (bxInEvent+ 16) % 16;
414 std::stringstream ss;
416 ss << std::uppercase << std::hex << bxInEventHex;
417 ss >> bxInEventHexString;
427 l1Obj.push_back(
IsoEG);
434 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
435 int bxInEventHex = (bxInEvent+ 16) % 16;
437 std::stringstream ss;
439 ss << std::uppercase << std::hex << bxInEventHex;
440 ss >> bxInEventHexString;
456 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
457 int bxInEventHex = (bxInEvent+ 16) % 16;
459 std::stringstream ss;
461 ss << std::uppercase << std::hex << bxInEventHex;
462 ss >> bxInEventHexString;
480 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
481 int bxInEventHex = (bxInEvent+ 16) % 16;
483 std::stringstream ss;
485 ss << std::uppercase << std::hex << bxInEventHex;
486 ss >> bxInEventHexString;
501 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
502 int bxInEventHex = (bxInEvent+ 16) % 16;
504 std::stringstream ss;
506 ss << std::uppercase << std::hex << bxInEventHex;
507 ss >> bxInEventHexString;
522 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
523 int bxInEventHex = (bxInEvent+ 16) % 16;
525 std::stringstream ss;
527 ss << std::uppercase << std::hex << bxInEventHex;
528 ss >> bxInEventHexString;
545 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
546 int bxInEventHex = (bxInEvent+ 16) % 16;
548 std::stringstream ss;
550 ss << std::uppercase << std::hex << bxInEventHex;
551 ss >> bxInEventHexString;
561 l1Obj.push_back(
ETT);
564 bool bookPhi =
false;
565 bool bookEta =
false;
571 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
572 int bxInEventHex = (bxInEvent+ 16) % 16;
574 std::stringstream ss;
576 ss << std::uppercase << std::hex << bxInEventHex;
577 ss >> bxInEventHexString;
581 (
m_meAnalysisL1ExtraETT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETT", l1Obj, bookPhi, bookEta);
586 l1Obj.push_back(
ETM);
594 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
595 int bxInEventHex = (bxInEvent+ 16) % 16;
597 std::stringstream ss;
599 ss << std::uppercase << std::hex << bxInEventHex;
600 ss >> bxInEventHexString;
604 (
m_meAnalysisL1ExtraETM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETM", l1Obj, bookPhi, bookEta);
609 l1Obj.push_back(
HTT);
618 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
619 int bxInEventHex = (bxInEvent+ 16) % 16;
621 std::stringstream ss;
623 ss << std::uppercase << std::hex << bxInEventHex;
624 ss >> bxInEventHexString;
628 (
m_meAnalysisL1ExtraHTT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTT", l1Obj, bookPhi, bookEta);
633 l1Obj.push_back(
HTM);
642 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
643 int bxInEventHex = (bxInEvent+ 16) % 16;
645 std::stringstream ss;
647 ss << std::uppercase << std::hex << bxInEventHex;
648 ss >> bxInEventHexString;
653 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTM", l1Obj, bookPhi, bookEta);
655 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTMHTT", l1Obj, bookPhi, bookEta);
671 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
672 int bxInEventHex = (bxInEvent+ 16) % 16;
674 std::stringstream ss;
676 ss << std::uppercase << std::hex << bxInEventHex;
677 ss >> bxInEventHexString;
696 evSetup, nrMonElements));
697 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
699 int bxInEventHex = (bxInEvent+ 16) % 16;
701 std::stringstream ss;
703 ss << std::uppercase << std::hex << bxInEventHex;
704 ss >> bxInEventHexString;
863 LogDebug(
"L1ExtraDQM") <<
"\n\n endRun: " << run.
id()
864 <<
"\n Number of events analyzed in this run: " <<
m_nrEvRun 865 <<
"\n Total number of events analyzed in this job: " <<
m_nrEvJob 866 <<
"\n" << std::endl;
871 template<
class CollectionType>
873 m_indexNrObjects(-1),
880 m_indexHfBitCounts(-1),
881 m_indexHfRingEtSums(-1) {
888 template<
class CollectionType>
896 template<
class CollectionType>
900 const std::vector<L1GtObject>& l1GtObj,
const bool bookPhi,
901 const bool bookEta) {
914 int indexHistogram = -1;
921 const int histNrBins = histLimits.
nrBins;
930 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
931 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
932 xAxisTitle = l1ExtraObject;
933 yAxisTitle =
"Entries";
935 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
948 quantity =
"NrObjects";
953 const int histNrBins = histLimits.
nrBins;
957 histName = l1ExtraObject +
"_NrObjectsPerEvent";
958 histTitle = l1ExtraObject +
": number of objects per event";
959 xAxisTitle =
"Nr_" + l1ExtraObject;
960 yAxisTitle =
"Entries";
962 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
965 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
966 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
975 std::string quantityLongName =
" transverse energy ";
979 quantityLongName =
" transverse momentum ";
985 const int histNrBinsET = histLimits.
nrBins;
988 const std::vector<float>& binThresholdsET = histLimits.
binThresholds;
990 float* binThresholdsETf;
991 size_t sizeBinThresholdsET = binThresholdsET.size();
992 binThresholdsETf =
new float[sizeBinThresholdsET];
993 copy(binThresholdsET.begin(), binThresholdsET.end(), binThresholdsETf);
995 LogDebug(
"L1ExtraDQM") <<
"\n PT/ET histogram for " << l1ExtraObject
996 <<
"\n histNrBinsET = " << histNrBinsET <<
"\n histMinValueET = " 997 << histMinValueET <<
"\n histMaxValueET = " << histMaxValueET
998 <<
"\n Last bin value represents the upper limit of the histogram" 1000 for (
size_t iBin = 0; iBin < sizeBinThresholdsET; ++iBin) {
1001 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": " << quantity <<
" = " 1002 << binThresholdsETf[iBin] <<
" GeV" << std::endl;
1006 histName = l1ExtraObject +
"_" +
quantity;
1007 histTitle = l1ExtraObject +
":" + quantityLongName + quantity +
" [GeV]";
1008 xAxisTitle = l1ExtraObject +
"_" + quantity +
" [GeV]";
1009 yAxisTitle =
"Entries";
1018 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
1019 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
1020 xAxisTitle = l1ExtraObject;
1021 yAxisTitle =
"Entries";
1023 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1032 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1035 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1036 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1043 delete[] binThresholdsETf;
1055 const int histNrBinsPhi = histLimits.
nrBins;
1058 const std::vector<float>& binThresholdsPhi = histLimits.
binThresholds;
1060 float* binThresholdsPhif;
1061 size_t sizeBinThresholdsPhi = binThresholdsPhi.size();
1062 binThresholdsPhif =
new float[sizeBinThresholdsPhi];
1063 copy(binThresholdsPhi.begin(), binThresholdsPhi.end(), binThresholdsPhif);
1065 LogDebug(
"L1ExtraDQM") <<
"\n phi histogram for " << l1ExtraObject
1066 <<
"\n histNrBinsPhi = " << histNrBinsPhi
1067 <<
"\n histMinValuePhi = " << histMinValuePhi
1068 <<
"\n histMaxValuePhi = " << histMaxValuePhi
1069 <<
"\n Last bin value represents the upper limit of the histogram" 1071 for (
size_t iBin = 0; iBin < sizeBinThresholdsPhi; ++iBin) {
1072 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": phi = " << binThresholdsPhif[iBin] <<
" deg" << std::endl;
1076 histName = l1ExtraObject +
"_phi";
1077 histTitle = l1ExtraObject +
": phi distribution ";
1078 xAxisTitle = l1ExtraObject +
"_phi [deg]";
1079 yAxisTitle =
"Entries";
1081 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsPhi, histMinValuePhi, histMaxValuePhi));
1084 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1085 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1088 delete[] binThresholdsPhif;
1102 const int histNrBinsEta = histLimits.
nrBins;
1105 const std::vector<float>& binThresholdsEta = histLimits.
binThresholds;
1108 float* binThresholdsEtaf;
1109 size_t sizeBinThresholdsEta = binThresholdsEta.size();
1110 binThresholdsEtaf =
new float[sizeBinThresholdsEta];
1111 copy(binThresholdsEta.begin(), binThresholdsEta.end(), binThresholdsEtaf);
1113 LogDebug(
"L1ExtraDQM") <<
"\n eta histogram for " << l1ExtraObject
1114 <<
"\n histNrBinsEta = " << histNrBinsEta
1115 <<
"\n histMinValueEta = " << histMinValueEta
1116 <<
"\n histMaxValueEta = " << histMaxValueEta
1117 <<
"\n Last bin value represents the upper limit of the histogram" 1119 for (
size_t iBin = 0; iBin < sizeBinThresholdsEta; ++iBin) {
1120 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": eta = " << binThresholdsEtaf[iBin] << std::endl;
1124 histName = l1ExtraObject +
"_eta";
1125 histTitle = l1ExtraObject +
": eta distribution ";
1126 xAxisTitle = l1ExtraObject +
"_eta";
1127 yAxisTitle =
"Entries";
1129 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsEta, binThresholdsEtaf));
1132 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1133 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1136 delete[] binThresholdsEtaf;
1142 template<
class CollectionType>
1144 const CollectionType* collType,
const bool validColl,
1145 const bool isL1Coll,
const int bxInEvent) {
1147 if (validColl && isL1Coll) {
1148 size_t collSize = 0;
1149 for (
CIterColl iterColl = collType->begin(); iterColl
1150 != collType->end(); ++iterColl) {
1152 if (iterColl->bx() == bxInEvent) {
1158 size_t collSize = collType->size();
1163 template<
class CollectionType>
1165 const CollectionType* collType,
const bool validColl,
1166 const bool bookPhi,
const bool bookEta,
const bool isL1Coll,
const int bxInEvent) {
1169 for (
CIterColl iterColl = collType->begin(); iterColl
1170 != collType->end(); ++iterColl) {
1172 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1191 template<
class CollectionType>
1193 const CollectionType* collType,
const bool validColl,
1194 const bool bookPhi,
const bool bookEta,
const bool isL1Coll,
const int bxInEvent) {
1197 for (
CIterColl iterColl = collType->begin(); iterColl
1198 != collType->end(); ++iterColl) {
1200 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1219 template<
class CollectionType>
1221 const CollectionType* collType,
const bool validColl,
const bool isL1Coll,
const int bxInEvent) {
1224 for (
CIterColl iterColl = collType->begin(); iterColl
1225 != collType->end(); ++iterColl) {
1227 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1237 template<
class CollectionType>
1239 const CollectionType* collType,
const bool validColl,
const bool isL1Coll,
const int bxInEvent) {
1242 for (
CIterColl iterColl = collType->begin(); iterColl
1243 != collType->end(); ++iterColl) {
1245 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1255 template<
class CollectionType>
1257 const CollectionType* collType,
const bool validColl,
1258 const int countIndex,
const bool isL1Coll,
const int bxInEvent) {
1261 for (
CIterColl iterColl = collType->begin(); iterColl
1262 != collType->end(); ++iterColl) {
1264 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1269 iterColl->hfBitCount(
1276 template<
class CollectionType>
1278 const CollectionType* collType,
const bool validColl,
1279 const int countIndex,
const bool isL1Coll,
const int bxInEvent) {
1282 for (
CIterColl iterColl = collType->begin(); iterColl
1283 != collType->end(); ++iterColl) {
1285 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setCurrentFolder(std::string const &fullpath)
MonitorElement * book1D(Args &&...args)
std::vector< float > binThresholds
const double rad2deg(const double &)
convert phi from rad (-pi, pi] to deg (0, 360)
T const * product() const
const L1HistLimits & l1HistLimits(const L1GtObject &l1GtObject, const std::string &quantity)