CMS 3D CMS Logo

PNIntegrityClient.cc
Go to the documentation of this file.
2 
4 
6 
8 
10 
11 namespace ecaldqm {
12  PNIntegrityClient::PNIntegrityClient() : DQWorkerClient(), errFractionThreshold_(0.) {
13  qualitySummaries_.insert("QualitySummary");
14  }
15 
17  errFractionThreshold_ = _params.getUntrackedParameter<double>("errFractionThreshold");
18  }
19 
23 
24  MESet& meQualitySummary(MEs_.at("QualitySummary"));
25 
26  MESet const& sOccupancy(sources_.at("Occupancy"));
27  MESet const& sMEMChId(sources_.at("MEMChId"));
28  MESet const& sMEMGain(sources_.at("MEMGain"));
29  MESet const& sMEMBlockSize(sources_.at("MEMBlockSize"));
30  MESet const& sMEMTowerId(sources_.at("MEMTowerId"));
31 
32  for (unsigned iDCC(0); iDCC < nDCC; ++iDCC) {
33  if (memDCCIndex(iDCC + 1) == unsigned(-1))
34  continue;
35  for (unsigned iPN(0); iPN < 10; ++iPN) {
36  int subdet(0);
37  if (iDCC >= kEBmLow && iDCC <= kEBpHigh)
38  subdet = EcalBarrel;
39  else
40  subdet = EcalEndcap;
41 
42  EcalPnDiodeDetId id(subdet, iDCC + 1, iPN + 1);
43 
44  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_));
45 
46  float entries(sOccupancy.getBinContent(id));
47 
48  float chid(sMEMChId.getBinContent(id));
49  float gain(sMEMGain.getBinContent(id));
50 
51  float blocksize(sMEMBlockSize.getBinContent(id));
52  float towerid(sMEMTowerId.getBinContent(id));
53 
54  if (entries + gain + chid + blocksize + towerid < 1.) {
55  meQualitySummary.setBinContent(id, doMask ? kMUnknown : kUnknown);
56  continue;
57  }
58 
59  float chErr((gain + chid + blocksize + towerid) / (entries + gain + chid + blocksize + towerid));
60 
61  if (chErr > errFractionThreshold_)
62  meQualitySummary.setBinContent(id, doMask ? kMBad : kBad);
63  else
64  meQualitySummary.setBinContent(id, doMask ? kMGood : kGood);
65  }
66  }
67  }
68 
70 } // namespace ecaldqm
ecaldqm::PNIntegrityClient
Definition: PNIntegrityClient.h:7
ecaldqm
Definition: DQWorker.h:24
ecaldqm::PNIntegrityClient::setParams
void setParams(edm::ParameterSet const &) override
Definition: PNIntegrityClient.cc:16
l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::memDCCIndex
unsigned memDCCIndex(unsigned)
Definition: EcalDQMCommonUtils.cc:48
ecaldqm::DQWorkerClient::statusManager_
StatusManager const * statusManager_
Definition: DQWorkerClient.h:60
EcalPnDiodeDetId
Definition: EcalPnDiodeDetId.h:22
EcalBarrel
Definition: EcalSubdetector.h:10
PNIntegrityClient.h
EcalDQMStatusHelper.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
ecaldqm::DQWorkerClient::qualitySummaries_
std::set< std::string > qualitySummaries_
Definition: DQWorkerClient.h:56
ecaldqm::DQWorkerClient::ProcessType
ProcessType
Definition: DQWorkerClient.h:15
ecaldqm::kEBpHigh
Definition: EcalDQMCommonUtils.h:88
EcalDQMStatusHelper::TT_SIZE_ERROR
static const int TT_SIZE_ERROR
Definition: EcalDQMStatusHelper.h:15
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:78
ecaldqm::DQWorkerClient::kMBad
Definition: DQWorkerClient.h:37
EcalDQMStatusHelper::CH_ID_ERROR
static const int CH_ID_ERROR
Definition: EcalDQMStatusHelper.h:11
EcalDQMStatusHelper::TT_ID_ERROR
static const int TT_ID_ERROR
Definition: EcalDQMStatusHelper.h:14
EcalEndcap
Definition: EcalSubdetector.h:10
ecaldqm::DQWorkerClient::kUnknown
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kBad
Definition: DQWorkerClient.h:37
EcalPnDiodeDetId.h
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:55
ecaldqm::DQWorkerClient::kMGood
Definition: DQWorkerClient.h:37
edm::ParameterSet
Definition: ParameterSet.h:36
EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR
static const int CH_GAIN_ZERO_ERROR
Definition: EcalDQMStatusHelper.h:12
ecaldqm::PNIntegrityClient::errFractionThreshold_
float errFractionThreshold_
Definition: PNIntegrityClient.h:17
ecaldqm::DQWorkerClient::kMUnknown
Definition: DQWorkerClient.h:37
ecaldqm::kEBmLow
Definition: EcalDQMCommonUtils.h:85
ecaldqm::DQWorkerClient
Definition: DQWorkerClient.h:13
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ecaldqm::DQWorkerClient::kGood
Definition: DQWorkerClient.h:37
ecaldqm::PNIntegrityClient::PNIntegrityClient
PNIntegrityClient()
Definition: PNIntegrityClient.cc:12
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:92
DEFINE_ECALDQM_WORKER
#define DEFINE_ECALDQM_WORKER(TYPE)
Definition: DQWorker.h:112
ParameterSet.h
EcalDQMCommonUtils.h
ecaldqm::MESet
Definition: MESet.h:27
ecaldqm::PNIntegrityClient::producePlots
void producePlots(ProcessType) override
Definition: PNIntegrityClient.cc:20