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 &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) 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 ()
 
- 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 &)
 
void recoverStats ()
 
void softReset ()
 
 ~DQWorkerTask () override
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
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 setTime (time_t _t)
 
virtual ~DQWorker ()(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

double bxBin_
 
std::array< int, nBXBins+1 > bxBinEdges_
 
edm::InputTag lhcStatusInfoCollectionTag_
 
edm::EDGetTokenT< TCDSRecordlhcStatusInfoRecordToken_
 
bool lhcStatusSet_
 
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 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::DQWorkerTask
std::set< std::string > resettable_
 
- 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

Enumerator
nBXBins 

Definition at line 38 of file TrigPrimTask.h.

38  {
39  nBXBins = 15
40  };

Constructor & Destructor Documentation

ecaldqm::TrigPrimTask::TrigPrimTask ( )

Definition at line 17 of file TrigPrimTask.cc.

References bxBin_, lhcStatusInfoCollectionTag_, lhcStatusSet_, and towerReadouts_.

17  :
18  DQWorkerTask(),
19  realTps_(nullptr),
20  runOnEmul_(false),
21  // HLTCaloPath_(""),
22  // HLTMuonPath_(""),
23  // HLTCaloBit_(false),
24  // HLTMuonBit_(false),
25  bxBinEdges_{ {1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565} },
26  bxBin_(0.),
29  lhcStatusSet_(false)
30  {
31  }
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TrigPrimTask.h:54
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:62
ecaldqm::TrigPrimTask::~TrigPrimTask ( )
inline

Member Function Documentation

void ecaldqm::TrigPrimTask::addDependencies ( DependencySet _dependencies)
overridevirtual
bool ecaldqm::TrigPrimTask::analyze ( void const *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 68 of file TrigPrimTask.h.

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

Referenced by ~TrigPrimTask().

68  {
69  switch(_collection){
70  case kTrigPrimDigi:
71  if(_p) runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
72  return true;
73  break;
74  case kTrigPrimEmulDigi:
75  if(_p && runOnEmul_) runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
76  return runOnEmul_;
77  break;
78  case kEBDigi:
79  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
80  return true;
81  break;
82  case kEEDigi:
83  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
84  return true;
85  break;
86  default:
87  break;
88  }
89  return false;
90  }
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
void ecaldqm::TrigPrimTask::beginEvent ( edm::Event const &  _evt,
edm::EventSetup const &  _es 
)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 75 of file TrigPrimTask.cc.

References edm::EventBase::bunchCrossing(), bxBin_, bxBinEdges_, ecaldqm::MESet::fill(), edm::EventSetup::get(), BSTRecord::getBeamMode(), TCDSRecord::getBST(), edm::Event::getByToken(), EcalTPGTowerStatus::getMap(), EcalTPGStripStatus::getMap(), edm::HandleBase::isValid(), lhcStatusInfoRecordToken_, lhcStatusSet_, ecaldqm::DQWorker::MEs_, edm::ESHandle< T >::product(), realTps_, and towerReadouts_.

Referenced by ~TrigPrimTask().

76  {
77  using namespace std;
78 
79  towerReadouts_.clear();
80 
81  if (!lhcStatusSet_) {
82  // Update LHC status once each LS
83  MESet& meLHCStatusByLumi(static_cast<MESet&>(MEs_.at("LHCStatusByLumi")));
84  edm::Handle<TCDSRecord> tcdsData;
85  _evt.getByToken(lhcStatusInfoRecordToken_, tcdsData);
86  if (tcdsData.isValid()) {
87  meLHCStatusByLumi.fill(double(tcdsData->getBST().getBeamMode()));
88  lhcStatusSet_ = true;
89  }
90  }
91 
92  realTps_ = nullptr;
93 
94  // HLTCaloBit_ = false;
95  // HLTMuonBit_ = false;
96 
97  int* pBin(std::upper_bound(bxBinEdges_.begin(), bxBinEdges_.end(), _evt.bunchCrossing()));
98  bxBin_ = static_cast<int>(pBin - bxBinEdges_.begin()) - 0.5;
99 
101  _es.get<EcalTPGTowerStatusRcd>().get(TTStatusRcd_);
102  const EcalTPGTowerStatus * TTStatus=TTStatusRcd_.product();
103  const EcalTPGTowerStatusMap &towerMap=TTStatus->getMap();
104 
105  edm::ESHandle<EcalTPGStripStatus> StripStatusRcd_;
106  _es.get<EcalTPGStripStatusRcd>().get(StripStatusRcd_);
107  const EcalTPGStripStatus * StripStatus=StripStatusRcd_.product();
108  const EcalTPGStripStatusMap &stripMap=StripStatus->getMap();
109 
110  MESet& meTTMaskMap(MEs_.at("TTMaskMap"));
111 
112  for(EcalTPGTowerStatusMap::const_iterator ttItr(towerMap.begin()); ttItr != towerMap.end(); ++ttItr){
113 
114  if ((*ttItr).second > 0)
115  {
116  const EcalTrigTowerDetId ttid((*ttItr).first);
117  //if(ttid.subDet() == EcalBarrel)
118  meTTMaskMap.fill(ttid,1);
119  }//masked
120  }//loop on towers
121 
122  for(EcalTPGStripStatusMap::const_iterator stItr(stripMap.begin()); stItr != stripMap.end(); ++stItr){
123 
124  if ((*stItr).second > 0)
125  {
126  const EcalElectronicsId stid((*stItr).first);
127  //if(stid.subdet() == EcalEndcap);
128  meTTMaskMap.fill(stid,1);
129  }//masked
130  }//loop on pseudo-strips
131 
132  // if(HLTCaloPath_.size() || HLTMuonPath_.size()){
133  // edm::TriggerResultsByName results(_evt.triggerResultsByName("HLT"));
134  // if(!results.isValid()) results = _evt.triggerResultsByName("RECO");
135  // if(results.isValid()){
136  // const vector<string>& pathNames(results.triggerNames());
137 
138  // size_t caloStar(HLTCaloPath_.find('*'));
139  // if(caloStar != string::npos){
140  // string caloSub(HLTCaloPath_.substr(0, caloStar));
141  // bool found(false);
142  // for(unsigned iP(0); iP < pathNames.size(); ++iP){
143  // if(pathNames[iP].substr(0, caloStar) == caloSub){
144  // HLTCaloPath_ = pathNames[iP];
145  // found = true;
146  // break;
147  // }
148  // }
149  // if(!found) HLTCaloPath_ = "";
150  // }
151 
152  // size_t muonStar(HLTMuonPath_.find('*'));
153  // if(muonStar != string::npos){
154  // string muonSub(HLTMuonPath_.substr(0, muonStar));
155  // bool found(false);
156  // for(unsigned iP(0); iP < pathNames.size(); ++iP){
157  // if(pathNames[iP].substr(0, muonStar) == muonSub){
158  // HLTMuonPath_ = pathNames[iP];
159  // found = true;
160  // break;
161  // }
162  // }
163  // if(!found) HLTMuonPath_ = "";
164  // }
165 
166  // if(HLTCaloPath_.size()){
167  // try{
168  // HLTCaloBit_ = results.accept(HLTCaloPath_);
169  // }
170  // catch(cms::Exception e){
171  // if(e.category() != "LogicError") throw e;
172  // HLTCaloPath_ = "";
173  // }
174  // }
175  // if(HLTMuonPath_.size()){
176  // try{
177  // HLTMuonBit_ = results.accept(HLTMuonPath_);
178  // }
179  // catch(cms::Exception e){
180  // if(e.category() != "LogicError") throw e;
181  // HLTMuonPath_ = "";
182  // }
183  // }
184  // }
185  // }
186  }
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
const BSTRecord & getBST() const
Definition: TCDSRecord.h:104
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
const std::map< uint32_t, uint16_t > & getMap() const
uint16_t const getBeamMode() const
Definition: BSTRecord.h:73
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:63
bool isValid() const
Definition: HandleBase.h:74
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
MESetCollection MEs_
Definition: DQWorker.h:75
const std::map< uint32_t, uint16_t > & getMap() const
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TrigPrimTask.h:54
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
T const * product() const
Definition: ESHandle.h:86
void ecaldqm::TrigPrimTask::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 64 of file TrigPrimTask.cc.

References lhcStatusSet_, and ecaldqm::DQWorker::MEs_.

Referenced by ~TrigPrimTask().

65  {
66  // Reset by LS plots at beginning of every LS
67  MEs_.at("EtSummaryByLumi").reset();
68  MEs_.at("LHCStatusByLumi").reset(-1);
69 
70  // Reset lhcStatusSet_ to false at the beginning of each LS; when LHC status is set in some event this variable will be set to true
71  lhcStatusSet_ = false;
72  }
MESetCollection MEs_
Definition: DQWorker.h:75
void ecaldqm::TrigPrimTask::beginRun ( edm::Run const &  ,
edm::EventSetup const &  _es 
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 54 of file TrigPrimTask.cc.

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

Referenced by ~TrigPrimTask().

55  {
56  // Read-in Status records:
57  // Status records stay constant over run so they are read-in only once here
58  // but filled by LS in runOnRealTPs() because MEs are not yet booked at beginRun()
59  _es.get<EcalTPGTowerStatusRcd>().get( TTStatusRcd );
60  _es.get<EcalTPGStripStatusRcd>().get( StripStatusRcd );
61  }
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:59
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:60
template<typename DigiCollection >
void ecaldqm::TrigPrimTask::runOnDigis ( DigiCollection const &  _digis)

Definition at line 190 of file TrigPrimTask.cc.

References ecaldqm::getTrigTowerMap(), DetId::rawId(), and towerReadouts_.

Referenced by analyze(), and ~TrigPrimTask().

191  {
192  for(typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
193  EcalTrigTowerDetId ttid(getTrigTowerMap()->towerOf(digiItr->id()));
194  towerReadouts_[ttid.rawId()]++;
195  }
196  }
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
void ecaldqm::TrigPrimTask::runOnEmulTPs ( EcalTrigPrimDigiCollection const &  _tps)

Definition at line 306 of file TrigPrimTask.cc.

References edm::SortedCollection< T, SORT >::begin(), EcalTrigTowerConstituentsMap::constituentsOf(), DEFINE_ECALDQM_WORKER, edm::SortedCollection< T, SORT >::end(), stringResolutionProvider_cfi::et, edm::SortedCollection< T, SORT >::find(), ecaldqm::getTrigTowerMap(), match(), ecaldqm::DQWorker::MEs_, realTps_, and towerReadouts_.

Referenced by analyze(), and ~TrigPrimTask().

307  {
308  MESet& meEtMaxEmul(MEs_.at("EtMaxEmul"));
309  MESet& meEmulMaxIndex(MEs_.at("EmulMaxIndex"));
310  MESet& meMatchedIndex(MEs_.at("MatchedIndex"));
311  MESet& meEtEmulError(MEs_.at("EtEmulError"));
312  MESet& meFGEmulError(MEs_.at("FGEmulError"));
313  MESet& meRealvEmulEt(MEs_.at("RealvEmulEt"));
314 
315  for(EcalTrigPrimDigiCollection::const_iterator tpItr(_tps.begin()); tpItr != _tps.end(); ++tpItr){
316  EcalTrigTowerDetId ttid(tpItr->id());
317 
318  int et(tpItr->compressedEt());
319 
320  float maxEt(0.);
321  int iMax(0);
322  for(int iDigi(0); iDigi < 5; iDigi++){
323  float sampleEt((*tpItr)[iDigi].compressedEt());
324 
325  if(sampleEt > maxEt){
326  maxEt = sampleEt;
327  iMax = iDigi + 1;
328  }
329  }
330 
331  meEtMaxEmul.fill(ttid, maxEt);
332  if(maxEt > 0.)
333  meEmulMaxIndex.fill(ttid, iMax);
334 
335  bool match(true);
336  bool matchFG(true);
337 
338  // Loop over real TPs and look for an emulated TP index with matching Et:
339  // If an Et match is found, return TP index correpsonding to BX of emulated TP where match was found
340  // 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 }
342  if(realItr != realTps_->end()){
343 
344  int realEt(realItr->compressedEt());
345 
346  if(realEt > 0){
347 
348  int ttF(realItr->ttFlag());
349  if((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] == getTrigTowerMap()->constituentsOf(ttid).size()){
350 
351  if(et != realEt) match = false;
352  if(tpItr->fineGrain() != realItr->fineGrain()) matchFG = false;
353 
354  // NOTE: matchedIndex comparison differs from Standard TPG comparison:
355  // { matchedIndex:TP index } = { 0:no emul, 1:BX-2, 2:BX-1, 3:in-time, 4:BX+1, 5:BX+2 }
356  std::vector<int> matchedIndex(0);
357  // iDigi only loops over explicit Et matches:
358  // { iDigi:TP index } = { 0:BX-2, 1:BX-1, 2:in-time, 3:BX+1, 4:BX+2 }
359  for(int iDigi(0); iDigi < 5; iDigi++){
360  if((*tpItr)[iDigi].compressedEt() == realEt) {
361  // matchedIndex = iDigi + 1
362  if (iDigi != 2) {
363  matchedIndex.push_back(iDigi + 1);
364  }
365  // If an in-time match is found, exit loop and clear out any other matches:
366  // Ensures multiple matches are not returned (e.g. during saturation)
367  else {
368  matchedIndex.clear();
369  matchedIndex.push_back(3); // Et match is to in-time emulated TP
370  break;
371  }
372  } // Et match found
373  } // iDigi
374  if(matchedIndex.empty()) matchedIndex.push_back(0); // no Et match found => no emul
375 
376  // Fill Real vs Emulated TP Et
377  meRealvEmulEt.fill( ttid,realEt,(*tpItr)[2].compressedEt() ); // iDigi=2:in-time BX
378 
379  // Fill matchedIndex ME
380  for(std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end(); ++matchItr){
381  meMatchedIndex.fill(ttid, *matchItr + 0.5);
382 
383  // timing information is only within emulated TPs (real TPs have one time sample)
384  // if(HLTCaloBit_) MEs_[kTimingCalo].fill(ttid, float(*matchItr));
385  // if(HLTMuonBit_) MEs_[kTimingMuon].fill(ttid, float(*matchItr));
386  }
387  }
388 
389  }
390  }
391  else{
392  match = false;
393  matchFG = false;
394  }
395 
396  if(!match) meEtEmulError.fill(ttid);
397  if(!matchFG) meFGEmulError.fill(ttid);
398  }
399  }
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
const_iterator end() const
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
MESetCollection MEs_
Definition: DQWorker.h:75
et
define resolution functions of each parameter
iterator find(key_type k)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
void ecaldqm::TrigPrimTask::runOnRealTPs ( EcalTrigPrimDigiCollection const &  _tps)

Definition at line 205 of file TrigPrimTask.cc.

References edm::SortedCollection< T, SORT >::begin(), bxBin_, EcalTrigTowerConstituentsMap::constituentsOf(), EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), stringResolutionProvider_cfi::et, ecaldqm::getElectronicsMap(), ecaldqm::getTrigTowerMap(), ecaldqm::DQWorker::MEs_, edm::ESHandle< T >::product(), realTps_, StripStatusRcd, EcalTriggerElectronicsId::tccId(), towerReadouts_, EcalTriggerElectronicsId::ttId(), and TTStatusRcd.

Referenced by analyze(), and ~TrigPrimTask().

206  {
207  MESet& meEtVsBx(MEs_.at("EtVsBx"));
208  MESet& meEtReal(MEs_.at("EtReal"));
209  MESet& meEtRealMap(MEs_.at("EtRealMap"));
210  MESet& meEtSummary(MEs_.at("EtSummary"));
211  MESet& meEtSummaryByLumi(MEs_.at("EtSummaryByLumi"));
212  MESet& meLowIntMap(MEs_.at("LowIntMap"));
213  MESet& meMedIntMap(MEs_.at("MedIntMap"));
214  MESet& meHighIntMap(MEs_.at("HighIntMap"));
215  MESet& meTTFlags(MEs_.at("TTFlags"));
216  MESet& meTTFlagsVsEt(MEs_.at("TTFlagsVsEt"));
217  MESet& meTTFlags4( MEs_.at("TTFlags4") );
218  MESet& meTTFMismatch(MEs_.at("TTFMismatch"));
219  MESet& meOccVsBx(MEs_.at("OccVsBx"));
220 
221  realTps_ = &_tps;
222 
223  double nTP[] = {0., 0., 0.};
224 
225  for(EcalTrigPrimDigiCollection::const_iterator tpItr(_tps.begin()); tpItr != _tps.end(); ++tpItr){
226  EcalTrigTowerDetId ttid(tpItr->id());
227  float et(tpItr->compressedEt());
228 
229  if(et > 0.){
230  if(ttid.subDet() == EcalBarrel)
231  nTP[0] += 1.;
232  else if(ttid.zside() < 0)
233  nTP[1] += 1.;
234  else
235  nTP[2] += 2.;
236  meEtVsBx.fill(ttid, bxBin_, et);
237  }
238 
239  meEtReal.fill(ttid, et);
240  meEtRealMap.fill(ttid, et);
241  meEtSummary.fill(ttid, et);
242  meEtSummaryByLumi.fill(ttid, et);
243 
244  int interest(tpItr->ttFlag() & 0x3);
245 
246  switch(interest){
247  case 0:
248  meLowIntMap.fill(ttid);
249  break;
250  case 1:
251  meMedIntMap.fill(ttid);
252  break;
253  case 3:
254  meHighIntMap.fill(ttid);
255  break;
256  default:
257  break;
258  }
259 
260  // Fill TT Flag MEs
261  int ttF( tpItr->ttFlag() );
262  meTTFlags.fill( ttid, 1.0*ttF );
263  meTTFlagsVsEt.fill(ttid, et, 1.0*ttF);
264  // Monitor occupancy of TTF=4
265  // which contains info about TT auto-masking
266  if ( ttF >= 4 )
267  meTTFlags4.fill( ttid );
268 
269  if((ttF == 1 || ttF == 3) && towerReadouts_[ttid.rawId()] != getTrigTowerMap()->constituentsOf(ttid).size())
270  meTTFMismatch.fill(ttid);
271  }
272 
273  meOccVsBx.fill( EcalBarrel, bxBin_, nTP[0]);
274  meOccVsBx.fill(-EcalEndcap, bxBin_, nTP[1]);
275  meOccVsBx.fill( EcalEndcap, bxBin_, nTP[2]);
276 
277  // Set TT/Strip Masking status in Ecal3P view
278  // Status Records are read-in at beginRun() but filled here
279  // Requestied by ECAL Trigger in addition to TTMaskMap plots in SM view
280  MESet& meTTMaskMapAll(MEs_.at("TTMaskMapAll"));
281 
282  // Fill from TT Status Rcd
283  const EcalTPGTowerStatus *TTStatus( TTStatusRcd.product() );
284  const EcalTPGTowerStatusMap &TTStatusMap( TTStatus->getMap() );
285  for( EcalTPGTowerStatusMap::const_iterator ttItr(TTStatusMap.begin()); ttItr != TTStatusMap.end(); ++ttItr ){
286  const EcalTrigTowerDetId ttid( ttItr->first );
287  if ( ttItr->second > 0 )
288  meTTMaskMapAll.setBinContent( ttid,1 ); // TT is masked
289  } // TTs
290 
291  // Fill from Strip Status Rcd
292  const EcalTPGStripStatus *StripStatus( StripStatusRcd.product() );
293  const EcalTPGStripStatusMap &StripStatusMap( StripStatus->getMap() );
294  for( EcalTPGStripStatusMap::const_iterator stItr(StripStatusMap.begin()); stItr != StripStatusMap.end(); ++stItr ){
295  const EcalTriggerElectronicsId stid( stItr->first );
296  // Since ME has kTriggerTower binning, convert to EcalTrigTowerDetId first
297  // In principle, setBinContent() could be implemented for EcalTriggerElectronicsId class as well
298  const EcalTrigTowerDetId ttid( getElectronicsMap()->getTrigTowerDetId(stid.tccId(), stid.ttId()) );
299  if ( stItr->second > 0 )
300  meTTMaskMapAll.setBinContent( ttid,1 ); // PseudoStrip is masked
301  } // PseudoStrips
302 
303  } // TrigPrimTask::runOnRealTPs()
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
EcalElectronicsMapping const * getElectronicsMap()
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:59
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:60
MESetCollection MEs_
Definition: DQWorker.h:75
et
define resolution functions of each parameter
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
T const * product() const
Definition: ESHandle.h:86
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
void ecaldqm::TrigPrimTask::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 34 of file TrigPrimTask.cc.

References edm::ParameterSet::getUntrackedParameter(), lhcStatusInfoCollectionTag_, ecaldqm::DQWorker::MEs_, runOnEmul_, and AlCaHLTBitMon_QueryRunRegistry::string.

35  {
36  runOnEmul_ = _params.getUntrackedParameter<bool>("runOnEmul");
37  if(!runOnEmul_){
38  MEs_.erase(std::string("EtMaxEmul"));
39  MEs_.erase(std::string("EmulMaxIndex"));
40  MEs_.erase(std::string("MatchedIndex"));
41  MEs_.erase(std::string("EtEmulError"));
42  MEs_.erase(std::string("FGEmulError"));
43  }
44  lhcStatusInfoCollectionTag_ = _params.getUntrackedParameter<edm::InputTag>("lhcStatusInfoCollectionTag", edm::InputTag("tcdsDigis", "tcdsRecord"));
45  }
MESetCollection MEs_
Definition: DQWorker.h:75
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:62
void ecaldqm::TrigPrimTask::setTokens ( edm::ConsumesCollector _collector)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 199 of file TrigPrimTask.cc.

References edm::ConsumesCollector::consumes(), lhcStatusInfoCollectionTag_, and lhcStatusInfoRecordToken_.

Referenced by ~TrigPrimTask().

200  {
202  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Class to contain information from TCDS FED.
Definition: TCDSRecord.h:21
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:63
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:62

Member Data Documentation

double ecaldqm::TrigPrimTask::bxBin_
private

Definition at line 55 of file TrigPrimTask.h.

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

std::array<int,nBXBins+1> ecaldqm::TrigPrimTask::bxBinEdges_
private

Definition at line 54 of file TrigPrimTask.h.

Referenced by beginEvent().

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

Definition at line 62 of file TrigPrimTask.h.

Referenced by setParams(), setTokens(), and TrigPrimTask().

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

Definition at line 63 of file TrigPrimTask.h.

Referenced by beginEvent(), and setTokens().

bool ecaldqm::TrigPrimTask::lhcStatusSet_
private

Definition at line 64 of file TrigPrimTask.h.

Referenced by beginEvent(), beginLuminosityBlock(), and TrigPrimTask().

EcalTrigPrimDigiCollection const* ecaldqm::TrigPrimTask::realTps_
private

Definition at line 45 of file TrigPrimTask.h.

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

bool ecaldqm::TrigPrimTask::runOnEmul_
private

Definition at line 47 of file TrigPrimTask.h.

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

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

Definition at line 60 of file TrigPrimTask.h.

Referenced by beginRun(), and runOnRealTPs().

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

Definition at line 57 of file TrigPrimTask.h.

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

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

Definition at line 59 of file TrigPrimTask.h.

Referenced by beginRun(), and runOnRealTPs().