106 : collNotFoundWarn_(ps.getUntrackedParameter<
bool>(
"warnIfCollectionNotFound",
true)),
107 ebDigis_(ps.getParameter<
edm::
InputTag>(
"EbDigiCollection"),
false, collNotFoundWarn_),
108 eeDigis_(ps.getParameter<
edm::
InputTag>(
"EeDigiCollection"),
false, collNotFoundWarn_),
111 ebSrFlags_(ps.getParameter<
edm::
InputTag>(
"EbSrFlagCollection"),
false, collNotFoundWarn_),
112 eeSrFlags_(ps.getParameter<
edm::
InputTag>(
"EeSrFlagCollection"),
false, collNotFoundWarn_),
119 tps_(ps.getParameter<
edm::
InputTag>(
"TrigPrimCollection"),
false, collNotFoundWarn_),
124 tmin(numeric_limits<int64_t>::
max()),
128 localReco_(ps.getParameter<
bool>(
"LocalReco")),
129 weights_(ps.getParameter<vector<double> >(
"weights")),
130 tpInGeV_(ps.getParameter<
bool>(
"tpInGeV")),
131 firstFIRSample_(ps.getParameter<
int>(
"ecalDccZs1stSample")),
132 useEventRate_(ps.getParameter<
bool>(
"useEventRate")),
133 logErrForDccs_(nDccs_,
false),
136 histDir_(ps.getParameter<
string>(
"histDir")),
137 withEeSimHit_(
false),
138 withEbSimHit_(
false) {
150 tps_.setToken(collector);
155 double ebZsThr = ps.
getParameter<
double>(
"ebZsThrADCCount");
156 double eeZsThr = ps.
getParameter<
double>(
"eeZsThrADCCount");
176 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will be saved to '" <<
outputFile_.c_str() <<
"'";
178 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will NOT be saved";
188 for (vector<string>::iterator it = hists.begin(); it != hists.end(); ++it)
195 const int32_t
bx =
event.bunchCrossing();
196 if (bx < 1 || bx > 3564)
199 int64_t
t =
event.bunchCrossing() + (
event.orbitNumber() - 1) * 3564;
213 LogDebug(
"EcalSrValid") << __FILE__ <<
":" << __LINE__ <<
": " 214 <<
"Tmax = " <<
tmax <<
" x 25ns; Tmin = " <<
tmin <<
" x 25ns; L1A(Tmax) = " <<
l1aOfTmax 215 <<
"; L1A(Tmin) = " <<
l1aOfTmin <<
"\n";
229 edm::LogInfo(
"EcalSrValid") <<
"Size of TP collection: " <<
tps_->size() << std::endl
230 <<
"Size of EB SRF collection read from data: " <<
ebSrFlags_->size() << std::endl
231 <<
"Size of EB SRF collection computed from data TTFs: " <<
ebComputedSrFlags_->size()
233 <<
"Size of EE SRF collection read from data: " <<
eeSrFlags_->size() << std::endl
234 <<
"Size of EE SRF collection computed from data TTFs: " <<
eeComputedSrFlags_->size()
291 bool eventError =
false;
295 for (
int iZ0 = 0; iZ0 <
nEndcaps; ++iZ0) {
296 for (
int iX0 = 0; iX0 <
nEeX; ++iX0) {
297 for (
int iY0 = 0; iY0 <
nEeY; ++iY0) {
318 int iZ0 = frame.
id().
zside() > 0 ? 1 : 0;
320 if (iX0 < 0 || iX0 >=
nEeX) {
321 edm::LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 322 <<
"[0," <<
nEeX - 1 <<
"]\n";
324 if (iY0 < 0 || iY0 >=
nEeY) {
325 edm::LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 326 <<
"[0," <<
nEeY - 1 <<
"]\n";
332 for (
int i = 0;
i < frame.
size(); ++
i) {
333 const int gain12Code = 0x1;
334 if (frame[
i].
gainId() != gain12Code)
348 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).ix());
349 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).iy());
350 int iZ0 =
static_cast<const EEDetId&
>(hit.
id()).
zside() > 0 ? 1 : 0;
352 if (iX0 < 0 || iX0 >=
nEeX) {
353 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 354 <<
"[0," <<
nEeX - 1 <<
"]\n";
356 if (iY0 < 0 || iY0 >=
nEeY) {
357 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 358 <<
"[0," <<
nEeY - 1 <<
"]\n";
366 for (vector<PCaloHit>::const_iterator it =
eeSimHits_->begin(); it !=
eeSimHits_->end(); ++it) {
373 int iZ0 = detId.zside() > 0 ? 1 : 0;
379 pair<int, int> EExtalCoor[
nEeX][
nEeY][2];
381 for (
int iEeZ = 0; iEeZ < 2; ++iEeZ) {
382 for (
int iEeX = 0; iEeX <
nEeX; ++iEeX) {
383 for (
int iEeY = 0; iEeY <
nEeY; ++iEeY) {
384 EEcrystalShot[iEeX][iEeY][iEeZ] =
false;
385 EExtalCoor[iEeX][iEeY][iEeZ] = make_pair(0, 0);
393 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).ix());
394 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).iy());
395 int iZ0 =
static_cast<const EEDetId&
>(frame.
id()).
zside() > 0 ? 1 : 0;
396 if (iX0 < 0 || iX0 >=
nEeX) {
397 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 398 <<
"[0," <<
nEeX - 1 <<
"]\n";
400 if (iY0 < 0 || iY0 >=
nEeY) {
401 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 402 <<
"[0," <<
nEeY - 1 <<
"]\n";
405 if (!EEcrystalShot[iX0][iY0][iZ0]) {
406 EEcrystalShot[iX0][iY0][iZ0] =
true;
409 cout <<
"Error: several digi for same crystal!";
418 for (
int i = 0;
i < frame.
size(); ++
i) {
419 const int gain12Code = 0x1;
420 if (frame[
i].
gainId() != gain12Code) {
427 bool highInterest =
false;
444 pair<int, int> ru =
dccCh(frame.
id());
449 <<
"RU " << frame.
id() <<
", " 450 <<
"DCC " << ru.first <<
" Ch : " << ru.second <<
": " 451 <<
"LI channel under ZS threshold.\n";
455 <<
"more ZS errors for this event...\n";
461 for (
int iEeZ = 0; iEeZ < 2; ++iEeZ) {
462 for (
int iEeX = 0; iEeX <
nEeX; ++iEeX) {
463 for (
int iEeY = 0; iEeY <
nEeY; ++iEeY) {
465 EExtalCoor[iEeX][iEeY][iEeZ].
first,
466 EExtalCoor[iEeX][iEeY][iEeZ].
second,
467 EEcrystalShot[iEeX][iEeY][iEeZ] ? 1 : 0);
472 for (
int iZ0 = 0; iZ0 <
nEndcaps; ++iZ0) {
473 for (
int iX0 = 0; iX0 <
nEeX; ++iX0) {
474 for (
int iY0 = 0; iY0 <
nEeY; ++iY0) {
496 int EEZs1RuCount[2][20][20];
497 int EEFullRuCount[2][20][20];
498 int EEForcedRuCount[2][20][20];
499 for (
int iZ(0); iZ < 2; iZ++) {
500 for (
int iX(0); iX < 20; iX++) {
501 for (
int iY(0); iY < 20; iY++) {
502 EEZs1RuCount[iZ][iX][iY] = 0;
503 EEFullRuCount[iZ][iX][iY] = 0;
504 EEForcedRuCount[iZ][iX][iY] = 0;
510 char eeSrfMark[2][20][20];
511 bzero(eeSrfMark,
sizeof(eeSrfMark));
516 int iX = srf.
id().
ix();
517 int iY = srf.
id().
iy();
519 if (iX < 1 || iY > 100)
521 <<
"Found an endcap SRF with an invalid det ID: " << srf.
id() <<
".\n";
522 ++eeSrfMark[zside > 0 ? 1 : 0][iX - 1][iY - 1];
523 if (eeSrfMark[zside > 0 ? 1 : 0][iX - 1][iY - 1] > 1)
524 throw cms::Exception(
"EcalSelectiveReadoutValidation") <<
"Duplicate SRF for supercrystal " << srf.
id() <<
".\n";
527 EEZs1RuCount[zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
531 EEFullRuCount[zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
536 EEForcedRuCount[zside > 0 ? 1 : 0][iX - 1][iY - 1] += 1;
539 for (
int iZ(0); iZ < 2; iZ++) {
540 int xOffset(iZ == 0 ? -40 : 20);
541 for (
int iX(0); iX < 20; iX++) {
542 for (
int iY(0); iY < 20; iY++) {
543 int GraphX = (iX + 1) + xOffset;
544 int GraphY = (iY + 1);
545 fill(
meZs1Ru_, GraphX, GraphY, EEZs1RuCount[iZ][iX][iY]);
554 <<
" ZS-flagged EE channels under " 555 "the ZS threshold, whose " 560 bool eventError =
false;
563 vector<pair<int, int> > xtalEtaPhi;
566 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
567 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0) {
573 xtalEtaPhi.push_back(pair<int, int>(iEta0, iPhi0));
589 if (iEta0 < 0 || iEta0 >= nEbEta) {
591 s <<
"EcalSelectiveReadoutValidation: " 592 <<
"iEta0 (= " << iEta0 <<
") is out of range (" 593 <<
"[0," << nEbEta - 1 <<
"]\n";
596 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
598 s <<
"EcalSelectiveReadoutValidation: " 599 <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 600 <<
"[0," <<
nEbPhi - 1 <<
"]\n";
606 for (
int i = 0;
i < frame.
size(); ++
i) {
607 const int gain12Code = 0x1;
608 if (frame[
i].
gainId() != gain12Code)
619 for (vector<PCaloHit>::const_iterator it =
ebSimHits_->begin(); it !=
ebSimHits_->end(); ++it) {
622 int iEta = detId.
ieta();
624 int iPhi = detId.iphi();
633 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
634 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0) {
635 crystalShot[iEta0][iPhi0] =
false;
636 EBxtalCoor[iEta0][iPhi0] = make_pair(0, 0);
649 if (iEta0 < 0 || iEta0 >= nEbEta) {
650 throw(
cms::Exception(
"EcalSelectiveReadoutValidation") <<
"iEta0 (= " << iEta0 <<
") is out of range (" 651 <<
"[0," << nEbEta - 1 <<
"]");
653 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
654 throw(
cms::Exception(
"EcalSelectiveReadoutValidation") <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 655 <<
"[0," <<
nEbPhi - 1 <<
"]");
657 assert(iEta0 >= 0 && iEta0 < nEbEta);
658 assert(iPhi0 >= 0 && iPhi0 <
nEbPhi);
659 if (!crystalShot[iEta0][iPhi0]) {
660 crystalShot[iEta0][iPhi0] =
true;
663 cout <<
"Error: several digi for same crystal!";
671 for (
int i = 0;
i < frame.
size(); ++
i) {
672 const int gain12Code = 0x1;
673 if (frame[
i].
gainId() != gain12Code) {
680 bool highInterest =
false;
699 pair<int, int> ru =
dccCh(frame.
id());
704 <<
"RU " << frame.
id() <<
", " 705 <<
"DCC " << ru.first <<
" Ch : " << ru.second <<
": " 706 <<
"LI channel under ZS threshold.\n";
710 <<
"more ZS errors for this event...\n";
716 for (
int iEta0 = 0; iEta0 <
nEbEta; ++iEta0) {
717 for (
int iPhi0 = 0; iPhi0 <
nEbPhi; ++iPhi0)
719 EBxtalCoor[iEta0][iPhi0].
first,
720 EBxtalCoor[iEta0][iPhi0].
second,
721 crystalShot[iEta0][iPhi0] ? 1. : 0.);
732 if (iEta0 < 0 || iEta0 >= nEbEta) {
733 LogError(
"EcalSrValid") <<
"iEta0 (= " << iEta0 <<
") is out of range (" 734 <<
"[0," << nEbEta - 1 <<
"]\n";
736 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
737 LogError(
"EcalSrValid") <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 738 <<
"[0," <<
nEbPhi - 1 <<
"]\n";
744 for (
unsigned int i = 0;
i < xtalEtaPhi.size(); ++
i) {
745 int iEta0 = xtalEtaPhi[
i].first;
746 int iPhi0 = xtalEtaPhi[
i].second;
749 double recE = energies.
recE;
767 int EBZs1RuCount[2][17][72];
768 int EBFullRuCount[2][17][72];
769 int EBForcedRuCount[2][17][72];
770 std::pair<int, int> EBtowerCoor[2][17][72];
771 for (
int iZ(0); iZ < 2; iZ++) {
772 for (
int iEta(0); iEta < 17; iEta++) {
773 for (
int iPhi(0); iPhi < 72; iPhi++) {
774 EBZs1RuCount[iZ][iEta][iPhi] = 0;
775 EBFullRuCount[iZ][iEta][iPhi] = 0;
776 EBForcedRuCount[iZ][iEta][iPhi] = 0;
783 char ebSrfMark[2][17][72];
784 bzero(ebSrfMark,
sizeof(ebSrfMark));
789 int iPhi = srf.
id().
iphi();
795 if (iEtaAbs < 1 || iEtaAbs > 17 || iPhi < 1 || iPhi > 72)
797 <<
"Found a barrel SRF with an invalid det ID: " << srf.
id() <<
".\n";
798 ++ebSrfMark[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1];
799 if (ebSrfMark[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] > 1)
800 throw cms::Exception(
"EcalSelectiveReadoutValidation") <<
"Duplicate SRF for RU " << srf.
id() <<
".\n";
802 EBtowerCoor[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] = std::pair<int, int>(srf.
id().
ieta(), srf.
id().
iphi());
806 EBZs1RuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
809 EBFullRuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
813 EBForcedRuCount[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] += 1;
816 for (
int iZ(0); iZ < 2; iZ++) {
817 for (
int iEta(0); iEta < 17; iEta++) {
818 for (
int iPhi(0); iPhi < 72; iPhi++) {
819 float x(EBtowerCoor[iZ][iEta][iPhi].
first);
820 float y(EBtowerCoor[iZ][iEta][iPhi].
second);
830 <<
" ZS-flagged EB channels under " 831 "the ZS threshold, whose " 864 "ECAL DCC event fragment size;Dcc id; " 872 "LI channel payload per DCC;Dcc id; " 880 "HI channel payload per DCC;Dcc id; " 888 "ECAL DCC event fragment size;Dcc id; " 896 "ECAL Barrel low interest crystal data payload;" 897 "Event size (kB);Nevts",
904 "Endcap low interest crystal data payload;" 905 "Event size (kB);Nevts",
912 "ECAL low interest crystal data payload;" 913 "Event size (kB);Nevts",
920 "Barrel high interest crystal data payload;" 921 "Event size (kB);Nevts",
928 "Endcap high interest crystal data payload;" 929 "Event size (kB);Nevts",
936 "ECAL high interest crystal data payload;" 937 "Event size (kB);Nevts",
944 "Barrel data volume;Event size (kB);Nevts",
951 "Endcap data volume;Event size (kB);Nevts",
958 "ECAL data volume;Event size (kB);Nevts",
965 "ECAL crystal channel occupancy after zero suppression;" 966 "iX -200 / iEta / iX + 100;" 967 "iY / iPhi (starting from -10^{o}!);" 981 tpUnit =
string(
"TP hw unit");
983 title =
string(
"Trigger primitive TT E_{T};E_{T} ") + tpUnit +
string(
";Event Count");
993 "Trigger primitive TT flag;Flag number;Event count",
998 title =
string(
"Trigger tower flag vs TP;E_{T}(TT) (") + tpUnit +
string(
");Flag number");
1003 "Trigger tower flag vs #sumE_{T};" 1013 "Trigger primitive Et (TP) vs #sumE_{T};" 1014 "E_{T} (sum) (GeV);" 1021 "Trigger primitive E_{T};" 1031 "Full Read-out readout unit;" 1032 "iX - 40 / iEta / iX + 20;" 1033 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1044 "Number of Full-readout-flagged readout units;" 1045 "FRO RU count;Event count",
1052 "Number of EB Full-readout-flagged readout units;" 1053 "FRO RU count;Event count",
1060 "Number of EE Full-readout-flagged readout units;" 1061 "FRO RU count;Event count",
1068 "Readout unit with ZS-thr-1 flag;" 1069 "iX - 40 / iEta / iX + 20;" 1070 "iY0 / iPhi0 (iPhi = 1 at phi = 0 rad);" 1081 "ECAL readout unit with forced bit of SR flag on;" 1082 "iX - 40 / iEta / iX + 20;" 1083 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1094 "Low interest trigger tower flags;" 1107 "Mid interest trigger tower flags;" 1120 "High interest trigger tower flags;" 1133 "Trigger tower flags with forced bit set;" 1144 const float ebMinNoise = -1.;
1145 const float ebMaxNoise = 1.;
1147 const float eeMinNoise = -1.;
1148 const float eeMaxNoise = 1.;
1150 const float ebMinE = ebMinNoise;
1151 const float ebMaxE = ebMaxNoise;
1153 const float eeMinE = eeMinNoise;
1154 const float eeMaxE = eeMaxNoise;
1156 const int evtMax = 500;
1158 meEbRecE_ =
book1D(ibooker,
"hEbRecE",
"Crystal reconstructed energy;E (GeV);Event count", 100, ebMinE, ebMaxE);
1160 meEbEMean_ =
bookProfile(ibooker,
"hEbEMean",
"EE <E_hit>;event #;<E_hit> (GeV)", evtMax, .5, evtMax + .5);
1165 "(rec E of crystal without deposited energy)" 1166 ";Rec E (GeV);Event count",
1173 "Emulated ouput of ZS FIR filter for EB " 1174 "low interest crystals;" 1183 "Emulated ouput of ZS FIR filter for EB " 1184 "high interest crystals;" 1199 meEbSimE_ =
book1D(ibooker,
"hEbSimE",
"EB hit crystal simulated energy", 100, ebMinE, ebMaxE);
1201 meEbRecEHitXtal_ =
book1D(ibooker,
"hEbRecEHitXtal",
"EB rec energy of hit crystals", 100, ebMinE, ebMaxE);
1205 "Crystal simulated vs reconstructed energy;" 1206 "Esim (GeV);Erec GeV);Event count",
1216 "Crystal no-zs simulated vs reconstructed " 1218 "Esim (GeV);Erec GeV);Event count",
1228 "EE crystal reconstructed energy;E (GeV);" 1234 meEeEMean_ =
bookProfile(ibooker,
"hEeEMean",
"<E_{EE hit}>;event;<E_{hit}> (GeV)", evtMax, .5, evtMax + .5);
1239 "(rec E of crystal without deposited energy);" 1240 "E (GeV);Event count",
1247 "Emulated ouput of ZS FIR filter for EE " 1248 "low interest crystals;" 1257 "Emulated ouput of ZS FIR filter for EE " 1258 "high interest crystals;" 1273 meEeSimE_ =
book1D(ibooker,
"hEeSimE",
"EE hit crystal simulated energy", 100, eeMinE, eeMaxE);
1275 meEeRecEHitXtal_ =
book1D(ibooker,
"hEeRecEHitXtal",
"EE rec energy of hit crystals", 100, eeMinE, eeMaxE);
1279 "EE crystal simulated vs reconstructed energy;" 1280 "Esim (GeV);Erec GeV);Event count",
1290 "EE crystal no-zs simulated vs " 1292 "energy;Esim (GeV);Erec GeV);Event count",
1302 "TTFlags and SR Flags mismatch;" 1303 "iX - 40 / iEta / iX + 20;" 1304 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1315 "hIncompleteFROMap",
1316 "Incomplete full-readout-flagged readout units;" 1317 "iX - 40 / iEta / iX + 20;" 1318 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1328 "hIncompleteFROCnt",
1329 "Number of incomplete full-readout-flagged " 1331 "Number of RUs;Event count;",
1337 "hIncompleteFRORateMap",
1338 "Incomplete full-readout-flagged readout units;" 1339 "iX - 40 / iEta / iX + 20;" 1340 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1341 "Incomplete error rate",
1351 "Dropped full-readout-flagged readout units;" 1352 "iX - 40 / iEta / iX + 20;" 1353 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1364 "Number of dropped full-readout-flagged " 1365 "RU count;RU count;Event count",
1372 "Number of zero-suppressed-flagged RU fully " 1374 "RU count;Event count",
1380 buf <<
"Number of LI EB channels below the " <<
ebZsThr_ / 4.
1381 <<
" ADC count ZS threshold;" 1382 "Channel count;Event count",
1386 buf <<
"Number of LI EE channels below the " <<
eeZsThr_ / 4.
1387 <<
" ADC count ZS theshold;" 1388 "Channel count;Event count",
1393 "Number of LI channels below the ZS threshold;" 1394 "Channel count;Event count",
1401 "Number of EB channels below the ZS " 1402 "threshold in a LI but fully readout RU;" 1403 "Channel count;Event count;",
1410 "Number EE channels below the ZS threshold" 1411 " in a LI but fully readout RU;" 1412 "Channel count;Event count",
1419 "Number of LI channels below the ZS threshold " 1420 "in a LI but fully readout RU;" 1421 "Channel count;Event count",
1427 "hDroppedFRORateMap",
1428 "Dropped full-readout-flagged readout units" 1429 "iX - 40 / iEta / iX + 20;" 1430 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1441 "Complete zero-suppressed-flagged readout units;" 1442 "iX - 40 / iEta / iX + 20;" 1443 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1454 "Complete zero-suppressed-flagged readout units;" 1455 "iX - 40 / iEta / iX + 20;" 1456 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1457 "Completeness rate",
1473 s << (s.str().empty() ?
"" :
", ") << *it;
1476 if (!s.str().empty()) {
1477 LogWarning(
"Configuration") <<
"Parameter 'histList' contains some unknown histogram(s). " 1478 "Check spelling. Following name were not found: " 1488 for (
int iTTFlag(0); iTTFlag < 8; iTTFlag++) {
1489 TTFlagCount[iTTFlag] = 0;
1491 for (
int iTtEta(0); iTtEta <
nTtEta; iTtEta++) {
1492 for (
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++) {
1493 LiTTFlagCount[iTtEta][iTtPhi] = 0;
1494 MiTTFlagCount[iTtEta][iTtPhi] = 0;
1495 HiTTFlagCount[iTtEta][iTtPhi] = 0;
1499 for (
int iEt(0); iEt < 100; iEt++) {
1516 double lsb10bitsEB(ebItr == physMap.end() ? 0. : ebItr->second.EtSat / 1024.);
1518 double lsb10bitsEE(eeItr == physMap.end() ? 0. : eeItr->second.EtSat / 1024.);
1524 unsigned int ADC = it->compressedEt();
1526 double lsb10bits(0.);
1528 lsb10bits = lsb10bitsEB;
1530 lsb10bits = lsb10bitsEE;
1534 uint32_t lutGrp = 999;
1535 if (itgrp != lutGrpMap.end())
1536 lutGrp = itgrp->second;
1539 if (itLut != lutMap.end()) {
1540 const unsigned int* lut = (itLut->second).getLut();
1541 for (
unsigned int i = 0;
i < 1024;
i++)
1542 if (ADC == (0xff & lut[
i])) {
1548 tpEt = lsb10bits * tpg10bits;
1550 tpEt = it->compressedEt();
1552 int iEta = it->id().ieta();
1554 int iPhi = it->id().iphi();
1556 double etSum =
ttEtSums[iEta0][iPhi0];
1559 if ((iE >= 0) && (iE < 100)) {
1568 ++TTFlagCount[it->ttFlag()];
1569 if ((it->ttFlag() & 0x3) == 0) {
1570 LiTTFlagCount[iEta0][iPhi0] += 1;
1571 }
else if ((it->ttFlag() & 0x3) == 1) {
1572 MiTTFlagCount[iEta0][iPhi0] += 1;
1573 }
else if ((it->ttFlag() & 0x3) == 3) {
1574 HiTTFlagCount[iEta0][iPhi0] += 1;
1576 if ((it->ttFlag() & 0x4)) {
1585 for (
int ittflag(0); ittflag < 8; ittflag++) {
1588 for (
int iTtEta(0); iTtEta <
nTtEta; iTtEta++) {
1589 for (
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++) {
1596 for (
int iE(0); iE < 100; iE++) {
1600 for (
int iE(0); iE < 40; iE++) {
1617 for (
unsigned int digis = 0; digis <
ebDigis_->
size(); ++digis) {
1623 for (
unsigned int digis = 0; digis <
eeDigis_->
size(); ++digis) {
1629 for (
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0) {
1659 template <
class T,
class U>
1661 const DetId& xtalId = frame.id();
1662 typedef typename U::key_type RuDetId;
1664 typename U::const_iterator srf = srFlagColl.find(ruId);
1666 bool highInterest =
false;
1669 if (srf != srFlagColl.end()) {
1670 flag = srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK;
1677 pair<int, int> ch =
dccCh(xtalId);
1705 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix());
1706 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy());
1707 int iZ0 =
static_cast<const EEDetId&
>(frame.id()).
zside() > 0 ? 1 : 0;
1721 if (ch.second < 1 || ch.second > 68) {
1723 <<
"Error in DCC channel retrieval for crystal with detId " << xtalId.
rawId()
1724 <<
"DCC channel out of allowed range [1..68]\n";
1754 static std::atomic<bool> firstCall{
true};
1755 bool expected =
true;
1756 if (firstCall.compare_exchange_strong(expected,
false)) {
1765 double adc2GeV = 0.;
1769 }
else if (
typeid(
EEDataFrame) ==
typeid(frame)) {
1779 double gainInv[] = {12., 1., 6., 12.};
1781 for (
int i = 0;
i <
n; ++
i) {
1782 acc +=
weights_[
i] * frame[
i].adc() * gainInv[frame[
i].gainId()] * adc2GeV;
1791 throw cms::Exception(
"InvalidParameter") <<
"Wrong type of DetId passed to the " 1792 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1793 "An ECAL DetId was expected.\n";
1806 const int oneXtalPhi0 = iTtPhi0 * 5;
1807 const int oneXtalEta0 = (iTtEta0 -
nOneEeTtEta) * 5;
1812 if (detId.
rawId() & 0x8000) {
1823 <<
"Wrong type of DetId passed to the method " 1824 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1825 "A valid EcalTriggerTower, EcalBarrel or EcalEndcap DetId was expected. " 1827 << xtalId.
rawId() <<
".\n";
1833 result.first = EcalElecId.
dccId();
1836 throw cms::Exception(
"OutOfRange") <<
"Got an invalid DCC ID, DCCID = " << result.first <<
" for DetId 0x" << hex
1837 << detId.
rawId() <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1840 result.second = EcalElecId.
towerId();
1842 if (result.second < 1 || result.second > 68) {
1843 throw cms::Exception(
"OutOfRange") <<
"Got an invalid DCC channel ID, DCC_CH = " << result.second <<
" for DetId 0x" 1844 << hex << detId.
rawId() <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1856 int iDCC = EcalElecId.
dccId();
1857 int iDccChan = EcalElecId.
towerId();
1858 const bool ignoreSingle =
true;
1869 if (eeGeometry ==
nullptr || ebGeometry ==
nullptr) {
1877 for (
int iEta0 = 0; iEta0 <
nTtEta; ++iEta0) {
1878 for (
int iPhi0 = 0; iPhi0 <
nTtPhi; ++iPhi0) {
1910 int innerTTEtas[] = {0, 1, 54, 55};
1911 for (
unsigned iRing = 0; iRing <
sizeof(innerTTEtas) /
sizeof(innerTTEtas[0]); ++iRing) {
1912 int iTtEta0 = innerTTEtas[iRing];
1928 for (
unsigned iTtPhi0 = 0; iTtPhi0 <
nTtPhi - 1; iTtPhi0 += 2) {
1943 double weights[] = {0., -1 / 3., -1 / 3., -1 / 3., 0., 1.};
1945 double adc2GeV = 0.;
1948 }
else if (
typeid(frame) ==
typeid(
EEDataFrame)) {
1952 throw cms::Exception(
"Severe Error") << __FILE__ <<
":" << __LINE__ <<
": " 1953 <<
"this is a bug. Please report it.\n";
1958 const int n = min<int>(frame.size(),
sizeof(
weights) /
sizeof(weights[0]));
1960 double gainInv[] = {12., 1., 6., 12};
1962 for (
int i = offset;
i <
n; ++
i) {
1964 if (iframe >= 0 && iframe < frame.size()) {
1965 acc += weights[
i] * frame[iframe].adc() * gainInv[frame[iframe].gainId()] * adc2GeV;
1977 if (result ==
nullptr) {
1988 if (result ==
nullptr) {
2006 if (result ==
nullptr) {
2017 if (result ==
nullptr) {
2035 MonitorElement*
result = ibook.
bookProfile2D(name, title, nbinx, xmin, xmax, nbiny, ymin, ymax, 0, 0, 0, option);
2036 if (result ==
nullptr) {
2066 log <<
"Avalailable histograms (DQM monitor elements): \n";
2068 log << it->first <<
": " << it->second <<
"\n";
2070 log <<
"\nTo include an histogram add its name in the vstring parameter " 2071 "'histograms' of the EcalSelectiveReadoutValidation module\n";
2075 double ruHeaderPayload = 0.;
2076 const int firstEbDcc0 =
nEeDccs / 2;
2077 for (
int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 +
nEbDccs; ++iDcc0) {
2085 double ruHeaderPayload = 0.;
2086 const unsigned firstEbDcc0 =
nEeDccs / 2;
2087 for (
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0) {
2089 if (iDcc0 == firstEbDcc0)
2099 const std::vector<int>& firWeights,
2102 const int nFIRTaps = 6;
2104 const vector<int>&
w = firWeights;
2108 bool gain12saturated =
false;
2109 const int gain12 = 0x01;
2110 const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
2113 for (
int iSample = firstFIRSample - 1; iSample < lastFIRSample; ++iSample, ++iWeight) {
2114 if (iSample >= 0 && iSample < frame.
size()) {
2116 if (sample.
gainId() != gain12)
2117 gain12saturated =
true;
2118 LogTrace(
"DccFir") << (iSample >= firstFIRSample ?
"+" :
"") << sample.
adc() <<
"*(" << w[iWeight] <<
")";
2119 acc += sample.
adc() * w[iWeight];
2122 <<
": Not enough samples in data frame or 'ecalDccZs1stSample' module " 2123 "parameter is not valid...";
2130 acc = (acc >= 0) ? (acc >> 8) : -(-acc >> 8);
2135 LogTrace(
"DccFir") <<
"acc: " << acc <<
"\n" 2136 <<
"saturated: " << (gain12saturated ?
"yes" :
"no") <<
"\n";
2139 *saturated = gain12saturated;
2146 const int nFIRTaps = 6;
2147 vector<int> firWeights(nFIRTaps, 0);
2148 const static int maxWeight = 0xEFF;
2149 for (
unsigned i = 0;
i <
min((
size_t)nFIRTaps, normalizedWeights.size()); ++
i) {
2150 firWeights[
i] = lround(normalizedWeights[
i] * (1 << 10));
2151 if (
abs(firWeights[
i]) > maxWeight) {
2152 firWeights[
i] = firWeights[
i] < 0 ? -maxWeight : maxWeight;
2159 bool notNormalized =
false;
2160 bool notInt =
false;
2161 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2162 if (weightsForZsFIR[
i] > 1.)
2163 notNormalized =
true;
2164 if ((
int)weightsForZsFIR[
i] != weightsForZsFIR[
i])
2167 if (notInt && notNormalized) {
2168 throw cms::Exception(
"InvalidParameter") <<
"weigtsForZsFIR paramater values are not valid: they " 2169 <<
"must either be integer and uses the hardware representation " 2170 <<
"of the weights or less or equal than 1 and used the normalized " 2171 <<
"representation.";
2174 if (notNormalized) {
2175 firWeights_ = vector<int>(weightsForZsFIR.size());
2176 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2183 log <<
"Input weights for FIR: ";
2184 for (
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i) {
2185 log << weightsForZsFIR[
i] <<
"\t";
2189 log <<
"\nActual FIR weights: ";
2192 s2 += firWeights_[
i] * firWeights_[
i];
2196 log <<
"\nNormalized FIR weights after hw representation rounding: ";
2209 <<
"' for SRP algorithm result check.\n";
2217 <<
"' for Selective Readout decision application check.\n";
2227 typedef typename T::const_iterator SrFlagCollectionConstIt;
2228 typedef typename T::key_type MyRuDetIdType;
2229 SrFlagCollectionConstIt itSrfFromData = srfFromData.begin();
2230 SrFlagCollectionConstIt itComputedSr = computedSrf.begin();
2232 while (itSrfFromData != srfFromData.end() || itComputedSr != computedSrf.end()) {
2233 MyRuDetIdType inconsistentRu = 0;
2234 bool inconsistent =
false;
2235 if (itComputedSr == computedSrf.end() ||
2236 (itSrfFromData != srfFromData.end() && itSrfFromData->id() < itComputedSr->id())) {
2238 pair<int, int> ch =
dccCh(itSrfFromData->id());
2239 srpAlgoErrorLog_ <<
event.id() <<
": " << itSrfFromData->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2240 <<
" found in data (SRF:" << itSrfFromData->flagName()
2241 <<
") but not in the set of SRFs computed from the data TTF.\n";
2242 inconsistentRu = itSrfFromData->id();
2243 inconsistent =
true;
2245 }
else if (itSrfFromData == srfFromData.end() ||
2246 (itComputedSr != computedSrf.end() && itComputedSr->id() < itSrfFromData->id())) {
2248 pair<int, int> ch =
dccCh(itComputedSr->id());
2250 srpAlgoErrorLog_ <<
event.id() <<
": " << itComputedSr->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2251 <<
" not found in data. Computed SRF: " << itComputedSr->flagName() <<
".\n";
2252 inconsistentRu = itComputedSr->id();
2253 inconsistent =
true;
2258 if (itComputedSr->value() != itSrfFromData->value()) {
2259 pair<int, int> ch =
dccCh(itSrfFromData->id());
2260 srpAlgoErrorLog_ <<
event.id() <<
", " << itSrfFromData->id() <<
", DCC " << ch.first <<
" ch " << ch.second
2261 <<
", SRF inconsistency: " 2262 <<
"from data: " << itSrfFromData->flagName()
2263 <<
", computed from TTF: " << itComputedSr->flagName() <<
"\n";
2264 inconsistentRu = itComputedSr->id();
2265 inconsistent =
true;
2267 if (itComputedSr != computedSrf.end())
2269 if (itSrfFromData != srfFromData.end())
2283 <<
"Argument of EcalSelectiveReadoutValidation::dccId(const EcalTrigTowerDetId&) " 2284 <<
"must be a barrel trigger tower Id\n";
2286 return dccCh(detId).first;
2305 buf <<
"List of DCCs found in the first processed event: ";
2307 for (
unsigned iDcc = 0; iDcc <
nDccs_; ++iDcc) {
2309 buf << (first ?
"" :
", ") << (iDcc +
minDccId_);
2313 buf <<
"\nOnly DCCs from this list will be considered for error logging\n";
2316 LogInfo(
"EcalSrValid") << buf.str();
2321 typedef typename T::const_iterator SrFlagCollectionConstIt;
2322 typedef typename T::key_type MyRuDetIdType;
2324 for (SrFlagCollectionConstIt itSrf = srfs.begin(); itSrf != srfs.end(); ++itSrf) {
2326 pair<int, int> ru =
dccCh(itSrf->id());
2338 << ru.second <<
") is 'Full readout' " 2339 <<
"while none of its channel was read out\n";
2346 << ru.second <<
") is 'Full readout' " 2348 <<
getCrystalCount(ru.first, ru.second) <<
" channels were read out.\n";
2368 if (iDcc < minDccId_ || iDcc >
maxDccId_) {
2370 }
else if (10 <= iDcc && iDcc <= 45) {
2377 iDccPhi = iDcc - 45;
2378 switch (iDccPhi * 100 + iDccCh) {
void configFirWeights(const std::vector< double > &weightsForZsFIR)
void printAvailableHists()
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
MonitorElement * meEbFullRoCnt_
int iPhi2cIndex(int iPhi) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
std::string srApplicationErrorLogFileName_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meEbRecVsSimE_
MonitorElement * meForcedRu_
MonitorElement * meChOcc_
bool gain12
eta crystal position
const EcalTPGGroupsMap & getMap() const
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_
MonitorElement * meTtfVsTp_
double getDccOverhead(subdet_t subdet) const
static const int nEeX
EE crystal grid size along X.
MonitorElement * meDroppedFROMap_
int xtalGraphX(const EEDetId &id) const
double getDccEventSize(int iDcc0, double nReadXtals) const
int nIncompleteFRO_
Counter of FRO-flagged RU only partial data.
MonitorElement * meCompleteZSRateMap_
MonitorElement * meEeFullRoCnt_
int cIndex2iPhi(int i) const
MonitorElement * bookFloat(TString const &name)
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
bool verbose_
Verbosity switch.
double phi
number of sim hits
static const int nEbPhi
number of crystals along Phi in EB
MonitorElement * meEeZsErrCnt_
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_
void setCurrentFolder(std::string const &fullpath)
int iXY2cIndex(int iX) const
static const int SRF_FORCED_MASK
static const double rad2deg
Conversion factor from radian to degree.
energiesEe_t eeEnergies[nEndcaps][nEeX][nEeY]
MonitorElement * meEeZsErrType1Cnt_
int cIndex2iTtPhi(int i) const
int simHit
energy reconstructed from zero-suppressed digi
CollHandle< EcalTrigPrimDigiCollection > tps_
Sin< T >::type sin(const T &t)
MonitorElement * meVolBLI_
Geom::Phi< T > phi() const
void analyzeEB(const edm::Event &event, const edm::EventSetup &es)
constexpr uint32_t rawId() const
get the raw id
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
int simHit
energy reconstructed from zero-suppressed digi
MonitorElement * meEbHiZsFir_
MonitorElement * meDccVolFromData_
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
CollHandle< FEDRawDataCollection > fedRaw_
int towerId() const
get the tower id
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_
const_iterator begin() const
MonitorElement * meVolELI_
static const int nEeDccs
number of DCCs for EE
double eta
phi crystal position in degrees
std::pair< int, int > getDCCandSC(EcalScDetId id) const
int gainId() const
get the gainId (2 bits)
MonitorElement * meTtfVsEtSum_
double ttEtSums[nTtEta][nTtPhi]
MonitorElement * meEbZsErrCnt_
MonitorElement * meEeLiZsFir_
MonitorElement * meDroppedFROCnt_
MonitorElement * meTpMap_
unsigned ttId(DetId const &)
size_t size() const
Lenght of the data buffer in bytes.
MonitorElement * meDccHiVol_
MonitorElement * meEbLiZsFir_
MonitorElement * meLiTtf_
bool registerHist(const std::string &name, const std::string &title)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
int ieta() const
get the tower ieta
void setTtEtSums(const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
int zside() const
get the z-side of the tower (1/-1)
MonitorElement * meVolBHI_
static const int minDccId_
static const int nEbEta
number of crystals along Eta in EB
int cIndex2iTtEta(int i) const
U second(std::pair< T, U > const &p)
MonitorElement * meIncompleteFROMap_
double frame2EnergyForTp(const T &frame, int offset=0) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
~EcalSelectiveReadoutValidation() override
Destructor.
CollHandle< EESrFlagCollection > eeComputedSrFlags_
static const int nTtPhi
Number of Trigger Towers along Phi.
const EcalTPGLutMap & getMap() const
int xtalGraphY(const EEDetId &id) const
CollHandle< EEDigiCollection > eeDigis_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::vector< int > firWeights_
void checkSrApplication(const edm::Event &event, T &srfs)
std::string outputFile_
Output file for histograms.
CollHandle< RecHitCollection > eeRecHits_
int ietaAbs() const
get the absolute value of the tower ieta
static const int maxDccId_
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="")
void analyzeDataVolume(const edm::Event &e, const edm::EventSetup &es)
double getL1aRate() const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
int iTtEta2cIndex(int iEta) const
double eta
phi crystal position in degrees
MonitorElement * meEeHiZsFir_
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 * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
MonitorElement * meEbNoZsRecVsSimE_
MonitorElement * meEeSimE_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void updateL1aRate(const edm::Event &event)
static const int SRF_FULL
Abs< T >::type abs(const T &t)
double noZsRecE
sim hit energy sum
int nCompleteZS_
Counter of ZS-flagged RU fully read out.
CollHandle< std::vector< PCaloHit > > eeSimHits_
MonitorElement * meDroppedFRORateMap_
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
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")
int ieta() const
get the crystal ieta
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
int iEta2cIndex(int iEta) const
MonitorElement * meMiTtf_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
virtual TProfile * getTProfile()
MonitorElement * meVolEHI_
void read(const edm::Event &event)
int cIndex2iEta(int i) const
MonitorElement * book2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
CollHandle< EESrFlagCollection > eeSrFlags_
static const int nDccRus_[nDccs_]
number of RUs for each DCC
MonitorElement * meEeRecVsSimE_
Namespace of DDCMS conversion namespace.
energiesEb_t ebEnergies[nEbEta][nEbPhi]
static const int nOneEeTtEta
Number of Trigger Towers in an endcap along Eta.
int nEbFROCnt_
Counter of EB FRO-flagged RUs.
static const int nEbDccs
number of DCCs for EB
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.
const EcalTrigTowerDetId & id() const override
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)
unsigned short rawId() const
int iphi() const
get the tower iphi
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.
const std::map< uint32_t, Item > & getMap() const
constexpr int16_t xOffset
DetId id() const
get the id
double getEeEventSize(double nReadXtals) const
MonitorElement * meForcedTtf_
MonitorElement * meDccVol_
static const int kByte_
number of bytes in 1 kByte:
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.
MonitorElement * meVolLI_
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
double getBytesPerCrystal() const
int nPerRu_[nDccs_][nDccChs_]
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
int getRuCount(int iDcc0) const
MonitorElement * meCompleteZSMap_
MonitorElement * meIncompleteFRORateMap_
MonitorElement * meVolHI_
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
CollHandle< EEDigiCollection > eeNoZsDigis_
double recE
energy reconstructed from unsuppressed digi
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int dccId(const EcalScDetId &detId) const
MonitorElement * meEeRecE_
std::map< std::string, std::string > availableHistList_
const_iterator end() const
std::map< uint32_t, EcalTPGLut > EcalTPGLutMap
bool isRuComplete_[nDccs_][nDccChs_]
int ruGraphX(const EcalScDetId &id) const
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
double phi
number of sim hits
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
static const int nTtEta
Number of Trigger Towers along Eta.
MonitorElement * meEeNoZsRecVsSimE_
MonitorElement * meEbZsErrType1Cnt_
MonitorElement * meEbRecE_
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_
int ruGraphY(const EcalScDetId &id) const
void compareSrfColl(const edm::Event &event, T &srfFromData, T &computedSrf)
std::pair< int, int > dccCh(const DetId &xtalId) const
double frame2Energy(const EcalDataFrame &frame) const
double noZsRecE
sim hit energy sum
const EcalScDetId & id() const override
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_
std::map< uint32_t, EcalTPGPhysicsConst::Item >::const_iterator EcalTPGPhysicsConstMapIterator
double getEbEventSize(double nReadXtals) const
MonitorElement * meSRFlagsConsistency_
static const unsigned nDccs_
Total number of DCCs.
T const * product() const
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
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 adc() const
get the ADC sample (12 bits)
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
bool gain12
eta crystal position
MonitorElement * meIncompleteFROCnt_
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
MonitorElement * meEbEMean_
constexpr Detector det() const
get the detector field from this detid