27 m_retrieveL1Extra(paramSet.getParameter<
edm::
ParameterSet>(
"L1ExtraInputTags"), consumesCollector()),
28 L1ExtraIsoTauJetSource(paramSet.getParameter<
edm::
InputTag>(
"L1ExtraIsoTauJetSource_")),
29 m_dirName(paramSet.getParameter<
std::
string>(
"DirName")),
30 m_stage1_layer2_(paramSet.getParameter<
bool>(
"stage1_layer2_")),
32 m_nrBxInEventGmt(paramSet.getParameter<
int>(
"NrBxInEventGmt")),
33 m_nrBxInEventGct(paramSet.getParameter<
int>(
"NrBxInEventGct")),
46 edm::LogInfo(
"L1ExtraDQM") <<
"\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: "
54 edm::LogInfo(
"L1ExtraDQM") <<
"\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: "
111 bool isL1Coll =
true;
132 bool isL1Coll =
true;
154 bool isL1Coll =
true;
175 bool isL1Coll =
true;
196 bool isL1Coll =
true;
217 bool isL1Coll =
true;
219 bool m_validL1ExtraIsoTauJet;
226 if (collL1ExtraIsoTauJet.
isValid()) {
227 m_validL1ExtraIsoTauJet =
true;
228 m_l1ExtraIsoTauJet = collL1ExtraIsoTauJet.
product();
230 LogDebug(
"L1RetrieveL1Extra") <<
"\n l1extra::L1JetParticleCollection with input tag \n "
231 <<
"m_tagL1ExtraIsoTauJet"
232 <<
"\n not found in the event.\n"
233 <<
"\n Return pointer 0 and false validity tag." << std::endl;
235 m_validL1ExtraIsoTauJet =
false;
236 m_l1ExtraIsoTauJet =
nullptr;
242 ->fillNrObjects(m_l1ExtraIsoTauJet, m_validL1ExtraIsoTauJet, isL1Coll, bxInEvent);
244 ->fillEtPhiEta(m_l1ExtraIsoTauJet, m_validL1ExtraIsoTauJet, bookPhi, bookEta, isL1Coll, bxInEvent);
249 bool isL1Coll =
true;
261 bool bookEta =
false;
263 bool isL1Coll =
true;
275 bool isL1Coll =
true;
287 bool bookEta =
false;
289 bool isL1Coll =
true;
301 bool isL1Coll =
true;
318 bool isL1Coll =
true;
339 std::vector<L1GtObject> l1Obj;
347 int nrMonElements = 5;
354 int bxInEventHex = (bxInEvent + 16) % 16;
356 std::stringstream
ss;
358 ss << std::uppercase << std::hex << bxInEventHex;
359 ss >> bxInEventHexString;
368 l1Obj.push_back(
IsoEG);
376 int bxInEventHex = (bxInEvent + 16) % 16;
378 std::stringstream
ss;
380 ss << std::uppercase << std::hex << bxInEventHex;
381 ss >> bxInEventHexString;
398 int bxInEventHex = (bxInEvent + 16) % 16;
400 std::stringstream
ss;
402 ss << std::uppercase << std::hex << bxInEventHex;
403 ss >> bxInEventHexString;
422 int bxInEventHex = (bxInEvent + 16) % 16;
424 std::stringstream
ss;
426 ss << std::uppercase << std::hex << bxInEventHex;
427 ss >> bxInEventHexString;
443 int bxInEventHex = (bxInEvent + 16) % 16;
445 std::stringstream
ss;
447 ss << std::uppercase << std::hex << bxInEventHex;
448 ss >> bxInEventHexString;
464 int bxInEventHex = (bxInEvent + 16) % 16;
466 std::stringstream
ss;
468 ss << std::uppercase << std::hex << bxInEventHex;
469 ss >> bxInEventHexString;
486 int bxInEventHex = (bxInEvent + 16) % 16;
488 std::stringstream
ss;
490 ss << std::uppercase << std::hex << bxInEventHex;
491 ss >> bxInEventHexString;
501 l1Obj.push_back(
ETT);
504 bool bookPhi =
false;
505 bool bookEta =
false;
512 int bxInEventHex = (bxInEvent + 16) % 16;
514 std::stringstream
ss;
516 ss << std::uppercase << std::hex << bxInEventHex;
517 ss >> bxInEventHexString;
521 (
m_meAnalysisL1ExtraETT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETT", l1Obj, bookPhi, bookEta);
526 l1Obj.push_back(
ETM);
536 int bxInEventHex = (bxInEvent + 16) % 16;
538 std::stringstream
ss;
540 ss << std::uppercase << std::hex << bxInEventHex;
541 ss >> bxInEventHexString;
545 (
m_meAnalysisL1ExtraETM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_ETM", l1Obj, bookPhi, bookEta);
550 l1Obj.push_back(
HTT);
560 int bxInEventHex = (bxInEvent + 16) % 16;
562 std::stringstream
ss;
564 ss << std::uppercase << std::hex << bxInEventHex;
565 ss >> bxInEventHexString;
569 (
m_meAnalysisL1ExtraHTT.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTT", l1Obj, bookPhi, bookEta);
574 l1Obj.push_back(
HTM);
584 int bxInEventHex = (bxInEvent + 16) % 16;
586 std::stringstream
ss;
588 ss << std::uppercase << std::hex << bxInEventHex;
589 ss >> bxInEventHexString;
594 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTM", l1Obj, bookPhi, bookEta);
596 (
m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker,
"L1_HTMHTT", l1Obj, bookPhi, bookEta);
612 int bxInEventHex = (bxInEvent + 16) % 16;
614 std::stringstream
ss;
616 ss << std::uppercase << std::hex << bxInEventHex;
617 ss >> bxInEventHexString;
622 ->bookhistograms(evSetup, ibooker,
"L1_HfBitCounts", l1Obj, bookPhi, bookEta);
637 int bxInEventHex = (bxInEvent + 16) % 16;
639 std::stringstream
ss;
641 ss << std::uppercase << std::hex << bxInEventHex;
642 ss >> bxInEventHexString;
648 ->bookhistograms(evSetup, ibooker,
"L1_HfRingEtSums", l1Obj, bookPhi, bookEta);
652 ->bookhistograms(evSetup, ibooker,
"L1_IsoTau_replace_Hf", l1Obj, bookPhi, bookEta);
781 LogDebug(
"L1ExtraDQM") <<
"\n\n endRun: " <<
run.id()
782 <<
"\n Number of events analyzed in this run: " <<
m_nrEvRun
783 <<
"\n Total number of events analyzed in this job: " <<
m_nrEvJob <<
"\n"
788 template <
class CollectionType>
790 : m_indexNrObjects(-1),
797 m_indexHfBitCounts(-1),
798 m_indexHfRingEtSums(-1) {
803 template <
class CollectionType>
808 template <
class CollectionType>
812 const std::vector<L1GtObject>& l1GtObj,
814 const bool bookEta) {
826 int indexHistogram = -1;
832 const int histNrBins = histLimits.
nrBins;
837 m_indexHfBitCounts = indexHistogram;
840 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
841 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
845 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBins, histMinValue, histMaxValue));
846 m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(
xAxisTitle, 1);
847 m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(
yAxisTitle, 2);
861 const int histNrBins = histLimits.
nrBins;
865 histName = l1ExtraObject +
"_NrObjectsPerEvent";
866 histTitle = l1ExtraObject +
": number of objects per event";
870 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBins, histMinValue, histMaxValue));
873 m_monElement[indexHistogram]->setAxisTitle(
xAxisTitle, 1);
874 m_monElement[indexHistogram]->setAxisTitle(
yAxisTitle, 2);
875 m_indexNrObjects = indexHistogram;
881 std::string quantityLongName =
" transverse energy ";
885 quantityLongName =
" transverse momentum ";
891 const int histNrBinsET = histLimits.
nrBins;
894 const std::vector<float>& binThresholdsET = histLimits.
binThresholds;
896 float* binThresholdsETf;
897 size_t sizeBinThresholdsET = binThresholdsET.size();
898 binThresholdsETf =
new float[sizeBinThresholdsET];
899 copy(binThresholdsET.begin(), binThresholdsET.end(), binThresholdsETf);
901 LogDebug(
"L1ExtraDQM") <<
"\n PT/ET histogram for " << l1ExtraObject <<
"\n histNrBinsET = " << histNrBinsET
902 <<
"\n histMinValueET = " << histMinValueET <<
"\n histMaxValueET = " << histMaxValueET
903 <<
"\n Last bin value represents the upper limit of the histogram" << std::endl;
904 for (
size_t iBin = 0; iBin < sizeBinThresholdsET; ++iBin) {
905 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": " <<
quantity <<
" = " << binThresholdsETf[iBin] <<
" GeV"
909 histName = l1ExtraObject +
"_" +
quantity;
916 m_indexHfRingEtSums = indexHistogram;
919 histName = l1ExtraObject +
"_Count_" + std::to_string(iCount);
920 histTitle = l1ExtraObject +
": count " + std::to_string(iCount);
924 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBinsET, binThresholdsETf));
926 m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(
xAxisTitle, 1);
927 m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(
yAxisTitle, 2);
931 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBinsET, binThresholdsETf));
934 m_monElement[indexHistogram]->setAxisTitle(
xAxisTitle, 1);
935 m_monElement[indexHistogram]->setAxisTitle(
yAxisTitle, 2);
936 m_indexPt = indexHistogram;
937 m_indexEt = indexHistogram;
938 m_indexEtTotal = indexHistogram;
941 delete[] binThresholdsETf;
952 const int histNrBinsPhi = histLimits.
nrBins;
955 const std::vector<float>& binThresholdsPhi = histLimits.
binThresholds;
957 float* binThresholdsPhif;
958 size_t sizeBinThresholdsPhi = binThresholdsPhi.size();
959 binThresholdsPhif =
new float[sizeBinThresholdsPhi];
960 copy(binThresholdsPhi.begin(), binThresholdsPhi.end(), binThresholdsPhif);
962 LogDebug(
"L1ExtraDQM") <<
"\n phi histogram for " << l1ExtraObject <<
"\n histNrBinsPhi = " << histNrBinsPhi
963 <<
"\n histMinValuePhi = " << histMinValuePhi <<
"\n histMaxValuePhi = " << histMaxValuePhi
964 <<
"\n Last bin value represents the upper limit of the histogram" << std::endl;
965 for (
size_t iBin = 0; iBin < sizeBinThresholdsPhi; ++iBin) {
966 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": phi = " << binThresholdsPhif[iBin] <<
" deg" << std::endl;
969 histName = l1ExtraObject +
"_phi";
970 histTitle = l1ExtraObject +
": phi distribution ";
974 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBinsPhi, histMinValuePhi, histMaxValuePhi));
977 m_monElement[indexHistogram]->setAxisTitle(
xAxisTitle, 1);
978 m_monElement[indexHistogram]->setAxisTitle(
yAxisTitle, 2);
979 m_indexPhi = indexHistogram;
981 delete[] binThresholdsPhif;
993 const int histNrBinsEta = histLimits.
nrBins;
996 const std::vector<float>& binThresholdsEta = histLimits.
binThresholds;
999 float* binThresholdsEtaf;
1000 size_t sizeBinThresholdsEta = binThresholdsEta.size();
1001 binThresholdsEtaf =
new float[sizeBinThresholdsEta];
1002 copy(binThresholdsEta.begin(), binThresholdsEta.end(), binThresholdsEtaf);
1004 LogDebug(
"L1ExtraDQM") <<
"\n eta histogram for " << l1ExtraObject <<
"\n histNrBinsEta = " << histNrBinsEta
1005 <<
"\n histMinValueEta = " << histMinValueEta <<
"\n histMaxValueEta = " << histMaxValueEta
1006 <<
"\n Last bin value represents the upper limit of the histogram" << std::endl;
1007 for (
size_t iBin = 0; iBin < sizeBinThresholdsEta; ++iBin) {
1008 LogTrace(
"L1ExtraDQM") <<
"Bin " << iBin <<
": eta = " << binThresholdsEtaf[iBin] << std::endl;
1011 histName = l1ExtraObject +
"_eta";
1012 histTitle = l1ExtraObject +
": eta distribution ";
1016 m_monElement.push_back(ibooker.
book1D(histName,
histTitle, histNrBinsEta, binThresholdsEtaf));
1019 m_monElement[indexHistogram]->setAxisTitle(
xAxisTitle, 1);
1020 m_monElement[indexHistogram]->setAxisTitle(
yAxisTitle, 2);
1021 m_indexEta = indexHistogram;
1023 delete[] binThresholdsEtaf;
1027 template <
class CollectionType>
1029 const bool validColl,
1030 const bool isL1Coll,
1031 const int bxInEvent) {
1032 if (validColl && isL1Coll) {
1033 size_t collSize = 0;
1034 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1035 if (iterColl->bx() == bxInEvent) {
1039 m_monElement[m_indexNrObjects]->Fill(collSize);
1041 size_t collSize = collType->size();
1042 m_monElement[m_indexNrObjects]->Fill(collSize);
1046 template <
class CollectionType>
1048 const bool validColl,
1051 const bool isL1Coll,
1052 const int bxInEvent) {
1054 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1055 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1059 m_monElement[m_indexPt]->Fill(iterColl->pt());
1063 m_monElement[m_indexPhi]->Fill(
rad2deg(iterColl->phi()) + 1.
e-6);
1067 m_monElement[m_indexEta]->Fill(iterColl->eta());
1073 template <
class CollectionType>
1075 const bool validColl,
1078 const bool isL1Coll,
1079 const int bxInEvent) {
1081 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1082 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1086 m_monElement[m_indexEt]->Fill(iterColl->et());
1090 m_monElement[m_indexPhi]->Fill(
rad2deg(iterColl->phi()) + 1.
e-6);
1094 m_monElement[m_indexEta]->Fill(iterColl->eta());
1100 template <
class CollectionType>
1102 const bool validColl,
1103 const bool isL1Coll,
1104 const int bxInEvent) {
1106 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1107 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1111 m_monElement[m_indexEtTotal]->Fill(iterColl->etTotal());
1116 template <
class CollectionType>
1118 const bool validColl,
1119 const bool isL1Coll,
1120 const int bxInEvent) {
1122 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1123 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1127 m_monElement[m_indexCharge]->Fill(iterColl->charge());
1132 template <
class CollectionType>
1134 const bool validColl,
1135 const int countIndex,
1136 const bool isL1Coll,
1137 const int bxInEvent) {
1139 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1140 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1144 m_monElement[m_indexHfBitCounts + countIndex]->Fill(
1150 template <
class CollectionType>
1152 const bool validColl,
1153 const int countIndex,
1154 const bool isL1Coll,
1155 const int bxInEvent) {
1157 for (
CIterColl iterColl = collType->begin(); iterColl != collType->end(); ++iterColl) {
1158 if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1162 m_monElement[m_indexHfRingEtSums + countIndex]->Fill(