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)),
58 ebDigis_(ps.getParameter<edm::
InputTag>(
"EbDigiCollection"),
false,
60 eeDigis_(ps.getParameter<edm::
InputTag>(
"EeDigiCollection"),
false,
62 ebNoZsDigis_(ps.getParameter<edm::
InputTag>(
"EbUnsuppressedDigiCollection"),
64 eeNoZsDigis_(ps.getParameter<edm::
InputTag>(
"EeUnsuppressedDigiCollection"),
66 ebSrFlags_(ps.getParameter<edm::
InputTag>(
"EbSrFlagCollection"),
false,
68 eeSrFlags_(ps.getParameter<edm::
InputTag>(
"EeSrFlagCollection"),
false,
70 ebComputedSrFlags_(ps.getParameter<edm::
InputTag>(
"EbSrFlagFromTTCollection"),
false,
72 eeComputedSrFlags_(ps.getParameter<edm::
InputTag>(
"EeSrFlagFromTTCollection"),
false,
74 ebSimHits_(ps.getParameter<edm::
InputTag>(
"EbSimHitCollection"),
false,
76 eeSimHits_(ps.getParameter<edm::
InputTag>(
"EeSimHitCollection"),
false,
78 tps_(ps.getParameter<edm::
InputTag>(
"TrigPrimCollection"),
false,
80 ebRecHits_(ps.getParameter<edm::
InputTag>(
"EbRecHitCollection"),
false,
82 eeRecHits_(ps.getParameter<edm::
InputTag>(
"EeRecHitCollection"),
false,
84 fedRaw_(ps.getParameter<edm::
InputTag>(
"FEDRawCollection"),
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;
270 for(
int iZ0=0; iZ0<
nEndcaps; ++iZ0){
271 for(
int iX0=0; iX0<
nEeX; ++iX0){
272 for(
int iY0=0; iY0<
nEeY; ++iY0){
295 int iZ0 = frame.
id().
zside()>0?1:0;
297 if(iX0<0 || iX0>=
nEeX){
298 edm::LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range ("
299 <<
"[0," <<
nEeX -1 <<
"]\n";
301 if(iY0<0 || iY0>=
nEeY){
302 edm::LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range ("
303 <<
"[0," <<
nEeY -1 <<
"]\n";
309 for(
int i = 0;
i< frame.
size(); ++
i){
310 const int gain12Code = 0x1;
327 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).ix());
328 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(hit.
id()).iy());
331 if(iX0<0 || iX0>=
nEeX){
332 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range ("
333 <<
"[0," <<
nEeX -1 <<
"]\n";
335 if(iY0<0 || iY0>=
nEeY){
336 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range ("
337 <<
"[0," <<
nEeY -1 <<
"]\n";
345 for(vector<PCaloHit>::const_iterator it =
eeSimHits_->begin();
353 int iZ0 = detId.zside()>0?1:0;
359 pair<int,int> EExtalCoor[
nEeX][
nEeY][2];
361 for(
int iEeZ=0; iEeZ<2; ++iEeZ){
362 for(
int iEeX=0; iEeX<
nEeX; ++iEeX){
363 for(
int iEeY=0; iEeY<
nEeY; ++iEeY){
364 EEcrystalShot[iEeX][iEeY][iEeZ] =
false;
365 EExtalCoor[iEeX][iEeY][iEeZ] = make_pair(0,0);
374 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).ix());
375 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.
id()).iy());
377 if(iX0<0 || iX0>=
nEeX){
378 LogError(
"EcalSrValid") <<
"iX0 (= " << iX0 <<
") is out of range ("
379 <<
"[0," <<
nEeX -1 <<
"]\n";
381 if(iY0<0 || iY0>=
nEeY){
382 LogError(
"EcalSrValid") <<
"iY0 (= " << iY0 <<
") is out of range ("
383 <<
"[0," <<
nEeY -1 <<
"]\n";
386 if(!EEcrystalShot[iX0][iY0][iZ0]){
387 EEcrystalShot[iX0][iY0][iZ0] =
true;
390 cout <<
"Error: several digi for same crystal!";
399 for(
int i = 0;
i< frame.
size(); ++
i){
400 const int gain12Code = 0x1;
401 if(frame[
i].
gainId()!=gain12Code){
409 bool highInterest =
false;
415 highInterest = ((srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK)
427 pair<int,int> ru =
dccCh(frame.
id());
431 <<
"RU " << frame.
id() <<
", "
432 <<
"DCC " << ru.first
433 <<
" Ch : " << ru.second <<
": "
434 <<
"LI channel under ZS threshold.\n";
438 <<
"more ZS errors for this event...\n";
444 for(
int iEeZ=0; iEeZ<2; ++iEeZ){
445 for(
int iEeX=0; iEeX<
nEeX; ++iEeX){
446 for(
int iEeY=0; iEeY<
nEeY; ++iEeY){
447 fill(
meChOcc_, EExtalCoor[iEeX][iEeY][iEeZ].
first, EExtalCoor[iEeX][iEeY][iEeZ].
second,EEcrystalShot[iEeX][iEeY][iEeZ] ? 1 : 0);
452 for(
int iZ0=0; iZ0<
nEndcaps; ++iZ0){
453 for(
int iX0=0; iX0<
nEeX; ++iX0){
454 for(
int iY0=0; iY0<
nEeY; ++iY0){
478 int EEZs1RuCount[2][20][20];
479 int EEFullRuCount[2][20][20];
480 int EEForcedRuCount[2][20][20];
481 for(
int iZ(0); iZ < 2; iZ++){
482 for(
int iX(0);iX < 20; iX++){
483 for(
int iY(0);iY < 20; iY++){
484 EEZs1RuCount[iZ][iX][iY] = 0;
485 EEFullRuCount[iZ][iX][iY] = 0;
486 EEForcedRuCount[iZ][iX][iY] = 0;
492 char eeSrfMark[2][20][20];
493 bzero(eeSrfMark,
sizeof(eeSrfMark));
499 int iX = srf.
id().
ix();
500 int iY = srf.
id().
iy();
502 if(iX<1 || iY > 100)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
503 <<
"Found an endcap SRF with an invalid det ID: " << srf.
id() <<
".\n";
504 ++eeSrfMark[zside>0?1:0][iX-1][iY-1];
505 if(eeSrfMark[zside>0?1:0][iX-1][iY-1] > 1)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
506 <<
"Duplicate SRF for supercrystal " << srf.
id() <<
".\n";
509 EEZs1RuCount[zside>0?1:0][iX-1][iY-1] += 1;
513 EEFullRuCount[zside>0?1:0][iX-1][iY-1] += 1;
518 EEForcedRuCount[zside>0?1:0][iX-1][iY-1] += 1;
521 for(
int iZ(0); iZ < 2; iZ++){
522 int xOffset(iZ == 0 ? -40 : 20);
523 for(
int iX(0);iX < 20; iX++){
524 for(
int iY(0);iY < 20; iY++){
525 int GraphX = (iX + 1)+ xOffset;
527 fill(
meZs1Ru_, GraphX, GraphY, EEZs1RuCount[iZ][iX][iY]);
536 <<
" ZS-flagged EE channels under "
538 <<
" in a complete RU.\n";
545 bool eventError =
false;
547 vector<pair<int,int> > xtalEtaPhi;
550 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
551 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0){
557 xtalEtaPhi.push_back(pair<int,int>(iEta0, iPhi0));
573 int iEta0 =
iEta2cIndex(static_cast<const EBDetId&>(frame.
id()).ieta());
574 int iPhi0 =
iPhi2cIndex(static_cast<const EBDetId&>(frame.
id()).iphi());
575 if(iEta0<0 || iEta0>=nEbEta){
577 s <<
"EcalSelectiveReadoutValidation: "
578 <<
"iEta0 (= " << iEta0 <<
") is out of range ("
579 <<
"[0," << nEbEta -1 <<
"]\n";
582 if(iPhi0<0 || iPhi0>=
nEbPhi){
584 s <<
"EcalSelectiveReadoutValidation: "
585 <<
"iPhi0 (= " << iPhi0 <<
") is out of range ("
586 <<
"[0," <<
nEbPhi -1 <<
"]\n";
592 for(
int i = 0;
i< frame.
size(); ++
i){
593 const int gain12Code = 0x1;
605 for(vector<PCaloHit>::const_iterator it =
ebSimHits_->begin();
609 int iEta = detId.
ieta();
611 int iPhi = detId.iphi();
620 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
621 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0){
622 crystalShot[iEta0][iPhi0] =
false;
623 EBxtalCoor[iEta0][iPhi0] = make_pair(0,0);
633 int iEta =
static_cast<const EBDetId&
>(frame.
id()).ieta();
634 int iPhi =
static_cast<const EBDetId&
>(frame.
id()).iphi();
637 if(iEta0<0 || iEta0>=nEbEta){
639 <<
"iEta0 (= " << iEta0 <<
") is out of range ("
640 <<
"[0," << nEbEta -1 <<
"]");
642 if(iPhi0<0 || iPhi0>=
nEbPhi){
644 <<
"iPhi0 (= " << iPhi0 <<
") is out of range ("
645 <<
"[0," <<
nEbPhi -1 <<
"]");
647 assert(iEta0>=0 && iEta0<nEbEta);
649 if(!crystalShot[iEta0][iPhi0]){
650 crystalShot[iEta0][iPhi0] =
true;
653 cout <<
"Error: several digi for same crystal!";
661 for(
int i = 0;
i< frame.
size(); ++
i){
662 const int gain12Code = 0x1;
663 if(frame[
i].
gainId()!=gain12Code){
671 bool highInterest =
false;
679 highInterest = ((srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK)
692 pair<int,int> ru =
dccCh(frame.
id());
696 <<
"RU " << frame.
id() <<
", "
697 <<
"DCC " << ru.first
698 <<
" Ch : " << ru.second <<
": "
699 <<
"LI channel under ZS threshold.\n";
703 <<
"more ZS errors for this event...\n";
709 for(
int iEta0=0; iEta0<
nEbEta; ++iEta0){
710 for(
int iPhi0=0; iPhi0<
nEbPhi; ++iPhi0)
711 fill(
meChOcc_, EBxtalCoor[iEta0][iPhi0].
first, EBxtalCoor[iEta0][iPhi0].
second,crystalShot[iEta0][iPhi0] ? 1. : 0.);
720 int iEta =
static_cast<const EBDetId&
>(hit.
id()).ieta();
721 int iPhi =
static_cast<const EBDetId&
>(hit.
id()).iphi();
724 if(iEta0<0 || iEta0>=nEbEta){
725 LogError(
"EcalSrValid") <<
"iEta0 (= " << iEta0 <<
") is out of range ("
726 <<
"[0," << nEbEta -1 <<
"]\n";
728 if(iPhi0<0 || iPhi0>=
nEbPhi){
729 LogError(
"EcalSrValid") <<
"iPhi0 (= " << iPhi0 <<
") is out of range ("
730 <<
"[0," <<
nEbPhi -1 <<
"]\n";
736 for(
unsigned int i=0;
i<xtalEtaPhi.size(); ++
i){
737 int iEta0 = xtalEtaPhi[
i].first;
738 int iPhi0= xtalEtaPhi[
i].second;
741 double recE = energies.
recE;
759 int EBZs1RuCount[2][17][72];
760 int EBFullRuCount[2][17][72];
761 int EBForcedRuCount[2][17][72];
762 std::pair<int, int> EBtowerCoor[2][17][72];
763 for(
int iZ(0); iZ < 2; iZ++){
764 for(
int iEta(0);iEta < 17; iEta++){
765 for(
int iPhi(0);iPhi < 72; iPhi++){
766 EBZs1RuCount[iZ][iEta][iPhi] = 0;
767 EBFullRuCount[iZ][iEta][iPhi] = 0;
768 EBForcedRuCount[iZ][iEta][iPhi] = 0;
775 char ebSrfMark[2][17][72];
776 bzero(ebSrfMark,
sizeof(ebSrfMark));
782 int iPhi = srf.
id().
iphi();
788 if(iEtaAbs < 1 || iEtaAbs > 17
789 || iPhi < 1 || iPhi > 72)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
790 <<
"Found a barrel SRF with an invalid det ID: " << srf.
id() <<
".\n";
791 ++ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1];
792 if(ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1] > 1)
throw cms::Exception(
"EcalSelectiveReadoutValidation")
793 <<
"Duplicate SRF for RU " << srf.
id() <<
".\n";
795 EBtowerCoor[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] = std::pair<int, int>(srf.
id().
ieta(), srf.
id().
iphi());
799 EBZs1RuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
802 EBFullRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
806 EBForcedRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
809 for(
int iZ(0); iZ < 2; iZ++){
810 for(
int iEta(0);iEta < 17; iEta++){
811 for(
int iPhi(0);iPhi < 72; iPhi++){
812 float x(EBtowerCoor[iZ][iEta][iPhi].
first);
813 float y(EBtowerCoor[iZ][iEta][iPhi].
second);
823 <<
" ZS-flagged EB channels under "
825 <<
" in a complete RU.\n";
854 "ECAL DCC event fragment size;Dcc id; "
858 "LI channel payload per DCC;Dcc id; "
862 "HI channel payload per DCC;Dcc id; "
866 "ECAL DCC event fragment size;Dcc id; "
870 "ECAL Barrel low interest crystal data payload;"
871 "Event size (kB);Nevts",
875 "Endcap low interest crystal data payload;"
876 "Event size (kB);Nevts",
880 "ECAL low interest crystal data payload;"
881 "Event size (kB);Nevts",
885 "Barrel high interest crystal data payload;"
886 "Event size (kB);Nevts",
890 "Endcap high interest crystal data payload;"
891 "Event size (kB);Nevts",
895 "ECAL high interest crystal data payload;"
896 "Event size (kB);Nevts",
900 "Barrel data volume;Event size (kB);Nevts",
904 "Endcap data volume;Event size (kB);Nevts",
908 "ECAL data volume;Event size (kB);Nevts",
912 "ECAL crystal channel occupancy after zero suppression;"
913 "iX -200 / iEta / iX + 100;"
914 "iY / iPhi (starting from -10^{o}!);"
923 title =
string(
"Trigger primitive TT E_{T};E_{T} ")
924 + tpUnit +
string(
";Event Count");
930 "Trigger primitive TT flag;Flag number;Event count",
933 title =
string(
"Trigger tower flag vs TP;E_{T}(TT) (")
934 + tpUnit +
string(
");Flag number");
941 "Trigger tower flag vs #sumE_{T};"
946 title =
string(
"Trigger primitive Et (TP) vs #sumE_{T};"
948 "E_{T} (TP) (") + tpUnit +
string (
")");
955 title =
string(
"Trigger primitive E_{T};"
958 "E_{T} (TP) (") + tpUnit +
string (
")");
966 "Full Read-out readout unit;"
967 "iX - 40 / iEta / iX + 20;"
968 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
974 "Number of Full-readout-flagged readout units;"
975 "FRO RU count;Event count",
979 "Number of EB Full-readout-flagged readout units;"
980 "FRO RU count;Event count",
984 "Number of EE Full-readout-flagged readout units;"
985 "FRO RU count;Event count",
989 "Readout unit with ZS-thr-1 flag;"
990 "iX - 40 / iEta / iX + 20;"
991 "iY0 / iPhi0 (iPhi = 1 at phi = 0 rad);"
997 "ECAL readout unit with forced bit of SR flag on;"
998 "iX - 40 / iEta / iX + 20;"
999 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1005 "Low interest trigger tower flags;"
1013 "Mid interest trigger tower flags;"
1021 "High interest trigger tower flags;"
1029 "Trigger tower flags with forced bit set;"
1037 const float ebMinNoise = -1.;
1038 const float ebMaxNoise = 1.;
1040 const float eeMinNoise = -1.;
1041 const float eeMaxNoise = 1.;
1043 const float ebMinE = ebMinNoise;
1044 const float ebMaxE = ebMaxNoise;
1046 const float eeMinE = eeMinNoise;
1047 const float eeMaxE = eeMaxNoise;
1049 const int evtMax = 500;
1052 "Crystal reconstructed energy;E (GeV);Event count",
1053 100, ebMinE, ebMaxE);
1056 "EE <E_hit>;event #;<E_hit> (GeV)",
1057 evtMax, .5, evtMax + .5);
1061 "(rec E of crystal without deposited energy)"
1062 ";Rec E (GeV);Event count",
1063 100, ebMinNoise, ebMaxNoise);
1066 "Emulated ouput of ZS FIR filter for EB "
1067 "low interest crystals;"
1073 "Emulated ouput of ZS FIR filter for EB "
1074 "high interest crystals;"
1087 meEbSimE_ =
book1D(ibooker,
"hEbSimE",
"EB hit crystal simulated energy",
1088 100, ebMinE, ebMaxE);
1091 "EB rec energy of hit crystals",
1092 100, ebMinE, ebMaxE);
1095 "Crystal simulated vs reconstructed energy;"
1096 "Esim (GeV);Erec GeV);Event count",
1097 100, ebMinE, ebMaxE,
1098 100, ebMinE, ebMaxE);
1101 "Crystal no-zs simulated vs reconstructed "
1103 "Esim (GeV);Erec GeV);Event count",
1104 100, ebMinE, ebMaxE,
1105 100, ebMinE, ebMaxE);
1108 "EE crystal reconstructed energy;E (GeV);"
1110 100, eeMinE, eeMaxE);
1113 "<E_{EE hit}>;event;<E_{hit}> (GeV)",
1114 evtMax, .5, evtMax + .5);
1119 "(rec E of crystal without deposited energy);"
1120 "E (GeV);Event count",
1121 200, eeMinNoise, eeMaxNoise);
1124 "Emulated ouput of ZS FIR filter for EE "
1125 "low interest crystals;"
1131 "Emulated ouput of ZS FIR filter for EE "
1132 "high interest crystals;"
1146 meEeSimE_ =
book1D(ibooker,
"hEeSimE",
"EE hit crystal simulated energy",
1147 100, eeMinE, eeMaxE);
1150 "EE rec energy of hit crystals",
1151 100, eeMinE, eeMaxE);
1154 "EE crystal simulated vs reconstructed energy;"
1155 "Esim (GeV);Erec GeV);Event count",
1156 100, eeMinE, eeMaxE,
1157 100, eeMinE, eeMaxE);
1160 "EE crystal no-zs simulated vs "
1162 "energy;Esim (GeV);Erec GeV);Event count",
1163 100, eeMinE, eeMaxE,
1164 100, eeMinE, eeMaxE);
1167 "TTFlags and SR Flags mismatch;"
1168 "iX - 40 / iEta / iX + 20;"
1169 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1176 "Incomplete full-readout-flagged readout units;"
1177 "iX - 40 / iEta / iX + 20;"
1178 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1184 "Number of incomplete full-readout-flagged "
1186 "Number of RUs;Event count;",
1191 "Incomplete full-readout-flagged readout units;"
1192 "iX - 40 / iEta / iX + 20;"
1193 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1194 "Incomplete error rate",
1200 "Dropped full-readout-flagged readout units;"
1201 "iX - 40 / iEta / iX + 20;"
1202 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1208 "Number of dropped full-readout-flagged "
1209 "RU count;RU count;Event count",
1213 "Number of zero-suppressed-flagged RU fully "
1215 "RU count;Event count",
1219 buf <<
"Number of LI EB channels below the " <<
ebZsThr_/4. <<
" ADC count ZS threshold;"
1220 "Channel count;Event count",
1226 buf <<
"Number of LI EE channels below the " <<
eeZsThr_/4. <<
" ADC count ZS theshold;"
1227 "Channel count;Event count",
1233 "Number of LI channels below the ZS threshold;"
1234 "Channel count;Event count",
1238 "Number of EB channels below the ZS "
1239 "threshold in a LI but fully readout RU;"
1240 "Channel count;Event count;",
1244 "Number EE channels below the ZS threshold"
1245 " in a LI but fully readout RU;"
1246 "Channel count;Event count",
1250 "Number of LI channels below the ZS threshold "
1251 "in a LI but fully readout RU;"
1252 "Channel count;Event count",
1258 "Dropped full-readout-flagged readout units"
1259 "iX - 40 / iEta / iX + 20;"
1260 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1266 "Complete zero-suppressed-flagged readout units;"
1267 "iX - 40 / iEta / iX + 20;"
1268 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1275 "Complete zero-suppressed-flagged readout units;"
1276 "iX - 40 / iEta / iX + 20;"
1277 "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1278 "Completeness rate",
1288 for(set<string>::iterator it =
histList_.begin();
1291 if(*it!=
string(
"all")
1293 s << (s.str().size()==0?
"":
", ") << *it;
1296 if(s.str().size()!=0){
1298 <<
"Parameter 'histList' contains some unknown histogram(s). "
1299 "Check spelling. Following name were not found: "
1311 for(
int iTTFlag(0);iTTFlag <8; iTTFlag++){
1312 TTFlagCount[iTTFlag]=0;
1314 for(
int iTtEta(0); iTtEta <
nTtEta; iTtEta++){
1315 for(
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++){
1316 LiTTFlagCount[iTtEta][iTtPhi] = 0;
1317 MiTTFlagCount[iTtEta][iTtPhi] = 0;
1318 HiTTFlagCount[iTtEta][iTtPhi] = 0;
1322 for(
int iEt(0);iEt < 100; iEt++){
1339 double lsb10bitsEB(ebItr == physMap.end() ? 0. : ebItr->second.EtSat / 1024.);
1341 double lsb10bitsEE(eeItr == physMap.end() ? 0. : eeItr->second.EtSat / 1024.);
1348 unsigned int ADC = it->compressedEt();
1350 double lsb10bits(0.);
1356 uint32_t lutGrp = 999 ;
1357 if (itgrp != lutGrpMap.end()) lutGrp = itgrp->second ;
1360 if (itLut != lutMap.end()) {
1361 const unsigned int *
lut = (itLut->second).getLut() ;
1362 for (
unsigned int i=0 ;
i<1024 ;
i++)
1363 if (ADC == (0xff & lut[
i])) {
1369 tpEt = lsb10bits * tpg10bits;
1372 tpEt = it->compressedEt();
1374 int iEta = it->id().ieta();
1376 int iPhi = it->id().iphi();
1378 double etSum =
ttEtSums[iEta0][iPhi0];
1381 if ((iE >= 0) && (iE < 100)) {
1390 ++TTFlagCount[it->ttFlag()];
1391 if((it->ttFlag() & 0x3) == 0){
1392 LiTTFlagCount[iEta0][iPhi0] += 1;
1394 else if((it->ttFlag() & 0x3) == 1){
1395 MiTTFlagCount[iEta0][iPhi0] += 1;
1397 else if((it->ttFlag() & 0x3) == 3){
1398 HiTTFlagCount[iEta0][iPhi0] += 1;
1400 if((it->ttFlag() & 0x4)){
1409 for(
int ittflag(0); ittflag < 8; ittflag++){
1412 for(
int iTtEta(0); iTtEta <
nTtEta; iTtEta++){
1413 for(
int iTtPhi(0); iTtPhi <
nTtPhi; iTtPhi++){
1420 for(
int iE(0);iE<100; iE++){
1424 for(
int iE(0); iE<40; iE++){
1446 for (
unsigned int digis=0; digis<
ebDigis_->
size(); ++digis){
1452 for (
unsigned int digis=0; digis<
eeDigis_->
size(); ++digis){
1458 for(
unsigned iDcc0 = 0; iDcc0 <
nDccs_; ++iDcc0){
1495 template<
class T,
class U>
1497 const U& srFlagColl){
1498 const DetId& xtalId = frame.id();
1499 typedef typename U::key_type RuDetId;
1501 typename U::const_iterator srf = srFlagColl.find(ruId);
1503 bool highInterest =
false;
1506 if(srf != srFlagColl.end()){
1507 flag = srf->value() & ~
EcalSrFlag::SRF_FORCED_MASK;
1515 pair<int,int> ch =
dccCh(xtalId);
1524 int iEta0 =
iEta2cIndex(static_cast<const EBDetId&>(xtalId).ieta());
1525 int iPhi0 =
iPhi2cIndex(static_cast<const EBDetId&>(xtalId).iphi());
1543 int iX0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix());
1544 int iY0 =
iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy());
1545 int iZ0 =
static_cast<const EEDetId&
>(frame.id()).
zside()>0?1:0;
1559 if(ch.second < 1 || ch.second > 68){
1561 <<
"Error in DCC channel retrieval for crystal with detId "
1562 << xtalId.
rawId() <<
"DCC channel out of allowed range [1..68]\n";
1592 static std::atomic<bool> firstCall {
true};
1593 bool expected =
true;
1594 if( firstCall.compare_exchange_strong(expected,
false) ) {
1603 double adc2GeV = 0.;
1617 double gainInv[] = {12., 1., 6., 12.};
1619 for(
int i=0;
i <
n; ++
i){
1620 acc +=
weights_[
i]*frame[
i].adc()*gainInv[frame[
i].gainId()]*adc2GeV;
1632 <<
"Wrong type of DetId passed to the "
1633 "EcalSelectiveReadoutValidation::dccCh(const DetId&). "
1634 "An ECAL DetId was expected.\n";
1647 const int oneXtalPhi0 = iTtPhi0 * 5;
1648 const int oneXtalEta0 = (iTtEta0 -
nOneEeTtEta) * 5;
1655 if(detId.
rawId() & 0x8000){
1666 <<
"Wrong type of DetId passed to the method "
1667 "EcalSelectiveReadoutValidation::dccCh(const DetId&). "
1668 "A valid EcalTriggerTower, EcalBarrel or EcalEndcap DetId was expected. "
1669 "detid = " << xtalId.
rawId() <<
".\n";
1675 result.first = EcalElecId.
dccId();
1679 <<
"Got an invalid DCC ID, DCCID = " << result.first
1680 <<
" for DetId 0x" << hex << detId.
rawId()
1681 <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1684 result.second = EcalElecId.
towerId();
1686 if(result.second < 1 || result.second > 68){
1688 <<
"Got an invalid DCC channel ID, DCC_CH = " << result.second
1689 <<
" for DetId 0x" << hex << detId.
rawId()
1690 <<
" and 0x" << xtalId.
rawId() <<
dec <<
"\n";
1704 int iDCC= EcalElecId.
dccId();
1705 int iDccChan = EcalElecId.
towerId();
1706 const bool ignoreSingle =
true;
1718 if(eeGeometry==0 || ebGeometry==0){
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){
1783 double et = .5*(
ttEtSums[iTtEta0][iTtPhi0]
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;
1835 <<
"Failed to book integer DQM monitor element" <<
name;
1846 <<
"Failed to book histogram " <<
name;
1854 nybins, ymin, ymax);
1857 <<
"Failed to book histogram " <<
name;
1868 <<
"Failed to book histogram " <<
name;
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){
2204 int flag = itSrf->value() & ~
EcalSrFlag::SRF_FORCED_MASK;
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
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
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
int gainId(sample_type sample)
get the gainId (2 bits)
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)
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)
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
MonitorElement * meVolBHI_
static const int minDccId_
static const int nEbEta
number of crystals along Eta in EB
int cIndex2iTtEta(int i) const
uint32_t rawId() const
get the raw id
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.
CollHandle< EESrFlagCollection > eeComputedSrFlags_
static const int nTtPhi
Number of Trigger Towers along Phi.
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
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 * meEbNoZsRecVsSimE_
MonitorElement * meEeSimE_
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_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int iTtPhi2cIndex(int iPhi) const
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int iEta2cIndex(int iEta) const
MonitorElement * meMiTtf_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned towerId(DetId const &)
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_
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.
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)
int iphi() const
get the tower iphi
static const int ebTtEdge
Number of crystals along an EB TT.
EcalSelectiveReadoutValidation(const edm::ParameterSet &ps)
Constructor.
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:
const EcalScDetId & id() const
MonitorElement * meVolLI_
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
double getBytesPerCrystal() const
int nPerRu_[nDccs_][nDccChs_]
T const * product() const
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
const EcalTrigTowerDetId & id() const
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
ESHandle< TrackerGeometry > geometry
bool isRuComplete_[nDccs_][nDccChs_]
int ruGraphX(const EcalScDetId &id) const
double phi
number of sim hits
static const int nTtEta
Number of Trigger Towers along Eta.
TProfile * getTProfile(void) const
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
volatile std::atomic< bool > shutdown_flag false
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
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
Detector det() const
get the detector field from this detid
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.
MonitorElement * meZs1Ru_
MonitorElement * meFullRoRu_
std::string srpAlgoErrorLogFileName_
~EcalSelectiveReadoutValidation()
Destructor.
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_