CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::OccupancyTask Class Reference

#include <OccupancyTask.h>

Inheritance diagram for ecaldqm::OccupancyTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Member Functions

bool analyze (void const *, Collections) override
 
void beginEvent (edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
bool filterRunType (short const *) override
 
 OccupancyTask ()
 
template<typename DigiCollection >
void runOnDigis (DigiCollection const &, Collections)
 
void runOnRawData (EcalRawDataCollection const &)
 
void runOnRecHits (EcalRecHitCollection const &, Collections)
 
void runOnTPDigis (EcalTrigPrimDigiCollection const &)
 
void setTokens (edm::ConsumesCollector &) override
 
 ~OccupancyTask () override
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void addDependencies (DependencySet &)
 
 DQWorkerTask ()
 
virtual void endEvent (edm::Event const &, edm::EventSetup const &)
 
virtual bool filterTrigger (edm::TriggerResultsByName const &)
 
 ~DQWorkerTask () override
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
bool checkElectronicsMap (bool=true)
 
bool checkGeometry (bool=true)
 
bool checkTopology (bool=true)
 
bool checkTrigTowerMap (bool=true)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
EcalDQMSetupObjects const getEcalDQMSetupObjects ()
 
EcalElectronicsMapping const * GetElectronicsMap ()
 
CaloGeometry const * GetGeometry ()
 
std::string const & getName () const
 
CaloTopology const * GetTopology ()
 
EcalTrigTowerConstituentsMap const * GetTrigTowerMap ()
 
bool onlineMode () const
 
virtual void releaseMEs ()
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setSetupObjects (edm::EventSetup const &)
 
void setSetupObjectsEndLumi (edm::EventSetup const &)
 
void setTime (time_t _t)
 
void setTokens (edm::ConsumesCollector &)
 
virtual ~DQWorker () noexcept(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

bool FillLaser = false
 
bool FindPUinLS = false
 
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecordlasertoken_
 
bool lumiCheck_
 
edm::TimeValue_t m_iTime
 
edm::InputTag metadataTag
 
edm::EDGetTokenT< OnlineLuminosityRecordmetaDataToken_
 
int nEv
 
float recHitThreshold_
 
double scal_pu
 
float tpThreshold_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerTask
typedef EcalDCCHeaderBlock::EcalDCCEventSettings EventSettings
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerTask
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Public Attributes inherited from ecaldqm::DQWorker
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandle
 
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandleEndLumi
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandle
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandleEndLumi
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandle
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandleEndLumi
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandle
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandleEndLumi
 
- Protected Types inherited from ecaldqm::DQWorker
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from ecaldqm::DQWorkerTask
void setME (edm::ParameterSet const &) final
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
virtual void setSource (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 17 of file OccupancyTask.h.

Constructor & Destructor Documentation

◆ OccupancyTask()

ecaldqm::OccupancyTask::OccupancyTask ( )

Definition at line 10 of file OccupancyTask.cc.

◆ ~OccupancyTask()

ecaldqm::OccupancyTask::~OccupancyTask ( )
inlineoverride

Definition at line 20 of file OccupancyTask.h.

20 {}

Member Function Documentation

◆ analyze()

bool ecaldqm::OccupancyTask::analyze ( void const *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 51 of file OccupancyTask.h.

References ecaldqm::kEBDigi, ecaldqm::kEBRecHit, ecaldqm::kEcalRawData, ecaldqm::kEEDigi, ecaldqm::kEERecHit, ecaldqm::kTrigPrimDigi, runOnDigis(), runOnRawData(), runOnRecHits(), and runOnTPDigis().

51  {
52  switch (_collection) {
53  case kEcalRawData:
54  if (_p)
55  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
56  return true;
57  case kEBDigi:
58  if (_p)
59  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
60  return true;
61  break;
62  case kEEDigi:
63  if (_p)
64  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
65  return true;
66  break;
67  case kTrigPrimDigi:
68  if (_p)
69  runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
70  return true;
71  break;
72  case kEBRecHit:
73  case kEERecHit:
74  if (_p)
75  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
76  return true;
77  break;
78  default:
79  break;
80  }
81 
82  return false;
83  }
void runOnRecHits(EcalRecHitCollection const &, Collections)
void runOnRawData(EcalRawDataCollection const &)
void runOnDigis(DigiCollection const &, Collections)
void runOnTPDigis(EcalTrigPrimDigiCollection const &)

◆ beginEvent()

void ecaldqm::OccupancyTask::beginEvent ( edm::Event const &  _evt,
edm::EventSetup const &  _es,
bool const &  ByLumiResetSwitch,
bool &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 45 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), OnlineLuminosityRecord::avgPileUp(), ecaldqm::MESet::fill(), FillLaser, FindPUinLS, edm::Event::getByToken(), edm::EventSetup::getData(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetElectronicsMap(), mps_fire::i, edm::HandleBase::isValid(), EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, EcalCondDBWriter_cfi::laser, lasertoken_, lumiCheck_, m_iTime, ecaldqm::DQWorker::MEs_, metaDataToken_, nEv, ecaldqm::DQWorker::onlineMode_, ecaldqm::MESet::reset(), scal_pu, edm::EventBase::time(), EBDetId::unhashIndex(), EEDetId::unhashIndex(), EBDetId::validDenseIndex(), EEDetId::validDenseIndex(), and edm::Timestamp::value().

48  {
49  if (ByLumiResetSwitch) {
50  MEs_.at("DigiAllByLumi").reset(GetElectronicsMap());
51  MEs_.at("TPDigiThrAllByLumi").reset(GetElectronicsMap());
52  MEs_.at("RecHitThrAllByLumi").reset(GetElectronicsMap());
53  nEv = 0;
54  if (onlineMode_) {
55  MEs_.at("PU").reset(GetElectronicsMap(), -1);
56  MEs_.at("NEvents").reset(GetElectronicsMap(), -1);
57  FindPUinLS = true;
58  }
59  }
60  nEv++;
61  MESet& meLaserCorrProjEta(MEs_.at("LaserCorrProjEta"));
62  m_iTime = _evt.time().value();
63  if (FillLaser) {
64  float lasercalib = 1.;
65  auto const& laser = &_es.getData(lasertoken_);
66  const edm::Timestamp& evtTimeStamp = edm::Timestamp(m_iTime);
67 
68  for (int i = 0; i < EBDetId::kSizeForDenseIndexing; i++) {
70  continue;
72  lasercalib = laser->getLaserCorrection(ebid, evtTimeStamp);
73  meLaserCorrProjEta.fill(getEcalDQMSetupObjects(), ebid, lasercalib);
74  }
75 
76  for (int i = 0; i < EEDetId::kSizeForDenseIndexing; i++) {
78  continue;
80  lasercalib = laser->getLaserCorrection(eeid, evtTimeStamp);
81  meLaserCorrProjEta.fill(getEcalDQMSetupObjects(), eeid, lasercalib);
82  }
83  FillLaser = false;
84  }
85  if (lumiCheck_ && FindPUinLS) {
86  scal_pu = -1.;
87  MESet& mePU(static_cast<MESet&>(MEs_.at("PU")));
89  _evt.getByToken(metaDataToken_, metaData);
90 
91  if (metaData.isValid())
92  scal_pu = metaData->avgPileUp();
93  mePU.fill(getEcalDQMSetupObjects(), double(scal_pu));
94  FindPUinLS = false;
95  }
96  }
static constexpr int kSizeForDenseIndexing
Definition: EEDetId.h:328
MESet & at(const std::string &key)
Definition: MESet.h:401
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
edm::TimeValue_t m_iTime
Definition: OccupancyTask.h:42
static constexpr int kSizeForDenseIndexing
Definition: EBDetId.h:155
EcalElectronicsMapping const * GetElectronicsMap()
Definition: DQWorker.cc:150
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > lasertoken_
Definition: OccupancyTask.h:38
MESetCollection MEs_
Definition: DQWorker.h:131
bool isValid() const
Definition: HandleBase.h:70
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
static bool validDenseIndex(uint32_t din)
Definition: EEDetId.h:213
edm::EDGetTokenT< OnlineLuminosityRecord > metaDataToken_
Definition: OccupancyTask.h:44
virtual void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.)
Definition: MESet.cc:98
float avgPileUp() const
Return the average pileup for th current nibble.
static bool validDenseIndex(uint32_t din)
Definition: EBDetId.h:105

◆ beginRun()

void ecaldqm::OccupancyTask::beginRun ( edm::Run const &  ,
edm::EventSetup const &  _es 
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 44 of file OccupancyTask.cc.

References FillLaser.

44 { FillLaser = true; }

◆ endLuminosityBlock()

void ecaldqm::OccupancyTask::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 105 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), EcalBarrel, ecaldqm::MESet::fill(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::Timestamp::iLumi, ecaldqm::DQWorker::MEs_, nEv, ecaldqm::DQWorker::onlineMode_, scal_pu, and ecaldqm::DQWorker::timestamp_.

105  {
106  if (onlineMode_) {
107  MESet& meNEvents(static_cast<MESet&>(MEs_.at("NEvents")));
108  MESet& meTrendEventsperLumi(MEs_.at("TrendEventsperLumi"));
109  MESet& meTrendPUperLumi(MEs_.at("TrendPUperLumi"));
110 
111  meNEvents.fill(getEcalDQMSetupObjects(), double(nEv));
112  meTrendEventsperLumi.fill(getEcalDQMSetupObjects(), EcalBarrel, double(timestamp_.iLumi), double(nEv));
113  meTrendPUperLumi.fill(getEcalDQMSetupObjects(), EcalBarrel, double(timestamp_.iLumi), double(scal_pu));
114  }
115  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:48
MESet & at(const std::string &key)
Definition: MESet.h:401
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
Timestamp timestamp_
Definition: DQWorker.h:134
MESetCollection MEs_
Definition: DQWorker.h:131

◆ filterRunType()

bool ecaldqm::OccupancyTask::filterRunType ( short const *  _runType)
overridevirtual

◆ runOnDigis()

template<typename DigiCollection >
void ecaldqm::OccupancyTask::runOnDigis ( DigiCollection const &  _digis,
Collections  _collection 
)

Definition at line 118 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), TrendClient_cfi::Digi, EcalBarrel, EcalEndcap, ecaldqm::MESet::fill(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), EcalPhiSymFlatTableProducers_cfi::id, ecaldqm::DQWorker::Timestamp::iLumi, ecaldqm::kEBDigi, ecaldqm::DQWorker::MEs_, ecaldqm::DQWorker::onlineMode_, and ecaldqm::DQWorker::timestamp_.

Referenced by analyze().

118  {
119  MESet& meDigi(MEs_.at("Digi"));
120  MESet& meDigiProjEta(MEs_.at("DigiProjEta"));
121  MESet& meDigiProjPhi(MEs_.at("DigiProjPhi"));
122  MESet& meDigiAll(MEs_.at("DigiAll"));
123  MESet& meDigiAllByLumi(MEs_.at("DigiAllByLumi"));
124  MESet& meDigiDCC(MEs_.at("DigiDCC"));
125  MESet& meDigi1D(MEs_.at("Digi1D"));
126  MESet& meTrendNDigi(MEs_.at("TrendNDigi"));
127  MESet* meAELoss = nullptr;
128  MESet* meAEReco = nullptr;
129  if (onlineMode_) {
130  meAELoss = &MEs_.at("AELoss");
131  meAEReco = &MEs_.at("AEReco");
132  }
133  std::for_each(_digis.begin(), _digis.end(), [&](typename DigiCollection::Digi const& digi) {
134  DetId id(digi.id());
135  meDigi.fill(getEcalDQMSetupObjects(), id);
136  meDigiProjEta.fill(getEcalDQMSetupObjects(), id);
137  meDigiProjPhi.fill(getEcalDQMSetupObjects(), id);
138  meDigiAll.fill(getEcalDQMSetupObjects(), id);
139  meDigiAllByLumi.fill(getEcalDQMSetupObjects(), id);
140  meDigiDCC.fill(getEcalDQMSetupObjects(), id);
141  if (onlineMode_) {
142  meAELoss->fill(getEcalDQMSetupObjects(), id);
143  meAEReco->fill(getEcalDQMSetupObjects(), id);
144  }
145  });
146 
147  int iSubdet(_collection == kEBDigi ? EcalBarrel : EcalEndcap);
148  meDigi1D.fill(getEcalDQMSetupObjects(), iSubdet, double(_digis.size()));
149  meTrendNDigi.fill(getEcalDQMSetupObjects(), iSubdet, double(timestamp_.iLumi), double(_digis.size()));
150  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:48
MESet & at(const std::string &key)
Definition: MESet.h:401
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
Definition: DetId.h:17
Timestamp timestamp_
Definition: DQWorker.h:134
MESetCollection MEs_
Definition: DQWorker.h:131

◆ runOnRawData()

void ecaldqm::OccupancyTask::runOnRawData ( EcalRawDataCollection const &  _dcchs)

Definition at line 98 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), ecaldqm::MESet::fill(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

98  {
99  MESet& meDCC(MEs_.at("DCC"));
100 
101  for (EcalRawDataCollection::const_iterator dcchItr(_dcchs.begin()); dcchItr != _dcchs.end(); ++dcchItr)
102  meDCC.fill(getEcalDQMSetupObjects(), dcchItr->id());
103  }
MESet & at(const std::string &key)
Definition: MESet.h:401
std::vector< T >::const_iterator const_iterator
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
MESetCollection MEs_
Definition: DQWorker.h:131

◆ runOnRecHits()

void ecaldqm::OccupancyTask::runOnRecHits ( EcalRecHitCollection const &  _hits,
Collections  _collection 
)

Definition at line 188 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), edm::SortedCollection< T, SORT >::begin(), EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), EcalPhiSymFlatTableProducers_cfi::id, hit::id, ecaldqm::DQWorker::Timestamp::iLumi, hcalRecHitTable_cff::iphi, ecaldqm::kEBRecHit, EcalRecHit::kGood, ecaldqm::DQWorker::MEs_, recHitThreshold_, ecaldqm::DQWorker::timestamp_, and ecaldqm::zside().

Referenced by analyze().

188  {
189  MESet& meRecHitAll(MEs_.at("RecHitAll"));
190  MESet& meRecHitProjEta(MEs_.at("RecHitProjEta"));
191  MESet& meRecHitProjPhi(MEs_.at("RecHitProjPhi"));
192  MESet& meRecHitThrAll(MEs_.at("RecHitThrAll"));
193  MESet& meRecHitThrAllByLumi(MEs_.at("RecHitThrAllByLumi"));
194  MESet& meRecHitThrmvp(MEs_.at("RecHitThrmvp"));
195  MESet& meRecHitThrpm(MEs_.at("RecHitThrpm"));
196  MESet& meRecHitThrProjEta(MEs_.at("RecHitThrProjEta"));
197  MESet& meRecHitThrProjPhi(MEs_.at("RecHitThrProjPhi"));
198  MESet& meRecHitThr1D(MEs_.at("RecHitThr1D"));
199  MESet& meTrendNRecHitThr(MEs_.at("TrendNRecHitThr"));
200 
201  uint32_t goodBits(0x1 << EcalRecHit::kGood);
202  double nFiltered(0.);
203 
204  float nRHThrp(0), nRHThrm(0);
205  int iSubdet(_collection == kEBRecHit ? EcalBarrel : EcalEndcap);
206  std::for_each(_hits.begin(), _hits.end(), [&](EcalRecHitCollection::value_type const& hit) {
207  DetId id(hit.id());
208 
209  meRecHitAll.fill(getEcalDQMSetupObjects(), id);
210  meRecHitProjEta.fill(getEcalDQMSetupObjects(), id);
211  meRecHitProjPhi.fill(getEcalDQMSetupObjects(), id);
212 
213  if (hit.checkFlagMask(goodBits) && hit.energy() > recHitThreshold_) {
214  meRecHitThrProjEta.fill(getEcalDQMSetupObjects(), id);
215  meRecHitThrProjPhi.fill(getEcalDQMSetupObjects(), id);
216  meRecHitThrAll.fill(getEcalDQMSetupObjects(), id);
217  meRecHitThrAllByLumi.fill(getEcalDQMSetupObjects(), id);
218  nFiltered += 1.;
219  bool isPlusFar(iSubdet == EcalBarrel ? (EBDetId(id).iphi() > 100 && EBDetId(id).iphi() < 280) : zside(id) > 0);
220  if (isPlusFar)
221  nRHThrp++;
222  else
223  nRHThrm++;
224  }
225  });
226 
227  meRecHitThr1D.fill(getEcalDQMSetupObjects(), iSubdet, nFiltered);
228  meTrendNRecHitThr.fill(getEcalDQMSetupObjects(), iSubdet, double(timestamp_.iLumi), nFiltered);
229  meRecHitThrmvp.fill(getEcalDQMSetupObjects(), iSubdet, nRHThrp, nRHThrm);
230  meRecHitThrpm.fill(getEcalDQMSetupObjects(), iSubdet, nRHThrp - nRHThrm);
231  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:48
MESet & at(const std::string &key)
Definition: MESet.h:401
int zside(DetId const &)
unsigned int id
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
Definition: DetId.h:17
Timestamp timestamp_
Definition: DQWorker.h:134
MESetCollection MEs_
Definition: DQWorker.h:131

◆ runOnTPDigis()

void ecaldqm::OccupancyTask::runOnTPDigis ( EcalTrigPrimDigiCollection const &  _digis)

Definition at line 152 of file OccupancyTask.cc.

References ecaldqm::MESetCollection::at(), edm::SortedCollection< T, SORT >::begin(), EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), EcalPhiSymFlatTableProducers_cfi::id, ecaldqm::DQWorker::Timestamp::iLumi, ecaldqm::DQWorker::MEs_, ecaldqm::DQWorker::timestamp_, and tpThreshold_.

Referenced by analyze().

152  {
153  // MESet& meTPDigiAll(MEs_.at("TPDigiAll"));
154  // MESet& meTPDigiProjEta(MEs_.at("TPDigiProjEta"));
155  // MESet& meTPDigiProjPhi(MEs_.at("TPDigiProjPhi"));
156  MESet& meTPDigiRCT(MEs_.at("TPDigiRCT"));
157  MESet& meTPDigiThrAll(MEs_.at("TPDigiThrAll"));
158  MESet& meTPDigiThrAllByLumi(MEs_.at("TPDigiThrAllByLumi"));
159  MESet& meTPDigiThrProjEta(MEs_.at("TPDigiThrProjEta"));
160  MESet& meTPDigiThrProjPhi(MEs_.at("TPDigiThrProjPhi"));
161  MESet& meTrendNTPDigi(MEs_.at("TrendNTPDigi"));
162 
163  double nFilteredEB(0.);
164  double nFilteredEE(0.);
165 
166  std::for_each(_digis.begin(), _digis.end(), [&](EcalTrigPrimDigiCollection::value_type const& digi) {
167  EcalTrigTowerDetId const& id(digi.id());
168  // meTPDigiProjEta.fill(id);
169  // meTPDigiProjPhi.fill(id);
170  // meTPDigiAll.fill(id);
171  if (digi.compressedEt() > tpThreshold_) {
172  meTPDigiThrProjEta.fill(getEcalDQMSetupObjects(), id);
173  meTPDigiThrProjPhi.fill(getEcalDQMSetupObjects(), id);
174  meTPDigiThrAll.fill(getEcalDQMSetupObjects(), id);
175  meTPDigiThrAllByLumi.fill(getEcalDQMSetupObjects(), id);
176  meTPDigiRCT.fill(getEcalDQMSetupObjects(), id);
177  if (id.subDet() == EcalBarrel)
178  nFilteredEB += 1.;
179  else
180  nFilteredEE += 1.;
181  }
182  });
183 
184  meTrendNTPDigi.fill(getEcalDQMSetupObjects(), EcalBarrel, double(timestamp_.iLumi), nFilteredEB);
185  meTrendNTPDigi.fill(getEcalDQMSetupObjects(), EcalEndcap, double(timestamp_.iLumi), nFilteredEE);
186  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:48
MESet & at(const std::string &key)
Definition: MESet.h:401
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
Timestamp timestamp_
Definition: DQWorker.h:134
MESetCollection MEs_
Definition: DQWorker.h:131

◆ setParams()

void ecaldqm::OccupancyTask::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 12 of file OccupancyTask.cc.

References l1extraParticles_cfi::_params, ecaldqm::MESetCollection::erase(), lumiCheck_, ecaldqm::DQWorker::MEs_, metadataTag, ecaldqm::DQWorker::onlineMode_, recHitThreshold_, AlCaHLTBitMon_QueryRunRegistry::string, and tpThreshold_.

12  {
13  recHitThreshold_ = _params.getUntrackedParameter<double>("recHitThreshold");
14  tpThreshold_ = _params.getUntrackedParameter<double>("tpThreshold");
15  metadataTag = _params.getParameter<edm::InputTag>("metadata");
16  lumiCheck_ = _params.getUntrackedParameter<bool>("lumiCheck", false);
17  if (!onlineMode_) {
18  MEs_.erase(std::string("PU"));
19  MEs_.erase(std::string("NEvents"));
20  MEs_.erase(std::string("TrendEventsperLumi"));
21  MEs_.erase(std::string("TrendPUperLumi"));
22  MEs_.erase(std::string("AELoss"));
23  MEs_.erase(std::string("AEReco"));
24  }
25  }
edm::InputTag metadataTag
Definition: OccupancyTask.h:43
MESetCollection MEs_
Definition: DQWorker.h:131
void erase(const std::string &key)
Definition: MESet.h:392

◆ setTokens()

void ecaldqm::OccupancyTask::setTokens ( edm::ConsumesCollector _collector)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 27 of file OccupancyTask.cc.

References edm::ConsumesCollector::consumes(), edm::ConsumesCollector::esConsumes(), lasertoken_, metadataTag, and metaDataToken_.

27  {
28  lasertoken_ = _collector.esConsumes();
30  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Class to contain the online luminosity from soft FED 1022.
edm::InputTag metadataTag
Definition: OccupancyTask.h:43
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > lasertoken_
Definition: OccupancyTask.h:38
edm::EDGetTokenT< OnlineLuminosityRecord > metaDataToken_
Definition: OccupancyTask.h:44

Member Data Documentation

◆ FillLaser

bool ecaldqm::OccupancyTask::FillLaser = false
private

Definition at line 39 of file OccupancyTask.h.

Referenced by beginEvent(), and beginRun().

◆ FindPUinLS

bool ecaldqm::OccupancyTask::FindPUinLS = false
private

Definition at line 46 of file OccupancyTask.h.

Referenced by beginEvent().

◆ lasertoken_

edm::ESGetToken<EcalLaserDbService, EcalLaserDbRecord> ecaldqm::OccupancyTask::lasertoken_
private

Definition at line 38 of file OccupancyTask.h.

Referenced by beginEvent(), and setTokens().

◆ lumiCheck_

bool ecaldqm::OccupancyTask::lumiCheck_
private

Definition at line 48 of file OccupancyTask.h.

Referenced by beginEvent(), and setParams().

◆ m_iTime

edm::TimeValue_t ecaldqm::OccupancyTask::m_iTime
private

Definition at line 42 of file OccupancyTask.h.

Referenced by beginEvent().

◆ metadataTag

edm::InputTag ecaldqm::OccupancyTask::metadataTag
private

Definition at line 43 of file OccupancyTask.h.

Referenced by setParams(), and setTokens().

◆ metaDataToken_

edm::EDGetTokenT<OnlineLuminosityRecord> ecaldqm::OccupancyTask::metaDataToken_
private

Definition at line 44 of file OccupancyTask.h.

Referenced by beginEvent(), and setTokens().

◆ nEv

int ecaldqm::OccupancyTask::nEv
private

Definition at line 47 of file OccupancyTask.h.

Referenced by beginEvent(), and endLuminosityBlock().

◆ recHitThreshold_

float ecaldqm::OccupancyTask::recHitThreshold_
private

Definition at line 40 of file OccupancyTask.h.

Referenced by runOnRecHits(), and setParams().

◆ scal_pu

double ecaldqm::OccupancyTask::scal_pu
private

Definition at line 45 of file OccupancyTask.h.

Referenced by beginEvent(), and endLuminosityBlock().

◆ tpThreshold_

float ecaldqm::OccupancyTask::tpThreshold_
private

Definition at line 41 of file OccupancyTask.h.

Referenced by runOnTPDigis(), and setParams().