44 34, 32, 33, 33, 32, 34, 33, 34, 33,
47 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
50 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
53 32, 33, 33, 32, 34, 33, 34, 33, 34
57 collNotFoundWarn_(ps.getUntrackedParameter<
bool>(
"warnIfCollectionNotFound",
true)),
62 ebNoZsDigis_(ps.getParameter<
edm::
InputTag>(
"EbUnsuppressedDigiCollection"),
64 eeNoZsDigis_(ps.getParameter<
edm::
InputTag>(
"EeUnsuppressedDigiCollection"),
70 ebComputedSrFlags_(ps.getParameter<
edm::
InputTag>(
"EbSrFlagFromTTCollection"),
false,
72 eeComputedSrFlags_(ps.getParameter<
edm::
InputTag>(
"EeSrFlagFromTTCollection"),
false,
87 tmin(numeric_limits<int64_t>::
max()),
91 localReco_(ps.getParameter<
bool>(
"LocalReco")),
92 weights_(ps.getParameter<vector<double> >(
"weights")),
93 tpInGeV_(ps.getParameter<
bool>(
"tpInGeV")),
94 firstFIRSample_(ps.getParameter<
int>(
"ecalDccZs1stSample")),
95 useEventRate_(ps.getParameter<
bool>(
"useEventRate")),
96 logErrForDccs_(nDccs_,
false),
99 histDir_(ps.getParameter<
string>(
"histDir")),
100 withEeSimHit_(
false),
101 withEbSimHit_(
false){
114 tps_.setToken(collector);
119 double ebZsThr = ps.
getParameter<
double>(
"ebZsThrADCCount");
120 double eeZsThr = ps.
getParameter<
double>(
"eeZsThrADCCount");
142 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will be saved to '" 145 LogInfo(
"OutputInfo") <<
" Ecal Digi Task histograms will NOT be saved";
155 vector<string>(1,
"all")));
157 for(vector<string>::iterator it = hists.begin();
158 it!=hists.end(); ++it)
histList_.insert(*it);
165 const int32_t bx =
event.bunchCrossing();
166 if(bx<1 || bx > 3564)
return;
168 int64_t
t =
event.bunchCrossing() + (
event.orbitNumber()-1)*3564;
182 LogDebug(
"EcalSrValid") << __FILE__ <<
":" << __LINE__ <<
": " 183 <<
"Tmax = " <<
tmax <<
" x 25ns; Tmin = " <<
tmin 184 <<
" x 25ns; L1A(Tmax) = " <<
l1aOfTmax <<
"; L1A(Tmin) = " 201 edm::LogInfo(
"EcalSrValid") <<
"Size of TP collection: " <<
tps_->size() << std::endl
202 <<
"Size of EB SRF collection read from data: " 204 <<
"Size of EB SRF collection computed from data TTFs: " 206 <<
"Size of EE SRF collection read from data: " 208 <<
"Size of EE SRF collection computed from data TTFs: " 267 bool eventError =
false;
271 for(
int iZ0=0; iZ0<
nEndcaps; ++iZ0){
272 for(
int iX0=0; iX0<
nEeX; ++iX0){
273 for(
int iY0=0; iY0<
nEeY; ++iY0){
296 int iZ0 = frame.
id().
zside()>0?1:0;
298 if(iX0<0 || iX0>=
nEeX){
299 edm::LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 300 <<
"[0," <<
nEeX -1 <<
"]\n";
302 if(iY0<0 || iY0>=
nEeY){
303 edm::LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 304 <<
"[0," <<
nEeY -1 <<
"]\n";
310 for(
int i = 0;
i< frame.
size(); ++
i){
311 const int gain12Code = 0x1;
328 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).ix());
329 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).iy());
332 if(iX0<0 || iX0>=
nEeX){
333 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 334 <<
"[0," <<
nEeX -1 <<
"]\n";
336 if(iY0<0 || iY0>=
nEeY){
337 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 338 <<
"[0," <<
nEeY -1 <<
"]\n";
346 for(vector<PCaloHit>::const_iterator it =
eeSimHits_->begin();
354 int iZ0 = detId.zside()>0?1:0;
360 pair<int,int> EExtalCoor[
nEeX][
nEeY][2];
362 for(
int iEeZ=0; iEeZ<2; ++iEeZ){
363 for(
int iEeX=0; iEeX<
nEeX; ++iEeX){
364 for(
int iEeY=0; iEeY<
nEeY; ++iEeY){
365 EEcrystalShot[iEeX][iEeY][iEeZ] =
false;
366 EExtalCoor[iEeX][iEeY][iEeZ] = make_pair(0,0);
375 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).ix());
376 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).iy());
378 if(iX0<0 || iX0>=
nEeX){
379 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range (" 380 <<
"[0," <<
nEeX -1 <<
"]\n";
382 if(iY0<0 || iY0>=
nEeY){
383 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range (" 384 <<
"[0," <<
nEeY -1 <<
"]\n";
387 if(!EEcrystalShot[iX0][iY0][iZ0]){
388 EEcrystalShot[iX0][iY0][iZ0] =
true;
391 cout <<
"Error: several digi for same crystal!";
400 for(
int i = 0;
i< frame.
size(); ++
i){
401 const int gain12Code = 0x1;
402 if(frame[
i].
gainId()!=gain12Code){
410 bool highInterest =
false;
416 highInterest = ((srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK)
428 pair<int,int> ru =
dccCh(frame.
id());
432 <<
"RU " << frame.
id() <<
", " 433 <<
"DCC " << ru.first
434 <<
" Ch : " << ru.second <<
": " 435 <<
"LI channel under ZS threshold.\n";
439 <<
"more ZS errors for this event...\n";
445 for(
int iEeZ=0; iEeZ<2; ++iEeZ){
446 for(
int iEeX=0; iEeX<
nEeX; ++iEeX){
447 for(
int iEeY=0; iEeY<
nEeY; ++iEeY){
448 fill(
meChOcc_, EExtalCoor[iEeX][iEeY][iEeZ].
first, EExtalCoor[iEeX][iEeY][iEeZ].
second,EEcrystalShot[iEeX][iEeY][iEeZ] ? 1 : 0);
453 for(
int iZ0=0; iZ0<
nEndcaps; ++iZ0){
454 for(
int iX0=0; iX0<
nEeX; ++iX0){
455 for(
int iY0=0; iY0<
nEeY; ++iY0){
479 int EEZs1RuCount[2][20][20];
480 int EEFullRuCount[2][20][20];
481 int EEForcedRuCount[2][20][20];
482 for(
int iZ(0); iZ < 2; iZ++){
483 for(
int iX(0);iX < 20; iX++){
484 for(
int iY(0);iY < 20; iY++){
485 EEZs1RuCount[iZ][iX][iY] = 0;
486 EEFullRuCount[iZ][iX][iY] = 0;
487 EEForcedRuCount[iZ][iX][iY] = 0;
493 char eeSrfMark[2][20][20];
494 bzero(eeSrfMark,
sizeof(eeSrfMark));
500 int iX = srf.
id().
ix();
501 int iY = srf.
id().
iy();
503 if(iX<1 || iY > 100)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
504 <<
"Found an endcap SRF with an invalid det ID: " << srf.
id() <<
".\n";
505 ++eeSrfMark[zside>0?1:0][iX-1][iY-1];
506 if(eeSrfMark[zside>0?1:0][iX-1][iY-1] > 1)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
507 <<
"Duplicate SRF for supercrystal " << srf.
id() <<
".\n";
510 EEZs1RuCount[zside>0?1:0][iX-1][iY-1] += 1;
514 EEFullRuCount[zside>0?1:0][iX-1][iY-1] += 1;
519 EEForcedRuCount[zside>0?1:0][iX-1][iY-1] += 1;
522 for(
int iZ(0); iZ < 2; iZ++){
523 int xOffset(iZ == 0 ? -40 : 20);
524 for(
int iX(0);iX < 20; iX++){
525 for(
int iY(0);iY < 20; iY++){
526 int GraphX = (iX + 1)+ xOffset;
528 fill(
meZs1Ru_, GraphX, GraphY, EEZs1RuCount[iZ][iX][iY]);
537 <<
" ZS-flagged EE channels under " 539 <<
" in a complete RU.\n";
546 bool eventError =
false;
549 vector<pair<int,int> > xtalEtaPhi;
552 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
553 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0){
559 xtalEtaPhi.push_back(pair<int,int>(iEta0, iPhi0));
575 int iEta0 =
iEta2cIndex(static_cast<const EBDetId&>(frame.
id()).ieta());
576 int iPhi0 =
iPhi2cIndex(static_cast<const EBDetId&>(frame.
id()).iphi());
577 if(iEta0<0 || iEta0>=nEbEta){
579 s <<
"EcalSelectiveReadoutValidation: " 580 <<
"iEta0 (= " << iEta0 <<
") is out of range (" 581 <<
"[0," << nEbEta -1 <<
"]\n";
584 if(iPhi0<0 || iPhi0>=
nEbPhi){
586 s <<
"EcalSelectiveReadoutValidation: " 587 <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 588 <<
"[0," <<
nEbPhi -1 <<
"]\n";
594 for(
int i = 0;
i< frame.
size(); ++
i){
595 const int gain12Code = 0x1;
607 for(vector<PCaloHit>::const_iterator it =
ebSimHits_->begin();
611 int iEta = detId.
ieta();
613 int iPhi = detId.iphi();
622 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
623 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0){
624 crystalShot[iEta0][iPhi0] =
false;
625 EBxtalCoor[iEta0][iPhi0] = make_pair(0,0);
635 int iEta =
static_cast<const EBDetId&
>(frame.
id()).ieta();
636 int iPhi =
static_cast<const EBDetId&
>(frame.
id()).iphi();
639 if(iEta0<0 || iEta0>=nEbEta){
641 <<
"iEta0 (= " << iEta0 <<
") is out of range (" 642 <<
"[0," << nEbEta -1 <<
"]");
644 if(iPhi0<0 || iPhi0>=
nEbPhi){
646 <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 647 <<
"[0," <<
nEbPhi -1 <<
"]");
649 assert(iEta0>=0 && iEta0<nEbEta);
650 assert(iPhi0>=0 && iPhi0<
nEbPhi);
651 if(!crystalShot[iEta0][iPhi0]){
652 crystalShot[iEta0][iPhi0] =
true;
655 cout <<
"Error: several digi for same crystal!";
663 for(
int i = 0;
i< frame.
size(); ++
i){
664 const int gain12Code = 0x1;
665 if(frame[
i].
gainId()!=gain12Code){
673 bool highInterest =
false;
681 highInterest = ((srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK)
694 pair<int,int> ru =
dccCh(frame.
id());
698 <<
"RU " << frame.
id() <<
", " 699 <<
"DCC " << ru.first
700 <<
" Ch : " << ru.second <<
": " 701 <<
"LI channel under ZS threshold.\n";
705 <<
"more ZS errors for this event...\n";
711 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
712 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0)
713 fill(
meChOcc_, EBxtalCoor[iEta0][iPhi0].
first, EBxtalCoor[iEta0][iPhi0].
second,crystalShot[iEta0][iPhi0] ? 1. : 0.);
722 int iEta =
static_cast<const EBDetId&
>(hit.
id()).ieta();
723 int iPhi =
static_cast<const EBDetId&
>(hit.
id()).iphi();
726 if(iEta0<0 || iEta0>=nEbEta){
727 LogError(
"EcalSrValid") <<
"iEta0 (= " << iEta0 <<
") is out of range (" 728 <<
"[0," << nEbEta -1 <<
"]\n";
730 if(iPhi0<0 || iPhi0>=
nEbPhi){
731 LogError(
"EcalSrValid") <<
"iPhi0 (= " << iPhi0 <<
") is out of range (" 732 <<
"[0," <<
nEbPhi -1 <<
"]\n";
738 for(
unsigned int i=0;
i<xtalEtaPhi.size(); ++
i){
739 int iEta0 = xtalEtaPhi[
i].first;
740 int iPhi0= xtalEtaPhi[
i].second;
743 double recE = energies.
recE;
761 int EBZs1RuCount[2][17][72];
762 int EBFullRuCount[2][17][72];
763 int EBForcedRuCount[2][17][72];
764 std::pair<int, int> EBtowerCoor[2][17][72];
765 for(
int iZ(0); iZ < 2; iZ++){
766 for(
int iEta(0);iEta < 17; iEta++){
767 for(
int iPhi(0);iPhi < 72; iPhi++){
768 EBZs1RuCount[iZ][iEta][iPhi] = 0;
769 EBFullRuCount[iZ][iEta][iPhi] = 0;
770 EBForcedRuCount[iZ][iEta][iPhi] = 0;
777 char ebSrfMark[2][17][72];
778 bzero(ebSrfMark,
sizeof(ebSrfMark));
784 int iPhi = srf.
id().
iphi();
790 if(iEtaAbs < 1 || iEtaAbs > 17
791 || iPhi < 1 || iPhi > 72)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
792 <<
"Found a barrel SRF with an invalid det ID: " << srf.
id() <<
".\n";
793 ++ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1];
794 if(ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1] > 1)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
795 <<
"Duplicate SRF for RU " << srf.
id() <<
".\n";
797 EBtowerCoor[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] = std::pair<int, int>(srf.
id().
ieta(), srf.
id().
iphi());
801 EBZs1RuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
804 EBFullRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
808 EBForcedRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
811 for(
int iZ(0); iZ < 2; iZ++){
812 for(
int iEta(0);iEta < 17; iEta++){
813 for(
int iPhi(0);iPhi < 72; iPhi++){
814 float x(EBtowerCoor[iZ][iEta][iPhi].
first);
815 float y(EBtowerCoor[iZ][iEta][iPhi].
second);
825 <<
" ZS-flagged EB channels under " 827 <<
" in a complete RU.\n";
856 "ECAL DCC event fragment size;Dcc id; " 860 "LI channel payload per DCC;Dcc id; " 864 "HI channel payload per DCC;Dcc id; " 868 "ECAL DCC event fragment size;Dcc id; " 872 "ECAL Barrel low interest crystal data payload;" 873 "Event size (kB);Nevts",
877 "Endcap low interest crystal data payload;" 878 "Event size (kB);Nevts",
882 "ECAL low interest crystal data payload;" 883 "Event size (kB);Nevts",
887 "Barrel high interest crystal data payload;" 888 "Event size (kB);Nevts",
892 "Endcap high interest crystal data payload;" 893 "Event size (kB);Nevts",
897 "ECAL high interest crystal data payload;" 898 "Event size (kB);Nevts",
902 "Barrel data volume;Event size (kB);Nevts",
906 "Endcap data volume;Event size (kB);Nevts",
910 "ECAL data volume;Event size (kB);Nevts",
914 "ECAL crystal channel occupancy after zero suppression;" 915 "iX -200 / iEta / iX + 100;" 916 "iY / iPhi (starting from -10^{o}!);" 925 title =
string(
"Trigger primitive TT E_{T};E_{T} ")
926 + tpUnit +
string(
";Event Count");
932 "Trigger primitive TT flag;Flag number;Event count",
935 title =
string(
"Trigger tower flag vs TP;E_{T}(TT) (")
936 + tpUnit +
string(
");Flag number");
943 "Trigger tower flag vs #sumE_{T};" 948 title =
string(
"Trigger primitive Et (TP) vs #sumE_{T};" 950 "E_{T} (TP) (") + tpUnit +
string (
")");
957 title =
string(
"Trigger primitive E_{T};" 960 "E_{T} (TP) (") + tpUnit +
string (
")");
968 "Full Read-out readout unit;" 969 "iX - 40 / iEta / iX + 20;" 970 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 976 "Number of Full-readout-flagged readout units;" 977 "FRO RU count;Event count",
981 "Number of EB Full-readout-flagged readout units;" 982 "FRO RU count;Event count",
986 "Number of EE Full-readout-flagged readout units;" 987 "FRO RU count;Event count",
991 "Readout unit with ZS-thr-1 flag;" 992 "iX - 40 / iEta / iX + 20;" 993 "iY0 / iPhi0 (iPhi = 1 at phi = 0 rad);" 999 "ECAL readout unit with forced bit of SR flag on;" 1000 "iX - 40 / iEta / iX + 20;" 1001 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1007 "Low interest trigger tower flags;" 1015 "Mid interest trigger tower flags;" 1023 "High interest trigger tower flags;" 1031 "Trigger tower flags with forced bit set;" 1039 const float ebMinNoise = -1.;
1040 const float ebMaxNoise = 1.;
1042 const float eeMinNoise = -1.;
1043 const float eeMaxNoise = 1.;
1045 const float ebMinE = ebMinNoise;
1046 const float ebMaxE = ebMaxNoise;
1048 const float eeMinE = eeMinNoise;
1049 const float eeMaxE = eeMaxNoise;
1051 const int evtMax = 500;
1054 "Crystal reconstructed energy;E (GeV);Event count",
1055 100, ebMinE, ebMaxE);
1058 "EE <E_hit>;event #;<E_hit> (GeV)",
1059 evtMax, .5, evtMax + .5);
1063 "(rec E of crystal without deposited energy)" 1064 ";Rec E (GeV);Event count",
1065 100, ebMinNoise, ebMaxNoise);
1068 "Emulated ouput of ZS FIR filter for EB " 1069 "low interest crystals;" 1075 "Emulated ouput of ZS FIR filter for EB " 1076 "high interest crystals;" 1089 meEbSimE_ =
book1D(ibooker,
"hEbSimE",
"EB hit crystal simulated energy",
1090 100, ebMinE, ebMaxE);
1093 "EB rec energy of hit crystals",
1094 100, ebMinE, ebMaxE);
1097 "Crystal simulated vs reconstructed energy;" 1098 "Esim (GeV);Erec GeV);Event count",
1099 100, ebMinE, ebMaxE,
1100 100, ebMinE, ebMaxE);
1103 "Crystal no-zs simulated vs reconstructed " 1105 "Esim (GeV);Erec GeV);Event count",
1106 100, ebMinE, ebMaxE,
1107 100, ebMinE, ebMaxE);
1110 "EE crystal reconstructed energy;E (GeV);" 1112 100, eeMinE, eeMaxE);
1115 "<E_{EE hit}>;event;<E_{hit}> (GeV)",
1116 evtMax, .5, evtMax + .5);
1121 "(rec E of crystal without deposited energy);" 1122 "E (GeV);Event count",
1123 200, eeMinNoise, eeMaxNoise);
1126 "Emulated ouput of ZS FIR filter for EE " 1127 "low interest crystals;" 1133 "Emulated ouput of ZS FIR filter for EE " 1134 "high interest crystals;" 1148 meEeSimE_ =
book1D(ibooker,
"hEeSimE",
"EE hit crystal simulated energy",
1149 100, eeMinE, eeMaxE);
1152 "EE rec energy of hit crystals",
1153 100, eeMinE, eeMaxE);
1156 "EE crystal simulated vs reconstructed energy;" 1157 "Esim (GeV);Erec GeV);Event count",
1158 100, eeMinE, eeMaxE,
1159 100, eeMinE, eeMaxE);
1162 "EE crystal no-zs simulated vs " 1164 "energy;Esim (GeV);Erec GeV);Event count",
1165 100, eeMinE, eeMaxE,
1166 100, eeMinE, eeMaxE);
1169 "TTFlags and SR Flags mismatch;" 1170 "iX - 40 / iEta / iX + 20;" 1171 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1178 "Incomplete full-readout-flagged readout units;" 1179 "iX - 40 / iEta / iX + 20;" 1180 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1186 "Number of incomplete full-readout-flagged " 1188 "Number of RUs;Event count;",
1193 "Incomplete full-readout-flagged readout units;" 1194 "iX - 40 / iEta / iX + 20;" 1195 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1196 "Incomplete error rate",
1202 "Dropped full-readout-flagged readout units;" 1203 "iX - 40 / iEta / iX + 20;" 1204 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1210 "Number of dropped full-readout-flagged " 1211 "RU count;RU count;Event count",
1215 "Number of zero-suppressed-flagged RU fully " 1217 "RU count;Event count",
1221 buf <<
"Number of LI EB channels below the " <<
ebZsThr_/4. <<
" ADC count ZS threshold;" 1222 "Channel count;Event count",
1228 buf <<
"Number of LI EE channels below the " <<
eeZsThr_/4. <<
" ADC count ZS theshold;" 1229 "Channel count;Event count",
1235 "Number of LI channels below the ZS threshold;" 1236 "Channel count;Event count",
1240 "Number of EB channels below the ZS " 1241 "threshold in a LI but fully readout RU;" 1242 "Channel count;Event count;",
1246 "Number EE channels below the ZS threshold" 1247 " in a LI but fully readout RU;" 1248 "Channel count;Event count",
1252 "Number of LI channels below the ZS threshold " 1253 "in a LI but fully readout RU;" 1254 "Channel count;Event count",
1260 "Dropped full-readout-flagged readout units" 1261 "iX - 40 / iEta / iX + 20;" 1262 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1268 "Complete zero-suppressed-flagged readout units;" 1269 "iX - 40 / iEta / iX + 20;" 1270 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1277 "Complete zero-suppressed-flagged readout units;" 1278 "iX - 40 / iEta / iX + 20;" 1279 "iY / iPhi (iPhi = 1 at phi = 0 rad);" 1280 "Completeness rate",
1290 for(set<string>::iterator it =
histList_.begin();
1293 if(*it!=
string(
"all")
1295 s << (s.str().empty()?
"":
", ") << *it;
1298 if(!s.str().empty()){
1300 <<
"Parameter 'histList' contains some unknown histogram(s). " 1301 "Check spelling. Following name were not found: " 1313 for(
int iTTFlag(0);iTTFlag <8; iTTFlag++){
1314 TTFlagCount[iTTFlag]=0;
1316 for(
int iTtEta(0); iTtEta <
nTtEta; iTtEta++){
1317 for(
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++){
1318 LiTTFlagCount[iTtEta][iTtPhi] = 0;
1319 MiTTFlagCount[iTtEta][iTtPhi] = 0;
1320 HiTTFlagCount[iTtEta][iTtPhi] = 0;
1324 for(
int iEt(0);iEt < 100; iEt++){
1341 double lsb10bitsEB(ebItr == physMap.end() ? 0. : ebItr->second.EtSat / 1024.);
1343 double lsb10bitsEE(eeItr == physMap.end() ? 0. : eeItr->second.EtSat / 1024.);
1350 unsigned int ADC = it->compressedEt();
1352 double lsb10bits(0.);
1358 uint32_t lutGrp = 999 ;
1359 if (itgrp != lutGrpMap.end()) lutGrp = itgrp->second ;
1362 if (itLut != lutMap.end()) {
1363 const unsigned int *
lut = (itLut->second).getLut() ;
1364 for (
unsigned int i=0 ;
i<1024 ;
i++)
1365 if (ADC == (0xff & lut[
i])) {
1371 tpEt = lsb10bits * tpg10bits;
1374 tpEt = it->compressedEt();
1376 int iEta = it->id().ieta();
1378 int iPhi = it->id().iphi();
1380 double etSum =
ttEtSums[iEta0][iPhi0];
1383 if ((iE >= 0) && (iE < 100)) {
1392 ++TTFlagCount[it->ttFlag()];
1393 if((it->ttFlag() & 0x3) == 0){
1394 LiTTFlagCount[iEta0][iPhi0] += 1;
1396 else if((it->ttFlag() & 0x3) == 1){
1397 MiTTFlagCount[iEta0][iPhi0] += 1;
1399 else if((it->ttFlag() & 0x3) == 3){
1400 HiTTFlagCount[iEta0][iPhi0] += 1;
1402 if((it->ttFlag() & 0x4)){
1411 for(
int ittflag(0); ittflag < 8; ittflag++){
1414 for(
int iTtEta(0); iTtEta <
nTtEta; iTtEta++){
1415 for(
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++){
1422 for(
int iE(0);iE<100; iE++){
1426 for(
int iE(0); iE<40; iE++){
1448 for (
unsigned int digis=0; digis<
ebDigis_->
size(); ++digis){
1454 for (
unsigned int digis=0; digis<
eeDigis_->
size(); ++digis){
1460 for(
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0){
1497 template<
class T,
class U>
1499 const U& srFlagColl){
1500 const DetId& xtalId = frame.id();
1501 typedef typename U::key_type RuDetId;
1503 typename U::const_iterator srf = srFlagColl.find(ruId);
1505 bool highInterest =
false;
1508 if(srf != srFlagColl.end()){
1509 flag = srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK;
1517 pair<int,int> ch =
dccCh(xtalId);
1526 int iEta0 =
iEta2cIndex(static_cast<const EBDetId&>(xtalId).ieta());
1527 int iPhi0 =
iPhi2cIndex(static_cast<const EBDetId&>(xtalId).iphi());
1545 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix());
1546 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy());
1547 int iZ0 =
static_cast<const EEDetId&
>(frame.id()).
zside()>0?1:0;
1561 if(ch.second < 1 || ch.second > 68){
1563 <<
"Error in DCC channel retrieval for crystal with detId " 1564 << xtalId.
rawId() <<
"DCC channel out of allowed range [1..68]\n";
1594 static std::atomic<bool> firstCall {
true};
1595 bool expected =
true;
1596 if( firstCall.compare_exchange_strong(expected,
false) ) {
1605 double adc2GeV = 0.;
1619 double gainInv[] = {12., 1., 6., 12.};
1621 for(
int i=0;
i <
n; ++
i){
1622 acc +=
weights_[
i]*frame[
i].adc()*gainInv[frame[
i].gainId()]*adc2GeV;
1634 <<
"Wrong type of DetId passed to the " 1635 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1636 "An ECAL DetId was expected.\n";
1649 const int oneXtalPhi0 = iTtPhi0 * 5;
1650 const int oneXtalEta0 = (iTtEta0 -
nOneEeTtEta) * 5;
1657 if(detId.
rawId() & 0x8000){
1668 <<
"Wrong type of DetId passed to the method " 1669 "EcalSelectiveReadoutValidation::dccCh(const DetId&). " 1670 "A valid EcalTriggerTower, EcalBarrel or EcalEndcap DetId was expected. " 1671 "detid = " << xtalId.
rawId() <<
".\n";
1677 result.first = EcalElecId.
dccId();
1681 <<
"Got an invalid DCC ID, DCCID = " << result.first
1682 <<
" for DetId 0x" << hex << detId.
rawId()
1683 <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1686 result.second = EcalElecId.
towerId();
1688 if(result.second < 1 || result.second > 68){
1690 <<
"Got an invalid DCC channel ID, DCC_CH = " << result.second
1691 <<
" for DetId 0x" << hex << detId.
rawId()
1692 <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1706 int iDCC= EcalElecId.
dccId();
1707 int iDccChan = EcalElecId.
towerId();
1708 const bool ignoreSingle =
true;
1720 if(eeGeometry==
nullptr || ebGeometry==
nullptr){
1728 for(
int iEta0 = 0; iEta0 <
nTtEta; ++iEta0){
1729 for(
int iPhi0 = 0; iPhi0 <
nTtPhi; ++iPhi0){
1749 it != eeDigis.
end(); ++it){
1763 int innerTTEtas[] = {0, 1, 54, 55};
1764 for(
unsigned iRing = 0; iRing <
sizeof(innerTTEtas)/
sizeof(innerTTEtas[0]);
1766 int iTtEta0 = innerTTEtas[iRing];
1782 for(
unsigned iTtPhi0 = 0; iTtPhi0 <
nTtPhi-1; iTtPhi0 += 2){
1799 double weights[] = {0., -1/3., -1/3., -1/3., 0., 1.};
1801 double adc2GeV = 0.;
1809 << __FILE__ <<
":" << __LINE__ <<
": " 1810 <<
"this is a bug. Please report it.\n";
1815 const int n = min<int>(frame.size(),
sizeof(
weights)/
sizeof(weights[0]));
1817 double gainInv[] = {12., 1., 6., 12};
1819 for(
int i=offset;
i <
n; ++
i){
1821 if(iframe>=0 && iframe<frame.size()){
1822 acc += weights[
i]*frame[iframe].adc()
1823 *gainInv[frame[iframe].gainId()]*adc2GeV;
1833 if(result==
nullptr){
1835 <<
"Failed to book integer DQM monitor element" <<
name;
1844 if(result==
nullptr){
1846 <<
"Failed to book histogram " <<
name;
1854 nybins, ymin, ymax);
1855 if(result==
nullptr){
1857 <<
"Failed to book histogram " <<
name;
1866 if(result==
nullptr){
1868 <<
"Failed to book histogram " <<
name;
1882 if(result==
nullptr){
1884 <<
"Failed to book histogram " <<
name;
1914 log <<
"Avalailable histograms (DQM monitor elements): \n";
1918 log << it->first <<
": " << it->second <<
"\n";
1920 log <<
"\nTo include an histogram add its name in the vstring parameter " 1921 "'histograms' of the EcalSelectiveReadoutValidation module\n";
1925 double ruHeaderPayload = 0.;
1926 const int firstEbDcc0 =
nEeDccs/2;
1927 for(
int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 +
nEbDccs; ++iDcc0){
1936 double ruHeaderPayload = 0.;
1937 const unsigned firstEbDcc0 =
nEeDccs/2;
1938 for(
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0){
1940 if(iDcc0== firstEbDcc0) iDcc0 +=
nEbDccs;
1951 const std::vector<int>& firWeights,
1954 const int nFIRTaps = 6;
1956 const vector<int>&
w = firWeights;
1960 bool gain12saturated =
false;
1961 const int gain12 = 0x01;
1962 const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
1965 for(
int iSample=firstFIRSample-1;
1966 iSample<lastFIRSample; ++iSample, ++iWeight){
1967 if(iSample>=0 && iSample < frame.
size()){
1969 if(sample.
gainId()!=gain12) gain12saturated =
true;
1970 LogTrace(
"DccFir") << (iSample>=firstFIRSample?
"+":
"") << sample.
adc()
1971 <<
"*(" << w[iWeight] <<
")";
1972 acc+=sample.
adc()*w[iWeight];
1975 ": Not enough samples in data frame or 'ecalDccZs1stSample' module " 1976 "parameter is not valid...";
1983 acc = (acc>=0)?(acc >> 8):-(-acc >> 8);
1988 LogTrace(
"DccFir") <<
"acc: " << acc <<
"\n" 1989 <<
"saturated: " << (gain12saturated?
"yes":
"no") <<
"\n";
1992 *saturated = gain12saturated;
2001 const int nFIRTaps = 6;
2002 vector<int> firWeights(nFIRTaps, 0);
2003 const static int maxWeight = 0xEFF;
2004 for(
unsigned i=0;
i <
min((
size_t)nFIRTaps,normalizedWeights.size()); ++
i){
2005 firWeights[
i] = lround(normalizedWeights[
i] * (1<<10));
2006 if(
abs(firWeights[
i])>maxWeight){
2007 firWeights[
i] = firWeights[
i]<0?-maxWeight:maxWeight;
2015 bool notNormalized =
false;
2016 bool notInt =
false;
2017 for(
unsigned i=0;
i < weightsForZsFIR.size(); ++
i){
2018 if(weightsForZsFIR[
i] > 1.) notNormalized =
true;
2019 if((
int)weightsForZsFIR[
i]!=weightsForZsFIR[
i]) notInt =
true;
2021 if(notInt && notNormalized){
2023 <<
"weigtsForZsFIR paramater values are not valid: they " 2024 <<
"must either be integer and uses the hardware representation " 2025 <<
"of the weights or less or equal than 1 and used the normalized " 2026 <<
"representation.";
2030 firWeights_ = vector<int>(weightsForZsFIR.size());
2031 for(
unsigned i = 0;
i< weightsForZsFIR.size(); ++
i){
2038 log <<
"Input weights for FIR: ";
2039 for(
unsigned i = 0;
i < weightsForZsFIR.size(); ++
i){
2040 log << weightsForZsFIR[
i] <<
"\t";
2044 log <<
"\nActual FIR weights: ";
2047 s2 += firWeights_[
i]*firWeights_[
i];
2051 log <<
"\nNormalized FIR weights after hw representation rounding: ";
2064 <<
"Failed to open the log file '" 2066 <<
"' for SRP algorithm result check.\n";
2074 <<
"Failed to open the log file '" 2076 <<
"' for Selective Readout decision application check.\n";
2086 typedef typename T::const_iterator SrFlagCollectionConstIt;
2087 typedef typename T::key_type MyRuDetIdType;
2088 SrFlagCollectionConstIt itSrfFromData = srfFromData.begin();
2089 SrFlagCollectionConstIt itComputedSr = computedSrf.begin();
2091 while(itSrfFromData != srfFromData.end()
2092 || itComputedSr != computedSrf.end()){
2093 MyRuDetIdType inconsistentRu = 0;
2094 bool inconsistent =
false;
2095 if(itComputedSr == computedSrf.end() ||
2096 (itSrfFromData != srfFromData.end()
2097 && itSrfFromData->id() < itComputedSr->id())){
2099 pair<int, int> ch =
dccCh(itSrfFromData->id());
2101 <<
", DCC " << ch.first <<
" ch " << ch.second
2102 <<
" found in data (SRF:" << itSrfFromData->flagName()
2103 <<
") but not in the set of SRFs computed from the data TTF.\n";
2104 inconsistentRu = itSrfFromData->id();
2105 inconsistent =
true;
2107 }
else if(itSrfFromData==srfFromData.end() ||
2108 (itComputedSr != computedSrf.end()
2109 && itComputedSr->id() < itSrfFromData->id())){
2111 pair<int, int> ch =
dccCh(itComputedSr->id());
2114 <<
", DCC " << ch.first <<
" ch " << ch.second
2115 <<
" not found in data. Computed SRF: " 2116 << itComputedSr->flagName() <<
".\n";
2117 inconsistentRu = itComputedSr->id();
2118 inconsistent =
true;
2123 if(itComputedSr->value()!=itSrfFromData->value()){
2124 pair<int, int> ch =
dccCh(itSrfFromData->id());
2126 << itSrfFromData->id()
2127 <<
", DCC " << ch.first <<
" ch " << ch.second
2128 <<
", SRF inconsistency: " 2129 <<
"from data: " << itSrfFromData->flagName()
2130 <<
", computed from TTF: " 2131 << itComputedSr->flagName()
2133 inconsistentRu = itComputedSr->id();
2134 inconsistent =
true;
2136 if(itComputedSr != computedSrf.end()) ++itComputedSr;
2137 if(itSrfFromData != srfFromData.end()) ++itSrfFromData;
2153 <<
"Argument of EcalSelectiveReadoutValidation::dccId(const EcalTrigTowerDetId&) " 2154 <<
"must be a barrel trigger tower Id\n";
2156 return dccCh(detId).first;
2181 buf <<
"List of DCCs found in the first processed event: ";
2183 for(
unsigned iDcc = 0; iDcc <
nDccs_; ++iDcc){
2185 buf << (first?
"":
", ") << (iDcc +
minDccId_);
2189 buf <<
"\nOnly DCCs from this list will be considered for error logging\n";
2192 LogInfo(
"EcalSrValid") << buf.str();
2199 typedef typename T::const_iterator SrFlagCollectionConstIt;
2200 typedef typename T::key_type MyRuDetIdType;
2202 for(SrFlagCollectionConstIt itSrf = srfs.begin();
2203 itSrf != srfs.end(); ++itSrf){
2205 pair<int,int> ru =
dccCh(itSrf->id());
2221 << itSrf->id() <<
" (DCC " << ru.first
2222 <<
" ch " << ru.second <<
") is 'Full readout' " 2223 <<
"while none of its channel was read out\n";
2233 << itSrf->id() <<
" (DCC " << ru.first
2234 <<
" ch " << ru.second <<
") is 'Full readout' " 2238 <<
" channels were read out.\n";
2261 if(iDcc < minDccId_ || iDcc >
maxDccId_){
2263 }
else if (10 <= iDcc && iDcc <= 45) {
2267 if(iDcc < 10) iDccPhi = iDcc;
2268 else iDccPhi = iDcc - 45;
2269 switch(iDccPhi*100+iDccCh){
void configFirWeights(const std::vector< double > &weightsForZsFIR)
void endRun(const edm::Run &r, const edm::EventSetup &c) override
void printAvailableHists()
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
TProfile * getTProfile() const
MonitorElement * meEbFullRoCnt_
int iPhi2cIndex(int iPhi) const
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_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
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
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * bookProfile(Args &&...args)
bool verbose_
Verbosity switch.
double phi
number of sim hits
static const int nEbPhi
number of crystals along Phi in EB
MonitorElement * meEeZsErrCnt_
MonitorElement * bookFloat(DQMStore::IBooker &, const std::string &name)
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_
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_
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 * book2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
MonitorElement * bookProfile2D(Args &&...args)
MonitorElement * book1D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
void analyzeDataVolume(const edm::Event &e, const edm::EventSetup &es)
double getL1aRate() const
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 * 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)
MonitorElement * book1D(Args &&...args)
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.
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
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
int iEta2cIndex(int iEta) const
MonitorElement * meMiTtf_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
MonitorElement * meVolEHI_
void read(const edm::Event &event)
int cIndex2iEta(int i) const
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.
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 * book2D(Args &&...args)
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_]
int getRuCount(int iDcc0) const
MonitorElement * meCompleteZSMap_
MonitorElement * meIncompleteFRORateMap_
MonitorElement * meVolHI_
et
define resolution functions of each parameter
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
CollHandle< EEDigiCollection > eeNoZsDigis_
double recE
energy reconstructed from unsuppressed digi
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
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_
MonitorElement * bookFloat(Args &&...args)
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_
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="")
static const unsigned nDccs_
Total number of DCCs.
T const * product() const
MonitorElement * meZs1Ru_
MonitorElement * meFullRoRu_
std::string srpAlgoErrorLogFileName_
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