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 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

double bxBin_
 
std::vector< int > bxBinEdges_
 
std::vector< int > bxBinEdgesFine_
 
double bxBinFine_
 
edm::InputTag lhcStatusInfoCollectionTag_
 
edm::EDGetTokenT< TCDSRecordlhcStatusInfoRecordToken_
 
EcalTrigPrimDigiCollection const * realTps_
 
bool runOnEmul_
 
const EcalTPGStripStatusStripStatus
 
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcdStripStatusRcd_
 
std::map< uint32_t, unsigned > towerReadouts_
 
const EcalTPGTowerStatusTTStatus
 
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcdTTStatusRcd_
 

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

Member Enumeration Documentation

◆ Constants

Enumerator
nBXBins 

Definition at line 40 of file TrigPrimTask.h.

40 { nBXBins = 15 };

Constructor & Destructor Documentation

◆ TrigPrimTask()

ecaldqm::TrigPrimTask::TrigPrimTask ( )

Definition at line 13 of file TrigPrimTask.cc.

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

◆ ~TrigPrimTask()

ecaldqm::TrigPrimTask::~TrigPrimTask ( )
inlineoverride

Definition at line 24 of file TrigPrimTask.h.

24 {}

Member Function Documentation

◆ addDependencies()

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 44 of file TrigPrimTask.cc.

44  {
45  if (runOnEmul_)
46  _dependencies.push_back(Dependency(kTrigPrimEmulDigi, kEBDigi, kEEDigi, kTrigPrimDigi));
47  }

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

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

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 57 of file TrigPrimTask.cc.

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

References ecaldqm::MESetCollection::at(), edm::EventBase::bunchCrossing(), bxBin_, bxBinEdges_, bxBinEdgesFine_, bxBinFine_, ecaldqm::MESet::fill(), 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, realTps_, ecaldqm::MESet::reset(), StripStatus, towerReadouts_, TTStatus, 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 49 of file TrigPrimTask.cc.

49  {
50  // Read-in Status records:
51  // Status records stay constant over run so they are read-in only once here
52  // but filled by LS in runOnRealTPs() because MEs are not yet booked at beginRun()
53  TTStatus = &_es.getData(TTStatusRcd_);
54  StripStatus = &_es.getData(StripStatusRcd_);
55  }

References edm::EventSetup::getData(), StripStatus, StripStatusRcd_, TTStatus, and TTStatusRcd_.

◆ runOnDigis()

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

Definition at line 172 of file TrigPrimTask.cc.

172  {
173  for (typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr) {
174  EcalTrigTowerDetId ttid(GetTrigTowerMap()->towerOf(digiItr->id()));
175  towerReadouts_[ttid.rawId()]++;
176  }
177  }

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

Referenced by analyze().

◆ runOnEmulTPs()

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

Definition at line 284 of file TrigPrimTask.cc.

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

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 185 of file TrigPrimTask.cc.

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

Referenced by analyze().

◆ setParams()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 28 of file TrigPrimTask.cc.

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

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

Referenced by beginEvent(), and runOnRealTPs().

◆ bxBinEdges_

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

Definition at line 54 of file TrigPrimTask.h.

Referenced by beginEvent(), and setParams().

◆ bxBinEdgesFine_

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

Definition at line 55 of file TrigPrimTask.h.

Referenced by beginEvent(), and setParams().

◆ bxBinFine_

double ecaldqm::TrigPrimTask::bxBinFine_
private

Definition at line 57 of file TrigPrimTask.h.

Referenced by beginEvent(), and runOnRealTPs().

◆ lhcStatusInfoCollectionTag_

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

Definition at line 66 of file TrigPrimTask.h.

Referenced by setParams(), and setTokens().

◆ lhcStatusInfoRecordToken_

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

Definition at line 67 of file TrigPrimTask.h.

Referenced by beginEvent(), and setTokens().

◆ realTps_

EcalTrigPrimDigiCollection const* ecaldqm::TrigPrimTask::realTps_
private

Definition at line 45 of file TrigPrimTask.h.

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

◆ runOnEmul_

bool ecaldqm::TrigPrimTask::runOnEmul_
private

Definition at line 47 of file TrigPrimTask.h.

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

◆ StripStatus

const EcalTPGStripStatus* ecaldqm::TrigPrimTask::StripStatus
private

Definition at line 64 of file TrigPrimTask.h.

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

◆ StripStatusRcd_

edm::ESGetToken<EcalTPGStripStatus, EcalTPGStripStatusRcd> ecaldqm::TrigPrimTask::StripStatusRcd_
private

Definition at line 62 of file TrigPrimTask.h.

Referenced by beginRun(), and setTokens().

◆ towerReadouts_

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

Definition at line 59 of file TrigPrimTask.h.

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

◆ TTStatus

const EcalTPGTowerStatus* ecaldqm::TrigPrimTask::TTStatus
private

Definition at line 63 of file TrigPrimTask.h.

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

◆ TTStatusRcd_

edm::ESGetToken<EcalTPGTowerStatus, EcalTPGTowerStatusRcd> ecaldqm::TrigPrimTask::TTStatusRcd_
private

Definition at line 61 of file TrigPrimTask.h.

Referenced by beginRun(), and setTokens().

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:54
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:67
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:89301
ecaldqm::TrigPrimTask::towerReadouts_
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:59
l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::TrigPrimTask::bxBinEdgesFine_
std::vector< int > bxBinEdgesFine_
Definition: TrigPrimTask.h:55
ecaldqm::TrigPrimTask::bxBinFine_
double bxBinFine_
Definition: TrigPrimTask.h:57
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle
Definition: AssociativeIterator.h:50
ecaldqm::TrigPrimTask::StripStatus
const EcalTPGStripStatus * StripStatus
Definition: TrigPrimTask.h:64
ecaldqm::DQWorker::GetElectronicsMap
const EcalElectronicsMapping * GetElectronicsMap()
Definition: DQWorker.cc:118
EcalBarrel
Definition: EcalSubdetector.h:10
ecaldqm::TrigPrimTask::TTStatus
const EcalTPGTowerStatus * TTStatus
Definition: TrigPrimTask.h:63
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:185
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
ecaldqm::DQWorker::GetTrigTowerMap
const EcalTrigTowerConstituentsMap * GetTrigTowerMap()
Definition: DQWorker.cc:124
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:125
muonRecoAnalyzer_cfi.pBin
pBin
Definition: muonRecoAnalyzer_cfi.py:37
ecaldqm::TrigPrimTask::TTStatusRcd_
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > TTStatusRcd_
Definition: TrigPrimTask.h:61
EcalEndcap
Definition: EcalSubdetector.h:10
ecaldqm::TrigPrimTask::runOnEmulTPs
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:284
ecaldqm::TrigPrimTask::runOnEmul_
bool runOnEmul_
Definition: TrigPrimTask.h:47
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:66
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
ecaldqm::TrigPrimTask::bxBin_
double bxBin_
Definition: TrigPrimTask.h:56
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::DQWorker::getEcalDQMSetupObjects
const EcalDQMSetupObjects getEcalDQMSetupObjects()
Definition: DQWorker.cc:142
ecaldqm::kTrigPrimEmulDigi
Definition: Collections.h:29
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
std
Definition: JetResolutionObject.h:76
ecaldqm::kEBDigi
Definition: Collections.h:25
ecaldqm::TrigPrimTask::StripStatusRcd_
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > StripStatusRcd_
Definition: TrigPrimTask.h:62
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:172
edm::Transition::BeginRun
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:45
TCDSRecord::getBST
const BSTRecord & getBST() const
Definition: TCDSRecord.h:100
ecaldqm::TrigPrimTask::nBXBins
Definition: TrigPrimTask.h:40
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15