CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TStage2CaloLayer1 Class Reference

#include <L1TStage2CaloLayer1.h>

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

Public Member Functions

 L1TStage2CaloLayer1 (const edm::ParameterSet &ps)
 
 ~L1TStage2CaloLayer1 () 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 Member Functions

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

Private Attributes

MonitorElementbxidErrors_
 
MonitorElementecalDiscrepancy_
 
MonitorElementecalLinkError_
 
MonitorElementecalLinkErrorByLumi_
 
MonitorElementecalMismatchByLumi_
 
MonitorElementECALmismatchesPerBx_
 
MonitorElementecalOccEtDiscrepancy_
 
MonitorElementecalOccFgDiscrepancy_
 
MonitorElementecalOccLinkMasked_
 
MonitorElementecalOccNoMatch_
 
MonitorElementecalOccRecdEtWgt_
 
MonitorElementecalOccRecdFgVB_
 
MonitorElementecalOccRecdNotSent_
 
MonitorElementecalOccSent_
 
MonitorElementecalOccSentAndRecd_
 
MonitorElementecalOccSentFgVB_
 
MonitorElementecalOccSentNotRecd_
 
MonitorElementecalOccTowerMasked_
 
MonitorElementecalOccupancy_
 
MonitorElementecalTPRawEtCorrelation_
 
MonitorElementecalTPRawEtDiffNoMatch_
 
MonitorElementecalTPRawEtRecd_
 
MonitorElementecalTPRawEtSent_
 
MonitorElementecalTPRawEtSentAndRecd_
 
std::vector< std::pair< EcalTriggerPrimitiveDigi, EcalTriggerPrimitiveDigi > > ecalTPSentRecd_
 
edm::EDGetTokenT< EcalTrigPrimDigiCollectionecalTPSourceRecd_
 
std::string ecalTPSourceRecdLabel_
 
edm::EDGetTokenT< EcalTrigPrimDigiCollectionecalTPSourceSent_
 
std::string ecalTPSourceSentLabel_
 
edm::EDGetTokenT< FEDRawDataCollectionfedRawData_
 
MonitorElementHBHEmismatchesPerBx_
 
MonitorElementhcalDiscrepancy_
 
MonitorElementhcalLinkError_
 
MonitorElementhcalLinkErrorByLumi_
 
MonitorElementhcalMismatchByLumi_
 
MonitorElementhcalOccEtDiscrepancy_
 
MonitorElementhcalOccFb2Discrepancy_
 
MonitorElementhcalOccFbDiscrepancy_
 
MonitorElementhcalOccLinkMasked_
 
MonitorElementhcalOccNoMatch_
 
MonitorElementhcalOccRecdEtWgt_
 
MonitorElementhcalOccRecdFb2_
 
MonitorElementhcalOccRecdFb_
 
MonitorElementhcalOccRecdNotSent_
 
MonitorElementhcalOccSent_
 
MonitorElementhcalOccSentAndRecd_
 
MonitorElementhcalOccSentFb2_
 
MonitorElementhcalOccSentFb_
 
MonitorElementhcalOccSentNotRecd_
 
MonitorElementhcalOccTowerMasked_
 
MonitorElementhcalOccupancy_
 
MonitorElementhcalTPRawEtCorrelationHBHE_
 
MonitorElementhcalTPRawEtCorrelationHF_
 
MonitorElementhcalTPRawEtDiffNoMatch_
 
MonitorElementhcalTPRawEtRecd_
 
MonitorElementhcalTPRawEtSent_
 
MonitorElementhcalTPRawEtSentAndRecd_
 
std::vector< std::pair< HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi > > hcalTPSentRecd_
 
edm::EDGetTokenT< HcalTrigPrimDigiCollectionhcalTPSourceRecd_
 
std::string hcalTPSourceRecdLabel_
 
edm::EDGetTokenT< HcalTrigPrimDigiCollectionhcalTPSourceSent_
 
std::string hcalTPSourceSentLabel_
 
MonitorElementHFmismatchesPerBx_
 
std::string histFolder_
 
bool ignoreHFfbs_
 
MonitorElementl1idErrors_
 
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
 
MonitorElementlast20Mismatches_
 
size_t lastMismatchIndex_ {0}
 
MonitorElementmaxEvtLinkErrorsByLumi_
 
MonitorElementmaxEvtLinkErrorsByLumiECAL_
 
MonitorElementmaxEvtLinkErrorsByLumiHCAL_
 
int maxEvtLinkErrorsECALCurrentLumi_ {0}
 
int maxEvtLinkErrorsHCALCurrentLumi_ {0}
 
MonitorElementmaxEvtMismatchByLumi_
 
MonitorElementmaxEvtMismatchByLumiECAL_
 
MonitorElementmaxEvtMismatchByLumiHCAL_
 
int maxEvtMismatchECALCurrentLumi_ {0}
 
int maxEvtMismatchHCALCurrentLumi_ {0}
 
MonitorElementorbitErrors_
 
int tpFillThreshold_
 

Detailed Description

Definition at line 61 of file L1TStage2CaloLayer1.h.

Constructor & Destructor Documentation

L1TStage2CaloLayer1::L1TStage2CaloLayer1 ( const edm::ParameterSet ps)

Definition at line 20 of file L1TStage2CaloLayer1.cc.

References ecalTPSentRecd_, and hcalTPSentRecd_.

20  :
21  ecalTPSourceRecd_(consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("ecalTPSourceRecd"))),
22  ecalTPSourceRecdLabel_(ps.getParameter<edm::InputTag>("ecalTPSourceRecd").label()),
23  hcalTPSourceRecd_(consumes<HcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("hcalTPSourceRecd"))),
24  hcalTPSourceRecdLabel_(ps.getParameter<edm::InputTag>("hcalTPSourceRecd").label()),
25  ecalTPSourceSent_(consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("ecalTPSourceSent"))),
26  ecalTPSourceSentLabel_(ps.getParameter<edm::InputTag>("ecalTPSourceSent").label()),
27  hcalTPSourceSent_(consumes<HcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("hcalTPSourceSent"))),
28  hcalTPSourceSentLabel_(ps.getParameter<edm::InputTag>("hcalTPSourceSent").label()),
29  fedRawData_(consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("fedRawDataLabel"))),
30  histFolder_(ps.getParameter<std::string>("histFolder")),
31  tpFillThreshold_(ps.getUntrackedParameter<int>("etDistributionsFillThreshold", 0)),
32  ignoreHFfbs_(ps.getUntrackedParameter<bool>("ignoreHFfbs", false))
33 {
34  ecalTPSentRecd_.reserve(28*2*72);
35  hcalTPSentRecd_.reserve(41*2*72);
36 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceSent_
std::string hcalTPSourceSentLabel_
std::vector< std::pair< HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi > > hcalTPSentRecd_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceRecd_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceRecd_
std::string ecalTPSourceRecdLabel_
std::string hcalTPSourceRecdLabel_
std::string ecalTPSourceSentLabel_
std::vector< std::pair< EcalTriggerPrimitiveDigi, EcalTriggerPrimitiveDigi > > ecalTPSentRecd_
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceSent_
edm::EDGetTokenT< FEDRawDataCollection > fedRawData_
L1TStage2CaloLayer1::~L1TStage2CaloLayer1 ( )
override

Definition at line 38 of file L1TStage2CaloLayer1.cc.

39 {
40 }

Member Function Documentation

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

Definition at line 46 of file L1TStage2CaloLayer1.cc.

References funct::abs(), UCTDAQRawData::amcPayload(), edm::SortedCollection< T, SORT >::begin(), edm::EventBase::bunchCrossing(), UCTDAQRawData::BXID(), bxidErrors_, FEDRawData::data(), ecalDiscrepancy_, ecalLinkError_, ecalLinkErrorByLumi_, ecalMismatchByLumi_, ECALmismatchesPerBx_, ecalOccEtDiscrepancy_, ecalOccFgDiscrepancy_, ecalOccLinkMasked_, ecalOccNoMatch_, ecalOccRecdEtWgt_, ecalOccRecdFgVB_, ecalOccRecdNotSent_, ecalOccSent_, ecalOccSentAndRecd_, ecalOccSentFgVB_, ecalOccSentNotRecd_, ecalOccTowerMasked_, ecalOccupancy_, ecalTPRawEtCorrelation_, ecalTPRawEtDiffNoMatch_, ecalTPRawEtRecd_, ecalTPRawEtSent_, ecalTPRawEtSentAndRecd_, ecalTPSentRecd_, ecalTPSourceRecd_, ecalTPSourceSent_, edm::SortedCollection< T, SORT >::end(), FEDRawDataCollection::FEDData(), fedRawData_, MonitorElement::Fill(), HBHEmismatchesPerBx_, hcalDiscrepancy_, hcalLinkError_, hcalLinkErrorByLumi_, hcalMismatchByLumi_, hcalOccEtDiscrepancy_, hcalOccFb2Discrepancy_, hcalOccFbDiscrepancy_, hcalOccLinkMasked_, hcalOccNoMatch_, hcalOccRecdEtWgt_, hcalOccRecdFb2_, hcalOccRecdFb_, hcalOccRecdNotSent_, hcalOccSent_, hcalOccSentAndRecd_, hcalOccSentFb2_, hcalOccSentFb_, hcalOccSentNotRecd_, hcalOccTowerMasked_, hcalOccupancy_, hcalTPRawEtCorrelationHBHE_, hcalTPRawEtCorrelationHF_, hcalTPRawEtDiffNoMatch_, hcalTPRawEtRecd_, hcalTPRawEtSent_, hcalTPRawEtSentAndRecd_, hcalTPSentRecd_, hcalTPSourceRecd_, hcalTPSourceSent_, HFmismatchesPerBx_, mps_fire::i, edm::EventBase::id(), ignoreHFfbs_, edm::HandleBase::isValid(), UCTDAQRawData::L1ID(), l1idErrors_, UCTAMCRawData::layer1Phi(), edm::EventID::luminosityBlock(), maxEvtLinkErrorsECALCurrentLumi_, maxEvtLinkErrorsHCALCurrentLumi_, maxEvtMismatchECALCurrentLumi_, maxEvtMismatchHCALCurrentLumi_, UCTDAQRawData::nAMCs(), orbitErrors_, UCTDAQRawData::orbitNumber(), simplePhotonAnalyzer_cfi::sample, EcalTriggerPrimitiveDigi::setSize(), FEDRawData::size(), edm::swap(), tpFillThreshold_, updateMismatch(), and ComparisonHelper::zip().

47 {
48  // Monitorables stored in Layer 1 raw data but
49  // not accessible from existing persistent data formats
50  edm::Handle<FEDRawDataCollection> fedRawDataCollection;
51  event.getByToken(fedRawData_, fedRawDataCollection);
52  bool caloLayer1OutOfRun{true};
53  if (fedRawDataCollection.isValid()) {
54  caloLayer1OutOfRun = false;
55  for(int iFed=1354; iFed<1360; iFed+=2) {
56  const FEDRawData& fedRawData = fedRawDataCollection->FEDData(iFed);
57  if ( fedRawData.size() == 0 ) {
58  caloLayer1OutOfRun = true;
59  continue; // In case one of 3 layer 1 FEDs not in
60  }
61  const uint64_t *fedRawDataArray = (const uint64_t *) fedRawData.data();
62  UCTDAQRawData daqData(fedRawDataArray);
63  for(uint32_t i = 0; i < daqData.nAMCs(); i++) {
64  UCTAMCRawData amcData(daqData.amcPayload(i));
65  int lPhi = amcData.layer1Phi();
66  if ( daqData.BXID() != amcData.BXID() ) {
67  bxidErrors_->Fill(lPhi);
68  }
69  if ( daqData.L1ID() != amcData.L1ID() ) {
70  l1idErrors_->Fill(lPhi);
71  }
72  // AMC payload header has 16 bit orbit number, AMC13 header is full 32
73  if ( (daqData.orbitNumber() & 0xFFFF) != amcData.orbitNo() ) {
74  orbitErrors_->Fill(lPhi);
75  }
76  }
77  }
78  }
79 
80 
82  event.getByToken(ecalTPSourceSent_, ecalTPsSent);
84  event.getByToken(ecalTPSourceRecd_, ecalTPsRecd);
85 
86  ecalTPSentRecd_.clear();
87 
88  ComparisonHelper::zip(ecalTPsSent->begin(), ecalTPsSent->end(),
89  ecalTPsRecd->begin(), ecalTPsRecd->end(),
91 
92  int nEcalLinkErrors{0};
93  int nEcalMismatch{0};
94 
95  for ( const auto& tpPair : ecalTPSentRecd_ ) {
96  auto sentTp = tpPair.first;
97  if ( sentTp.compressedEt() < 0 ) {
98  // ECal zero-suppresses digis, and a default-constructed
99  // digi has et=-1 apparently, but we know it should be zero
101  EcalTriggerPrimitiveDigi tpg(sentTp.id());
102  tpg.setSize(1);
103  tpg.setSample(0, sample);
104  swap(sentTp, tpg);
105  }
106  const auto& recdTp = tpPair.second;
107  const int ieta = sentTp.id().ieta();
108  const int iphi = sentTp.id().iphi();
109  const bool towerMasked = recdTp.sample(0).raw() & (1<<13);
110  const bool linkMasked = recdTp.sample(0).raw() & (1<<14);
111  const bool linkError = recdTp.sample(0).raw() & (1<<15);
112 
113  // Link status bits from layer 1
114  if( towerMasked ){
115  ecalOccTowerMasked_->Fill(ieta, iphi);
116  }
117  if( linkMasked ){
118  ecalOccLinkMasked_->Fill(ieta, iphi);
119  }
120 
121  if ( sentTp.compressedEt() > tpFillThreshold_ ) {
122  ecalTPRawEtSent_->Fill(sentTp.compressedEt());
123  ecalOccSent_->Fill(ieta, iphi);
124  }
125  if(sentTp.fineGrain()==1){
126  ecalOccSentFgVB_->Fill(ieta, iphi);
127  }
128 
129  if ( towerMasked || caloLayer1OutOfRun ) {
130  // Do not compare if we have a mask applied
131  continue;
132  }
133 
134  if ( linkError ) {
135  ecalLinkError_->Fill(ieta, iphi);
136  ecalLinkErrorByLumi_->Fill(event.id().luminosityBlock());
137  nEcalLinkErrors++;
138  // Don't compare anymore, we already know its bad
139  continue;
140  }
141 
142  ecalTPRawEtCorrelation_->Fill(sentTp.compressedEt(), recdTp.compressedEt());
143 
144  if ( recdTp.compressedEt() > tpFillThreshold_ ) {
145  ecalTPRawEtRecd_->Fill(recdTp.compressedEt());
146  ecalOccupancy_->Fill(ieta, iphi);
147  ecalOccRecdEtWgt_ ->Fill(ieta, iphi, recdTp.compressedEt());
148  }
149  if(recdTp.fineGrain()==1){
150  ecalOccRecdFgVB_->Fill(ieta, iphi);
151  }
152 
153  // Now for comparisons
154 
155  const bool EetAgreement = sentTp.compressedEt() == recdTp.compressedEt();
156  const bool EfbAgreement = sentTp.fineGrain() == recdTp.fineGrain();
157  if ( EetAgreement && EfbAgreement ) {
158  // Full match
159  if ( sentTp.compressedEt() > tpFillThreshold_ ) {
160  ecalOccSentAndRecd_->Fill(ieta, iphi);
161  ecalTPRawEtSentAndRecd_->Fill(sentTp.compressedEt());
162  }
163  }
164  else {
165  // There is some issue
166  ecalDiscrepancy_->Fill(ieta, iphi);
167  ecalMismatchByLumi_->Fill(event.id().luminosityBlock());
168  ECALmismatchesPerBx_->Fill(event.bunchCrossing());
169  nEcalMismatch++;
170 
171  if ( not EetAgreement ) {
172  ecalOccEtDiscrepancy_->Fill(ieta, iphi);
173  ecalTPRawEtDiffNoMatch_->Fill(recdTp.compressedEt()-sentTp.compressedEt());
174  updateMismatch(event, 0);
175 
176  if ( sentTp.compressedEt() == 0 ) ecalOccRecdNotSent_->Fill(ieta, iphi);
177  else if ( recdTp.compressedEt() == 0 ) ecalOccSentNotRecd_->Fill(ieta, iphi);
178  else ecalOccNoMatch_->Fill(ieta, iphi);
179  }
180  if ( not EfbAgreement ) {
181  // occ for fine grain mismatch
182  ecalOccFgDiscrepancy_->Fill(ieta, iphi);
183  updateMismatch(event, 1);
184  }
185  }
186 
187  }
188 
189  if ( nEcalLinkErrors > maxEvtLinkErrorsECALCurrentLumi_ ) {
190  maxEvtLinkErrorsECALCurrentLumi_ = nEcalLinkErrors;
191  }
192  if ( nEcalMismatch > maxEvtMismatchECALCurrentLumi_ ) {
193  maxEvtMismatchECALCurrentLumi_ = nEcalMismatch;
194  }
195 
196 
198  event.getByToken(hcalTPSourceSent_, hcalTPsSent);
200  event.getByToken(hcalTPSourceRecd_, hcalTPsRecd);
201 
202  hcalTPSentRecd_.clear();
203 
204  ComparisonHelper::zip(hcalTPsSent->begin(), hcalTPsSent->end(),
205  hcalTPsRecd->begin(), hcalTPsRecd->end(),
207 
208  int nHcalLinkErrors{0};
209  int nHcalMismatch{0};
210 
211  for ( const auto& tpPair : hcalTPSentRecd_ ) {
212  const auto& sentTp = tpPair.first;
213  const auto& recdTp = tpPair.second;
214  const int ieta = sentTp.id().ieta();
215  if ( abs(ieta) > 28 && sentTp.id().version() != 1 ) continue;
216  const int iphi = sentTp.id().iphi();
217  const bool towerMasked = recdTp.sample(0).raw() & (1<<13);
218  const bool linkMasked = recdTp.sample(0).raw() & (1<<14);
219  const bool linkError = recdTp.sample(0).raw() & (1<<15);
220 
221  if(towerMasked){
222  hcalOccTowerMasked_->Fill(ieta, iphi);
223  }
224  if(linkMasked){
225  hcalOccLinkMasked_->Fill(ieta, iphi);
226  }
227 
228  if ( sentTp.SOI_compressedEt() > tpFillThreshold_ ) {
229  hcalTPRawEtSent_->Fill(sentTp.SOI_compressedEt());
230  hcalOccSent_->Fill(ieta, iphi);
231  }
232  if(sentTp.SOI_fineGrain()==1){
233  hcalOccSentFb_->Fill(ieta, iphi);
234  }
235  if(sentTp.t0().fineGrain(1)==1){
236  hcalOccSentFb2_->Fill(ieta, iphi);
237  }
238 
239  if ( towerMasked || caloLayer1OutOfRun ) {
240  // Do not compare if we have a mask applied
241  continue;
242  }
243 
244  if ( linkError ) {
245  hcalLinkError_->Fill(ieta, iphi);
246  hcalLinkErrorByLumi_->Fill(event.id().luminosityBlock());
247  nHcalLinkErrors++;
248  // Don't compare anymore, we already know its bad
249  continue;
250  }
251 
252  if ( recdTp.SOI_compressedEt() > tpFillThreshold_ ) {
253  hcalTPRawEtRecd_->Fill(recdTp.SOI_compressedEt());
254  hcalOccupancy_->Fill(ieta, iphi);
255  hcalOccRecdEtWgt_ ->Fill(ieta, iphi, recdTp.SOI_compressedEt());
256  }
257  if(recdTp.SOI_fineGrain()){
258  hcalOccRecdFb_->Fill(ieta, iphi);
259  }
260  if(recdTp.t0().fineGrain(1)){
261  hcalOccRecdFb2_->Fill(ieta, iphi);
262  }
263 
264  if ( abs(ieta) > 29 ) {
265  hcalTPRawEtCorrelationHF_->Fill(sentTp.SOI_compressedEt(), recdTp.SOI_compressedEt());
266  } else {
267  hcalTPRawEtCorrelationHBHE_->Fill(sentTp.SOI_compressedEt(), recdTp.SOI_compressedEt());
268  }
269 
270  const bool HetAgreement = sentTp.SOI_compressedEt() == recdTp.SOI_compressedEt();
271  const bool Hfb1Agreement = ( abs(ieta) < 29 ) ? true : (recdTp.SOI_compressedEt()==0 || (sentTp.SOI_fineGrain() == recdTp.SOI_fineGrain()) || ignoreHFfbs_);
272  // Ignore minBias (FB2) bit if we receieve 0 ET, which means it is likely zero-suppressed on HCal readout side
273  const bool Hfb2Agreement = ( abs(ieta) < 29 ) ? true : (recdTp.SOI_compressedEt()==0 || (sentTp.SOI_fineGrain(1) == recdTp.SOI_fineGrain(1)) || ignoreHFfbs_);
274  if ( HetAgreement && Hfb1Agreement && Hfb2Agreement ) {
275  // Full match
276  if ( sentTp.SOI_compressedEt() > tpFillThreshold_ ) {
277  hcalOccSentAndRecd_->Fill(ieta, iphi);
278  hcalTPRawEtSentAndRecd_->Fill(sentTp.SOI_compressedEt());
279  }
280  }
281  else {
282  // There is some issue
283  hcalDiscrepancy_->Fill(ieta, iphi);
284  hcalMismatchByLumi_->Fill(event.id().luminosityBlock());
285  nHcalMismatch++;
286 
287  if ( not HetAgreement ) {
288  if ( abs(ieta) > 29 ) {
289  HFmismatchesPerBx_->Fill(event.bunchCrossing());
290  } else {
291  HBHEmismatchesPerBx_->Fill(event.bunchCrossing());
292  }
293  hcalOccEtDiscrepancy_->Fill(ieta, iphi);
294  hcalTPRawEtDiffNoMatch_->Fill(recdTp.SOI_compressedEt()-sentTp.SOI_compressedEt());
295  updateMismatch(event, 2);
296 
297  // Handle HCal discrepancy debug
298  if ( sentTp.SOI_compressedEt() == 0 ) hcalOccRecdNotSent_->Fill(ieta, iphi);
299  else if ( recdTp.SOI_compressedEt() == 0 ) hcalOccSentNotRecd_->Fill(ieta, iphi);
300  else hcalOccNoMatch_->Fill(ieta, iphi);
301  }
302  if ( not Hfb1Agreement ) {
303  // Handle fine grain discrepancies
304  hcalOccFbDiscrepancy_->Fill(ieta, iphi);
305  updateMismatch(event, 3);
306  }
307  if ( not Hfb2Agreement ) {
308  // Handle fine grain discrepancies
309  hcalOccFb2Discrepancy_->Fill(ieta, iphi);
310  updateMismatch(event, 3);
311  }
312  }
313 
314  }
315 
316 
317  if ( nHcalLinkErrors > maxEvtLinkErrorsHCALCurrentLumi_ ) {
318  maxEvtLinkErrorsHCALCurrentLumi_ = nHcalLinkErrors;
319  }
320  if ( nHcalMismatch > maxEvtMismatchHCALCurrentLumi_ ) {
321  maxEvtMismatchHCALCurrentLumi_ = nHcalMismatch;
322  }
323 
324 }
MonitorElement * hcalTPRawEtRecd_
MonitorElement * ecalOccTowerMasked_
MonitorElement * ecalOccRecdNotSent_
MonitorElement * ecalTPRawEtCorrelation_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceSent_
std::vector< std::pair< HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi > > hcalTPSentRecd_
MonitorElement * ecalOccRecdFgVB_
MonitorElement * ecalTPRawEtSentAndRecd_
MonitorElement * ecalOccFgDiscrepancy_
MonitorElement * ecalMismatchByLumi_
MonitorElement * bxidErrors_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceRecd_
MonitorElement * hcalOccSentFb2_
MonitorElement * HBHEmismatchesPerBx_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceRecd_
MonitorElement * hcalOccSentFb_
MonitorElement * hcalOccTowerMasked_
MonitorElement * ecalOccSentFgVB_
MonitorElement * hcalOccupancy_
MonitorElement * hcalLinkErrorByLumi_
MonitorElement * hcalTPRawEtSentAndRecd_
MonitorElement * hcalMismatchByLumi_
MonitorElement * hcalOccRecdEtWgt_
MonitorElement * ECALmismatchesPerBx_
MonitorElement * ecalOccupancy_
MonitorElement * hcalOccRecdNotSent_
MonitorElement * hcalOccLinkMasked_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
MonitorElement * ecalTPRawEtRecd_
void Fill(long long x)
MonitorElement * ecalTPRawEtDiffNoMatch_
MonitorElement * hcalOccSent_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * ecalOccNoMatch_
MonitorElement * ecalTPRawEtSent_
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
MonitorElement * ecalOccSentAndRecd_
MonitorElement * ecalLinkErrorByLumi_
MonitorElement * hcalOccEtDiscrepancy_
MonitorElement * hcalTPRawEtCorrelationHBHE_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void updateMismatch(const edm::Event &e, int mismatchType)
MonitorElement * ecalOccSent_
std::vector< std::pair< EcalTriggerPrimitiveDigi, EcalTriggerPrimitiveDigi > > ecalTPSentRecd_
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * hcalOccSentAndRecd_
MonitorElement * l1idErrors_
MonitorElement * ecalDiscrepancy_
const_iterator end() const
MonitorElement * hcalOccFbDiscrepancy_
unsigned long long uint64_t
Definition: Time.h:15
MonitorElement * hcalOccFb2Discrepancy_
MonitorElement * hcalTPRawEtSent_
MonitorElement * hcalOccRecdFb2_
MonitorElement * hcalTPRawEtCorrelationHF_
MonitorElement * ecalLinkError_
MonitorElement * hcalOccRecdFb_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
MonitorElement * hcalTPRawEtDiffNoMatch_
MonitorElement * ecalOccEtDiscrepancy_
MonitorElement * ecalOccRecdEtWgt_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceSent_
MonitorElement * HFmismatchesPerBx_
MonitorElement * ecalOccLinkMasked_
edm::EDGetTokenT< FEDRawDataCollection > fedRawData_
MonitorElement * hcalOccNoMatch_
MonitorElement * hcalOccSentNotRecd_
MonitorElement * hcalLinkError_
MonitorElement * ecalOccSentNotRecd_
const_iterator begin() const
MonitorElement * orbitErrors_
Definition: event.py:1
uint32_t layer1Phi()
Definition: UCTAMCRawData.h:25
MonitorElement * hcalDiscrepancy_
void L1TStage2CaloLayer1::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overrideprotected

Definition at line 341 of file L1TStage2CaloLayer1.cc.

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

341  {
342  // Ugly way to loop backwards through the last 20 mismatches
343  auto h = last20Mismatches_->getTH2F();
344  for (size_t ibin=1, imatch=lastMismatchIndex_; ibin<=20; ibin++, imatch=(imatch+19)%20) {
345  h->GetYaxis()->SetBinLabel(ibin, last20MismatchArray_.at(imatch).first.c_str());
346  for(int itype=0; itype<h->GetNbinsX(); ++itype) {
347  int binContent = (last20MismatchArray_.at(imatch).second>>itype) & 1;
348  last20Mismatches_->setBinContent(itype+1, ibin, binContent);
349  }
350  }
351 }
void setBinContent(int binx, double content)
set content of bin (1-D)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
TH2F * getTH2F() const
MonitorElement * last20Mismatches_
void L1TStage2CaloLayer1::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run run,
const edm::EventSetup es 
)
overrideprotected

Definition at line 393 of file L1TStage2CaloLayer1.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), bxidErrors_, ecalDiscrepancy_, ecalLinkError_, ecalLinkErrorByLumi_, ecalMismatchByLumi_, ECALmismatchesPerBx_, ecalOccEtDiscrepancy_, ecalOccFgDiscrepancy_, ecalOccLinkMasked_, ecalOccNoMatch_, ecalOccRecdEtWgt_, ecalOccRecdFgVB_, ecalOccRecdNotSent_, ecalOccSent_, ecalOccSentAndRecd_, ecalOccSentFgVB_, ecalOccSentNotRecd_, ecalOccTowerMasked_, ecalOccupancy_, ecalTPRawEtCorrelation_, ecalTPRawEtDiffNoMatch_, ecalTPRawEtRecd_, ecalTPRawEtSent_, ecalTPRawEtSentAndRecd_, MonitorElement::getTH2F(), HBHEmismatchesPerBx_, hcalDiscrepancy_, hcalLinkError_, hcalLinkErrorByLumi_, hcalMismatchByLumi_, hcalOccEtDiscrepancy_, hcalOccFb2Discrepancy_, hcalOccFbDiscrepancy_, hcalOccLinkMasked_, hcalOccNoMatch_, hcalOccRecdEtWgt_, hcalOccRecdFb2_, hcalOccRecdFb_, hcalOccRecdNotSent_, hcalOccSent_, hcalOccSentAndRecd_, hcalOccSentFb2_, hcalOccSentFb_, hcalOccSentNotRecd_, hcalOccTowerMasked_, hcalOccupancy_, hcalTPRawEtCorrelationHBHE_, hcalTPRawEtCorrelationHF_, hcalTPRawEtDiffNoMatch_, hcalTPRawEtRecd_, hcalTPRawEtSent_, hcalTPRawEtSentAndRecd_, HFmismatchesPerBx_, histFolder_, mps_fire::i, l1idErrors_, last20MismatchArray_, last20Mismatches_, maxEvtLinkErrorsByLumi_, maxEvtLinkErrorsByLumiECAL_, maxEvtLinkErrorsByLumiHCAL_, maxEvtMismatchByLumi_, maxEvtMismatchByLumiECAL_, maxEvtMismatchByLumiHCAL_, dataset::name, orbitErrors_, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

394 {
395  auto bookEt = [&ibooker](std::string name, std::string title) {
396  return ibooker.book1D(name, title+";Raw ET;Counts", 256, -0.5, 255.5);
397  };
398  auto bookEtCorrelation = [&ibooker](std::string name, std::string title) {
399  return ibooker.book2D(name, title, 256, -0.5, 255.5, 256, -0.5, 255.5);
400  };
401  auto bookEtDiff = [&ibooker](std::string name, std::string title) {
402  return ibooker.book1D(name, title+";#Delta Raw ET;Counts", 511, -255.5, 255.5);
403  };
404  auto bookEcalOccupancy = [&ibooker](std::string name, std::string title) {
405  return ibooker.book2D(name, title+";iEta;iPhi", 57, -28.5, 28.5, 72, 0.5, 72.5);
406  };
407  auto bookHcalOccupancy = [&ibooker](std::string name, std::string title) {
408  return ibooker.book2D(name, title+";iEta;iPhi", 83, -41.5, 41.5, 72, 0.5, 72.5);
409  };
410 
411  ibooker.setCurrentFolder(histFolder_);
412 
413  ecalDiscrepancy_ = bookEcalOccupancy("ecalDiscrepancy", "ECAL Discrepancies between TCC and Layer1 Readout");
414  ecalLinkError_ = bookEcalOccupancy("ecalLinkError", "ECAL Link Errors");
415  ecalOccupancy_ = bookEcalOccupancy("ecalOccupancy", "ECAL TP Occupancy at Layer1");
416  ecalOccRecdEtWgt_= bookEcalOccupancy("ecalOccRecdEtWgt", "ECal TP ET-weighted Occupancy at Layer1");
417  hcalDiscrepancy_ = bookHcalOccupancy("hcalDiscrepancy", "HCAL Discrepancies between uHTR and Layer1 Readout");
418  hcalLinkError_ = bookHcalOccupancy("hcalLinkError", "HCAL Link Errors");
419  hcalOccupancy_ = bookHcalOccupancy("hcalOccupancy", "HCAL TP Occupancy at Layer1");
420  hcalOccRecdEtWgt_= bookHcalOccupancy("hcalOccRecdEtWgt", "HCal TP ET-weighted Occupancy at Layer1");
421 
422 
423  ibooker.setCurrentFolder(histFolder_+"/ECalDetail");
424 
425  ecalOccEtDiscrepancy_ = bookEcalOccupancy("ecalOccEtDiscrepancy", "ECal Et Discrepancy Occupancy");
426  ecalOccFgDiscrepancy_ = bookEcalOccupancy("ecalOccFgDiscrepancy", "ECal FG Veto Bit Discrepancy Occupancy");
427  ecalOccLinkMasked_ = bookEcalOccupancy("ecalOccLinkMasked", "ECal Masked Links");
428  ecalOccRecdFgVB_ = bookEcalOccupancy("ecalOccRecdFgVB", "ECal FineGrain Veto Bit Occupancy at Layer1");
429  ecalOccSentAndRecd_ = bookEcalOccupancy("ecalOccSentAndRecd", "ECal TP Occupancy FULL MATCH");
430  ecalOccSentFgVB_ = bookEcalOccupancy("ecalOccSentFgVB", "ECal FineGrain Veto Bit Occupancy at TCC");
431  ecalOccSent_ = bookEcalOccupancy("ecalOccSent", "ECal TP Occupancy at TCC");
432  ecalOccTowerMasked_ = bookEcalOccupancy("ecalOccTowerMasked", "ECal Masked towers");
433  ecalTPRawEtCorrelation_ = bookEtCorrelation("ecalTPRawEtCorrelation", "Raw Et correlation TCC and Layer1;TCC Et;Layer1 Et");
434  ecalTPRawEtDiffNoMatch_ = bookEtDiff("ecalTPRawEtDiffNoMatch", "ECal Raw Et Difference Layer1 - TCC");
435  ecalTPRawEtRecd_ = bookEt("ecalTPRawEtRecd", "ECal Raw Et Layer1 Readout");
436  ecalTPRawEtSentAndRecd_ = bookEt("ecalTPRawEtMatch", "ECal Raw Et FULL MATCH");
437  ecalTPRawEtSent_ = bookEt("ecalTPRawEtSent", "ECal Raw Et TCC Readout");
438 
439  ibooker.setCurrentFolder(histFolder_+"/ECalDetail/TCCDebug");
440  ecalOccSentNotRecd_ = bookHcalOccupancy("ecalOccSentNotRecd", "ECal TP Occupancy sent by TCC, zero at Layer1");
441  ecalOccRecdNotSent_ = bookHcalOccupancy("ecalOccRecdNotSent", "ECal TP Occupancy received by Layer1, zero at TCC");
442  ecalOccNoMatch_ = bookHcalOccupancy("ecalOccNoMatch", "ECal TP Occupancy for TCC and Layer1 nonzero, not matching");
443 
444 
445  ibooker.setCurrentFolder(histFolder_+"/HCalDetail");
446 
447  hcalOccEtDiscrepancy_ = bookHcalOccupancy("hcalOccEtDiscrepancy", "HCal Et Discrepancy Occupancy");
448  hcalOccFbDiscrepancy_ = bookHcalOccupancy("hcalOccFbDiscrepancy", "HCal Feature Bit Discrepancy Occupancy");
449  hcalOccFb2Discrepancy_ = bookHcalOccupancy("hcalOccFb2Discrepancy", "HCal Second Feature Bit Discrepancy Occupancy");
450  hcalOccLinkMasked_ = bookHcalOccupancy("hcalOccLinkMasked", "HCal Masked Links");
451  hcalOccRecdFb_ = bookHcalOccupancy("hcalOccRecdFb", "HCal Feature Bit Occupancy at Layer1");
452  hcalOccRecdFb2_ = bookHcalOccupancy("hcalOccRecdFb2", "HF Second Feature Bit Occupancy at Layer1");
453  hcalOccSentAndRecd_ = bookHcalOccupancy("hcalOccSentAndRecd", "HCal TP Occupancy FULL MATCH");
454  hcalOccSentFb_ = bookHcalOccupancy("hcalOccSentFb", "HCal Feature Bit Occupancy at uHTR");
455  hcalOccSentFb2_ = bookHcalOccupancy("hcalOccSentFb2", "HF Second Feature Bit Occupancy at uHTR");
456  hcalOccSent_ = bookHcalOccupancy("hcalOccSent", "HCal TP Occupancy at uHTR");
457  hcalOccTowerMasked_ = bookHcalOccupancy("hcalOccTowerMasked", "HCal Masked towers");
458  hcalTPRawEtCorrelationHBHE_= bookEtCorrelation("hcalTPRawEtCorrelationHBHE", "HBHE Raw Et correlation uHTR and Layer1;uHTR Et;Layer1 Et");
459  hcalTPRawEtCorrelationHF_ = bookEtCorrelation("hcalTPRawEtCorrelationHF", "HF Raw Et correlation uHTR and Layer1;uHTR Et;Layer1 Et");
460  hcalTPRawEtDiffNoMatch_ = bookEtDiff("hcalTPRawEtDiffNoMatch", "HCal Raw Et Difference Layer1 - uHTR");
461  hcalTPRawEtRecd_ = bookEt("hcalTPRawEtRecd", "HCal Raw Et Layer1 Readout");
462  hcalTPRawEtSentAndRecd_ = bookEt("hcalTPRawEtMatch", "HCal Raw Et FULL MATCH");
463  hcalTPRawEtSent_ = bookEt("hcalTPRawEtSent", "HCal Raw Et uHTR Readout");
464 
465  ibooker.setCurrentFolder(histFolder_+"/HCalDetail/uHTRDebug");
466  hcalOccSentNotRecd_ = bookHcalOccupancy("hcalOccSentNotRecd", "HCal TP Occupancy sent by uHTR, zero at Layer1");
467  hcalOccRecdNotSent_ = bookHcalOccupancy("hcalOccRecdNotSent", "HCal TP Occupancy received by Layer1, zero at uHTR");
468  hcalOccNoMatch_ = bookHcalOccupancy("hcalOccNoMatch", "HCal TP Occupancy for uHTR and Layer1 nonzero, not matching");
469 
470  ibooker.setCurrentFolder(histFolder_+"/MismatchDetail");
471 
472  const int nMismatchTypes = 4;
473  last20Mismatches_ = ibooker.book2D("last20Mismatches",
474  "Log of last 20 mismatches (use json tool to copy/paste)",
475  nMismatchTypes, 0, nMismatchTypes, 20, 0, 20);
476  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(1, "Ecal TP Et Mismatch");
477  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(2, "Ecal TP Fine Grain Bit Mismatch");
478  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(3, "Hcal TP Et Mismatch");
479  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(4, "Hcal TP Feature Bit Mismatch");
480  for (size_t i=0; i<last20MismatchArray_.size(); ++i) last20MismatchArray_[i] = {"-"+std::to_string(i), 0};
481  for (size_t i=1; i<=20; ++i) last20Mismatches_->getTH2F()->GetYaxis()->SetBinLabel(i, ("-"+std::to_string(i)).c_str());
482 
483  const int nLumis = 2000;
484  ecalLinkErrorByLumi_ = ibooker.book1D("ecalLinkErrorByLumi", "Link error counts per lumi section for ECAL;LumiSection;Counts", nLumis, .5, nLumis+0.5);
485  ecalMismatchByLumi_ = ibooker.book1D("ecalMismatchByLumi", "Mismatch counts per lumi section for ECAL;LumiSection;Counts", nLumis, .5, nLumis+0.5);
486  hcalLinkErrorByLumi_ = ibooker.book1D("hcalLinkErrorByLumi", "Link error counts per lumi section for HCAL;LumiSection;Counts", nLumis, .5, nLumis+0.5);
487  hcalMismatchByLumi_ = ibooker.book1D("hcalMismatchByLumi", "Mismatch counts per lumi section for HCAL;LumiSection;Counts", nLumis, .5, nLumis+0.5);
488 
489  ECALmismatchesPerBx_ = ibooker.book1D("ECALmismatchesPerBx", "Mismatch counts per bunch crossing for ECAL", 3564, -.5, 3563.5);
490  HBHEmismatchesPerBx_ = ibooker.book1D("HBHEmismatchesPerBx", "Mismatch counts per bunch crossing for HBHE", 3564, -.5, 3563.5);
491  HFmismatchesPerBx_ = ibooker.book1D("HFmismatchesPerBx", "Mismatch counts per bunch crossing for HF", 3564, -.5, 3563.5);
492 
493  maxEvtLinkErrorsByLumiECAL_ = ibooker.book1D("maxEvtLinkErrorsByLumiECAL", "Max number of single-event ECAL link errors per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
494  maxEvtLinkErrorsByLumiHCAL_ = ibooker.book1D("maxEvtLinkErrorsByLumiHCAL", "Max number of single-event HCAL link errors per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
495 
496  maxEvtMismatchByLumiECAL_ = ibooker.book1D("maxEvtMismatchByLumiECAL", "Max number of single-event ECAL discrepancies per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
497  maxEvtMismatchByLumiHCAL_ = ibooker.book1D("maxEvtMismatchByLumiHCAL", "Max number of single-event HCAL discrepancies per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
498 
499  ibooker.setCurrentFolder(histFolder_);
500  maxEvtLinkErrorsByLumi_ = ibooker.book1D("maxEvtLinkErrorsByLumi", "Max number of single-event link errors per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
501  maxEvtMismatchByLumi_ = ibooker.book1D("maxEvtMismatchByLumi", "Max number of single-event discrepancies per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
502 
503  ibooker.setCurrentFolder(histFolder_+"/AMC13ErrorCounters");
504  bxidErrors_ = ibooker.book1D("bxidErrors", "bxid mismatch between AMC13 and CTP Cards;Layer1 Phi;Counts", 18, -.5, 17.5);
505  l1idErrors_ = ibooker.book1D("l1idErrors", "l1id mismatch between AMC13 and CTP Cards;Layer1 Phi;Counts", 18, -.5, 17.5);
506  orbitErrors_ = ibooker.book1D("orbitErrors", "orbit mismatch between AMC13 and CTP Cards;Layer1 Phi;Counts", 18, -.5, 17.5);
507 }
MonitorElement * hcalTPRawEtRecd_
MonitorElement * ecalOccTowerMasked_
MonitorElement * ecalOccRecdNotSent_
MonitorElement * ecalTPRawEtCorrelation_
MonitorElement * maxEvtMismatchByLumiHCAL_
MonitorElement * maxEvtLinkErrorsByLumi_
MonitorElement * maxEvtMismatchByLumi_
MonitorElement * ecalOccRecdFgVB_
MonitorElement * ecalTPRawEtSentAndRecd_
MonitorElement * ecalOccFgDiscrepancy_
MonitorElement * ecalMismatchByLumi_
MonitorElement * bxidErrors_
MonitorElement * maxEvtLinkErrorsByLumiHCAL_
MonitorElement * hcalOccSentFb2_
MonitorElement * HBHEmismatchesPerBx_
MonitorElement * hcalOccSentFb_
MonitorElement * hcalOccTowerMasked_
MonitorElement * maxEvtMismatchByLumiECAL_
MonitorElement * ecalOccSentFgVB_
MonitorElement * hcalOccupancy_
MonitorElement * hcalLinkErrorByLumi_
MonitorElement * hcalTPRawEtSentAndRecd_
MonitorElement * hcalMismatchByLumi_
MonitorElement * hcalOccRecdEtWgt_
MonitorElement * ECALmismatchesPerBx_
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
MonitorElement * ecalOccupancy_
MonitorElement * hcalOccRecdNotSent_
MonitorElement * hcalOccLinkMasked_
MonitorElement * ecalTPRawEtRecd_
MonitorElement * ecalTPRawEtDiffNoMatch_
MonitorElement * hcalOccSent_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * ecalOccNoMatch_
MonitorElement * ecalTPRawEtSent_
MonitorElement * ecalOccSentAndRecd_
MonitorElement * ecalLinkErrorByLumi_
MonitorElement * hcalOccEtDiscrepancy_
MonitorElement * hcalTPRawEtCorrelationHBHE_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * ecalOccSent_
MonitorElement * hcalOccSentAndRecd_
MonitorElement * l1idErrors_
TH2F * getTH2F() const
MonitorElement * ecalDiscrepancy_
MonitorElement * hcalOccFbDiscrepancy_
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * hcalOccFb2Discrepancy_
MonitorElement * hcalTPRawEtSent_
MonitorElement * hcalOccRecdFb2_
MonitorElement * hcalTPRawEtCorrelationHF_
MonitorElement * ecalLinkError_
MonitorElement * hcalOccRecdFb_
MonitorElement * last20Mismatches_
MonitorElement * hcalTPRawEtDiffNoMatch_
MonitorElement * ecalOccEtDiscrepancy_
MonitorElement * maxEvtLinkErrorsByLumiECAL_
MonitorElement * ecalOccRecdEtWgt_
MonitorElement * HFmismatchesPerBx_
MonitorElement * ecalOccLinkMasked_
MonitorElement * hcalOccNoMatch_
MonitorElement * hcalOccSentNotRecd_
MonitorElement * hcalLinkError_
MonitorElement * ecalOccSentNotRecd_
MonitorElement * orbitErrors_
MonitorElement * hcalDiscrepancy_
void L1TStage2CaloLayer1::dqmBeginRun ( const edm::Run ,
const edm::EventSetup  
)
overrideprotected

Definition at line 42 of file L1TStage2CaloLayer1.cc.

43 {
44 }
void L1TStage2CaloLayer1::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup  
)
overrideprotected

Definition at line 353 of file L1TStage2CaloLayer1.cc.

References ecalLinkErrorByLumi_, ecalMismatchByLumi_, MonitorElement::Fill(), MonitorElement::getTH1F(), hcalLinkErrorByLumi_, hcalMismatchByLumi_, edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), maxEvtLinkErrorsByLumi_, maxEvtLinkErrorsByLumiECAL_, maxEvtLinkErrorsByLumiHCAL_, maxEvtLinkErrorsECALCurrentLumi_, maxEvtLinkErrorsHCALCurrentLumi_, maxEvtMismatchByLumi_, maxEvtMismatchByLumiECAL_, maxEvtMismatchByLumiHCAL_, maxEvtMismatchECALCurrentLumi_, and maxEvtMismatchHCALCurrentLumi_.

353  {
354  auto id = static_cast<double>(lumi.id().luminosityBlock()); // uint64_t
355 
358  }
361  }
364  }
367 
368  if ( maxEvtMismatchECALCurrentLumi_ > 0 ) {
370  }
371  if ( maxEvtMismatchHCALCurrentLumi_ > 0 ) {
373  }
376  }
379 
380  // Simple way to embed current lumi to auto-scale axis limits in render plugin
381  ecalLinkErrorByLumi_->getTH1F()->SetBinContent(0, id);
382  ecalMismatchByLumi_->getTH1F()->SetBinContent(0, id);
383  hcalLinkErrorByLumi_->getTH1F()->SetBinContent(0, id);
384  hcalMismatchByLumi_->getTH1F()->SetBinContent(0, id);
385  maxEvtLinkErrorsByLumiECAL_->getTH1F()->SetBinContent(0, id);
386  maxEvtLinkErrorsByLumiHCAL_->getTH1F()->SetBinContent(0, id);
387  maxEvtLinkErrorsByLumi_->getTH1F()->SetBinContent(0, id);
388  maxEvtMismatchByLumiECAL_->getTH1F()->SetBinContent(0, id);
389  maxEvtMismatchByLumiHCAL_->getTH1F()->SetBinContent(0, id);
390  maxEvtMismatchByLumi_->getTH1F()->SetBinContent(0, id);
391 }
LuminosityBlockID id() const
MonitorElement * maxEvtMismatchByLumiHCAL_
MonitorElement * maxEvtLinkErrorsByLumi_
MonitorElement * maxEvtMismatchByLumi_
MonitorElement * ecalMismatchByLumi_
MonitorElement * maxEvtLinkErrorsByLumiHCAL_
TH1F * getTH1F() const
MonitorElement * maxEvtMismatchByLumiECAL_
MonitorElement * hcalLinkErrorByLumi_
MonitorElement * hcalMismatchByLumi_
void Fill(long long x)
MonitorElement * ecalLinkErrorByLumi_
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * maxEvtLinkErrorsByLumiECAL_
void L1TStage2CaloLayer1::updateMismatch ( const edm::Event e,
int  mismatchType 
)
private

Definition at line 327 of file L1TStage2CaloLayer1.cc.

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

Referenced by analyze().

327  {
328  auto id = e.id();
329  std::string eventString{std::to_string(id.run()) + ":" + std::to_string(id.luminosityBlock()) + ":" + std::to_string(id.event())};
330  if ( last20MismatchArray_.at(lastMismatchIndex_).first == eventString ) {
331  // same event
332  last20MismatchArray_.at(lastMismatchIndex_).second |= 1<<mismatchType;
333  }
334  else {
335  // New event, advance
337  last20MismatchArray_.at(lastMismatchIndex_) = {eventString, 1<<mismatchType};
338  }
339 }
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
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
edm::EventID id() const
Definition: EventBase.h:59

Member Data Documentation

MonitorElement* L1TStage2CaloLayer1::bxidErrors_
private

Definition at line 163 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalDiscrepancy_
private

Definition at line 89 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalLinkError_
private

Definition at line 90 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalLinkErrorByLumi_
private

Definition at line 142 of file L1TStage2CaloLayer1.h.

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

MonitorElement* L1TStage2CaloLayer1::ecalMismatchByLumi_
private

Definition at line 143 of file L1TStage2CaloLayer1.h.

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

MonitorElement* L1TStage2CaloLayer1::ECALmismatchesPerBx_
private

Definition at line 159 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccEtDiscrepancy_
private

Definition at line 96 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccFgDiscrepancy_
private

Definition at line 97 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccLinkMasked_
private

Definition at line 98 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccNoMatch_
private

Definition at line 113 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccRecdEtWgt_
private

Definition at line 99 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccRecdFgVB_
private

Definition at line 100 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccRecdNotSent_
private

Definition at line 112 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccSent_
private

Definition at line 103 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccSentAndRecd_
private

Definition at line 101 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccSentFgVB_
private

Definition at line 102 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccSentNotRecd_
private

Definition at line 111 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccTowerMasked_
private

Definition at line 104 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalOccupancy_
private

Definition at line 91 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalTPRawEtCorrelation_
private

Definition at line 105 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalTPRawEtDiffNoMatch_
private

Definition at line 106 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalTPRawEtRecd_
private

Definition at line 107 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalTPRawEtSent_
private

Definition at line 109 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::ecalTPRawEtSentAndRecd_
private

Definition at line 108 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::pair<EcalTriggerPrimitiveDigi, EcalTriggerPrimitiveDigi> > L1TStage2CaloLayer1::ecalTPSentRecd_
private

Definition at line 168 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and L1TStage2CaloLayer1().

edm::EDGetTokenT<EcalTrigPrimDigiCollection> L1TStage2CaloLayer1::ecalTPSourceRecd_
private

Definition at line 76 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

std::string L1TStage2CaloLayer1::ecalTPSourceRecdLabel_
private

Definition at line 77 of file L1TStage2CaloLayer1.h.

edm::EDGetTokenT<EcalTrigPrimDigiCollection> L1TStage2CaloLayer1::ecalTPSourceSent_
private

Definition at line 80 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

std::string L1TStage2CaloLayer1::ecalTPSourceSentLabel_
private

Definition at line 81 of file L1TStage2CaloLayer1.h.

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

Definition at line 84 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

MonitorElement* L1TStage2CaloLayer1::HBHEmismatchesPerBx_
private

Definition at line 160 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalDiscrepancy_
private

Definition at line 92 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalLinkError_
private

Definition at line 93 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalLinkErrorByLumi_
private

Definition at line 144 of file L1TStage2CaloLayer1.h.

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

MonitorElement* L1TStage2CaloLayer1::hcalMismatchByLumi_
private

Definition at line 145 of file L1TStage2CaloLayer1.h.

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

MonitorElement* L1TStage2CaloLayer1::hcalOccEtDiscrepancy_
private

Definition at line 115 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccFb2Discrepancy_
private

Definition at line 117 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccFbDiscrepancy_
private

Definition at line 116 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccLinkMasked_
private

Definition at line 118 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccNoMatch_
private

Definition at line 136 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccRecdEtWgt_
private

Definition at line 119 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccRecdFb2_
private

Definition at line 121 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccRecdFb_
private

Definition at line 120 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccRecdNotSent_
private

Definition at line 135 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccSent_
private

Definition at line 125 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccSentAndRecd_
private

Definition at line 122 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccSentFb2_
private

Definition at line 124 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccSentFb_
private

Definition at line 123 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccSentNotRecd_
private

Definition at line 134 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccTowerMasked_
private

Definition at line 126 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalOccupancy_
private

Definition at line 94 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtCorrelationHBHE_
private

Definition at line 127 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtCorrelationHF_
private

Definition at line 128 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtDiffNoMatch_
private

Definition at line 129 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtRecd_
private

Definition at line 130 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtSent_
private

Definition at line 132 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2CaloLayer1::hcalTPRawEtSentAndRecd_
private

Definition at line 131 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::pair<HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi> > L1TStage2CaloLayer1::hcalTPSentRecd_
private

Definition at line 169 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and L1TStage2CaloLayer1().

edm::EDGetTokenT<HcalTrigPrimDigiCollection> L1TStage2CaloLayer1::hcalTPSourceRecd_
private

Definition at line 78 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

std::string L1TStage2CaloLayer1::hcalTPSourceRecdLabel_
private

Definition at line 79 of file L1TStage2CaloLayer1.h.

edm::EDGetTokenT<HcalTrigPrimDigiCollection> L1TStage2CaloLayer1::hcalTPSourceSent_
private

Definition at line 82 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

std::string L1TStage2CaloLayer1::hcalTPSourceSentLabel_
private

Definition at line 83 of file L1TStage2CaloLayer1.h.

MonitorElement* L1TStage2CaloLayer1::HFmismatchesPerBx_
private

Definition at line 161 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

std::string L1TStage2CaloLayer1::histFolder_
private

Definition at line 85 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms().

bool L1TStage2CaloLayer1::ignoreHFfbs_
private

Definition at line 87 of file L1TStage2CaloLayer1.h.

Referenced by analyze().

MonitorElement* L1TStage2CaloLayer1::l1idErrors_
private

Definition at line 164 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 139 of file L1TStage2CaloLayer1.h.

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

MonitorElement* L1TStage2CaloLayer1::last20Mismatches_
private

Definition at line 138 of file L1TStage2CaloLayer1.h.

Referenced by beginLuminosityBlock(), and bookHistograms().

size_t L1TStage2CaloLayer1::lastMismatchIndex_ {0}
private

Definition at line 140 of file L1TStage2CaloLayer1.h.

Referenced by beginLuminosityBlock(), and updateMismatch().

MonitorElement* L1TStage2CaloLayer1::maxEvtLinkErrorsByLumi_
private

Definition at line 149 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::maxEvtLinkErrorsByLumiECAL_
private

Definition at line 147 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::maxEvtLinkErrorsByLumiHCAL_
private

Definition at line 148 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

int L1TStage2CaloLayer1::maxEvtLinkErrorsECALCurrentLumi_ {0}
private

Definition at line 150 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and endLuminosityBlock().

int L1TStage2CaloLayer1::maxEvtLinkErrorsHCALCurrentLumi_ {0}
private

Definition at line 151 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::maxEvtMismatchByLumi_
private

Definition at line 155 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::maxEvtMismatchByLumiECAL_
private

Definition at line 153 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::maxEvtMismatchByLumiHCAL_
private

Definition at line 154 of file L1TStage2CaloLayer1.h.

Referenced by bookHistograms(), and endLuminosityBlock().

int L1TStage2CaloLayer1::maxEvtMismatchECALCurrentLumi_ {0}
private

Definition at line 156 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and endLuminosityBlock().

int L1TStage2CaloLayer1::maxEvtMismatchHCALCurrentLumi_ {0}
private

Definition at line 157 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and endLuminosityBlock().

MonitorElement* L1TStage2CaloLayer1::orbitErrors_
private

Definition at line 165 of file L1TStage2CaloLayer1.h.

Referenced by analyze(), and bookHistograms().

int L1TStage2CaloLayer1::tpFillThreshold_
private

Definition at line 86 of file L1TStage2CaloLayer1.h.

Referenced by analyze().