105 collNotFoundWarn_(ps.getUntrackedParameter<
bool>(
"warnIfCollectionNotFound",
true)),
106 ebDigis_(ps.getParameter<
edm::
InputTag>(
"EbDigiCollection"),
false, collNotFoundWarn_),
107 eeDigis_(ps.getParameter<
edm::
InputTag>(
"EeDigiCollection"),
false, collNotFoundWarn_),
110 ebSrFlags_(ps.getParameter<
edm::
InputTag>(
"EbSrFlagCollection"),
false, collNotFoundWarn_),
111 eeSrFlags_(ps.getParameter<
edm::
InputTag>(
"EeSrFlagCollection"),
false, collNotFoundWarn_),
118 tps_(ps.getParameter<
edm::
InputTag>(
"TrigPrimCollection"),
false, collNotFoundWarn_),
123 tmin(numeric_limits<int64_t>::
max()),
126 triggerTowerMap_(nullptr),
127 localReco_(ps.getParameter<
bool>(
"LocalReco")),
128 weights_(ps.getParameter<
vector<double>>(
"weights")),
129 tpInGeV_(ps.getParameter<
bool>(
"tpInGeV")),
130 firstFIRSample_(ps.getParameter<
int>(
"ecalDccZs1stSample")),
131 useEventRate_(ps.getParameter<
bool>(
"useEventRate")),
132 logErrForDccs_(nDccs_,
false),
135 histDir_(ps.getParameter<
string>(
"histDir")),
136 withEeSimHit_(
false),
137 withEbSimHit_(
false) {
149 tps_.setToken(collector);
154 double ebZsThr = ps.
getParameter<
double>(
"ebZsThrADCCount");
155 double eeZsThr = ps.
getParameter<
double>(
"eeZsThrADCCount");
175 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will be saved to '" <<
outputFile_.c_str() <<
"'";
177 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will NOT be saved";
194 const int32_t
bx =
event.bunchCrossing();
195 if (bx < 1 || bx > 3564)
198 int64_t
t =
event.bunchCrossing() + (
event.orbitNumber() - 1) * 3564;
212 LogDebug(
"EcalSrValid") << __FILE__ <<
":" << __LINE__ <<
": " 213 <<
"Tmax = " <<
tmax <<
" x 25ns; Tmin = " <<
tmin <<
" x 25ns; L1A(Tmax) = " <<
l1aOfTmax 214 <<
"; L1A(Tmin) = " <<
l1aOfTmin <<
"\n";
228 edm::LogInfo(
"EcalSrValid") <<
"Size of TP collection: " <<
tps_->size() << std::endl
229 <<
"Size of EB SRF collection read from data: " <<
ebSrFlags_->size() << std::endl
230 <<
"Size of EB SRF collection computed from data TTFs: " <<
ebComputedSrFlags_->size()
232 <<
"Size of EE SRF collection read from data: " <<
eeSrFlags_->size() << std::endl
233 <<
"Size of EE SRF collection computed from data TTFs: " <<
eeComputedSrFlags_->size()
290 bool eventError =
false;
297 std::unique_ptr<std::array<std::array<std::array<energiesEe_t, nEeY>,
nEeX>,
nEndcaps>> eeEnergies =
298 std::make_unique<std::array<std::array<std::array<energiesEe_t, nEeY>,
nEeX>,
nEndcaps>>();
300 for (
int iZ0 = 0; iZ0 <
nEndcaps; ++iZ0) {
301 for (
int iX0 = 0; iX0 <
nEeX; ++iX0) {
302 for (
int iY0 = 0; iY0 <
nEeY; ++iY0) {
305 (*eeEnergies)[iZ0][iX0][iY0].simE = 0;
306 (*eeEnergies)[iZ0][iX0][iY0].simHit = 0;
307 (*eeEnergies)[iZ0][iX0][iY0].gain12 =
false;
322 int iZ0 =
frame.id().zside() > 0 ? 1 : 0;
324 if (iX0 < 0 || iX0 >=
nEeX) {
325 edm::LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 326 <<
"[0," <<
nEeX - 1 <<
"]\n";
328 if (iY0 < 0 || iY0 >=
nEeY) {
329 edm::LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 330 <<
"[0," <<
nEeY - 1 <<
"]\n";
335 (*eeEnergies)[iZ0][iX0][iY0].gain12 =
true;
336 for (
int i = 0;
i <
frame.size(); ++
i) {
337 const int gain12Code = 0x1;
339 (*eeEnergies)[iZ0][iX0][iY0].gain12 =
false;
344 (*eeEnergies)[iZ0][iX0][iY0].phi =
rad2deg * ((double)xtalPos.
phi());
345 (*eeEnergies)[iZ0][iX0][iY0].eta = xtalPos.
eta();
356 if (iX0 < 0 || iX0 >=
nEeX) {
357 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 358 <<
"[0," <<
nEeX - 1 <<
"]\n";
360 if (iY0 < 0 || iY0 >=
nEeY) {
361 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 362 <<
"[0," <<
nEeY - 1 <<
"]\n";
365 (*eeEnergies)[iZ0][iX0][iY0].recE =
hit.energy();
377 int iZ0 =
detId.zside() > 0 ? 1 : 0;
378 (*eeEnergies)[iZ0][iX0][iY0].simE +=
simHit.energy();
379 ++(*eeEnergies)[iZ0][iX0][iY0].simHit;
383 pair<int, int> EExtalCoor[
nEeX][
nEeY][2];
385 for (
int iEeZ = 0; iEeZ < 2; ++iEeZ) {
386 for (
int iEeX = 0; iEeX <
nEeX; ++iEeX) {
387 for (
int iEeY = 0; iEeY <
nEeY; ++iEeY) {
388 EEcrystalShot[iEeX][iEeY][iEeZ] =
false;
389 EExtalCoor[iEeX][iEeY][iEeZ] = make_pair(0, 0);
400 if (iX0 < 0 || iX0 >=
nEeX) {
401 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 402 <<
"[0," <<
nEeX - 1 <<
"]\n";
404 if (iY0 < 0 || iY0 >=
nEeY) {
405 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 406 <<
"[0," <<
nEeY - 1 <<
"]\n";
409 if (!EEcrystalShot[iX0][iY0][iZ0]) {
410 EEcrystalShot[iX0][iY0][iZ0] =
true;
413 cout <<
"Error: several digi for same crystal!";
421 (*eeEnergies)[iZ0][iX0][iY0].gain12 =
true;
422 for (
int i = 0;
i <
frame.size(); ++
i) {
423 const int gain12Code = 0x1;
425 (*eeEnergies)[iZ0][iX0][iY0].gain12 =
false;
431 bool highInterest =
false;
453 <<
"RU " <<
frame.id() <<
", " 454 <<
"DCC " << ru.first <<
" Ch : " << ru.second <<
": " 455 <<
"LI channel under ZS threshold.\n";
459 <<
"more ZS errors for this event...\n";
465 for (
int iEeZ = 0; iEeZ < 2; ++iEeZ) {
466 for (
int iEeX = 0; iEeX <
nEeX; ++iEeX) {
467 for (
int iEeY = 0; iEeY <
nEeY; ++iEeY) {
469 EExtalCoor[iEeX][iEeY][iEeZ].
first,
470 EExtalCoor[iEeX][iEeY][iEeZ].
second,
471 EEcrystalShot[iEeX][iEeY][iEeZ] ? 1 : 0);
476 for (
int iZ0 = 0; iZ0 <
nEndcaps; ++iZ0) {
477 for (
int iX0 = 0; iX0 <
nEeX; ++iX0) {
478 for (
int iY0 = 0; iY0 <
nEeY; ++iY0) {
479 double recE = (*eeEnergies)[iZ0][iX0][iY0].recE;
487 if (!(*eeEnergies)[iZ0][iX0][iY0].
simHit) {
493 fill(
meEeRecVsSimE_, (*eeEnergies)[iZ0][iX0][iY0].simE, (*eeEnergies)[iZ0][iX0][iY0].recE);
500 int EEZs1RuCount[2][20][20];
501 int EEFullRuCount[2][20][20];
502 int EEForcedRuCount[2][20][20];
503 for (
int iZ(0); iZ < 2; iZ++) {
504 for (
int iX(0); iX < 20; iX++) {
505 for (
int iY(0); iY < 20; iY++) {
506 EEZs1RuCount[iZ][iX][iY] = 0;
507 EEFullRuCount[iZ][iX][iY] = 0;
508 EEForcedRuCount[iZ][iX][iY] = 0;
514 char eeSrfMark[2][20][20];
515 bzero(eeSrfMark,
sizeof(eeSrfMark));
520 int iX = srf.
id().
ix();
521 int iY = srf.
id().
iy();
523 if (iX < 1 || iY > 100)
525 <<
"Found an endcap SRF with an invalid det ID: " << srf.
id() <<
".\n";
526 ++eeSrfMark[
zside > 0 ? 1 : 0][iX - 1][iY - 1];
527 if (eeSrfMark[
zside > 0 ? 1 : 0][iX - 1][iY - 1] > 1)
528 throw cms::Exception(
"EcalSelectiveReadoutValidation") <<
"Duplicate SRF for supercrystal " << srf.
id() <<
".\n";
531 EEZs1RuCount[
zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
535 EEFullRuCount[
zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
540 EEForcedRuCount[
zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
543 for (
int iZ(0); iZ < 2; iZ++) {
544 int xOffset(iZ == 0 ? -40 : 20);
545 for (
int iX(0); iX < 20; iX++) {
546 for (
int iY(0); iY < 20; iY++) {
547 int GraphX = (iX + 1) + xOffset;
548 int GraphY = (iY + 1);
549 fill(
meZs1Ru_, GraphX, GraphY, EEZs1RuCount[iZ][iX][iY]);
558 <<
" ZS-flagged EE channels under " 559 "the ZS threshold, whose " 564 bool eventError =
false;
567 vector<pair<int, int>> xtalEtaPhi;
574 std::unique_ptr<std::array<std::array<energiesEb_t, nEbPhi>,
nEbEta>> ebEnergies =
575 std::make_unique<std::array<std::array<energiesEb_t, nEbPhi>,
nEbEta>>();
577 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
578 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0) {
581 (*ebEnergies)[iEta0][iPhi0].simE = 0;
582 (*ebEnergies)[iEta0][iPhi0].simHit = 0;
583 (*ebEnergies)[iEta0][iPhi0].gain12 =
false;
584 xtalEtaPhi.push_back(pair<int, int>(iEta0, iPhi0));
598 if (iEta0 < 0 || iEta0 >=
nEbEta) {
600 s <<
"EcalSelectiveReadoutValidation: " 601 <<
"iEta0 (= " << iEta0 <<
") is out of range (" 602 <<
"[0," <<
nEbEta - 1 <<
"]\n";
605 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
607 s <<
"EcalSelectiveReadoutValidation: " 608 <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 609 <<
"[0," <<
nEbPhi - 1 <<
"]\n";
614 (*ebEnergies)[iEta0][iPhi0].gain12 =
true;
615 for (
int i = 0;
i <
frame.size(); ++
i) {
616 const int gain12Code = 0x1;
618 (*ebEnergies)[iEta0][iPhi0].gain12 =
false;
623 (*ebEnergies)[iEta0][iPhi0].phi =
rad2deg * ((double)xtalPos.
phi());
624 (*ebEnergies)[iEta0][iPhi0].eta = xtalPos.
eta();
633 int iPhi =
detId.iphi();
635 (*ebEnergies)[iEta0][iPhi0].simE +=
simHit.energy();
636 ++(*ebEnergies)[iEta0][iPhi0].simHit;
642 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
643 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0) {
644 crystalShot[iEta0][iPhi0] =
false;
645 EBxtalCoor[iEta0][iPhi0] = make_pair(0, 0);
655 if (iEta0 < 0 || iEta0 >=
nEbEta) {
656 throw(
cms::Exception(
"EcalSelectiveReadoutValidation") <<
"iEta0 (= " << iEta0 <<
") is out of range (" 657 <<
"[0," <<
nEbEta - 1 <<
"]");
659 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
660 throw(
cms::Exception(
"EcalSelectiveReadoutValidation") <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 661 <<
"[0," <<
nEbPhi - 1 <<
"]");
665 if (!crystalShot[iEta0][iPhi0]) {
666 crystalShot[iEta0][iPhi0] =
true;
669 cout <<
"Error: several digi for same crystal!";
676 (*ebEnergies)[iEta0][iPhi0].gain12 =
true;
677 for (
int i = 0;
i <
frame.size(); ++
i) {
678 const int gain12Code = 0x1;
680 (*ebEnergies)[iEta0][iPhi0].gain12 =
false;
686 bool highInterest =
false;
710 <<
"RU " <<
frame.id() <<
", " 711 <<
"DCC " << ru.first <<
" Ch : " << ru.second <<
": " 712 <<
"LI channel under ZS threshold.\n";
716 <<
"more ZS errors for this event...\n";
722 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
723 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0)
725 EBxtalCoor[iEta0][iPhi0].
first,
726 EBxtalCoor[iEta0][iPhi0].
second,
727 crystalShot[iEta0][iPhi0] ? 1. : 0.);
737 if (iEta0 < 0 || iEta0 >=
nEbEta) {
738 LogError(
"EcalSrValid") <<
"iEta0 (= " << iEta0 <<
") is out of range (" 739 <<
"[0," <<
nEbEta - 1 <<
"]\n";
741 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
742 LogError(
"EcalSrValid") <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 743 <<
"[0," <<
nEbPhi - 1 <<
"]\n";
745 (*ebEnergies)[iEta0][iPhi0].recE =
hit.energy();
749 for (
unsigned int i = 0;
i < xtalEtaPhi.size(); ++
i) {
750 int iEta0 = xtalEtaPhi[
i].first;
751 int iPhi0 = xtalEtaPhi[
i].second;
754 double recE = energies.
recE;
772 int EBZs1RuCount[2][17][72];
773 int EBFullRuCount[2][17][72];
774 int EBForcedRuCount[2][17][72];
775 std::pair<int, int> EBtowerCoor[2][17][72];
776 for (
int iZ(0); iZ < 2; iZ++) {
778 for (
int iPhi(0); iPhi < 72; iPhi++) {
779 EBZs1RuCount[iZ][
iEta][iPhi] = 0;
780 EBFullRuCount[iZ][
iEta][iPhi] = 0;
781 EBForcedRuCount[iZ][
iEta][iPhi] = 0;
788 char ebSrfMark[2][17][72];
789 bzero(ebSrfMark,
sizeof(ebSrfMark));
794 int iPhi = srf.
id().
iphi();
800 if (iEtaAbs < 1 || iEtaAbs > 17 || iPhi < 1 || iPhi > 72)
802 <<
"Found a barrel SRF with an invalid det ID: " << srf.
id() <<
".\n";
803 ++ebSrfMark[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1];
804 if (ebSrfMark[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] > 1)
805 throw cms::Exception(
"EcalSelectiveReadoutValidation") <<
"Duplicate SRF for RU " << srf.
id() <<
".\n";
807 EBtowerCoor[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] = std::pair<int, int>(srf.
id().
ieta(), srf.
id().
iphi());
811 EBZs1RuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
814 EBFullRuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
818 EBForcedRuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
821 for (
int iZ(0); iZ < 2; iZ++) {
823 for (
int iPhi(0); iPhi < 72; iPhi++) {
835 <<
" ZS-flagged EB channels under " 836 "the ZS threshold, whose " 868 "ECAL DCC event fragment size;Dcc id; " 876 "LI channel payload per DCC;Dcc id; " 884 "HI channel payload per DCC;Dcc id; " 892 "ECAL DCC event fragment size;Dcc id; " 900 "ECAL Barrel low interest crystal data payload;" 901 "Event size (kB);Nevts",
908 "Endcap low interest crystal data payload;" 909 "Event size (kB);Nevts",
916 "ECAL low interest crystal data payload;" 917 "Event size (kB);Nevts",
924 "Barrel high interest crystal data payload;" 925 "Event size (kB);Nevts",
932 "Endcap high interest crystal data payload;" 933 "Event size (kB);Nevts",
940 "ECAL high interest crystal data payload;" 941 "Event size (kB);Nevts",
948 "Barrel data volume;Event size (kB);Nevts",
955 "Endcap data volume;Event size (kB);Nevts",
962 "ECAL data volume;Event size (kB);Nevts",
969 "ECAL crystal channel occupancy after zero suppression;" 970 "iX -200 / iEta / iX + 100;" 971 "iY / iPhi (starting from -10^{o}!);" 985 tpUnit =
string(
"TP hw unit");
987 title =
string(
"Trigger primitive TT E_{T};E_{T} ") + tpUnit +
string(
";Event Count");
997 "Trigger primitive TT flag;Flag number;Event count",
1002 title =
string(
"Trigger tower flag vs TP;E_{T}(TT) (") + tpUnit +
string(
");Flag number");
1007 "Trigger tower flag vs #sumE_{T};" 1017 "Trigger primitive Et (TP) vs #sumE_{T};" 1018 "E_{T} (sum) (GeV);" 1025 "Trigger primitive E_{T};" 1035 "Full Read-out readout unit;" 1036 "iX - 40 / iEta / iX + 20;" 1037 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1048 "Number of Full-readout-flagged readout units;" 1049 "FRO RU count;Event count",
1056 "Number of EB Full-readout-flagged readout units;" 1057 "FRO RU count;Event count",
1064 "Number of EE Full-readout-flagged readout units;" 1065 "FRO RU count;Event count",
1072 "Readout unit with ZS-thr-1 flag;" 1073 "iX - 40 / iEta / iX + 20;" 1074 "iY0 / iPhi0 (iPhi = 1 at phi = 0 rad);" 1085 "ECAL readout unit with forced bit of SR flag on;" 1086 "iX - 40 / iEta / iX + 20;" 1087 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1098 "Low interest trigger tower flags;" 1111 "Mid interest trigger tower flags;" 1124 "High interest trigger tower flags;" 1137 "Trigger tower flags with forced bit set;" 1148 const float ebMinNoise = -1.;
1149 const float ebMaxNoise = 1.;
1151 const float eeMinNoise = -1.;
1152 const float eeMaxNoise = 1.;
1154 const float ebMinE = ebMinNoise;
1155 const float ebMaxE = ebMaxNoise;
1157 const float eeMinE = eeMinNoise;
1158 const float eeMaxE = eeMaxNoise;
1160 const int evtMax = 500;
1162 meEbRecE_ =
book1D(ibooker,
"hEbRecE",
"Crystal reconstructed energy;E (GeV);Event count", 100, ebMinE, ebMaxE);
1164 meEbEMean_ =
bookProfile(ibooker,
"hEbEMean",
"EE <E_hit>;event #;<E_hit> (GeV)", evtMax, .5, evtMax + .5);
1169 "(rec E of crystal without deposited energy)" 1170 ";Rec E (GeV);Event count",
1177 "Emulated ouput of ZS FIR filter for EB " 1178 "low interest crystals;" 1187 "Emulated ouput of ZS FIR filter for EB " 1188 "high interest crystals;" 1203 meEbSimE_ =
book1D(ibooker,
"hEbSimE",
"EB hit crystal simulated energy", 100, ebMinE, ebMaxE);
1205 meEbRecEHitXtal_ =
book1D(ibooker,
"hEbRecEHitXtal",
"EB rec energy of hit crystals", 100, ebMinE, ebMaxE);
1209 "Crystal simulated vs reconstructed energy;" 1210 "Esim (GeV);Erec GeV);Event count",
1220 "Crystal no-zs simulated vs reconstructed " 1222 "Esim (GeV);Erec GeV);Event count",
1232 "EE crystal reconstructed energy;E (GeV);" 1238 meEeEMean_ =
bookProfile(ibooker,
"hEeEMean",
"<E_{EE hit}>;event;<E_{hit}> (GeV)", evtMax, .5, evtMax + .5);
1243 "(rec E of crystal without deposited energy);" 1244 "E (GeV);Event count",
1251 "Emulated ouput of ZS FIR filter for EE " 1252 "low interest crystals;" 1261 "Emulated ouput of ZS FIR filter for EE " 1262 "high interest crystals;" 1277 meEeSimE_ =
book1D(ibooker,
"hEeSimE",
"EE hit crystal simulated energy", 100, eeMinE, eeMaxE);
1279 meEeRecEHitXtal_ =
book1D(ibooker,
"hEeRecEHitXtal",
"EE rec energy of hit crystals", 100, eeMinE, eeMaxE);
1283 "EE crystal simulated vs reconstructed energy;" 1284 "Esim (GeV);Erec GeV);Event count",
1294 "EE crystal no-zs simulated vs " 1296 "energy;Esim (GeV);Erec GeV);Event count",
1306 "TTFlags and SR Flags mismatch;" 1307 "iX - 40 / iEta / iX + 20;" 1308 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1319 "hIncompleteFROMap",
1320 "Incomplete full-readout-flagged readout units;" 1321 "iX - 40 / iEta / iX + 20;" 1322 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1332 "hIncompleteFROCnt",
1333 "Number of incomplete full-readout-flagged " 1335 "Number of RUs;Event count;",
1341 "hIncompleteFRORateMap",
1342 "Incomplete full-readout-flagged readout units;" 1343 "iX - 40 / iEta / iX + 20;" 1344 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1345 "Incomplete error rate",
1355 "Dropped full-readout-flagged readout units;" 1356 "iX - 40 / iEta / iX + 20;" 1357 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1368 "Number of dropped full-readout-flagged " 1369 "RU count;RU count;Event count",
1376 "Number of zero-suppressed-flagged RU fully " 1378 "RU count;Event count",
1384 buf <<
"Number of LI EB channels below the " <<
ebZsThr_ / 4.
1385 <<
" ADC count ZS threshold;" 1386 "Channel count;Event count",
1390 buf <<
"Number of LI EE channels below the " <<
eeZsThr_ / 4.
1391 <<
" ADC count ZS theshold;" 1392 "Channel count;Event count",
1397 "Number of LI channels below the ZS threshold;" 1398 "Channel count;Event count",
1405 "Number of EB channels below the ZS " 1406 "threshold in a LI but fully readout RU;" 1407 "Channel count;Event count;",
1414 "Number EE channels below the ZS threshold" 1415 " in a LI but fully readout RU;" 1416 "Channel count;Event count",
1423 "Number of LI channels below the ZS threshold " 1424 "in a LI but fully readout RU;" 1425 "Channel count;Event count",
1431 "hDroppedFRORateMap",
1432 "Dropped full-readout-flagged readout units" 1433 "iX - 40 / iEta / iX + 20;" 1434 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1445 "Complete zero-suppressed-flagged readout units;" 1446 "iX - 40 / iEta / iX + 20;" 1447 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1458 "Complete zero-suppressed-flagged readout units;" 1459 "iX - 40 / iEta / iX + 20;" 1460 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1461 "Completeness rate",
1477 s << (
s.str().empty() ?
"" :
", ") << *
it;
1480 if (!
s.str().empty()) {
1481 LogWarning(
"Configuration") <<
"Parameter 'histList' contains some unknown histogram(s). " 1482 "Check spelling. Following name were not found: " 1492 for (
int iTTFlag(0); iTTFlag < 8; iTTFlag++) {
1493 TTFlagCount[iTTFlag] = 0;
1495 for (
int iTtEta(0); iTtEta <
nTtEta; iTtEta++) {
1496 for (
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++) {
1497 LiTTFlagCount[iTtEta][iTtPhi] = 0;
1498 MiTTFlagCount[iTtEta][iTtPhi] = 0;
1499 HiTTFlagCount[iTtEta][iTtPhi] = 0;
1503 for (
int iEt(0); iEt < 100; iEt++) {
1514 double lsb10bitsEB(ebItr == physMap.end() ? 0. : ebItr->second.EtSat / 1024.);
1516 double lsb10bitsEE(eeItr == physMap.end() ? 0. : eeItr->second.EtSat / 1024.);
1522 unsigned int ADC =
it->compressedEt();
1524 double lsb10bits(0.);
1526 lsb10bits = lsb10bitsEB;
1528 lsb10bits = lsb10bitsEE;
1532 uint32_t lutGrp = 999;
1533 if (itgrp != lutGrpMap.end())
1534 lutGrp = itgrp->second;
1537 if (itLut != lutMap.end()) {
1538 const unsigned int* lut = (itLut->second).getLut();
1539 for (
unsigned int i = 0;
i < 1024;
i++)
1540 if (
ADC == (0xff & lut[
i])) {
1546 tpEt = lsb10bits * tpg10bits;
1548 tpEt =
it->compressedEt();
1550 int iEta =
it->id().ieta();
1552 int iPhi =
it->id().iphi();
1554 double etSum =
ttEtSums[iEta0][iPhi0];
1557 if ((iE >= 0) && (iE < 100)) {
1566 ++TTFlagCount[
it->ttFlag()];
1567 if ((
it->ttFlag() & 0x3) == 0) {
1568 LiTTFlagCount[iEta0][iPhi0] += 1;
1569 }
else if ((
it->ttFlag() & 0x3) == 1) {
1570 MiTTFlagCount[iEta0][iPhi0] += 1;
1571 }
else if ((
it->ttFlag() & 0x3) == 3) {
1572 HiTTFlagCount[iEta0][iPhi0] += 1;
1574 if ((
it->ttFlag() & 0x4)) {
1583 for (
int ittflag(0); ittflag < 8; ittflag++) {
1586 for (
int iTtEta(0); iTtEta <
nTtEta; iTtEta++) {
1587 for (
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++) {
1594 for (
int iE(0); iE < 100; iE++) {
1598 for (
int iE(0); iE < 40; iE++) {
1615 for (
unsigned int digis = 0; digis <
ebDigis_->
size(); ++digis) {
1621 for (
unsigned int digis = 0; digis <
eeDigis_->
size(); ++digis) {
1627 for (
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0) {
1657 template <
class T,
class U>
1660 typedef typename U::key_type RuDetId;
1662 typename U::const_iterator srf = srFlagColl.find(ruId);
1664 bool highInterest =
false;
1667 if (srf != srFlagColl.end()) {
1675 pair<int, int> ch =
dccCh(xtalId);
1719 if (ch.second < 1 || ch.second > 68) {
1721 <<
"Error in DCC channel retrieval for crystal with detId " << xtalId.
rawId()
1722 <<
"DCC channel out of allowed range [1..68]\n";
1752 static std::atomic<bool> firstCall{
true};
1753 bool expected =
true;
1754 if (firstCall.compare_exchange_strong(expected,
false)) {
1763 double adc2GeV = 0.;
1777 double gainInv[] = {12., 1., 6., 12.};
1779 for (
int i = 0;
i <
n; ++
i) {
1789 throw cms::Exception(
"InvalidParameter") <<
"Wrong type of DetId passed to the " 1790 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1791 "An ECAL DetId was expected.\n";
1795 switch (
detId.subdetId()) {
1804 const int oneXtalPhi0 = iTtPhi0 * 5;
1805 const int oneXtalEta0 = (iTtEta0 -
nOneEeTtEta) * 5;
1810 if (
detId.rawId() & 0x8000) {
1821 <<
"Wrong type of DetId passed to the method " 1822 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1823 "A valid EcalTriggerTower, EcalBarrel or EcalEndcap DetId was expected. " 1825 << xtalId.
rawId() <<
".\n";
1834 throw cms::Exception(
"OutOfRange") <<
"Got an invalid DCC ID, DCCID = " <<
result.first <<
" for DetId 0x" << hex
1835 <<
detId.rawId() <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1841 throw cms::Exception(
"OutOfRange") <<
"Got an invalid DCC channel ID, DCC_CH = " <<
result.second <<
" for DetId 0x" 1842 << hex <<
detId.rawId() <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1854 int iDCC = EcalElecId.
dccId();
1855 int iDccChan = EcalElecId.
towerId();
1856 const bool ignoreSingle =
true;
1867 if (eeGeometry ==
nullptr || ebGeometry ==
nullptr) {
1875 for (
int iEta0 = 0; iEta0 <
nTtEta; ++iEta0) {
1876 for (
int iPhi0 = 0; iPhi0 <
nTtPhi; ++iPhi0) {
1908 int innerTTEtas[] = {0, 1, 54, 55};
1909 for (
unsigned iRing = 0; iRing <
sizeof(innerTTEtas) /
sizeof(innerTTEtas[0]); ++iRing) {
1910 int iTtEta0 = innerTTEtas[iRing];
1926 for (
unsigned iTtPhi0 = 0; iTtPhi0 <
nTtPhi - 1; iTtPhi0 += 2) {
1941 double weights[] = {0., -1 / 3., -1 / 3., -1 / 3., 0., 1.};
1943 double adc2GeV = 0.;
1950 throw cms::Exception(
"Severe Error") << __FILE__ <<
":" << __LINE__ <<
": " 1951 <<
"this is a bug. Please report it.\n";
1958 double gainInv[] = {12., 1., 6., 12};
1962 if (iframe >= 0 && iframe <
frame.size()) {
2033 MonitorElement*
result = ibook.
bookProfile2D(
name,
title, nbinx,
xmin,
xmax, nbiny,
ymin,
ymax, 0, 0, 0,
option);
2064 log <<
"Avalailable histograms (DQM monitor elements): \n";
2066 log <<
it->first <<
": " <<
it->second <<
"\n";
2068 log <<
"\nTo include an histogram add its name in the vstring parameter " 2069 "'histograms' of the EcalSelectiveReadoutValidation module\n";
2073 double ruHeaderPayload = 0.;
2074 const int firstEbDcc0 =
nEeDccs / 2;
2075 for (
int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 +
nEbDccs; ++iDcc0) {
2083 double ruHeaderPayload = 0.;
2084 const unsigned firstEbDcc0 =
nEeDccs / 2;
2085 for (
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0) {
2087 if (iDcc0 == firstEbDcc0)
2097 const std::vector<int>& firWeights,
2100 const int nFIRTaps = 6;
2102 const vector<int>&
w = firWeights;
2106 bool gain12saturated =
false;
2107 const int gain12 = 0x01;
2108 const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
2111 for (
int iSample = firstFIRSample - 1; iSample < lastFIRSample; ++iSample, ++iWeight) {
2112 if (iSample >= 0 && iSample <
frame.size()) {
2114 if (
sample.gainId() != gain12)
2115 gain12saturated =
true;
2116 LogTrace(
"DccFir") << (iSample >= firstFIRSample ?
"+" :
"") <<
sample.adc() <<
"*(" <<
w[iWeight] <<
")";
2117 acc +=
sample.adc() *
w[iWeight];
2120 <<
": Not enough samples in data frame or 'ecalDccZs1stSample' module " 2121 "parameter is not valid...";
2128 acc = (acc >= 0) ? (acc >> 8) : -(-acc >> 8);
2133 LogTrace(
"DccFir") <<
"acc: " << acc <<
"\n" 2134 <<
"saturated: " << (gain12saturated ?
"yes" :
"no") <<
"\n";
2137 *saturated = gain12saturated;
2144 const int nFIRTaps = 6;
2145 vector<int> firWeights(nFIRTaps, 0);
2146 const static int maxWeight = 0xEFF;
2147 for (
unsigned i = 0;
i <
min((
size_t)nFIRTaps, normalizedWeights.size()); ++
i) {
2148 firWeights[
i] = lround(normalizedWeights[
i] * (1 << 10));
2149 if (
abs(firWeights[
i]) > maxWeight) {
2150 firWeights[
i] = firWeights[
i] < 0 ? -maxWeight : maxWeight;
2157 bool notNormalized =
false;
2158 bool notInt =
false;
2159 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2160 if (weightsForZsFIR[
i] > 1.)
2161 notNormalized =
true;
2162 if ((
int)weightsForZsFIR[
i] != weightsForZsFIR[
i])
2165 if (notInt && notNormalized) {
2166 throw cms::Exception(
"InvalidParameter") <<
"weigtsForZsFIR paramater values are not valid: they " 2167 <<
"must either be integer and uses the hardware representation " 2168 <<
"of the weights or less or equal than 1 and used the normalized " 2169 <<
"representation.";
2172 if (notNormalized) {
2173 firWeights_ = vector<int>(weightsForZsFIR.size());
2174 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2181 log <<
"Input weights for FIR: ";
2182 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2183 log << weightsForZsFIR[
i] <<
"\t";
2186 log <<
"\nActual FIR weights: ";
2191 log <<
"\nNormalized FIR weights after hw representation rounding: ";
2204 <<
"' for SRP algorithm result check.\n";
2212 <<
"' for Selective Readout decision application check.\n";
2222 typedef typename T::const_iterator SrFlagCollectionConstIt;
2223 typedef typename T::key_type MyRuDetIdType;
2224 SrFlagCollectionConstIt itSrfFromData = srfFromData.begin();
2225 SrFlagCollectionConstIt itComputedSr = computedSrf.begin();
2227 while (itSrfFromData != srfFromData.end() || itComputedSr != computedSrf.end()) {
2228 MyRuDetIdType inconsistentRu = 0;
2229 bool inconsistent =
false;
2230 if (itComputedSr == computedSrf.end() ||
2231 (itSrfFromData != srfFromData.end() && itSrfFromData->id() < itComputedSr->id())) {
2233 pair<int, int> ch =
dccCh(itSrfFromData->id());
2234 srpAlgoErrorLog_ <<
event.id() <<
": " << itSrfFromData->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2235 <<
" found in data (SRF:" << itSrfFromData->flagName()
2236 <<
") but not in the set of SRFs computed from the data TTF.\n";
2237 inconsistentRu = itSrfFromData->id();
2238 inconsistent =
true;
2240 }
else if (itSrfFromData == srfFromData.end() ||
2241 (itComputedSr != computedSrf.end() && itComputedSr->id() < itSrfFromData->id())) {
2243 pair<int, int> ch =
dccCh(itComputedSr->id());
2245 srpAlgoErrorLog_ <<
event.id() <<
": " << itComputedSr->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2246 <<
" not found in data. Computed SRF: " << itComputedSr->flagName() <<
".\n";
2247 inconsistentRu = itComputedSr->id();
2248 inconsistent =
true;
2253 if (itComputedSr->value() != itSrfFromData->value()) {
2254 pair<int, int> ch =
dccCh(itSrfFromData->id());
2255 srpAlgoErrorLog_ <<
event.id() <<
", " << itSrfFromData->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2256 <<
", SRF inconsistency: " 2257 <<
"from data: " << itSrfFromData->flagName()
2258 <<
", computed from TTF: " << itComputedSr->flagName() <<
"\n";
2259 inconsistentRu = itComputedSr->id();
2260 inconsistent =
true;
2262 if (itComputedSr != computedSrf.end())
2264 if (itSrfFromData != srfFromData.end())
2276 if (
detId.ietaAbs() > 17) {
2278 <<
"Argument of EcalSelectiveReadoutValidation::dccId(const EcalTrigTowerDetId&) " 2279 <<
"must be a barrel trigger tower Id\n";
2300 buf <<
"List of DCCs found in the first processed event: ";
2302 for (
unsigned iDcc = 0; iDcc <
nDccs_; ++iDcc) {
2308 buf <<
"\nOnly DCCs from this list will be considered for error logging\n";
2316 typedef typename T::const_iterator SrFlagCollectionConstIt;
2317 typedef typename T::key_type MyRuDetIdType;
2319 for (SrFlagCollectionConstIt itSrf = srfs.begin(); itSrf != srfs.end(); ++itSrf) {
2321 pair<int, int> ru =
dccCh(itSrf->id());
2333 << ru.second <<
") is 'Full readout' " 2334 <<
"while none of its channel was read out\n";
2341 << ru.second <<
") is 'Full readout' " 2343 <<
getCrystalCount(ru.first, ru.second) <<
" channels were read out.\n";
2363 if (iDcc < minDccId_ || iDcc >
maxDccId_) {
2365 }
else if (10 <= iDcc && iDcc <= 45) {
2372 iDccPhi = iDcc - 45;
2373 switch (iDccPhi * 100 + iDccCh) {
void configFirWeights(const std::vector< double > &weightsForZsFIR)
void printAvailableHists()
MonitorElement * meEbFullRoCnt_
std::string srApplicationErrorLogFileName_
MonitorElement * meEbRecVsSimE_
MonitorElement * meForcedRu_
MonitorElement * meChOcc_
T getParameter(std::string const &) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
int getCrystalCount(int iDcc, int iDccCh)
CollHandle< EBDigiCollection > ebNoZsDigis_
MonitorElement * meEeEMean_
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
MonitorElement * meZsErrType1Cnt_
std::pair< int, int > getDCCandSC(EcalScDetId id) const
MonitorElement * meTtfVsTp_
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
static const int nEeX
EE crystal grid size along X.
MonitorElement * meDroppedFROMap_
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
int nIncompleteFRO_
Counter of FRO-flagged RU only partial data.
MonitorElement * meCompleteZSRateMap_
MonitorElement * meEeFullRoCnt_
int ieta() const
get the tower ieta
virtual void setCurrentFolder(std::string const &fullpath)
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
int cIndex2iTtPhi(int i) const
bool verbose_
Verbosity switch.
static const int nEbPhi
number of crystals along Phi in EB
MonitorElement * meEeZsErrCnt_
int xtalGraphY(const EEDetId &id) const
int ruGraphY(const EcalScDetId &id) const
std::map< uint32_t, uint32_t >::const_iterator EcalTPGGroupsMapItr
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
MonitorElement * meEbNoise_
static const int SRF_FORCED_MASK
static const double rad2deg
Conversion factor from radian to degree.
Geom::Phi< T > phi() const
MonitorElement * meEeZsErrType1Cnt_
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
int simHit
energy reconstructed from zero-suppressed digi
CollHandle< EcalTrigPrimDigiCollection > tps_
Sin< T >::type sin(const T &t)
MonitorElement * meVolBLI_
int iXY2cIndex(int iX) const
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::pair< int, int > dccCh(const DetId &xtalId) const
void analyzeEB(const edm::Event &event, const edm::EventSetup &es)
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > lutMapHandle
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * meEbHiZsFir_
MonitorElement * meDccVolFromData_
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
size_t size() const
Lenght of the data buffer in bytes.
double getBytesPerCrystal() const
CollHandle< FEDRawDataCollection > fedRaw_
MonitorElement * meTpVsEtSum_
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
MonitorElement * meDccLiVol_
void analyzeEE(const edm::Event &event, const edm::EventSetup &es)
MonitorElement * meEeNoise_
MonitorElement * meVolELI_
int getRuCount(int iDcc0) const
static const int nEeDccs
number of DCCs for EE
Log< level::Error, false > LogError
MonitorElement * meTtfVsEtSum_
double ttEtSums[nTtEta][nTtPhi]
double frame2Energy(const EcalDataFrame &frame) const
MonitorElement * meEbZsErrCnt_
MonitorElement * meEeLiZsFir_
MonitorElement * meDroppedFROCnt_
MonitorElement * meTpMap_
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
const EcalTrigTowerDetId & id() const override
double frame2EnergyForTp(const T &frame, int offset=0) const
MonitorElement * meDccHiVol_
MonitorElement * meEbLiZsFir_
MonitorElement * meLiTtf_
bool registerHist(const std::string &name, const std::string &title)
int cIndex2iPhi(int i) const
void setTtEtSums(const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
MonitorElement * meVolBHI_
const EcalScDetId & id() const override
static const int minDccId_
static const int nEbEta
number of crystals along Eta in EB
T getUntrackedParameter(std::string const &, T const &) const
U second(std::pair< T, U > const &p)
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > hTriggerTowerMap
MonitorElement * meIncompleteFROMap_
~EcalSelectiveReadoutValidation() override
Destructor.
CollHandle< EESrFlagCollection > eeComputedSrFlags_
static const int nTtPhi
Number of Trigger Towers along Phi.
CollHandle< EEDigiCollection > eeDigis_
std::vector< int > firWeights_
int zside() const
get the z-side of the tower (1/-1)
void checkSrApplication(const edm::Event &event, T &srfs)
std::string outputFile_
Output file for histograms.
CollHandle< RecHitCollection > eeRecHits_
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
int ruGraphX(const EcalScDetId &id) const
static const int maxDccId_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * bookProfile2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbinx, double xmin, double xmax, int nbiny, double ymin, double ymax, const char *option="")
double getDccEventSize(int iDcc0, double nReadXtals) const
void analyzeDataVolume(const edm::Event &e, const edm::EventSetup &es)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
int towerId() const
get the tower id
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > lutGrpHandle
MonitorElement * meEeHiZsFir_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoToken
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyzes the event.
void anaDigi(const T &frame, const U &srFlagColl)
CollHandle< EBSrFlagCollection > ebSrFlags_
MonitorElement * meEbNoZsRecVsSimE_
edm::ESGetToken< EcalTPGPhysicsConst, EcalTPGPhysicsConstRcd > physHandle
MonitorElement * meEeSimE_
void updateL1aRate(const edm::Event &event)
static const int SRF_FULL
Abs< T >::type abs(const T &t)
int nCompleteZS_
Counter of ZS-flagged RU fully read out.
double getDccOverhead(subdet_t subdet) const
CollHandle< std::vector< PCaloHit > > eeSimHits_
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=nullptr)
MonitorElement * meDroppedFRORateMap_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
bool logSrApplicationErrors_
std::vector< double > weights_
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meCompleteZSCnt_
int iTtPhi2cIndex(int iPhi) const
MonitorElement * meMiTtf_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
virtual TProfile * getTProfile()
MonitorElement * meVolEHI_
void read(const edm::Event &event)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * book2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
CollHandle< EESrFlagCollection > eeSrFlags_
static const int nDccRus_[nDccs_]
number of RUs for each DCC
double getEbEventSize(double nReadXtals) const
MonitorElement * meEeRecVsSimE_
const_iterator end() const
Namespace of DDCMS conversion namespace.
static const int nOneEeTtEta
Number of Trigger Towers in an endcap along Eta.
int dccId(const EcalScDetId &detId) const
int nEbFROCnt_
Counter of EB FRO-flagged RUs.
static const int nEbDccs
number of DCCs for EB
Log< level::Info, false > LogInfo
int ietaAbs() const
get the absolute value of the tower ieta
MonitorElement * meZsErrCnt_
CollHandle< std::vector< PCaloHit > > ebSimHits_
int nEbZsErrors_
Counter of EB ZS errors (LI channel below ZS threshold)
static const int scEdge
Number of crystals along a supercrystal edge.
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
MonitorElement * meFullRoCnt_
double recE
energy reconstructed from unsuppressed digi
static const double tmax[3]
void readAllCollections(const edm::Event &e)
static std::vector< int > getFIRWeights(const std::vector< double > &normalizedWeights)
static const int ebTtEdge
Number of crystals along an EB TT.
MonitorElement * book1D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
EcalSelectiveReadoutValidation(const edm::ParameterSet &ps)
Constructor.
int cIndex2iEta(int i) const
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
MonitorElement * meForcedTtf_
MonitorElement * meDccVol_
static const int kByte_
number of bytes in 1 kByte:
const_iterator begin() const
The iterator returned can not safely be used across threads.
constexpr uint32_t rawId() const
get the raw id
MonitorElement * meVolLI_
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
int nPerRu_[nDccs_][nDccChs_]
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalmapping
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
MonitorElement * meCompleteZSMap_
MonitorElement * meIncompleteFRORateMap_
MonitorElement * meVolHI_
CollHandle< EEDigiCollection > eeNoZsDigis_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * meEeRecE_
std::map< std::string, std::string > availableHistList_
std::map< uint32_t, EcalTPGLut > EcalTPGLutMap
bool isRuComplete_[nDccs_][nDccChs_]
int iPhi2cIndex(int iPhi) const
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static const int nTtEta
Number of Trigger Towers along Eta.
MonitorElement * meEeNoZsRecVsSimE_
MonitorElement * meEbZsErrType1Cnt_
MonitorElement * meEbRecE_
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
MonitorElement * meEeRecEHitXtal_
int nDroppedFRO_
Counter of FRO-flagged RU dropped from data.
void setToken(edm::ConsumesCollector &collector)
void fill(MonitorElement *me, float x)
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap
MonitorElement * meL1aRate_
void compareSrfColl(const edm::Event &event, T &srfFromData, T &computedSrf)
double noZsRecE
sim hit energy sum
Log< level::Warning, false > LogWarning
double getL1aRate() const
MonitorElement * meEbRecEHitXtal_
MonitorElement * meEbSimE_
std::ofstream srpAlgoErrorLog_
Output ascii file for unconsistency on SR flags.
static const int nEeY
EE crystal grid size along Y.
CollHandle< EBDigiCollection > ebDigis_
int cIndex2iTtEta(int i) const
std::map< uint32_t, EcalTPGPhysicsConst::Item >::const_iterator EcalTPGPhysicsConstMapIterator
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int iphi() const
get the tower iphi
UseScope< MonitorElementData::Scope::RUN > UseRunScope
double getEeEventSize(double nReadXtals) const
MonitorElement * meSRFlagsConsistency_
static const unsigned nDccs_
Total number of DCCs.
MonitorElement * meZs1Ru_
MonitorElement * meFullRoRu_
std::string srpAlgoErrorLogFileName_
MonitorElement * bookFloat(DQMStore::IBooker &, const std::string &name)
MonitorElement * meHiTtf_
std::vector< bool > logErrForDccs_
static const int nEndcaps
number of endcaps
std::map< uint32_t, uint32_t > EcalTPGGroupsMap
std::map< uint32_t, EcalTPGLut >::const_iterator EcalTPGLutMapItr
int xtalGraphX(const EEDetId &id) const
const EcalTrigTowerConstituentsMap * triggerTowerMap_
void analyzeTP(const edm::Event &event, const edm::EventSetup &es)
std::set< std::string > histList_
const EcalElectronicsMapping * elecMap_
CollHandle< RecHitCollection > ebRecHits_
int iTtEta2cIndex(int iEta) const
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
MonitorElement * meIncompleteFROCnt_
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
int iEta2cIndex(int iEta) const
MonitorElement * meEbEMean_