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 76 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().

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

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

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

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

Definition at line 309 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().

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

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

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

Referenced by ~TrigPrimTask().

201  {
203  }
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().