CMS 3D CMS Logo

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

#include <TrigPrimTask.h>

Inheritance diagram for ecaldqm::TrigPrimTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  Constants { nBXBins = 15 }
 
- Public Types inherited from ecaldqm::DQWorkerTask
typedef EcalDCCHeaderBlock::EcalDCCEventSettings EventSettings
 

Public Member Functions

void addDependencies (DependencySet &) override
 
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
 
template<typename DigiCollection >
void runOnDigis (DigiCollection const &)
 
void runOnEmulTPs (EcalTrigPrimDigiCollection const &)
 
void runOnRealTPs (EcalTrigPrimDigiCollection const &)
 
void setTokens (edm::ConsumesCollector &) override
 
 TrigPrimTask ()
 
 ~TrigPrimTask () override
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
 DQWorkerTask ()
 
virtual void endEvent (edm::Event const &, edm::EventSetup const &)
 
virtual bool filterRunType (short 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 &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
const EcalDQMSetupObjects getEcalDQMSetupObjects ()
 
const EcalElectronicsMappingGetElectronicsMap ()
 
const CaloGeometryGetGeometry ()
 
const std::string & getName () const
 
const CaloTopologyGetTopology ()
 
const EcalTrigTowerConstituentsMapGetTrigTowerMap ()
 
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 setTime (time_t _t)
 
virtual ~DQWorker () noexcept(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

double bxBin_
 
std::vector< int > bxBinEdges_
 
std::vector< int > bxBinEdgesFine_
 
double bxBinFine_
 
edm::InputTag lhcStatusInfoCollectionTag_
 
edm::EDGetTokenT< TCDSRecordlhcStatusInfoRecordToken_
 
EcalTrigPrimDigiCollection const * realTps_
 
bool runOnEmul_
 
edm::ESHandle< EcalTPGStripStatusStripStatusRcd
 
std::map< uint32_t, unsigned > towerReadouts_
 
edm::ESHandle< EcalTPGTowerStatusTTStatusRcd
 

Additional Inherited Members

- 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)
 
- 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 19 of file TrigPrimTask.h.

Member Enumeration Documentation

◆ Constants

Enumerator
nBXBins 

Definition at line 38 of file TrigPrimTask.h.

38 { nBXBins = 15 };

Constructor & Destructor Documentation

◆ TrigPrimTask()

ecaldqm::TrigPrimTask::TrigPrimTask ( )

Definition at line 16 of file TrigPrimTask.cc.

17  : DQWorkerTask(),
18  realTps_(nullptr),
19  runOnEmul_(false),
20  // HLTCaloPath_(""),
21  // HLTMuonPath_(""),
22  // HLTCaloBit_(false),
23  // HLTMuonBit_(false),
24  bxBinEdges_(),
26  bxBin_(0.),
27  bxBinFine_(0.),

◆ ~TrigPrimTask()

ecaldqm::TrigPrimTask::~TrigPrimTask ( )
inlineoverride

Definition at line 22 of file TrigPrimTask.h.

22 {}

Member Function Documentation

◆ addDependencies()

void ecaldqm::TrigPrimTask::addDependencies ( DependencySet _dependencies)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 47 of file TrigPrimTask.cc.

47  {
48  if (runOnEmul_)
49  _dependencies.push_back(Dependency(kTrigPrimEmulDigi, kEBDigi, kEEDigi, kTrigPrimDigi));
50  }

References ecaldqm::kEBDigi, ecaldqm::kEEDigi, ecaldqm::kTrigPrimDigi, ecaldqm::kTrigPrimEmulDigi, ecaldqm::DependencySet::push_back(), and runOnEmul_.

◆ analyze()

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 66 of file TrigPrimTask.h.

66  {
67  switch (_collection) {
68  case kTrigPrimDigi:
69  if (_p)
70  runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
71  return true;
72  break;
73  case kTrigPrimEmulDigi:
74  if (_p && runOnEmul_)
75  runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
76  return runOnEmul_;
77  break;
78  case kEBDigi:
79  if (_p)
80  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
81  return true;
82  break;
83  case kEEDigi:
84  if (_p)
85  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
86  return true;
87  break;
88  default:
89  break;
90  }
91  return false;
92  }

References ecaldqm::kEBDigi, ecaldqm::kEEDigi, ecaldqm::kTrigPrimDigi, ecaldqm::kTrigPrimEmulDigi, runOnDigis(), runOnEmul_, runOnEmulTPs(), and runOnRealTPs().

◆ beginEvent()

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 60 of file TrigPrimTask.cc.

63  {
64  using namespace std;
65 
66  towerReadouts_.clear();
67 
68  if (ByLumiResetSwitch) {
69  MEs_.at("EtSummaryByLumi").reset(GetElectronicsMap());
70  MEs_.at("TTFlags4ByLumi").reset(GetElectronicsMap());
71  MEs_.at("LHCStatusByLumi").reset(GetElectronicsMap(), -1);
72  }
73 
74  if (!lhcStatusSet) {
75  // Update LHC status once each LS
76  MESet& meLHCStatusByLumi(static_cast<MESet&>(MEs_.at("LHCStatusByLumi")));
77  edm::Handle<TCDSRecord> tcdsData;
78  _evt.getByToken(lhcStatusInfoRecordToken_, tcdsData);
79  if (tcdsData.isValid()) {
80  meLHCStatusByLumi.fill(getEcalDQMSetupObjects(), double(tcdsData->getBST().getBeamMode()));
81  lhcStatusSet = true;
82  }
83  }
84 
85  realTps_ = nullptr;
86 
87  // HLTCaloBit_ = false;
88  // HLTMuonBit_ = false;
89 
90  std::vector<int>::iterator pBin(std::upper_bound(bxBinEdges_.begin(), bxBinEdges_.end(), _evt.bunchCrossing()));
91  bxBin_ = static_cast<int>(pBin - bxBinEdges_.begin()) - 0.5;
92  // fine binning for TP Occ vs BX plot as requested by DAQ in March 2021
93  std::vector<int>::iterator pBinFine(
94  std::upper_bound(bxBinEdgesFine_.begin(), bxBinEdgesFine_.end(), _evt.bunchCrossing()));
95  bxBinFine_ = static_cast<int>(pBinFine - bxBinEdgesFine_.begin()) - 0.5;
96 
98  _es.get<EcalTPGTowerStatusRcd>().get(TTStatusRcd_);
99  const EcalTPGTowerStatus* TTStatus = TTStatusRcd_.product();
100  const EcalTPGTowerStatusMap& towerMap = TTStatus->getMap();
101 
102  edm::ESHandle<EcalTPGStripStatus> StripStatusRcd_;
103  _es.get<EcalTPGStripStatusRcd>().get(StripStatusRcd_);
104  const EcalTPGStripStatus* StripStatus = StripStatusRcd_.product();
105  const EcalTPGStripStatusMap& stripMap = StripStatus->getMap();
106 
107  MESet& meTTMaskMap(MEs_.at("TTMaskMap"));
108 
109  for (EcalTPGTowerStatusMap::const_iterator ttItr(towerMap.begin()); ttItr != towerMap.end(); ++ttItr) {
110  if ((*ttItr).second > 0) {
111  const EcalTrigTowerDetId ttid((*ttItr).first);
112  //if(ttid.subDet() == EcalBarrel)
113  meTTMaskMap.fill(getEcalDQMSetupObjects(), ttid, 1);
114  } //masked
115  } //loop on towers
116 
117  for (EcalTPGStripStatusMap::const_iterator stItr(stripMap.begin()); stItr != stripMap.end(); ++stItr) {
118  if ((*stItr).second > 0) {
119  const EcalElectronicsId stid((*stItr).first);
120  //if(stid.subdet() == EcalEndcap);
121  meTTMaskMap.fill(getEcalDQMSetupObjects(), stid, 1);
122  } //masked
123  } //loop on pseudo-strips
124 
125  // if(HLTCaloPath_.size() || HLTMuonPath_.size()){
126  // edm::TriggerResultsByName results(_evt.triggerResultsByName("HLT"));
127  // if(!results.isValid()) results = _evt.triggerResultsByName("RECO");
128  // if(results.isValid()){
129  // const vector<string>& pathNames(results.triggerNames());
130 
131  // size_t caloStar(HLTCaloPath_.find('*'));
132  // if(caloStar != string::npos){
133  // string caloSub(HLTCaloPath_.substr(0, caloStar));
134  // bool found(false);
135  // for(unsigned iP(0); iP < pathNames.size(); ++iP){
136  // if(pathNames[iP].substr(0, caloStar) == caloSub){
137  // HLTCaloPath_ = pathNames[iP];
138  // found = true;
139  // break;
140  // }
141  // }
142  // if(!found) HLTCaloPath_ = "";
143  // }
144 
145  // size_t muonStar(HLTMuonPath_.find('*'));
146  // if(muonStar != string::npos){
147  // string muonSub(HLTMuonPath_.substr(0, muonStar));
148  // bool found(false);
149  // for(unsigned iP(0); iP < pathNames.size(); ++iP){
150  // if(pathNames[iP].substr(0, muonStar) == muonSub){
151  // HLTMuonPath_ = pathNames[iP];
152  // found = true;
153  // break;
154  // }
155  // }
156  // if(!found) HLTMuonPath_ = "";
157  // }
158 
159  // if(HLTCaloPath_.size()){
160  // try{
161  // HLTCaloBit_ = results.accept(HLTCaloPath_);
162  // }
163  // catch(cms::Exception e){
164  // if(e.category() != "LogicError") throw e;
165  // HLTCaloPath_ = "";
166  // }
167  // }
168  // if(HLTMuonPath_.size()){
169  // try{
170  // HLTMuonBit_ = results.accept(HLTMuonPath_);
171  // }
172  // catch(cms::Exception e){
173  // if(e.category() != "LogicError") throw e;
174  // HLTMuonPath_ = "";
175  // }
176  // }
177  // }
178  // }
179  }

References ecaldqm::MESetCollection::at(), edm::EventBase::bunchCrossing(), bxBin_, bxBinEdges_, bxBinEdgesFine_, bxBinFine_, ecaldqm::MESet::fill(), edm::EventSetup::get(), get, BSTRecord::getBeamMode(), TCDSRecord::getBST(), edm::Event::getByToken(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetElectronicsMap(), EcalTPGTowerStatus::getMap(), EcalTPGStripStatus::getMap(), edm::HandleBase::isValid(), lhcStatusInfoRecordToken_, ecaldqm::DQWorker::MEs_, muonRecoAnalyzer_cfi::pBin, edm::ESHandle< T >::product(), realTps_, ecaldqm::MESet::reset(), towerReadouts_, and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.

◆ beginRun()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 52 of file TrigPrimTask.cc.

52  {
53  // Read-in Status records:
54  // Status records stay constant over run so they are read-in only once here
55  // but filled by LS in runOnRealTPs() because MEs are not yet booked at beginRun()
58  }

References edm::EventSetup::get(), get, StripStatusRcd, and TTStatusRcd.

◆ runOnDigis()

template<typename DigiCollection >
void ecaldqm::TrigPrimTask::runOnDigis ( DigiCollection const &  _digis)

Definition at line 182 of file TrigPrimTask.cc.

182  {
183  for (typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr) {
184  EcalTrigTowerDetId ttid(GetTrigTowerMap()->towerOf(digiItr->id()));
185  towerReadouts_[ttid.rawId()]++;
186  }
187  }

References ecaldqm::DQWorker::GetTrigTowerMap(), DetId::rawId(), egamma::towerOf(), and towerReadouts_.

Referenced by analyze().

◆ runOnEmulTPs()

void ecaldqm::TrigPrimTask::runOnEmulTPs ( EcalTrigPrimDigiCollection const &  _tps)

Definition at line 294 of file TrigPrimTask.cc.

294  {
295  MESet& meEtMaxEmul(MEs_.at("EtMaxEmul"));
296  MESet& meEmulMaxIndex(MEs_.at("EmulMaxIndex"));
297  MESet& meMatchedIndex(MEs_.at("MatchedIndex"));
298  MESet& meEtEmulError(MEs_.at("EtEmulError"));
299  MESet& meFGEmulError(MEs_.at("FGEmulError"));
300  MESet& meRealvEmulEt(MEs_.at("RealvEmulEt"));
301 
302  for (EcalTrigPrimDigiCollection::const_iterator tpItr(_tps.begin()); tpItr != _tps.end(); ++tpItr) {
303  EcalTrigTowerDetId ttid(tpItr->id());
304 
305  int et(tpItr->compressedEt());
306 
307  float maxEt(0.);
308  int iMax(0);
309  for (int iDigi(0); iDigi < 5; iDigi++) {
310  float sampleEt((*tpItr)[iDigi].compressedEt());
311 
312  if (sampleEt > maxEt) {
313  maxEt = sampleEt;
314  iMax = iDigi + 1;
315  }
316  }
317 
318  meEtMaxEmul.fill(getEcalDQMSetupObjects(), ttid, maxEt);
319  if (maxEt > 0.)
320  meEmulMaxIndex.fill(getEcalDQMSetupObjects(), ttid, iMax);
321 
322  bool match(true);
323  bool matchFG(true);
324 
325  // Loop over real TPs and look for an emulated TP index with matching Et:
326  // If an Et match is found, return TP index correpsonding to BX of emulated TP where match was found
327  // Standard TPG comparison: { TP index:matched BX } = { no emul:No Et match, 0:BX-2, 1:BX-1, 2:in-time, 3:BX+1, 4:BX+2 }
329  if (realItr != realTps_->end()) {
330  int realEt(realItr->compressedEt());
331 
332  if (realEt > 0) {
333  int ttF(realItr->ttFlag());
334  if ((ttF == 1 || ttF == 3) &&
335  towerReadouts_[ttid.rawId()] == GetTrigTowerMap()->constituentsOf(ttid).size()) {
336  if (et != realEt)
337  match = false;
338  if (tpItr->fineGrain() != realItr->fineGrain())
339  matchFG = false;
340 
341  // NOTE: matchedIndex comparison differs from Standard TPG comparison:
342  // { matchedIndex:TP index } = { 0:no emul, 1:BX-2, 2:BX-1, 3:in-time, 4:BX+1, 5:BX+2 }
343  std::vector<int> matchedIndex(0);
344  // iDigi only loops over explicit Et matches:
345  // { iDigi:TP index } = { 0:BX-2, 1:BX-1, 2:in-time, 3:BX+1, 4:BX+2 }
346  for (int iDigi(0); iDigi < 5; iDigi++) {
347  if ((*tpItr)[iDigi].compressedEt() == realEt) {
348  // matchedIndex = iDigi + 1
349  if (iDigi != 2) {
350  matchedIndex.push_back(iDigi + 1);
351  }
352  // If an in-time match is found, exit loop and clear out any other matches:
353  // Ensures multiple matches are not returned (e.g. during saturation)
354  else {
355  matchedIndex.clear();
356  matchedIndex.push_back(3); // Et match is to in-time emulated TP
357  break;
358  }
359  } // Et match found
360  } // iDigi
361  if (matchedIndex.empty())
362  matchedIndex.push_back(0); // no Et match found => no emul
363 
364  // Fill Real vs Emulated TP Et
365  meRealvEmulEt.fill(
366  getEcalDQMSetupObjects(), ttid, realEt, (*tpItr)[2].compressedEt()); // iDigi=2:in-time BX
367 
368  // Fill matchedIndex ME
369  for (std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end();
370  ++matchItr) {
371  meMatchedIndex.fill(getEcalDQMSetupObjects(), ttid, *matchItr + 0.5);
372 
373  // timing information is only within emulated TPs (real TPs have one time sample)
374  // if(HLTCaloBit_) MEs_[kTimingCalo].fill(ttid, float(*matchItr));
375  // if(HLTMuonBit_) MEs_[kTimingMuon].fill(ttid, float(*matchItr));
376  }
377  }
378  }
379  } else {
380  match = false;
381  matchFG = false;
382  }
383 
384  if (!match)
385  meEtEmulError.fill(getEcalDQMSetupObjects(), ttid);
386  if (!matchFG)
387  meFGEmulError.fill(getEcalDQMSetupObjects(), ttid);
388  }
389  }

References ecaldqm::MESetCollection::at(), edm::SortedCollection< T, SORT >::begin(), EcalTrigTowerConstituentsMap::constituentsOf(), edm::SortedCollection< T, SORT >::end(), EgHLTOffHistBins_cfi::et, edm::SortedCollection< T, SORT >::find(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetTrigTowerMap(), match(), heavyionUCCDQM_cfi::maxEt, ecaldqm::DQWorker::MEs_, realTps_, and towerReadouts_.

Referenced by analyze().

◆ runOnRealTPs()

void ecaldqm::TrigPrimTask::runOnRealTPs ( EcalTrigPrimDigiCollection const &  _tps)

Definition at line 193 of file TrigPrimTask.cc.

193  {
194  MESet& meEtVsBx(MEs_.at("EtVsBx"));
195  MESet& meEtReal(MEs_.at("EtReal"));
196  MESet& meEtRealMap(MEs_.at("EtRealMap"));
197  MESet& meEtSummary(MEs_.at("EtSummary"));
198  MESet& meEtSummaryByLumi(MEs_.at("EtSummaryByLumi"));
199  MESet& meLowIntMap(MEs_.at("LowIntMap"));
200  MESet& meMedIntMap(MEs_.at("MedIntMap"));
201  MESet& meHighIntMap(MEs_.at("HighIntMap"));
202  MESet& meTTFlags(MEs_.at("TTFlags"));
203  MESet& meTTFlagsVsEt(MEs_.at("TTFlagsVsEt"));
204  MESet& meTTFlags4(MEs_.at("TTFlags4"));
205  MESet& meTTFlags4ByLumi(MEs_.at("TTFlags4ByLumi"));
206  MESet& meTTFMismatch(MEs_.at("TTFMismatch"));
207  MESet& meOccVsBx(MEs_.at("OccVsBx"));
208 
209  realTps_ = &_tps;
210 
211  double nTP[] = {0., 0., 0.};
212 
213  for (EcalTrigPrimDigiCollection::const_iterator tpItr(_tps.begin()); tpItr != _tps.end(); ++tpItr) {
214  EcalTrigTowerDetId ttid(tpItr->id());
215  float et(tpItr->compressedEt());
216 
217  if (et > 0.) {
218  if (ttid.subDet() == EcalBarrel)
219  nTP[0] += 1.;
220  else if (ttid.zside() < 0)
221  nTP[1] += 1.;
222  else
223  nTP[2] += 2.;
224  meEtVsBx.fill(getEcalDQMSetupObjects(), ttid, bxBin_, et);
225  }
226 
227  meEtReal.fill(getEcalDQMSetupObjects(), ttid, et);
228  meEtRealMap.fill(getEcalDQMSetupObjects(), ttid, et);
229  meEtSummary.fill(getEcalDQMSetupObjects(), ttid, et);
230  meEtSummaryByLumi.fill(getEcalDQMSetupObjects(), ttid, et);
231 
232  int interest(tpItr->ttFlag() & 0x3);
233 
234  switch (interest) {
235  case 0:
236  meLowIntMap.fill(getEcalDQMSetupObjects(), ttid);
237  break;
238  case 1:
239  meMedIntMap.fill(getEcalDQMSetupObjects(), ttid);
240  break;
241  case 3:
242  meHighIntMap.fill(getEcalDQMSetupObjects(), ttid);
243  break;
244  default:
245  break;
246  }
247 
248  // Fill TT Flag MEs
249  int ttF(tpItr->ttFlag());
250  meTTFlags.fill(getEcalDQMSetupObjects(), ttid, 1.0 * ttF);
251  meTTFlagsVsEt.fill(getEcalDQMSetupObjects(), ttid, et, 1.0 * ttF);
252  // Monitor occupancy of TTF=4
253  // which contains info about TT auto-masking
254  if (ttF >= 4) {
255  meTTFlags4.fill(getEcalDQMSetupObjects(), ttid);
256  meTTFlags4ByLumi.fill(getEcalDQMSetupObjects(), ttid);
257  }
258  if ((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] != GetTrigTowerMap()->constituentsOf(ttid).size())
259  meTTFMismatch.fill(getEcalDQMSetupObjects(), ttid);
260  }
261 
262  meOccVsBx.fill(getEcalDQMSetupObjects(), EcalBarrel, bxBinFine_, nTP[0]);
263  meOccVsBx.fill(getEcalDQMSetupObjects(), -EcalEndcap, bxBinFine_, nTP[1]);
264  meOccVsBx.fill(getEcalDQMSetupObjects(), EcalEndcap, bxBinFine_, nTP[2]);
265 
266  // Set TT/Strip Masking status in Ecal3P view
267  // Status Records are read-in at beginRun() but filled here
268  // Requestied by ECAL Trigger in addition to TTMaskMap plots in SM view
269  MESet& meTTMaskMapAll(MEs_.at("TTMaskMapAll"));
270 
271  // Fill from TT Status Rcd
272  const EcalTPGTowerStatus* TTStatus(TTStatusRcd.product());
273  const EcalTPGTowerStatusMap& TTStatusMap(TTStatus->getMap());
274  for (EcalTPGTowerStatusMap::const_iterator ttItr(TTStatusMap.begin()); ttItr != TTStatusMap.end(); ++ttItr) {
275  const EcalTrigTowerDetId ttid(ttItr->first);
276  if (ttItr->second > 0)
277  meTTMaskMapAll.setBinContent(getEcalDQMSetupObjects(), ttid, 1); // TT is masked
278  } // TTs
279 
280  // Fill from Strip Status Rcd
281  const EcalTPGStripStatus* StripStatus(StripStatusRcd.product());
282  const EcalTPGStripStatusMap& StripStatusMap(StripStatus->getMap());
283  for (EcalTPGStripStatusMap::const_iterator stItr(StripStatusMap.begin()); stItr != StripStatusMap.end(); ++stItr) {
284  const EcalTriggerElectronicsId stid(stItr->first);
285  // Since ME has kTriggerTower binning, convert to EcalTrigTowerDetId first
286  // In principle, setBinContent() could be implemented for EcalTriggerElectronicsId class as well
287  const EcalTrigTowerDetId ttid(GetElectronicsMap()->getTrigTowerDetId(stid.tccId(), stid.ttId()));
288  if (stItr->second > 0)
289  meTTMaskMapAll.setBinContent(getEcalDQMSetupObjects(), ttid, 1); // PseudoStrip is masked
290  } // PseudoStrips
291 
292  } // TrigPrimTask::runOnRealTPs()

References ecaldqm::MESetCollection::at(), edm::SortedCollection< T, SORT >::begin(), bxBin_, bxBinFine_, EcalTrigTowerConstituentsMap::constituentsOf(), EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), EgHLTOffHistBins_cfi::et, ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetElectronicsMap(), ecaldqm::DQWorker::GetTrigTowerMap(), ecaldqm::DQWorker::MEs_, edm::ESHandle< T >::product(), realTps_, StripStatusRcd, EcalTriggerElectronicsId::tccId(), towerReadouts_, EcalTriggerElectronicsId::ttId(), and TTStatusRcd.

Referenced by analyze().

◆ setParams()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 31 of file TrigPrimTask.cc.

31  {
32  runOnEmul_ = _params.getUntrackedParameter<bool>("runOnEmul");
33  if (!runOnEmul_) {
34  MEs_.erase(std::string("EtMaxEmul"));
35  MEs_.erase(std::string("EmulMaxIndex"));
36  MEs_.erase(std::string("MatchedIndex"));
37  MEs_.erase(std::string("EtEmulError"));
38  MEs_.erase(std::string("FGEmulError"));
39  MEs_.erase(std::string("RealvEmulEt"));
40  }
41  lhcStatusInfoCollectionTag_ = _params.getUntrackedParameter<edm::InputTag>(
42  "lhcStatusInfoCollectionTag", edm::InputTag("tcdsDigis", "tcdsRecord"));
43  bxBinEdges_ = _params.getUntrackedParameter<std::vector<int> >("bxBins");
44  bxBinEdgesFine_ = _params.getUntrackedParameter<std::vector<int> >("bxBinsFine");
45  }

References l1extraParticles_cfi::_params, bxBinEdges_, bxBinEdgesFine_, ecaldqm::MESetCollection::erase(), HLT_FULL_cff::InputTag, lhcStatusInfoCollectionTag_, ecaldqm::DQWorker::MEs_, runOnEmul_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ setTokens()

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

Member Data Documentation

◆ bxBin_

double ecaldqm::TrigPrimTask::bxBin_
private

Definition at line 54 of file TrigPrimTask.h.

Referenced by beginEvent(), and runOnRealTPs().

◆ bxBinEdges_

std::vector<int> ecaldqm::TrigPrimTask::bxBinEdges_
private

Definition at line 52 of file TrigPrimTask.h.

Referenced by beginEvent(), and setParams().

◆ bxBinEdgesFine_

std::vector<int> ecaldqm::TrigPrimTask::bxBinEdgesFine_
private

Definition at line 53 of file TrigPrimTask.h.

Referenced by beginEvent(), and setParams().

◆ bxBinFine_

double ecaldqm::TrigPrimTask::bxBinFine_
private

Definition at line 55 of file TrigPrimTask.h.

Referenced by beginEvent(), and runOnRealTPs().

◆ lhcStatusInfoCollectionTag_

edm::InputTag ecaldqm::TrigPrimTask::lhcStatusInfoCollectionTag_
private

Definition at line 62 of file TrigPrimTask.h.

Referenced by setParams(), and setTokens().

◆ lhcStatusInfoRecordToken_

edm::EDGetTokenT<TCDSRecord> ecaldqm::TrigPrimTask::lhcStatusInfoRecordToken_
private

Definition at line 63 of file TrigPrimTask.h.

Referenced by beginEvent(), and setTokens().

◆ realTps_

EcalTrigPrimDigiCollection const* ecaldqm::TrigPrimTask::realTps_
private

Definition at line 43 of file TrigPrimTask.h.

Referenced by beginEvent(), runOnEmulTPs(), and runOnRealTPs().

◆ runOnEmul_

bool ecaldqm::TrigPrimTask::runOnEmul_
private

Definition at line 45 of file TrigPrimTask.h.

Referenced by addDependencies(), analyze(), and setParams().

◆ StripStatusRcd

edm::ESHandle<EcalTPGStripStatus> ecaldqm::TrigPrimTask::StripStatusRcd
private

Definition at line 60 of file TrigPrimTask.h.

Referenced by beginRun(), and runOnRealTPs().

◆ towerReadouts_

std::map<uint32_t, unsigned> ecaldqm::TrigPrimTask::towerReadouts_
private

Definition at line 57 of file TrigPrimTask.h.

Referenced by beginEvent(), runOnDigis(), runOnEmulTPs(), and runOnRealTPs().

◆ TTStatusRcd

edm::ESHandle<EcalTPGTowerStatus> ecaldqm::TrigPrimTask::TTStatusRcd
private

Definition at line 59 of file TrigPrimTask.h.

Referenced by beginRun(), and runOnRealTPs().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
pfDeepBoostedJetPreprocessParams_cfi.upper_bound
upper_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:16
EcalTPGStripStatusMap
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
Definition: EcalTPGStripStatus.h:24
ecaldqm::TrigPrimTask::bxBinEdges_
std::vector< int > bxBinEdges_
Definition: TrigPrimTask.h:52
EcalTPGTowerStatus::getMap
const std::map< uint32_t, uint16_t > & getMap() const
Definition: EcalTPGTowerStatus.h:15
ecaldqm::TrigPrimTask::lhcStatusInfoRecordToken_
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:63
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalTriggerElectronicsId
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
Definition: EcalTriggerElectronicsId.h:18
ecaldqm::kEEDigi
Definition: Collections.h:26
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
ecaldqm::TrigPrimTask::towerReadouts_
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::TrigPrimTask::bxBinEdgesFine_
std::vector< int > bxBinEdgesFine_
Definition: TrigPrimTask.h:53
ecaldqm::TrigPrimTask::bxBinFine_
double bxBinFine_
Definition: TrigPrimTask.h:55
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
edm::Handle
Definition: AssociativeIterator.h:50
ecaldqm::DQWorker::GetElectronicsMap
const EcalElectronicsMapping * GetElectronicsMap()
Definition: DQWorker.cc:104
EcalBarrel
Definition: EcalSubdetector.h:10
EcalTPGStripStatusRcd
Definition: EcalTPGStripStatusRcd.h:5
EcalTPGStripStatus::getMap
const std::map< uint32_t, uint16_t > & getMap() const
Definition: EcalTPGStripStatus.h:15
ecaldqm::MESet::reset
virtual void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.)
Definition: MESet.cc:98
BSTRecord::getBeamMode
const uint16_t getBeamMode() const
Definition: BSTRecord.h:70
EcalTPGTowerStatusMap
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
Definition: EcalTPGTowerStatus.h:24
ecaldqm::DQWorkerTask::DQWorkerTask
DQWorkerTask()
Definition: DQWorkerTask.cc:8
ecaldqm::TrigPrimTask::runOnRealTPs
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:193
edm::ESHandle< EcalTPGTowerStatus >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
ecaldqm::DQWorker::GetTrigTowerMap
const EcalTrigTowerConstituentsMap * GetTrigTowerMap()
Definition: DQWorker.cc:110
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
egamma::towerOf
CaloTowerDetId towerOf(reco::CaloCluster const &cluster, CaloTowerConstituentsMap const &towerMap)
Definition: EgammaHadTower.cc:10
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:104
muonRecoAnalyzer_cfi.pBin
pBin
Definition: muonRecoAnalyzer_cfi.py:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
ecaldqm::TrigPrimTask::runOnEmulTPs
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:294
ecaldqm::TrigPrimTask::runOnEmul_
bool runOnEmul_
Definition: TrigPrimTask.h:45
ecaldqm::TrigPrimTask::StripStatusRcd
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:60
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
ecaldqm::MESetCollection::at
MESet & at(const std::string &key)
Definition: MESet.h:399
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
ecaldqm::MESetCollection::erase
void erase(const std::string &key)
Definition: MESet.h:390
ecaldqm::TrigPrimTask::lhcStatusInfoCollectionTag_
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:62
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
get
#define get
ecaldqm::TrigPrimTask::bxBin_
double bxBin_
Definition: TrigPrimTask.h:54
ecaldqm::DQWorker::getEcalDQMSetupObjects
const EcalDQMSetupObjects getEcalDQMSetupObjects()
Definition: DQWorker.cc:128
ecaldqm::kTrigPrimEmulDigi
Definition: Collections.h:29
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
EcalTPGTowerStatus
Definition: EcalTPGTowerStatus.h:9
std
Definition: JetResolutionObject.h:76
ecaldqm::kEBDigi
Definition: Collections.h:25
EcalTrigTowerConstituentsMap::constituentsOf
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
Definition: EcalTrigTowerConstituentsMap.cc:162
ecaldqm::TrigPrimTask::runOnDigis
void runOnDigis(DigiCollection const &)
Definition: TrigPrimTask.cc:182
TCDSRecord
Class to contain information from TCDS FED.
Definition: TCDSRecord.h:19
heavyionUCCDQM_cfi.maxEt
maxEt
Definition: heavyionUCCDQM_cfi.py:14
ecaldqm::TrigPrimTask::realTps_
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:43
EcalTPGStripStatus
Definition: EcalTPGStripStatus.h:9
TCDSRecord::getBST
const BSTRecord & getBST() const
Definition: TCDSRecord.h:100
ecaldqm::TrigPrimTask::nBXBins
Definition: TrigPrimTask.h:38
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EcalTPGTowerStatusRcd
Definition: EcalTPGTowerStatusRcd.h:5
edm::InputTag
Definition: InputTag.h:15
ecaldqm::TrigPrimTask::TTStatusRcd
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:59