CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
L1TdeStage2CaloLayer1 Class Reference

#include <L1TdeStage2CaloLayer1.h>

Inheritance diagram for L1TdeStage2CaloLayer1:
one::DQMEDAnalyzer< edm::one::WatchLuminosityBlocks > one::dqmimplementation::DQMBaseClass< T... >

Classes

class  SimpleTower
 

Public Member Functions

 L1TdeStage2CaloLayer1 (const edm::ParameterSet &ps)
 
 ~L1TdeStage2CaloLayer1 () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< edm::one::WatchLuminosityBlocks >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 

Private Types

typedef std::set< SimpleTowerSimpleTowerSet
 
enum  SummaryColumn {
  EtMismatch, ErMismatch, FbMismatch, TowerCountMismatch,
  NSummaryColumns
}
 

Private Member Functions

void updateMismatch (const edm::Event &e, int mismatchType)
 

Private Attributes

double dataEmulDenominator_
 
std::array< double, NSummaryColumnsdataEmulNumerator_
 
MonitorElementdataEmulSummary_
 
MonitorElementdataEtDistribution_
 
MonitorElementdataEtDistributionFBMismatch_
 
edm::InputTag dataLabel_
 
MonitorElementdataOcc_
 
edm::EDGetTokenT< l1t::CaloTowerBxCollectiondataSource_
 
MonitorElementemulEtDistribution_
 
edm::InputTag emulLabel_
 
MonitorElementemulOcc_
 
edm::EDGetTokenT< l1t::CaloTowerBxCollectionemulSource_
 
MonitorElementerMismatchByLumi_
 
MonitorElementerMismatchesPerBx_
 
MonitorElementetCorrelation_
 
MonitorElementetMismatchByLumi_
 
MonitorElementetMismatchDiff_
 
MonitorElementetMismatchesPerBx_
 
MonitorElementfailureOccErMismatch_
 
MonitorElementfailureOccEtDataZero_
 
MonitorElementfailureOccEtEmulZero_
 
MonitorElementfailureOccEtMismatch_
 
MonitorElementfailureOccFbMismatch_
 
MonitorElementfbCorrelation_
 
MonitorElementfbCorrelationHF_
 
MonitorElementfbMismatchByLumi_
 
MonitorElementfbMismatchesPerBx_
 
edm::EDGetTokenT< FEDRawDataCollectionfedRawData_
 
edm::EDGetTokenT< HcalTrigPrimDigiCollectionhcalTowers_
 
std::string histFolder_
 
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
 
MonitorElementlast20Mismatches_
 
size_t lastMismatchIndex_ {0}
 
MonitorElementmatchEtDistribution_
 
MonitorElementmatchOcc_
 
MonitorElementmismatchesPerBxMod9_
 
MonitorElementtowerCountMismatchesPerBx_
 
int tpFillThreshold_
 

Detailed Description

Definition at line 30 of file L1TdeStage2CaloLayer1.h.

Member Typedef Documentation

Definition at line 75 of file L1TdeStage2CaloLayer1.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1TdeStage2CaloLayer1::L1TdeStage2CaloLayer1 ( const edm::ParameterSet ps)

Definition at line 20 of file L1TdeStage2CaloLayer1.cc.

References dataEmulDenominator_, dataEmulNumerator_, mps_fire::i, and NSummaryColumns.

20  :
21  dataLabel_(ps.getParameter<edm::InputTag>("dataSource")),
22  dataSource_(consumes<CaloTowerBxCollection>(dataLabel_)),
23  emulLabel_(ps.getParameter<edm::InputTag>("emulSource")),
24  emulSource_(consumes<CaloTowerBxCollection>(emulLabel_)),
25  hcalTowers_(consumes<HcalTrigPrimDigiCollection>(edm::InputTag("l1tCaloLayer1Digis"))),
26  fedRawData_(consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("fedRawDataLabel"))),
27  histFolder_(ps.getParameter<std::string>("histFolder")),
28  tpFillThreshold_(ps.getUntrackedParameter<int>("etDistributionsFillThreshold", 0))
29 {
31  for(size_t i=0; i<NSummaryColumns; ++i) {
32  dataEmulNumerator_[i] = 0.;
33  }
34 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::array< double, NSummaryColumns > dataEmulNumerator_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > emulSource_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > dataSource_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTowers_
edm::EDGetTokenT< FEDRawDataCollection > fedRawData_
L1TdeStage2CaloLayer1::~L1TdeStage2CaloLayer1 ( )
override

Definition at line 36 of file L1TdeStage2CaloLayer1.cc.

37 {
38 }

Member Function Documentation

void L1TdeStage2CaloLayer1::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 44 of file L1TdeStage2CaloLayer1.cc.

References funct::abs(), BXVector< T >::begin(), edm::EventBase::bunchCrossing(), dataEmulDenominator_, dataEmulNumerator_, dataEmulSummary_, dataEtDistribution_, dataEtDistributionFBMismatch_, dataOcc_, dataSource_, emulEtDistribution_, emulOcc_, emulSource_, BXVector< T >::end(), ErMismatch, erMismatchByLumi_, erMismatchesPerBx_, PVValHelper::eta, etCorrelation_, EtMismatch, etMismatchByLumi_, etMismatchDiff_, etMismatchesPerBx_, failureOccErMismatch_, failureOccEtDataZero_, failureOccEtEmulZero_, failureOccEtMismatch_, failureOccFbMismatch_, fbCorrelation_, fbCorrelationHF_, FbMismatch, fbMismatchByLumi_, fbMismatchesPerBx_, FEDRawDataCollection::FEDData(), fedRawData_, MonitorElement::Fill(), MonitorElement::getTH1F(), ecalDrivenElectronSeedsParameters_cff::hcalTowers, hcalTowers_, mps_fire::i, edm::EventBase::id(), edm::HandleBase::isValid(), edm::EventID::luminosityBlock(), matchOcc_, mismatchesPerBxMod9_, NSummaryColumns, or, FEDRawData::size(), TowerCountMismatch, towerCountMismatchesPerBx_, tpFillThreshold_, and updateMismatch().

45 {
47  event.getByToken(dataSource_, dataTowers);
49  event.getByToken(emulSource_, emulTowers);
51  event.getByToken(hcalTowers_, hcalTowers);
52 
53  // Best way I know to check if FED in a run
54  edm::Handle<FEDRawDataCollection> fedRawDataCollection;
55  event.getByToken(fedRawData_, fedRawDataCollection);
56  bool caloLayer1OutOfRun{true};
57  bool caloLayer2OutOfRun{true};
58  if (fedRawDataCollection.isValid()) {
59  caloLayer1OutOfRun = false;
60  caloLayer2OutOfRun = false;
61  for(int iFed=1354; iFed<1360; iFed+=2) {
62  const FEDRawData& fedRawData = fedRawDataCollection->FEDData(iFed);
63  if ( fedRawData.size() == 0 ) {
64  caloLayer1OutOfRun = true;
65  continue; // In case one of 3 layer 1 FEDs not in
66  }
67  }
68  const FEDRawData& fedRawData = fedRawDataCollection->FEDData(1360);
69  if ( fedRawData.size() == 0 ) {
70  caloLayer2OutOfRun = true;
71  }
72  }
73 
74  if ( caloLayer1OutOfRun or caloLayer2OutOfRun ) {
75  // No point in comparing
76  return;
77  }
78 
79  // We'll fill sets, compare, and then dissect comparison failures after.
80  SimpleTowerSet dataTowerSet;
81  // BXVector::begin(int bx)
82  for ( auto iter = dataTowers->begin(0); iter != dataTowers->end(0); ++iter) {
83  const auto& tower = *iter;
84  int eta = tower.hwEta();
85  if ( eta == 29 ) eta = 30;
86  if ( eta == -29 ) eta = -30;
87  dataTowerSet.emplace(eta, tower.hwPhi(), tower.hwPt() + (tower.hwEtRatio()<<9) + (tower.hwQual()<<12), true);
88  if ( tower.hwPt() > tpFillThreshold_ ) {
89  dataOcc_->Fill(eta, tower.hwPhi());
90  dataEtDistribution_->Fill(tower.hwPt());
91  }
92  }
93  SimpleTowerSet emulTowerSet;
94  for ( auto iter = emulTowers->begin(0); iter != emulTowers->end(0); ++iter) {
95  const auto& tower = *iter;
96  emulTowerSet.emplace(tower.hwEta(), tower.hwPhi(), tower.hwPt() + (tower.hwEtRatio()<<9) + (tower.hwQual()<<12), false);
97  if ( tower.hwPt() > tpFillThreshold_ ) {
98  emulOcc_->Fill(tower.hwEta(), tower.hwPhi());
99  emulEtDistribution_->Fill(tower.hwPt());
100  }
101  }
102 
103  bool etMsmThisEvent{false};
104  bool erMsmThisEvent{false};
105  bool fbMsmThisEvent{false};
106  bool towerCountMsmThisEvent{false};
107 
108  if ( dataTowerSet.size() != emulTowerSet.size() ) {
109  // This will happen if either CaloLayer1 or CaloLayer2 are out of run (in which case we exit early)
110  // The problematic situation that we are monitoring is when we see both in, but one MP7 card is not sending fat events when it should
111  towerCountMismatchesPerBx_->Fill(event.bunchCrossing());
112  towerCountMsmThisEvent = true;
113  }
114  else {
115  auto dataIter = dataTowerSet.begin();
116  auto emulIter = emulTowerSet.begin();
117  while ( dataIter != dataTowerSet.end() && emulIter != emulTowerSet.end() ) {
118  auto dataTower = *(dataIter++);
119  auto emulTower = *(emulIter++);
120  assert(dataTower.ieta_==emulTower.ieta_ && dataTower.iphi_==emulTower.iphi_);
121 
122  etCorrelation_->Fill(dataTower.et(), emulTower.et());
123 
124  if ( abs(dataTower.ieta_) >= 30 ) {
125  fbCorrelationHF_->Fill(dataTower.fb(), emulTower.fb());
126  } else {
127  fbCorrelation_->Fill(dataTower.fb(), emulTower.fb());
128  }
129 
130  if ( dataTower.data_ == emulTower.data_ ) {
131  // Perfect match
132  if ( dataTower.et() > tpFillThreshold_ ) {
133  matchOcc_->Fill(dataTower.ieta_, dataTower.iphi_);
134  }
135  } else {
136  // Ok, now dissect the failure
137  if ( dataTower.et() != emulTower.et() ) {
138  if ( dataTower.et() == 0 ) failureOccEtDataZero_->Fill(dataTower.ieta_, dataTower.iphi_);
139  else if ( emulTower.et() == 0 ) failureOccEtEmulZero_->Fill(dataTower.ieta_, dataTower.iphi_);
140  else failureOccEtMismatch_->Fill(dataTower.ieta_, dataTower.iphi_);
141 
142  etMismatchDiff_->Fill(dataTower.et() - emulTower.et());
143  etMismatchByLumi_->Fill(event.id().luminosityBlock());
144  etMismatchesPerBx_->Fill(event.bunchCrossing());
145  etMsmThisEvent = true;
146  updateMismatch(event, 0);
147  }
148  if ( dataTower.er() != emulTower.er() ) {
149  failureOccErMismatch_->Fill(dataTower.ieta_, dataTower.iphi_);
150  erMismatchByLumi_->Fill(event.id().luminosityBlock());
151  erMismatchesPerBx_->Fill(event.bunchCrossing());
152  erMsmThisEvent = true;
153  updateMismatch(event, 1);
154  }
155  if ( dataTower.fb() != emulTower.fb() ) {
156  failureOccFbMismatch_->Fill(dataTower.ieta_, dataTower.iphi_);
157  fbMismatchByLumi_->Fill(event.id().luminosityBlock());
158  fbMismatchesPerBx_->Fill(event.bunchCrossing());
159  dataEtDistributionFBMismatch_->Fill(dataTower.et());
160  fbMsmThisEvent = true;
161  updateMismatch(event, 2);
162  }
163  }
164  }
165  }
166 
168  if ( etMsmThisEvent ) dataEmulNumerator_[EtMismatch] += 1;
169  if ( erMsmThisEvent ) dataEmulNumerator_[ErMismatch] += 1;
170  if ( fbMsmThisEvent ) dataEmulNumerator_[FbMismatch] += 1;
171  if ( towerCountMsmThisEvent ) dataEmulNumerator_[TowerCountMismatch] += 1;
172 
173  for(size_t i=0; i<NSummaryColumns; ++i) {
175  }
176  // GetEntries() increments every SetBinContent() call
178 
179  // To see if problems correlate with TMT cycle (i.e. an MP7-side issue)
180  if ( etMsmThisEvent or erMsmThisEvent or fbMsmThisEvent or towerCountMsmThisEvent ) {
181  mismatchesPerBxMod9_->Fill(event.bunchCrossing()%9);
182  }
183 }
const_iterator end(int bx) const
std::array< double, NSummaryColumns > dataEmulNumerator_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > emulSource_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > dataSource_
MonitorElement * erMismatchesPerBx_
TH1F * getTH1F() const
MonitorElement * fbCorrelationHF_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTowers_
MonitorElement * fbMismatchesPerBx_
MonitorElement * dataEmulSummary_
MonitorElement * failureOccErMismatch_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
MonitorElement * fbCorrelation_
void Fill(long long x)
void updateMismatch(const edm::Event &e, int mismatchType)
MonitorElement * dataEtDistributionFBMismatch_
std::set< SimpleTower > SimpleTowerSet
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * failureOccEtDataZero_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
MonitorElement * failureOccEtMismatch_
MonitorElement * dataEtDistribution_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * emulEtDistribution_
MonitorElement * erMismatchByLumi_
MonitorElement * etMismatchDiff_
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * etMismatchesPerBx_
MonitorElement * etMismatchByLumi_
MonitorElement * mismatchesPerBxMod9_
MonitorElement * failureOccFbMismatch_
MonitorElement * failureOccEtEmulZero_
MonitorElement * etCorrelation_
const_iterator begin(int bx) const
edm::EDGetTokenT< FEDRawDataCollection > fedRawData_
Definition: event.py:1
MonitorElement * towerCountMismatchesPerBx_
MonitorElement * fbMismatchByLumi_
void L1TdeStage2CaloLayer1::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overrideprotected

Definition at line 199 of file L1TdeStage2CaloLayer1.cc.

References MonitorElement::getTH2F(), last20MismatchArray_, last20Mismatches_, lastMismatchIndex_, and MonitorElement::setBinContent().

199  {
200  // Ugly way to loop backwards through the last 20 mismatches
201  for (size_t ibin=1, imatch=lastMismatchIndex_; ibin<=20; ibin++, imatch=(imatch+19)%20) {
202  last20Mismatches_->getTH2F()->GetYaxis()->SetBinLabel(ibin, last20MismatchArray_.at(imatch).first.c_str());
203  for(int itype=0; itype<4; ++itype) {
204  int binContent = (last20MismatchArray_.at(imatch).second>>itype) & 1;
205  last20Mismatches_->setBinContent(itype+1, ibin, binContent);
206  }
207  }
208 }
void setBinContent(int binx, double content)
set content of bin (1-D)
TH2F * getTH2F() const
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
MonitorElement * last20Mismatches_
void L1TdeStage2CaloLayer1::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run run,
const edm::EventSetup es 
)
overrideprotected

Definition at line 218 of file L1TdeStage2CaloLayer1.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), dataEmulSummary_, dataEtDistribution_, dataEtDistributionFBMismatch_, dataOcc_, emulEtDistribution_, emulOcc_, ErMismatch, erMismatchByLumi_, erMismatchesPerBx_, etCorrelation_, EtMismatch, etMismatchByLumi_, etMismatchDiff_, etMismatchesPerBx_, failureOccErMismatch_, failureOccEtDataZero_, failureOccEtEmulZero_, failureOccEtMismatch_, failureOccFbMismatch_, fbCorrelation_, fbCorrelationHF_, FbMismatch, fbMismatchByLumi_, fbMismatchesPerBx_, MonitorElement::getTH1F(), MonitorElement::getTH2F(), histFolder_, mps_fire::i, last20MismatchArray_, last20Mismatches_, matchEtDistribution_, matchOcc_, mismatchesPerBxMod9_, dataset::name, NSummaryColumns, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, TowerCountMismatch, and towerCountMismatchesPerBx_.

219 {
220  auto bookEt = [&ibooker](std::string name, std::string title) {
221  title += ";Raw ET value";
222  return ibooker.book1D(name, title, 512, -0.5, 511.5);
223  };
224  auto bookEtDiff = [&ibooker](std::string name, std::string title) {
225  title += ";#Delta raw ET value";
226  return ibooker.book1D(name, title, 1023, -511.5, 511.5);
227  };
228  auto bookEtCorrelation = [&ibooker](std::string name, std::string title) {
229  return ibooker.book2D(name, title, 512, -0.5, 511.5, 512, -0.5, 511.5);
230  };
231  auto bookOccupancy = [&ibooker](std::string name, std::string title) {
232  title += ";i#eta;i#phi";
233  return ibooker.book2D(name, title, 83, -41.5, 41.5, 72, 0.5, 72.5);
234  };
235 
236  ibooker.setCurrentFolder(histFolder_+"/");
237  dataEmulSummary_ = ibooker.book1D("dataEmulSummary", "CaloLayer1 data-emul mismatch frac. (entries=evts processed)", NSummaryColumns, 0., double(NSummaryColumns));
238  dataEmulSummary_->getTH1F()->GetYaxis()->SetTitle("Fraction events with mismatch");
239  dataEmulSummary_->getTH1F()->GetXaxis()->SetBinLabel(1+EtMismatch, "Et");
240  dataEmulSummary_->getTH1F()->GetXaxis()->SetBinLabel(1+ErMismatch, "Et ratio");
241  dataEmulSummary_->getTH1F()->GetXaxis()->SetBinLabel(1+FbMismatch, "Feature bit");
242  dataEmulSummary_->getTH1F()->GetXaxis()->SetBinLabel(1+TowerCountMismatch, "CaloTower readout");
243  mismatchesPerBxMod9_ = ibooker.book1D("mismatchesPerBxMod9", "CaloLayer1 data-emulator mismatch per bx%9;Bunch crossing mod 9;Counts", 9, -0.5, 8.5);
244 
245  ibooker.setCurrentFolder(histFolder_+"/Occupancies");
246 
247  dataOcc_ = bookOccupancy("dataOcc", "Tower Occupancy for Data");
248  emulOcc_ = bookOccupancy("emulOcc", "Tower Occupancy for Emulator");
249  matchOcc_ = bookOccupancy("matchOcc", "Tower Occupancy for Data/Emulator Full Matches");
250  failureOccEtMismatch_ = bookOccupancy("failureOccEtMismatch", "Tower Occupancy for Data/Emulator ET Mismatch");
251  failureOccEtDataZero_ = bookOccupancy("failureOccEtDataZero", "Tower Occupancy for Data ET Zero, Emul Nonzero");
252  failureOccEtEmulZero_ = bookOccupancy("failureOccEtEmulZero", "Tower Occupancy for Data ET Nonzero, Emul Zero");
253  failureOccErMismatch_ = bookOccupancy("failureOccErMismatch", "Tower Occupancy for Data/Emulator ET Ratio Mismatch");
254  failureOccFbMismatch_ = bookOccupancy("failureOccFbMismatch", "Tower Occupancy for Data/Emulator Feature Bit Mismatch");
255 
256  ibooker.setCurrentFolder(histFolder_+"/EtDistributions");
257  dataEtDistribution_ = bookEt("dataEtDistribution", "ET distribution for towers in data");
258  dataEtDistributionFBMismatch_ = bookEt("dataEtDistributionFBMismatch", "ET distribution for towers in data when FB Mismatch");
259  emulEtDistribution_ = bookEt("emulEtDistribution", "ET distribution for towers in emulator");
260  etCorrelation_ = bookEtCorrelation("EtCorrelation", "Et correlation for all towers;Data tower Et;Emulator tower Et");
261  matchEtDistribution_ = bookEt("matchEtDistribution", "ET distribution for towers matched between data and emulator");
262  etMismatchDiff_ = bookEtDiff("etMismatchDiff", "ET difference (data-emulator) for ET mismatches");
263  fbCorrelation_ = ibooker.book2D("FbCorrelation", "Feature Bit correlation for BE;Data;Emulator", 16, -0.5, 15.5, 16, -0.5, 15.5);
264  fbCorrelationHF_ = ibooker.book2D("FbCorrelationHF", "Feature Bit correlation for HF;Data;Emulator", 16, -0.5, 15.5, 16, -0.5, 15.5);
265 
266  ibooker.setCurrentFolder(histFolder_+"/MismatchDetail");
267 
268  const int nLumis = 2000;
269  etMismatchByLumi_ = ibooker.book1D("etMismatchByLumi", "ET Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
270  erMismatchByLumi_ = ibooker.book1D("erMismatchByLumi", "ET Ratio Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
271  fbMismatchByLumi_ = ibooker.book1D("fbMismatchByLumi", "Feature Bit Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
272 
273  etMismatchesPerBx_ = ibooker.book1D("etMismatchesPerBx", "ET Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
274  erMismatchesPerBx_ = ibooker.book1D("erMismatchesPerBx", "ET Ratio Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
275  fbMismatchesPerBx_ = ibooker.book1D("fbMismatchesPerBx", "Feature Bit Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
276  towerCountMismatchesPerBx_ = ibooker.book1D("towerCountMismatchesPerBx", "CaloTower size mismatch counts per bunch crossing", 3564, -.5, 3563.5);
277 
278  last20Mismatches_ = ibooker.book2D("last20Mismatches",
279  "Log of last 20 mismatches (use json tool to copy/paste)",
280  4, 0, 4, 20, 0, 20);
281  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(1, "Et Mismatch");
282  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(2, "Et ratio Mismatch");
283  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(3, "Feature bit Mismatch");
284  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(4, "-");
285  for (size_t i=0; i<last20MismatchArray_.size(); ++i) last20MismatchArray_[i] = {"-"+std::to_string(i), 0};
286  for (size_t i=1; i<=20; ++i) last20Mismatches_->getTH2F()->GetYaxis()->SetBinLabel(i, ("-"+std::to_string(i)).c_str());
287 }
MonitorElement * erMismatchesPerBx_
TH1F * getTH1F() const
MonitorElement * fbCorrelationHF_
MonitorElement * fbMismatchesPerBx_
MonitorElement * dataEmulSummary_
MonitorElement * failureOccErMismatch_
MonitorElement * fbCorrelation_
MonitorElement * dataEtDistributionFBMismatch_
MonitorElement * failureOccEtDataZero_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * matchEtDistribution_
MonitorElement * failureOccEtMismatch_
MonitorElement * dataEtDistribution_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * emulEtDistribution_
MonitorElement * erMismatchByLumi_
MonitorElement * etMismatchDiff_
MonitorElement * etMismatchesPerBx_
TH2F * getTH2F() const
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * etMismatchByLumi_
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
MonitorElement * last20Mismatches_
MonitorElement * mismatchesPerBxMod9_
MonitorElement * failureOccFbMismatch_
MonitorElement * failureOccEtEmulZero_
MonitorElement * etCorrelation_
MonitorElement * towerCountMismatchesPerBx_
MonitorElement * fbMismatchByLumi_
void L1TdeStage2CaloLayer1::dqmBeginRun ( const edm::Run ,
const edm::EventSetup  
)
overrideprotected

Definition at line 40 of file L1TdeStage2CaloLayer1.cc.

41 {
42 }
void L1TdeStage2CaloLayer1::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup  
)
overrideprotected

Definition at line 210 of file L1TdeStage2CaloLayer1.cc.

References erMismatchByLumi_, etMismatchByLumi_, fbMismatchByLumi_, MonitorElement::getTH1F(), edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

210  {
211  auto id = static_cast<double>(lumi.id().luminosityBlock()); // uint64_t
212  // Simple way to embed current lumi to auto-scale axis limits in render plugin
213  etMismatchByLumi_->getTH1F()->SetBinContent(0, id);
214  erMismatchByLumi_->getTH1F()->SetBinContent(0, id);
215  fbMismatchByLumi_->getTH1F()->SetBinContent(0, id);
216 }
LuminosityBlockID id() const
TH1F * getTH1F() const
MonitorElement * erMismatchByLumi_
MonitorElement * etMismatchByLumi_
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * fbMismatchByLumi_
void L1TdeStage2CaloLayer1::updateMismatch ( const edm::Event e,
int  mismatchType 
)
private

Definition at line 185 of file L1TdeStage2CaloLayer1.cc.

References event(), edm::EventBase::id(), last20MismatchArray_, lastMismatchIndex_, writedatasetfile::run, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

185  {
186  auto id = e.id();
187  std::string eventString{std::to_string(id.run()) + ":" + std::to_string(id.luminosityBlock()) + ":" + std::to_string(id.event())};
188  if ( last20MismatchArray_.at(lastMismatchIndex_).first == eventString ) {
189  // same event
190  last20MismatchArray_.at(lastMismatchIndex_).second |= 1<<mismatchType;
191  }
192  else {
193  // New event, advance
195  last20MismatchArray_.at(lastMismatchIndex_) = {eventString, 1<<mismatchType};
196  }
197 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
edm::EventID id() const
Definition: EventBase.h:59

Member Data Documentation

double L1TdeStage2CaloLayer1::dataEmulDenominator_
private

Definition at line 86 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and L1TdeStage2CaloLayer1().

std::array<double, NSummaryColumns> L1TdeStage2CaloLayer1::dataEmulNumerator_
private

Definition at line 85 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and L1TdeStage2CaloLayer1().

MonitorElement* L1TdeStage2CaloLayer1::dataEmulSummary_
private

Definition at line 84 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::dataEtDistribution_
private

Definition at line 98 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::dataEtDistributionFBMismatch_
private

Definition at line 99 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TdeStage2CaloLayer1::dataLabel_
private

Definition at line 45 of file L1TdeStage2CaloLayer1.h.

MonitorElement* L1TdeStage2CaloLayer1::dataOcc_
private

Definition at line 89 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<l1t::CaloTowerBxCollection> L1TdeStage2CaloLayer1::dataSource_
private

Definition at line 46 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze().

MonitorElement* L1TdeStage2CaloLayer1::emulEtDistribution_
private

Definition at line 100 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TdeStage2CaloLayer1::emulLabel_
private

Definition at line 47 of file L1TdeStage2CaloLayer1.h.

MonitorElement* L1TdeStage2CaloLayer1::emulOcc_
private

Definition at line 90 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<l1t::CaloTowerBxCollection> L1TdeStage2CaloLayer1::emulSource_
private

Definition at line 48 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze().

MonitorElement* L1TdeStage2CaloLayer1::erMismatchByLumi_
private

Definition at line 108 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TdeStage2CaloLayer1::erMismatchesPerBx_
private

Definition at line 112 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::etCorrelation_
private

Definition at line 101 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::etMismatchByLumi_
private

Definition at line 107 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TdeStage2CaloLayer1::etMismatchDiff_
private

Definition at line 103 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::etMismatchesPerBx_
private

Definition at line 111 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::failureOccErMismatch_
private

Definition at line 95 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::failureOccEtDataZero_
private

Definition at line 93 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::failureOccEtEmulZero_
private

Definition at line 94 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::failureOccEtMismatch_
private

Definition at line 92 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::failureOccFbMismatch_
private

Definition at line 96 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::fbCorrelation_
private

Definition at line 104 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::fbCorrelationHF_
private

Definition at line 105 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::fbMismatchByLumi_
private

Definition at line 109 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TdeStage2CaloLayer1::fbMismatchesPerBx_
private

Definition at line 113 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<FEDRawDataCollection> L1TdeStage2CaloLayer1::fedRawData_
private

Definition at line 50 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze().

edm::EDGetTokenT<HcalTrigPrimDigiCollection> L1TdeStage2CaloLayer1::hcalTowers_
private

Definition at line 49 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze().

std::string L1TdeStage2CaloLayer1::histFolder_
private

Definition at line 51 of file L1TdeStage2CaloLayer1.h.

Referenced by bookHistograms().

std::array<std::pair<std::string, int>, 20> L1TdeStage2CaloLayer1::last20MismatchArray_
private

Definition at line 117 of file L1TdeStage2CaloLayer1.h.

Referenced by beginLuminosityBlock(), bookHistograms(), and updateMismatch().

MonitorElement* L1TdeStage2CaloLayer1::last20Mismatches_
private

Definition at line 116 of file L1TdeStage2CaloLayer1.h.

Referenced by beginLuminosityBlock(), and bookHistograms().

size_t L1TdeStage2CaloLayer1::lastMismatchIndex_ {0}
private

Definition at line 118 of file L1TdeStage2CaloLayer1.h.

Referenced by beginLuminosityBlock(), and updateMismatch().

MonitorElement* L1TdeStage2CaloLayer1::matchEtDistribution_
private

Definition at line 102 of file L1TdeStage2CaloLayer1.h.

Referenced by bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::matchOcc_
private

Definition at line 91 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::mismatchesPerBxMod9_
private

Definition at line 87 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TdeStage2CaloLayer1::towerCountMismatchesPerBx_
private

Definition at line 114 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

int L1TdeStage2CaloLayer1::tpFillThreshold_
private

Definition at line 52 of file L1TdeStage2CaloLayer1.h.

Referenced by analyze().