1 #include "../interface/OccupancyClient.h" 16 deviationThreshold_(0.)
36 unsigned const nPhiRings(56);
38 MESet& meQualitySummary(
MEs_.at(
"QualitySummary"));
51 double digiPhiRingMean[nPhiRings];
52 std::fill_n(digiPhiRingMean, nPhiRings, 0.);
53 double rechitPhiRingMean[nPhiRings];
54 std::fill_n(rechitPhiRingMean, nPhiRings, 0.);
55 int numCrystals[nPhiRings];
56 std::fill_n(numCrystals, nPhiRings, 0);
63 float entries(dItr->getBinContent());
64 float rhentries(rItr->getBinContent());
72 if(ids.empty())
continue;
76 unsigned index(ieta < 0 ? ieta + 28 : ieta + 27);
78 digiPhiRingMean[
index] += entries;
79 rechitPhiRingMean[
index] += rhentries;
80 numCrystals[
index] += 1;
83 for(
unsigned ie(0); ie < nPhiRings; ie++){
84 digiPhiRingMean[ie] /= numCrystals[ie];
85 rechitPhiRingMean[ie] /= numCrystals[ie];
89 std::vector<float> Nentries(
nDCC,0.);
90 std::vector<float> Nrhentries(
nDCC,0.);
96 bool doMask(meQualitySummary.maskMatches(
id, mask,
statusManager_));
100 float entries(dItr->getBinContent());
101 float rhentries(rItr->getBinContent());
108 if(ids.empty())
continue;
112 unsigned index(ieta < 0 ? ieta + 28 : ieta + 27);
120 if(rhentries >
minHits_ && rhentries > rechitPhiRingMean[index] * deviationThreshold_){
125 meQualitySummary.setBinContent(
id,
double(quality));
128 unsigned iDCC(
dccId(
id)-1 );
129 if ( entries >
minHits_ ) Nentries[iDCC] += entries;
130 if ( rhentries >
minHits_ ) Nrhentries[iDCC] += rhentries;
134 double tpdigiPhiRingMean[nPhiRings];
135 std::fill_n(tpdigiPhiRingMean, nPhiRings, 0.);
139 float entries(sTPDigiThr.getBinContent(ttid));
143 tpdigiPhiRingMean[
index] += entries;
146 for(
int ie(0); ie < 28; ie++){
148 if(ie < 27) denom = 72.;
150 tpdigiPhiRingMean[ie] /= denom;
151 tpdigiPhiRingMean[55 - ie] /= denom;
157 float entries(sTPDigiThr.getBinContent(ttid));
168 if(quality !=
kBad)
continue;
171 for(
unsigned iD(0); iD < ids.size(); ++iD){
174 int quality(meQualitySummary.getBinContent(
id));
175 if(quality ==
kMBad || quality ==
kBad)
continue;
183 float meanFEDEB(0), meanFEDEE(0), rmsFEDEB(0), rmsFEDEE(0);
184 unsigned int nFEDEB(0), nFEDEE(0);
185 for (
unsigned iDCC(0); iDCC <
nDCC; iDCC++ ) {
187 meanFEDEB += Nrhentries[iDCC];
188 rmsFEDEB += Nrhentries[iDCC]*Nrhentries[iDCC];
192 meanFEDEE += Nrhentries[iDCC];
193 rmsFEDEE += Nrhentries[iDCC]*Nrhentries[iDCC];
197 meanFEDEB /=
float( nFEDEB ); rmsFEDEB /=
float( nFEDEB );
198 meanFEDEE /=
float( nFEDEE ); rmsFEDEE /=
float( nFEDEE );
199 rmsFEDEB =
sqrt(
abs(rmsFEDEB - meanFEDEB*meanFEDEB) );
200 rmsFEDEE =
sqrt(
abs(rmsFEDEE - meanFEDEE*meanFEDEE) );
202 float meanFED(0.), rmsFED(0.), nRMS(5.);
205 unsigned iDCC(
dccId(
id)-1 );
215 if ( meanFED > 1000. && Nrhentries[iDCC] < threshold )
T getUntrackedParameter(std::string const &, T const &) const
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
#define DEFINE_ECALDQM_WORKER(TYPE)
static const int PHYSICS_BAD_CHANNEL_WARNING
static const int PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR
static const int PHYSICS_BAD_CHANNEL_ERROR
void setParams(edm::ParameterSet const &) override
const_iterator & toNextChannel()
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
std::set< std::string > qualitySummaries_
float deviationThreshold_
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
StatusManager const * statusManager_
Abs< T >::type abs(const T &t)
void producePlots(ProcessType) override
const_iterator & toNextChannel()
std::vector< DetId > scConstituents(EcalScDetId const &)
unsigned dccId(DetId const &)