#include <IntegrityClient.h>
Public Types | |
enum | MESets { kQuality, kQualitySummary, nMESets } |
enum | Sources { sOccupancy, sGain, sChId, sGainSwitch, sTowerId, sBlockSize, nSources } |
Public Member Functions | |
void | bookMEs () |
IntegrityClient (const edm::ParameterSet &, const edm::ParameterSet &) | |
void | producePlots () |
~IntegrityClient () | |
Static Public Member Functions | |
static void | setMEData (std::vector< MEData > &) |
Protected Attributes | |
float | errFractionThreshold_ |
Definition at line 8 of file IntegrityClient.h.
Reimplemented from ecaldqm::DQWorker.
Definition at line 17 of file IntegrityClient.h.
{ kQuality, kQualitySummary, nMESets };
Reimplemented from ecaldqm::DQWorkerClient.
Definition at line 25 of file IntegrityClient.h.
{ sOccupancy, sGain, sChId, sGainSwitch, sTowerId, sBlockSize, nSources };
data refman pasoursint CMSSW_5_3_4 src DQM EcalBarrelMonitorClient src IntegrityClient cc ecaldqm::IntegrityClient::IntegrityClient | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths | ||
) |
Definition at line 11 of file IntegrityClient.cc.
References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::IntegrityTask::kBlockSize, ecaldqm::IntegrityTask::kChId, ecaldqm::OccupancyTask::kDigi, ecaldqm::IntegrityTask::kGain, ecaldqm::IntegrityTask::kGainSwitch, and ecaldqm::IntegrityTask::kTowerId.
{ edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_)); errFractionThreshold_ = taskParams.getUntrackedParameter<double>("errFractionThreshold"); edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources")); source_(sOccupancy, "OccupancyTask", OccupancyTask::kDigi, sources); source_(sGain, "IntegrityTask", IntegrityTask::kGain, sources); source_(sChId, "IntegrityTask", IntegrityTask::kChId, sources); source_(sGainSwitch, "IntegrityTask", IntegrityTask::kGainSwitch, sources); source_(sTowerId, "IntegrityTask", IntegrityTask::kTowerId, sources); source_(sBlockSize, "IntegrityTask", IntegrityTask::kBlockSize, sources); }
ecaldqm::IntegrityClient::~IntegrityClient | ( | ) | [inline] |
Definition at line 11 of file IntegrityClient.h.
{}
void ecaldqm::IntegrityClient::bookMEs | ( | ) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 28 of file IntegrityClient.cc.
References kQuality, kQualitySummary, and ecaldqm::DQWorker::MEs_.
{ DQWorker::bookMEs(); MEs_[kQuality]->resetAll(-1.); MEs_[kQualitySummary]->resetAll(-1.); }
void ecaldqm::IntegrityClient::producePlots | ( | ) | [virtual] |
Implements ecaldqm::DQWorkerClient.
Definition at line 37 of file IntegrityClient.cc.
References EcalDQMStatusHelper::CH_GAIN_SWITCH_ERROR, EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR, EcalDQMStatusHelper::CH_ID_ERROR, python::tagInventory::entries, errFractionThreshold_, ecaldqm::DQWorkerClient::fillQuality_(), ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), kQuality, kQualitySummary, sBlockSize, sChId, sGain, sGainSwitch, sOccupancy, ecaldqm::DQWorkerClient::sources_, sTowerId, EcalDQMStatusHelper::TT_ID_ERROR, and EcalDQMStatusHelper::TT_SIZE_ERROR.
{ uint32_t mask(1 << EcalDQMStatusHelper::CH_ID_ERROR | 1 << EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR | 1 << EcalDQMStatusHelper::CH_GAIN_SWITCH_ERROR | 1 << EcalDQMStatusHelper::TT_ID_ERROR | 1 << EcalDQMStatusHelper::TT_SIZE_ERROR); for(unsigned dccid(1); dccid <= 54; dccid++){ for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){ std::vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower)); if(ids.size() == 0) continue; float towerEntries(0.); bool towerGood(true); for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ float entries(sources_[sOccupancy]->getBinContent(*idItr)); towerEntries += entries; float gain(sources_[sGain]->getBinContent(*idItr)); float chid(sources_[sChId]->getBinContent(*idItr)); float gainswitch(sources_[sGainSwitch]->getBinContent(*idItr)); if(entries + gain + chid + gainswitch < 1.){ fillQuality_(kQuality, *idItr, mask, 2.); continue; } float chErr((gain + chid + gainswitch) / (entries + gain + chid + gainswitch)); if(chErr > errFractionThreshold_){ fillQuality_(kQuality, *idItr, mask, 0.); towerGood = false; } else fillQuality_(kQuality, *idItr, mask, 1.); } float towerid(sources_[sTowerId]->getBinContent(ids[0])); float blocksize(sources_[sBlockSize]->getBinContent(ids[0])); float quality(-1.); if(towerEntries + towerid + blocksize > 1.){ float towerErr((towerid + blocksize) / (towerEntries + towerid + blocksize)); if(towerErr > errFractionThreshold_) towerGood = false; quality = towerGood ? 1. : 0.; } else{ quality = 2.; } if(dccid <= 9 || dccid >= 46){ std::vector<EcalScDetId> scs(getElectronicsMap()->getEcalScDetId(dccid, tower)); for(std::vector<EcalScDetId>::iterator scItr(scs.begin()); scItr != scs.end(); ++scItr) fillQuality_(kQualitySummary, *scItr, mask, quality); } else fillQuality_(kQualitySummary, ids[0], mask, quality); } } }
void ecaldqm::IntegrityClient::setMEData | ( | std::vector< MEData > & | _data | ) | [static] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 105 of file IntegrityClient.cc.
References MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kEcal2P, kQuality, kQualitySummary, EcalDQMBinningService::kSM, and EcalDQMBinningService::kSuperCrystal.
{ _data[kQuality] = MEData("Quality", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TH2F); _data[kQualitySummary] = MEData("QualitySummary", BinService::kEcal2P, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F); }
float ecaldqm::IntegrityClient::errFractionThreshold_ [protected] |
Definition at line 36 of file IntegrityClient.h.
Referenced by producePlots().