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);
400 std::vector<L1GtObject> l1Obj;
408 int nrMonElements = 5;
415 int bxInEventHex = (bxInEvent+ 16) % 16;
417 std::stringstream ss;
419 ss << std::uppercase << std::hex << bxInEventHex;
420 ss >> bxInEventHexString;
430 l1Obj.push_back(
IsoEG);
437 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
438 int bxInEventHex = (bxInEvent+ 16) % 16;
440 std::stringstream ss;
442 ss << std::uppercase << std::hex << bxInEventHex;
443 ss >> bxInEventHexString;
459 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
460 int bxInEventHex = (bxInEvent+ 16) % 16;
462 std::stringstream ss;
464 ss << std::uppercase << std::hex << bxInEventHex;
465 ss >> bxInEventHexString;
483 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
484 int bxInEventHex = (bxInEvent+ 16) % 16;
486 std::stringstream ss;
488 ss << std::uppercase << std::hex << bxInEventHex;
489 ss >> bxInEventHexString;
504 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
505 int bxInEventHex = (bxInEvent+ 16) % 16;
507 std::stringstream ss;
509 ss << std::uppercase << std::hex << bxInEventHex;
510 ss >> bxInEventHexString;
525 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
526 int bxInEventHex = (bxInEvent+ 16) % 16;
528 std::stringstream ss;
530 ss << std::uppercase << std::hex << bxInEventHex;
531 ss >> bxInEventHexString;
548 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
549 int bxInEventHex = (bxInEvent+ 16) % 16;
551 std::stringstream ss;
553 ss << std::uppercase << std::hex << bxInEventHex;
554 ss >> bxInEventHexString;
564 l1Obj.push_back(
ETT);
567 bool bookPhi =
false;
568 bool bookEta =
false;
574 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
575 int bxInEventHex = (bxInEvent+ 16) % 16;
577 std::stringstream ss;
579 ss << std::uppercase << std::hex << bxInEventHex;
580 ss >> bxInEventHexString;
584 (
m_meAnalysisL1ExtraETT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETT", l1Obj, bookPhi, bookEta);
589 l1Obj.push_back(
ETM);
597 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
598 int bxInEventHex = (bxInEvent+ 16) % 16;
600 std::stringstream ss;
602 ss << std::uppercase << std::hex << bxInEventHex;
603 ss >> bxInEventHexString;
607 (
m_meAnalysisL1ExtraETM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETM", l1Obj, bookPhi, bookEta);
612 l1Obj.push_back(
HTT);
621 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
622 int bxInEventHex = (bxInEvent+ 16) % 16;
624 std::stringstream ss;
626 ss << std::uppercase << std::hex << bxInEventHex;
627 ss >> bxInEventHexString;
631 (
m_meAnalysisL1ExtraHTT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTT", l1Obj, bookPhi, bookEta);
636 l1Obj.push_back(
HTM);
645 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
646 int bxInEventHex = (bxInEvent+ 16) % 16;
648 std::stringstream ss;
650 ss << std::uppercase << std::hex << bxInEventHex;
651 ss >> bxInEventHexString;
656 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTM", l1Obj, bookPhi, bookEta);
658 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTMHTT", l1Obj, bookPhi, bookEta);
674 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
675 int bxInEventHex = (bxInEvent+ 16) % 16;
677 std::stringstream ss;
679 ss << std::uppercase << std::hex << bxInEventHex;
680 ss >> bxInEventHexString;
699 evSetup, nrMonElements));
700 int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
702 int bxInEventHex = (bxInEvent+ 16) % 16;
704 std::stringstream ss;
706 ss << std::uppercase << std::hex << bxInEventHex;
707 ss >> bxInEventHexString;
866 LogDebug(
"L1ExtraDQM") <<
"\n\n endRun: " << run.
id()
867 <<
"\n Number of events analyzed in this run: " <<
m_nrEvRun 868 <<
"\n Total number of events analyzed in this job: " <<
m_nrEvJob 869 <<
"\n" << std::endl;
874 template<
class CollectionType>
876 m_indexNrObjects(-1),
883 m_indexHfBitCounts(-1),
884 m_indexHfRingEtSums(-1) {
891 template<
class CollectionType>
899 template<
class CollectionType>
903 const std::vector<L1GtObject>& l1GtObj,
const bool bookPhi,
904 const bool bookEta) {
917 int indexHistogram = -1;
924 const int histNrBins = histLimits.
nrBins;
933 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
934 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
935 xAxisTitle = l1ExtraObject;
936 yAxisTitle =
"Entries";
938 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
951 quantity =
"NrObjects";
956 const int histNrBins = histLimits.
nrBins;
960 histName = l1ExtraObject +
"_NrObjectsPerEvent";
961 histTitle = l1ExtraObject +
": number of objects per event";
962 xAxisTitle =
"Nr_" + l1ExtraObject;
963 yAxisTitle =
"Entries";
965 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
968 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
969 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
978 std::string quantityLongName =
" transverse energy ";
982 quantityLongName =
" transverse momentum ";
988 const int histNrBinsET = histLimits.
nrBins;
991 const std::vector<float>& binThresholdsET = histLimits.
binThresholds;
993 float* binThresholdsETf;
994 size_t sizeBinThresholdsET = binThresholdsET.size();
995 binThresholdsETf =
new float[sizeBinThresholdsET];
996 copy(binThresholdsET.begin(), binThresholdsET.end(), binThresholdsETf);
998 LogDebug(
"L1ExtraDQM") <<
"\n PT/ET histogram for " << l1ExtraObject
999 <<
"\n histNrBinsET = " << histNrBinsET <<
"\n histMinValueET = " 1000 << histMinValueET <<
"\n histMaxValueET = " << histMaxValueET
1001 <<
"\n Last bin value represents the upper limit of the histogram" 1003 for (
size_t iBin = 0; iBin < sizeBinThresholdsET; ++iBin) {
1004 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": " << quantity <<
" = " 1005 << binThresholdsETf[iBin] <<
" GeV" << std::endl;
1009 histName = l1ExtraObject +
"_" +
quantity;
1010 histTitle = l1ExtraObject +
":" + quantityLongName + quantity +
" [GeV]";
1011 xAxisTitle = l1ExtraObject +
"_" + quantity +
" [GeV]";
1012 yAxisTitle =
"Entries";
1021 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
1022 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
1023 xAxisTitle = l1ExtraObject;
1024 yAxisTitle =
"Entries";
1026 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1035 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1038 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1039 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1046 delete[] binThresholdsETf;
1058 const int histNrBinsPhi = histLimits.
nrBins;
1061 const std::vector<float>& binThresholdsPhi = histLimits.
binThresholds;
1063 float* binThresholdsPhif;
1064 size_t sizeBinThresholdsPhi = binThresholdsPhi.size();
1065 binThresholdsPhif =
new float[sizeBinThresholdsPhi];
1066 copy(binThresholdsPhi.begin(), binThresholdsPhi.end(), binThresholdsPhif);
1068 LogDebug(
"L1ExtraDQM") <<
"\n phi histogram for " << l1ExtraObject
1069 <<
"\n histNrBinsPhi = " << histNrBinsPhi
1070 <<
"\n histMinValuePhi = " << histMinValuePhi
1071 <<
"\n histMaxValuePhi = " << histMaxValuePhi
1072 <<
"\n Last bin value represents the upper limit of the histogram" 1074 for (
size_t iBin = 0; iBin < sizeBinThresholdsPhi; ++iBin) {
1075 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": phi = " << binThresholdsPhif[iBin] <<
" deg" << std::endl;
1079 histName = l1ExtraObject +
"_phi";
1080 histTitle = l1ExtraObject +
": phi distribution ";
1081 xAxisTitle = l1ExtraObject +
"_phi [deg]";
1082 yAxisTitle =
"Entries";
1084 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsPhi, histMinValuePhi, histMaxValuePhi));
1087 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1088 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1091 delete[] binThresholdsPhif;
1105 const int histNrBinsEta = histLimits.
nrBins;
1108 const std::vector<float>& binThresholdsEta = histLimits.
binThresholds;
1111 float* binThresholdsEtaf;
1112 size_t sizeBinThresholdsEta = binThresholdsEta.size();
1113 binThresholdsEtaf =
new float[sizeBinThresholdsEta];
1114 copy(binThresholdsEta.begin(), binThresholdsEta.end(), binThresholdsEtaf);
1116 LogDebug(
"L1ExtraDQM") <<
"\n eta histogram for " << l1ExtraObject
1117 <<
"\n histNrBinsEta = " << histNrBinsEta
1118 <<
"\n histMinValueEta = " << histMinValueEta
1119 <<
"\n histMaxValueEta = " << histMaxValueEta
1120 <<
"\n Last bin value represents the upper limit of the histogram" 1122 for (
size_t iBin = 0; iBin < sizeBinThresholdsEta; ++iBin) {
1123 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": eta = " << binThresholdsEtaf[iBin] << std::endl;
1127 histName = l1ExtraObject +
"_eta";
1128 histTitle = l1ExtraObject +
": eta distribution ";
1129 xAxisTitle = l1ExtraObject +
"_eta";
1130 yAxisTitle =
"Entries";
1132 m_monElement.push_back(ibooker.
book1D(histName, histTitle, histNrBinsEta, binThresholdsEtaf));
1135 m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1136 m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1139 delete[] binThresholdsEtaf;
1145 template<
class CollectionType>
1147 const CollectionType* collType,
const bool validColl,
1148 const bool isL1Coll,
const int bxInEvent) {
1150 if (validColl && isL1Coll) {
1151 size_t collSize = 0;
1152 for (
CIterColl iterColl = collType->begin(); iterColl
1153 != collType->end(); ++iterColl) {
1155 if (iterColl->bx() == bxInEvent) {
1161 size_t collSize = collType->size();
1166 template<
class CollectionType>
1168 const CollectionType* collType,
const bool validColl,
1169 const bool bookPhi,
const bool bookEta,
const bool isL1Coll,
const int bxInEvent) {
1172 for (
CIterColl iterColl = collType->begin(); iterColl
1173 != collType->end(); ++iterColl) {
1175 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1194 template<
class CollectionType>
1196 const CollectionType* collType,
const bool validColl,
1197 const bool bookPhi,
const bool bookEta,
const bool isL1Coll,
const int bxInEvent) {
1200 for (
CIterColl iterColl = collType->begin(); iterColl
1201 != collType->end(); ++iterColl) {
1203 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1222 template<
class CollectionType>
1224 const CollectionType* collType,
const bool validColl,
const bool isL1Coll,
const int bxInEvent) {
1227 for (
CIterColl iterColl = collType->begin(); iterColl
1228 != collType->end(); ++iterColl) {
1230 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1240 template<
class CollectionType>
1242 const CollectionType* collType,
const bool validColl,
const bool isL1Coll,
const int bxInEvent) {
1245 for (
CIterColl iterColl = collType->begin(); iterColl
1246 != collType->end(); ++iterColl) {
1248 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1258 template<
class CollectionType>
1260 const CollectionType* collType,
const bool validColl,
1261 const int countIndex,
const bool isL1Coll,
const int bxInEvent) {
1264 for (
CIterColl iterColl = collType->begin(); iterColl
1265 != collType->end(); ++iterColl) {
1267 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1272 iterColl->hfBitCount(
1279 template<
class CollectionType>
1281 const CollectionType* collType,
const bool validColl,
1282 const int countIndex,
const bool isL1Coll,
const int bxInEvent) {
1285 for (
CIterColl iterColl = collType->begin(); iterColl
1286 != collType->end(); ++iterColl) {
1288 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * book1D(Args &&...args)
std::vector< float > binThresholds
const double rad2deg(const double &)
convert phi from rad (-pi, pi] to deg (0, 360)
void setCurrentFolder(const std::string &fullpath)
T const * product() const
const L1HistLimits & l1HistLimits(const L1GtObject &l1GtObject, const std::string &quantity)