#include <OccupancyClient.h>
Public Types | |
enum | MESets { kHotDigi, kHotRecHitThr, kHotTPDigiThr, kQualitySummary, nMESets } |
enum | Sources { sDigi, sRecHitThr, sTPDigiThr, nSources } |
Public Member Functions | |
void | beginRun (const edm::Run &, const edm::EventSetup &) |
void | bookMEs () |
OccupancyClient (const edm::ParameterSet &, const edm::ParameterSet &) | |
void | producePlots () |
~OccupancyClient () | |
Static Public Member Functions | |
static void | setMEData (std::vector< MEData > &) |
Private Attributes | |
float | deviationThreshold_ |
const CaloGeometry * | geometry_ |
int | minHits_ |
Definition at line 10 of file OccupancyClient.h.
Reimplemented from ecaldqm::DQWorker.
Definition at line 21 of file OccupancyClient.h.
Reimplemented from ecaldqm::DQWorkerClient.
Definition at line 31 of file OccupancyClient.h.
{ sDigi, sRecHitThr, sTPDigiThr, nSources };
data refman pasoursint CMSSW_6_1_2_SLHC4_patch1 src DQM EcalBarrelMonitorClient src OccupancyClient cc ecaldqm::OccupancyClient::OccupancyClient | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths | ||
) |
Definition at line 16 of file OccupancyClient.cc.
References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::OccupancyTask::kDigi, ecaldqm::OccupancyTask::kRecHitThr, and ecaldqm::OccupancyTask::kTPDigiThr.
{ edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_)); minHits_ = taskParams.getUntrackedParameter<int>("minHits"); deviationThreshold_ = taskParams.getUntrackedParameter<double>("deviationThreshold"); edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources")); source_(sDigi, "OccupancyTask", OccupancyTask::kDigi, sources); source_(sRecHitThr, "OccupancyTask", OccupancyTask::kRecHitThr, sources); source_(sTPDigiThr, "OccupancyTask", OccupancyTask::kTPDigiThr, sources); }
ecaldqm::OccupancyClient::~OccupancyClient | ( | ) | [inline] |
Definition at line 13 of file OccupancyClient.h.
{}
void ecaldqm::OccupancyClient::beginRun | ( | const edm::Run & | , |
const edm::EventSetup & | _es | ||
) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 33 of file OccupancyClient.cc.
References Exception, geometry_, edm::EventSetup::get(), and edm::ESHandle< T >::product().
{ edm::ESHandle<CaloGeometry> geomHndl; _es.get<CaloGeometryRecord>().get(geomHndl); geometry_ = geomHndl.product(); if(!geometry_) throw cms::Exception("EventSetup") << "CaloGeometry invalid"; }
void ecaldqm::OccupancyClient::bookMEs | ( | ) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 43 of file OccupancyClient.cc.
References kQualitySummary, and ecaldqm::DQWorker::MEs_.
{ DQWorker::bookMEs(); MEs_[kQualitySummary]->resetAll(-1.); }
void ecaldqm::OccupancyClient::producePlots | ( | ) | [virtual] |
Implements ecaldqm::DQWorkerClient.
Definition at line 51 of file OccupancyClient.cc.
References EcalTrigTowerDetId::detIdFromDenseIndex(), deviationThreshold_, python::tagInventory::entries, ecaldqm::DQWorkerClient::fillQuality_(), ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ietaAbs(), kHotDigi, kHotRecHitThr, kHotTPDigiThr, kQualitySummary, EcalTrigTowerDetId::kSizeForDenseIndexing, ecaldqm::DQWorker::MEs_, minHits_, EcalDQMStatusHelper::PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR, sDigi, ecaldqm::DQWorkerClient::sources_, sRecHitThr, and sTPDigiThr.
{ using namespace std; MEs_[kHotDigi]->reset(); MEs_[kHotRecHitThr]->reset(); MEs_[kHotTPDigiThr]->reset(); uint32_t mask(1 << EcalDQMStatusHelper::PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR); vector<double> digiPhiRingMean(28, 0.); vector<double> rechitPhiRingMean(28, 0.); vector<int> numCrystals(28, 0); // this is static, but is easier to count now for(unsigned dccid(1); dccid <= 54; dccid++){ for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){ vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower)); if(ids.size() == 0) continue; for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ float entries(sources_[sDigi]->getBinContent(*idItr)); float rhentries(sources_[sRecHitThr]->getBinContent(*idItr)); int ieta(getTrigTowerMap()->towerOf(*idItr).ietaAbs()); digiPhiRingMean.at(ieta - 1) += entries; rechitPhiRingMean.at(ieta - 1) += rhentries; numCrystals.at(ieta - 1) += 1; } } } for(int ie(0); ie < 28; ie++){ digiPhiRingMean[ie] /= numCrystals[ie]; rechitPhiRingMean[ie] /= numCrystals[ie]; } // second round to find hot towers for(unsigned dccid(1); dccid <= 54; dccid++){ for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){ vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower)); if(ids.size() == 0) continue; float quality(1.); for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ float entries(sources_[sDigi]->getBinContent(*idItr)); float rhentries(sources_[sRecHitThr]->getBinContent(*idItr)); int ieta(getTrigTowerMap()->towerOf(*idItr).ietaAbs()); if(entries > minHits_ && entries > digiPhiRingMean.at(ieta - 1) * deviationThreshold_){ MEs_[kHotDigi]->fill(*idItr); quality = 0.; } if(rhentries > minHits_ && rhentries > rechitPhiRingMean.at(ieta - 1) * deviationThreshold_){ MEs_[kHotRecHitThr]->fill(*idItr); quality = 0.; } } if(dccid <= 9 || dccid >= 46){ vector<EcalScDetId> scs(getElectronicsMap()->getEcalScDetId(dccid, tower)); for(vector<EcalScDetId>::iterator scItr(scs.begin()); scItr != scs.end(); ++scItr) fillQuality_(kQualitySummary, *scItr, mask, quality); } else fillQuality_(kQualitySummary, ids[0], mask, quality); } } vector<double> tpdigiPhiRingMean(28, 0.); for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++){ EcalTrigTowerDetId ttid(EcalTrigTowerDetId::detIdFromDenseIndex(iTT)); float entries(sources_[sTPDigiThr]->getBinContent(ttid)); tpdigiPhiRingMean.at(ttid.ietaAbs() - 1) += entries; } for(int ie(0); ie < 28; ie++){ float denom(-1.); if(ie < 27) denom = 72.; else denom = 36.; tpdigiPhiRingMean[ie] /= denom; } for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++){ EcalTrigTowerDetId ttid(EcalTrigTowerDetId::detIdFromDenseIndex(iTT)); float entries(sources_[sTPDigiThr]->getBinContent(ttid)); if(entries > minHits_ && entries > tpdigiPhiRingMean.at(ttid.ietaAbs() - 1) * deviationThreshold_){ MEs_[kHotTPDigiThr]->fill(ttid); vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid)); for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ if(MEs_[kQualitySummary]->getBinContent(*idItr) > 0.) fillQuality_(kQualitySummary, *idItr, mask, 0.); } } } }
void ecaldqm::OccupancyClient::setMEData | ( | std::vector< MEData > & | _data | ) | [static] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 156 of file OccupancyClient.cc.
References MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::kChannel, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kEcal2P, kHotDigi, kHotRecHitThr, kHotTPDigiThr, kQualitySummary, EcalDQMBinningService::kSuperCrystal, and EcalDQMBinningService::kTriggerTower.
{ _data[kHotDigi] = MEData("HotDigi", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F); _data[kHotRecHitThr] = MEData("HotRecHitThr", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F); _data[kHotTPDigiThr] = MEData("HotTPDigiThr", BinService::kChannel, BinService::kTriggerTower, MonitorElement::DQM_KIND_TH1F); _data[kQualitySummary] = MEData("QualitySummary", BinService::kEcal2P, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F); }
float ecaldqm::OccupancyClient::deviationThreshold_ [private] |
Definition at line 42 of file OccupancyClient.h.
Referenced by producePlots().
const CaloGeometry* ecaldqm::OccupancyClient::geometry_ [private] |
Definition at line 39 of file OccupancyClient.h.
Referenced by beginRun().
int ecaldqm::OccupancyClient::minHits_ [private] |
Definition at line 41 of file OccupancyClient.h.
Referenced by producePlots().