CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TLayer1.cc
Go to the documentation of this file.
1 /*
2  * \file L1TLayer1.cc
3  *
4  * N. Smith <nick.smith@cern.ch>
5  */
6 //Modified by Bhawna Gomber <bhawna.gomber@cern.ch>
7 
9 
12 
15 
16 // Binning specification
17 namespace {
18  constexpr unsigned int TPGETABINS = 57;
19  constexpr float TPGETAMIN = -28.5;
20  constexpr float TPGETAMAX = 28.5;
21 
22  constexpr unsigned int TPETABINSHCAL = 83;
23  constexpr float TPETAMINHCAL = -41.5;
24  constexpr float TPETAMAXHCAL = 41.5;
25 
26  constexpr unsigned int TPGPHIBINS = 72;
27  constexpr float TPGPHIMIN = 0.5;
28  constexpr float TPGPHIMAX = 72.5;
29 
30  constexpr unsigned int TPGEtbins = 255;
31  constexpr float TPGEtMIN = 0.0;
32  constexpr float TPGEtMAX = 255.0;
33 
34  // Will be used for et difference at some point
35  // constexpr unsigned int TPGEtbins1 = 510;
36  // constexpr float TPGEtMIN1 = -255.0;
37  // constexpr float TPGEtMAX1 = 255.0;
38 };
39 
41  ecalTPSourceRecd_(consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("ecalTPSourceRecd"))),
42  ecalTPSourceRecdLabel_(ps.getParameter<edm::InputTag>("ecalTPSourceRecd").label()),
43  hcalTPSourceRecd_(consumes<HcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("hcalTPSourceRecd"))),
44  hcalTPSourceRecdLabel_(ps.getParameter<edm::InputTag>("hcalTPSourceRecd").label()),
45  ecalTPSourceSent_(consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("ecalTPSourceSent"))),
46  ecalTPSourceSentLabel_(ps.getParameter<edm::InputTag>("ecalTPSourceSent").label()),
47  hcalTPSourceSent_(consumes<HcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("hcalTPSourceSent"))),
48  hcalTPSourceSentLabel_(ps.getParameter<edm::InputTag>("hcalTPSourceSent").label()),
49  histFolder_(ps.getParameter<std::string>("histFolder")),
50  tpFillThreshold_(ps.getUntrackedParameter<int>("etDistributionsFillThreshold", 0))
51 {
52 }
53 
55 {
56 }
57 
59 {
60 }
61 
63 {
65  event.getByToken(ecalTPSourceSent_, ecalTPsSent);
67  event.getByToken(ecalTPSourceRecd_, ecalTPsRecd);
68 
69  SimpleTowerSet ecalSentSet;
70  for ( const auto& tp : *ecalTPsSent ) {
71  // Zero-suppress (if not already done before collection was saved)
72  if ( tp.compressedEt() > 0 ) {
73  ecalSentSet.emplace(tp.id().ieta(), tp.id().iphi(), tp.compressedEt());
74  }
75  }
76  SimpleTowerSet ecalRecdSet;
77  SimpleTowerSet ecalMasked;
78  // Store link flags from received TPs (bits 13-15)
79  // Shift so we access using bits 1-3
80  // See EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc L218
81  for ( const auto& tp : *ecalTPsRecd ) {
82  // Zero-suppress (if not already done before collection was saved)
83  if ( tp.compressedEt() > 0 ) {
84  ecalRecdSet.emplace(tp.id().ieta(), tp.id().iphi(), tp.compressedEt(), tp.sample(0).raw()>>13);
85  }
86  if ( ((tp.sample(0).raw()>>13) & 0b11) > 0 ) {
87  // We will use this later to check if a mismatch is from masked link/tower
88  // Sets are nice for this since find is O(log(n))
89  ecalMasked.emplace(tp.id().ieta(), tp.id().iphi(), 0);
90  }
91  }
92 
93  SimpleTowerSet ecalSentNotRecdSet;
94  std::set_difference(ecalSentSet.begin(), ecalSentSet.end(), ecalRecdSet.begin(), ecalRecdSet.end(), std::inserter(ecalSentNotRecdSet, ecalSentNotRecdSet.begin()));
95  for ( const auto& tp : ecalSentNotRecdSet ) {
96  ecalOccSentNotRecd_->Fill(tp.ieta_, tp.iphi_);
97  ecalTPRawEtSentNotRecd_->Fill(tp.data_);
98 
99  SimpleTower tpNoEt(tp.ieta_, tp.iphi_, 0);
100  if ( ecalMasked.find(tpNoEt) == ecalMasked.end() ) {
101  ecalOccMaskedSentNotRecd_->Fill(tp.ieta_, tp.iphi_);
102  updateMismatch(event, 0);
103  }
104  }
105 
106  SimpleTowerSet ecalRecdNotSentSet;
107  std::set_difference(ecalRecdSet.begin(), ecalRecdSet.end(), ecalSentSet.begin(), ecalSentSet.end(), std::inserter(ecalRecdNotSentSet, ecalRecdNotSentSet.begin()));
108  for ( const auto& tp : ecalRecdNotSentSet ) {
109  ecalOccRecdNotSent_->Fill(tp.ieta_, tp.iphi_);
110  ecalTPRawEtRecdNotSent_->Fill(tp.data_);
111 
112  SimpleTower tpNoEt(tp.ieta_, tp.iphi_, 0);
113  if ( ecalMasked.find(tpNoEt) == ecalMasked.end() ) {
114  ecalOccMaskedRecdNotSent_->Fill(tp.ieta_, tp.iphi_);
115  updateMismatch(event, 1);
116  }
117  }
118 
119  SimpleTowerSet ecalSentAndRecdSet;
120  std::set_intersection(ecalRecdSet.begin(), ecalRecdSet.end(), ecalSentSet.begin(), ecalSentSet.end(), std::inserter(ecalSentAndRecdSet, ecalSentAndRecdSet.begin()));
121  for ( const auto& tp : ecalSentAndRecdSet ) {
122  ecalOccSentAndRecd_->Fill(tp.ieta_, tp.iphi_);
123  ecalTPRawEtSentAndRecd_->Fill(tp.data_);
124  }
125 
126  for ( const auto& ecalTp : *ecalTPsRecd ) {
127  if ( ecalTp.compressedEt() > tpFillThreshold_ ) {
128  ecalTPRawEtRecd_->Fill(ecalTp.compressedEt());
129  ecalOccRecd_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
130  }
131 
132  if(ecalTp.fineGrain()==1){
133  ecalOccRecd_isFineGrainVB_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
134  }
135 
136  if(((ecalTp.sample(0).raw()>>13)&1)==1){
137  ecalOccRecd_isECALTowerMasked_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
138  }
139 
140  if(((ecalTp.sample(0).raw()>>14)&1)==1){
141  ecalOccRecd_isECALLinkMasked_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
142  }
143 
144  if(((ecalTp.sample(0).raw()>>15)&1)==1){
145  ecalOccRecd_isECALLinkInError_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
146  }
147  }
148 
149  for ( const auto& ecalTp : *ecalTPsSent ) {
150  if ( ecalTp.compressedEt() > tpFillThreshold_ ) {
151  ecalTPRawEtSent_->Fill(ecalTp.compressedEt());
152  ecalOccSent_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
153  }
154  if(ecalTp.fineGrain()==1){
155  ecalOccSent_isFineGrainVB_->Fill(ecalTp.id().ieta(), ecalTp.id().iphi());
156  }
157  }
158 
159 
160 
162  event.getByToken(hcalTPSourceSent_, hcalTPsSent);
164  event.getByToken(hcalTPSourceRecd_, hcalTPsRecd);
165 
166  SimpleTowerSet hcalSentSet;
167  for ( const auto& tp : *hcalTPsSent ) {
168  // Zero-suppress (if not already done before collection was saved)
169  if ( tp.SOI_compressedEt() > 0 ) {
170  hcalSentSet.emplace(tp.id().ieta(), tp.id().iphi(), tp.SOI_compressedEt());
171  }
172  }
173  SimpleTowerSet hcalRecdSet;
174  SimpleTowerSet hcalMasked;
175  // Store link flags from received TPs (bits 13-15, also bits 9-11 are misaligned, inerror, down, resp.)
176  // See EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc L261
177  for ( const auto& tp : *hcalTPsRecd ) {
178  // Zero-suppress (if not already done before collection was saved)
179  if ( tp.SOI_compressedEt() > 0 ) {
180  hcalRecdSet.emplace(tp.id().ieta(), tp.id().iphi(), tp.SOI_compressedEt(), tp.sample(0).raw()>>13);
181  }
182  }
183 
184  SimpleTowerSet hcalSentNotRecdSet;
185  std::set_difference(hcalSentSet.begin(), hcalSentSet.end(), hcalRecdSet.begin(), hcalRecdSet.end(), std::inserter(hcalSentNotRecdSet, hcalSentNotRecdSet.begin()));
186  for ( const auto& tp : hcalSentNotRecdSet ) {
187  hcalOccSentNotRecd_->Fill(tp.ieta_, tp.iphi_);
188  hcalTPRawEtSentNotRecd_->Fill(tp.data_);
189 
190  SimpleTower tpNoEt(tp.ieta_, tp.iphi_, 0);
191  if ( hcalMasked.find(tpNoEt) == hcalMasked.end() ) {
192  hcalOccMaskedSentNotRecd_->Fill(tp.ieta_, tp.iphi_);
193  updateMismatch(event, 2);
194  }
195  }
196 
197  SimpleTowerSet hcalRecdNotSentSet;
198  std::set_difference(hcalRecdSet.begin(), hcalRecdSet.end(), hcalSentSet.begin(), hcalSentSet.end(), std::inserter(hcalRecdNotSentSet, hcalRecdNotSentSet.begin()));
199  for ( const auto& tp : hcalRecdNotSentSet ) {
200  hcalOccRecdNotSent_->Fill(tp.ieta_, tp.iphi_);
201  hcalTPRawEtRecdNotSent_->Fill(tp.data_);
202 
203  SimpleTower tpNoEt(tp.ieta_, tp.iphi_, 0);
204  if ( hcalMasked.find(tpNoEt) == hcalMasked.end() ) {
205  hcalOccMaskedRecdNotSent_->Fill(tp.ieta_, tp.iphi_);
206  updateMismatch(event, 3);
207  }
208  }
209 
210  SimpleTowerSet hcalSentAndRecdSet;
211  std::set_intersection(hcalRecdSet.begin(), hcalRecdSet.end(), hcalSentSet.begin(), hcalSentSet.end(), std::inserter(hcalSentAndRecdSet, hcalSentAndRecdSet.begin()));
212  for ( const auto& tp : hcalSentAndRecdSet ) {
213  hcalOccSentAndRecd_->Fill(tp.ieta_, tp.iphi_);
214  hcalTPRawEtSentAndRecd_->Fill(tp.data_);
215  }
216 
217 
218  for ( const auto& hcalTp : *hcalTPsRecd ) {
219  if ( hcalTp.SOI_compressedEt() > tpFillThreshold_ ) {
220  hcalTPRawEtRecd_->Fill(hcalTp.SOI_compressedEt());
221  hcalOccRecd_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
222  }
223  if(hcalTp.SOI_fineGrain()){
224  hcalOccRecd_hasFeatureBits_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
225  }
226 
227  if(((hcalTp.sample(0).raw()>>13)&1)==1){
228  hcalOccRecd_isHCALTowerMasked_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
229  }
230 
231  if(((hcalTp.sample(0).raw()>>14)&1)==1){
232  hcalOccRecd_isHCALLinkMasked_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
233  }
234 
235  if(((hcalTp.sample(0).raw()>>15)&1)==1){
236  hcalOccRecd_isHCALLinkInError_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
237  }
238  }
239 
240  for ( const auto& hcalTp : *hcalTPsSent ) {
241  if ( hcalTp.SOI_compressedEt() > tpFillThreshold_ ) {
242  hcalTPRawEtSent_->Fill(hcalTp.SOI_compressedEt());
243  hcalOccSent_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
244  }
245  if(hcalTp.SOI_fineGrain()==1){
246  hcalOccSent_hasFeatureBits_->Fill(hcalTp.id().ieta(), hcalTp.id().iphi());
247  }
248  }
249 }
250 
251 
252 void L1TLayer1::updateMismatch(const edm::Event& e, int mismatchType) {
253  auto id = e.id();
254  std::string eventString{std::to_string(id.run()) + ":" + std::to_string(id.luminosityBlock()) + ":" + std::to_string(id.event())};
255  last20MismatchArray_.at(lastMismatchIndex_) = {eventString, mismatchType};
256 
257  // Ugly way to loop backwards through the last 20 mismatches
258  for (size_t ibin=1, imatch=lastMismatchIndex_; ibin<=20; ibin++, imatch=(imatch+19)%20) {
259  last20Mismatches_->getTH2F()->GetYaxis()->SetBinLabel(ibin, last20MismatchArray_.at(imatch).first.c_str());
260  for(int itype=0; itype<4; ++itype) {
261  int binContent = itype==last20MismatchArray_.at(imatch).second;
262  last20Mismatches_->setBinContent(itype+1, ibin, binContent);
263  }
264  }
265 
267 }
268 
269 
271 {
272  auto sourceString = [](std::string label){return " (source: "+label+")";};
273 
274  ibooker.setCurrentFolder(histFolder_+"/ECalEtDistributions");
275 
276  ecalTPRawEtSent_ = ibooker.book1D("ecalTPRawEtSent",
277  "ECal Raw Et sent"+sourceString(ecalTPSourceSentLabel_),
278  TPGEtbins, TPGEtMIN, TPGEtMAX);
279 
280  ecalTPRawEtRecd_ = ibooker.book1D("ecalTPRawEtRecd",
281  "ECal Raw Et received"+sourceString(ecalTPSourceRecdLabel_),
282  TPGEtbins, TPGEtMIN, TPGEtMAX);
283 
284  ecalTPRawEtRecdNotSent_ = ibooker.book1D("ecalTPRawEtRecdNotSent",
285  "ECal Raw Et Received NOT Sent",
286  TPGEtbins, TPGEtMIN, TPGEtMAX);
287 
288  ecalTPRawEtSentNotRecd_ = ibooker.book1D("ecalTPRawEtSentNotRecd",
289  "ECal Raw Et Sent NOT Received",
290  TPGEtbins, TPGEtMIN, TPGEtMAX);
291 
292  ecalTPRawEtSentAndRecd_ = ibooker.book1D("ecalTPRawEtSentAndRecd",
293  "ECal Raw Et Sent AND Recd",
294  TPGEtbins, TPGEtMIN, TPGEtMAX);
295 
296 
297  ibooker.setCurrentFolder(histFolder_+"/ECalOccupancies");
298 
299  ecalOccRecd_isECALTowerMasked_ = ibooker.book2D("ecalOccRecd_isECALTowerMasked",
300  "ECal TP Occupancy received for the ECAL Masked towers"+sourceString(ecalTPSourceRecdLabel_),
302 
303  ecalOccRecd_isFineGrainVB_ = ibooker.book2D("ecalOccRecd_isFineGrainVB",
304  "ECal TP Occupancy received for the fine grain veto"+sourceString(ecalTPSourceRecdLabel_),
306 
307  ecalOccSent_isFineGrainVB_ = ibooker.book2D("ecalOccSent_isFineGrainVB",
308  "ECal TP Occupancy sent for the fine grain veto"+sourceString(ecalTPSourceSentLabel_),
310 
311  ecalOccRecd_isECALLinkMasked_ = ibooker.book2D("ecalOccRecd_isECALLinkMasked",
312  "ECal TP Occupancy received for the ECAL Masked Links"+sourceString(ecalTPSourceRecdLabel_),
314 
315  ecalOccRecd_isECALLinkInError_ = ibooker.book2D("ecalOccRecd_isECALLinkInError",
316  "ECal TP Occupancy received for the ECAL Misaligned, Inerror and Down Links"+sourceString(ecalTPSourceRecdLabel_),
318 
319  ecalOccRecd_ = ibooker.book2D("ecalOccRecd",
320  "ECal TP Occupancy received"+sourceString(ecalTPSourceRecdLabel_),
322 
323  ecalOccSent_ = ibooker.book2D("ecalOccSent",
324  "ECal TP Occupancy sent"+sourceString(ecalTPSourceSentLabel_),
326 
327  ecalOccRecdNotSent_ = ibooker.book2D("ecalOccRecdNotSent",
328  "ECal TP Occupancy Received NOT Sent",
330 
331  ecalOccSentNotRecd_ = ibooker.book2D("ecalOccSentNotRecd",
332  "ECal TP Occupancy Sent NOT Received",
334 
335  ecalOccSentAndRecd_ = ibooker.book2D("ecalOccSentAndRecd",
336  "ECal TP Occupancy Sent AND Received",
338 
339 
340  ibooker.setCurrentFolder(histFolder_+"/ECalOccupancies/Masked");
341 
342  ecalOccMaskedRecdNotSent_ = ibooker.book2D("ecalOccMaskedRecdNotSent",
343  "ECal Masked TP Occupancy Received NOT Sent",
345 
346  ecalOccMaskedSentNotRecd_ = ibooker.book2D("ecalOccMaskedSentNotRecd",
347  "ECal Masked TP Occupancy Sent NOT Received",
349 
350  ecalOccMaskedSentAndRecd_ = ibooker.book2D("ecalOccMaskedSentAndRecd",
351  "ECal Masked TP Occupancy Sent AND Received",
353 
354 
355  ibooker.setCurrentFolder(histFolder_+"/HCalEtDistributions");
356 
357  hcalTPRawEtSent_ = ibooker.book1D("hcalTPRawEtSent",
358  "Hcal Raw Et sent"+sourceString(hcalTPSourceSentLabel_),
359  TPGEtbins, TPGEtMIN, TPGEtMAX);
360 
361  hcalTPRawEtRecd_ = ibooker.book1D("hcalTPRawEtRecd",
362  "Hcal Raw Et received"+sourceString(hcalTPSourceRecdLabel_),
363  TPGEtbins, TPGEtMIN, TPGEtMAX);
364 
365  hcalTPRawEtRecdNotSent_ = ibooker.book1D("hcalTPRawEtRecdNotSent",
366  "Hcal Raw Et Received NOT Sent",
367  TPGEtbins, TPGEtMIN, TPGEtMAX);
368 
369  hcalTPRawEtSentNotRecd_ = ibooker.book1D("hcalTPRawEtSentNotRecd",
370  "Hcal Raw Et Sent NOT Received",
371  TPGEtbins, TPGEtMIN, TPGEtMAX);
372 
373  hcalTPRawEtSentAndRecd_ = ibooker.book1D("hcalTPRawEtSentAndRecd",
374  "Hcal Raw Et Sent AND Received",
375  TPGEtbins, TPGEtMIN, TPGEtMAX);
376 
377 
378  ibooker.setCurrentFolder(histFolder_+"/HCalOccupancies");
379 
380  hcalOccRecd_isHCALTowerMasked_ = ibooker.book2D("hcalOccRecd_isHCALTowerMasked",
381  "Hcal TP Occupancy received for the HCAL Masked towers"+sourceString(hcalTPSourceRecdLabel_),
382  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
383 
384  hcalOccRecd_hasFeatureBits_ = ibooker.book2D("hcalOccRecd_hasFeatureBits",
385  "Hcal TP Occupancy received for the feature bits"+sourceString(hcalTPSourceRecdLabel_),
386  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
387 
388  hcalOccSent_hasFeatureBits_ = ibooker.book2D("hcalOccSent_hasFeatureBits",
389  "Hcal TP Occupancy sent for the feature bits"+sourceString(hcalTPSourceSentLabel_),
390  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
391 
392 
393  hcalOccRecd_isHCALLinkMasked_ = ibooker.book2D("hcalOccRecd_isHCALLinkMasked",
394  "Hcal TP Occupancy received for the HCAL Masked Links"+sourceString(hcalTPSourceRecdLabel_),
395  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
396 
397  hcalOccRecd_isHCALLinkInError_ = ibooker.book2D("hcalOccRecd_isHCALLinkInError",
398  "Hcal TP Occupancy received for the HCAL Misaligned, Inerror and Down Links"+sourceString(hcalTPSourceRecdLabel_),
399  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
400 
401  hcalOccRecd_ = ibooker.book2D("hcalOccRecd",
402  "Hcal TP Occupancy received"+sourceString(hcalTPSourceRecdLabel_),
403  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
404 
405  hcalOccSent_ = ibooker.book2D("hcalOccSent",
406  "Hcal TP Occupancy sent"+sourceString(hcalTPSourceSentLabel_),
407  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
408 
409  hcalOccRecdNotSent_ = ibooker.book2D("hcalOccRecdNotSent",
410  "HCal TP Occupancy Received NOT Sent",
411  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
412 
413  hcalOccSentNotRecd_ = ibooker.book2D("hcalOccSentNotRecd",
414  "HCal TP Occupancy Sent NOT Received",
415  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
416 
417  hcalOccSentAndRecd_ = ibooker.book2D("hcalOccSentAndRecd",
418  "HCal TP Occupancy Sent AND Received",
419  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
420 
421 
422  ibooker.setCurrentFolder(histFolder_+"/HCalOccupancies/Masked");
423 
424  hcalOccMaskedRecdNotSent_ = ibooker.book2D("hcalOccMaskedRecdNotSent",
425  "HCal Masked TP Occupancy Received NOT Sent",
426  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
427 
428  hcalOccMaskedSentNotRecd_ = ibooker.book2D("hcalOccMaskedSentNotRecd",
429  "HCal Masked TP Occupancy Sent NOT Received",
430  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
431 
432  hcalOccMaskedSentAndRecd_ = ibooker.book2D("hcalOccMaskedSentAndRecd",
433  "HCal Masked TP Occupancy Sent AND Received",
434  TPETABINSHCAL, TPETAMINHCAL, TPETAMAXHCAL, TPGPHIBINS, TPGPHIMIN, TPGPHIMAX);
435 
436 
437  ibooker.setCurrentFolder(histFolder_+"/Mismatch");
438 
439  last20Mismatches_ = ibooker.book2D("last20Mismatches",
440  "Log of last 20 mismatches (use json tool to copy/paste)",
441  4, 0, 4, 20, 0, 20);
442  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(1, "Ecal TP Sent Not Received");
443  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(2, "Ecal TP Received Not Sent");
444  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(3, "Hcal TP Sent Not Received");
445  last20Mismatches_->getTH2F()->GetXaxis()->SetBinLabel(4, "Hcal TP Received Not Sent");
446  for (size_t i=0; i<20; ++i) last20MismatchArray_.at(i) = {"-", -1};
447  for (size_t i=1; i<=20; ++i) last20Mismatches_->getTH2F()->GetYaxis()->SetBinLabel(i, "-");
448 }
449 
451 {
452 }
453 
size_t lastMismatchIndex_
Definition: L1TLayer1.h:122
L1TLayer1(const edm::ParameterSet &ps)
Definition: L1TLayer1.cc:40
int i
Definition: DBlmapReader.cc:9
MonitorElement * hcalTPRawEtSent_
Definition: L1TLayer1.h:115
MonitorElement * hcalTPRawEtRecdNotSent_
Definition: L1TLayer1.h:116
MonitorElement * ecalOccRecdNotSent_
Definition: L1TLayer1.h:85
void setBinContent(int binx, double content)
set content of bin (1-D)
const unsigned int TPGETABINS
Definition: L1TdeRCT.cc:54
MonitorElement * last20Mismatches_
Definition: L1TLayer1.h:120
int tpFillThreshold_
Definition: L1TLayer1.h:50
MonitorElement * ecalOccSentNotRecd_
Definition: L1TLayer1.h:84
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceSent_
Definition: L1TLayer1.h:47
virtual ~L1TLayer1()
Definition: L1TLayer1.cc:54
MonitorElement * hcalOccMaskedSentNotRecd_
Definition: L1TLayer1.h:111
MonitorElement * ecalOccMaskedRecdNotSent_
Definition: L1TLayer1.h:89
def ls
Definition: eostools.py:348
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceRecd_
Definition: L1TLayer1.h:41
const float TPGETAMAX
Definition: L1TdeRCT.cc:56
MonitorElement * ecalTPRawEtRecd_
Definition: L1TLayer1.h:91
MonitorElement * ecalTPRawEtSentNotRecd_
Definition: L1TLayer1.h:94
MonitorElement * hcalOccSentNotRecd_
Definition: L1TLayer1.h:107
MonitorElement * ecalOccRecd_
Definition: L1TLayer1.h:77
std::string ecalTPSourceSentLabel_
Definition: L1TLayer1.h:46
MonitorElement * ecalOccRecd_isECALLinkInError_
Definition: L1TLayer1.h:81
#define constexpr
std::string ecalTPSourceRecdLabel_
Definition: L1TLayer1.h:42
std::set< SimpleTower > SimpleTowerSet
Definition: L1TLayer1.h:72
MonitorElement * hcalOccRecd_
Definition: L1TLayer1.h:100
const float TPGPHIMIN
Definition: L1TdeRCT.cc:51
void Fill(long long x)
MonitorElement * ecalOccRecd_isECALTowerMasked_
Definition: L1TLayer1.h:79
MonitorElement * ecalTPRawEtSent_
Definition: L1TLayer1.h:92
MonitorElement * hcalOccRecd_isHCALTowerMasked_
Definition: L1TLayer1.h:102
MonitorElement * hcalTPRawEtSentNotRecd_
Definition: L1TLayer1.h:117
MonitorElement * hcalOccSent_
Definition: L1TLayer1.h:97
MonitorElement * hcalOccRecd_isHCALLinkInError_
Definition: L1TLayer1.h:104
MonitorElement * ecalOccMaskedSentNotRecd_
Definition: L1TLayer1.h:88
MonitorElement * hcalOccMaskedSentAndRecd_
Definition: L1TLayer1.h:110
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
Definition: L1TLayer1.h:121
std::string histFolder_
Definition: L1TLayer1.h:49
MonitorElement * hcalOccMaskedRecdNotSent_
Definition: L1TLayer1.h:112
MonitorElement * hcalOccSentAndRecd_
Definition: L1TLayer1.h:106
virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
Definition: L1TLayer1.cc:270
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hcalTPRawEtSentAndRecd_
Definition: L1TLayer1.h:118
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TLayer1.cc:62
MonitorElement * ecalOccSentAndRecd_
Definition: L1TLayer1.h:83
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
MonitorElement * ecalOccSent_isFineGrainVB_
Definition: L1TLayer1.h:75
std::string hcalTPSourceSentLabel_
Definition: L1TLayer1.h:48
MonitorElement * ecalOccSent_
Definition: L1TLayer1.h:74
void updateMismatch(const edm::Event &e, int mismatchType)
Definition: L1TLayer1.cc:252
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * ecalOccRecd_isECALLinkMasked_
Definition: L1TLayer1.h:80
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * hcalOccRecd_isHCALLinkMasked_
Definition: L1TLayer1.h:103
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSourceRecd_
Definition: L1TLayer1.h:43
MonitorElement * hcalOccRecd_hasFeatureBits_
Definition: L1TLayer1.h:101
MonitorElement * hcalOccSent_hasFeatureBits_
Definition: L1TLayer1.h:98
MonitorElement * hcalTPRawEtRecd_
Definition: L1TLayer1.h:114
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSourceSent_
Definition: L1TLayer1.h:45
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: L1TLayer1.cc:450
MonitorElement * ecalOccRecd_isFineGrainVB_
Definition: L1TLayer1.h:78
MonitorElement * ecalTPRawEtSentAndRecd_
Definition: L1TLayer1.h:95
const unsigned int TPGPHIBINS
Definition: L1TdeRCT.cc:50
edm::EventID id() const
Definition: EventBase.h:59
MonitorElement * ecalOccMaskedSentAndRecd_
Definition: L1TLayer1.h:87
std::string hcalTPSourceRecdLabel_
Definition: L1TLayer1.h:44
MonitorElement * ecalTPRawEtRecdNotSent_
Definition: L1TLayer1.h:93
MonitorElement * hcalOccRecdNotSent_
Definition: L1TLayer1.h:108
TH2F * getTH2F(void) const
const float TPGETAMIN
Definition: L1TdeRCT.cc:55
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Definition: L1TLayer1.cc:58
Definition: Run.h:43
const float TPGPHIMAX
Definition: L1TdeRCT.cc:52