CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TGCT.cc
Go to the documentation of this file.
1 /*
2  * \file L1TGCT.cc
3  *
4  * $Date: 2012/04/04 09:56:36 $
5  * $Revision: 1.57 $
6  * \author J. Berryhill
7  *
8  * $Log: L1TGCT.cc,v $
9  * Revision 1.57 2012/04/04 09:56:36 ghete
10  * Clean up L1TDEMON, add TriggerType hist to RCT, GCT, enable correlation condition tests in GT, clean up HCAL files.
11  *
12  * Revision 1.56 2012/03/29 21:16:48 rovere
13  * Removed all instances of hltTriggerTypeFilter from L1T DQM Code.
14  *
15  * Revision 1.55 2010/06/28 09:29:30 tapper
16  * Reduced number of bins.
17  *
18  * Revision 1.54 2010/06/28 06:40:46 tapper
19  * Reduced numbers of bins in correlation plots (MET vs MHT and SumET vs HT).
20  *
21  * Revision 1.53 2010/06/14 20:38:45 tapper
22  * Fixed stupid bug in MET vs MHT phi correlation.
23  *
24  * Revision 1.52 2010/06/09 14:39:27 tapper
25  * Fixed labels and binning again.
26  *
27  * Revision 1.51 2010/06/09 14:03:04 tapper
28  * Fixed histogram titles and binning in projections.
29  *
30  * Revision 1.50 2010/05/30 10:01:59 tapper
31  * Added one histogram, correlation of sum ET and HT and changed a few labels for the better.
32  *
33  * Revision 1.49 2010/04/30 12:50:22 tapper
34  * Fixed number of bins and range for MHT phi.
35  *
36  * Revision 1.48 2010/04/05 11:34:58 tapper
37  * Changed scales on 2D HF correlation plots. No idea why they had eta phi scales when they only have 3 bits....
38  *
39  * Revision 1.47 2010/04/02 16:32:42 tapper
40  * 1. Changed GCT unpacker settings to unpack 5 BXs.
41  * 2. Changed L1TGCT to plot only central BX distributions but all 5 BXs for timing plots.
42  * 3. Made labels more descriptive in GCT emulator expert DQM.
43  *
44  * Revision 1.46 2009/11/19 14:39:15 puigh
45  * modify beginJob
46  *
47  * Revision 1.45 2009/11/02 22:30:27 tapper
48  * Err that'll teach me to test it properly.... fixed a bug in the HF ring histograms.
49  *
50  * Revision 1.44 2009/11/02 17:00:05 tapper
51  * Changes to L1TdeGCT (to include energy sums), to L1TDEMON (should not make any difference now) and L1TGCT to add multiple BXs.
52  *
53  * Revision 1.43 2009/07/22 19:40:24 puigh
54  * Update binning to reflect instrumentation
55  *
56  * Revision 1.42 2009/06/23 09:48:55 tapper
57  * Added missing occupancy plot for central and forward jets.
58  *
59  * Revision 1.41 2009/06/22 15:58:20 tapper
60  * Added MET vs MHT correlation plots (both for magnitude and phi). Still untested!
61  *
62  * Revision 1.39 2009/05/27 21:49:26 jad
63  * updated Total and Missing Energy histograms and added Overlow plots
64  *
65  * Revision 1.38 2009/02/24 13:01:42 jad
66  * Updated MET_PHI histogram to obey the correct limits
67  *
68  * Revision 1.37 2008/11/11 13:20:32 tapper
69  * A whole list of house keeping:
70  * 1. New shifter histogram with central and forward jets together.
71  * 2. Relabelled Ring 0 and Ring 1 to Ring 1 and Ring 2 for HF rings.
72  * 3. Tidied up some histograms names to make all consistent.
73  * 4. Switched eta and phi in 2D plots to match RCT.
74  * 5. Removed 1D eta and phi plots. Will not be needed for Qtests in future.
75  *
76  * Revision 1.36 2008/10/28 14:16:16 tapper
77  * Tidied up and removed some unnecessary code.
78  *
79  * Revision 1.35 2008/10/24 08:38:54 jbrooke
80  * fix empty jet plots
81  *
82  * Revision 1.34 2008/10/10 12:41:24 jbrooke
83  * put back checks on energy sum vector size, change [] to .at()
84  *
85  * Revision 1.33 2008/09/21 14:37:51 jad
86  * updated HF Sums & Counts and added individual Jet Candidates and differences
87  *
88  * Revision 1.30 2008/06/09 11:07:52 tapper
89  * Removed electron sub-folders with histograms per eta and phi bin.
90  *
91  * Revision 1.29 2008/06/06 15:18:22 tapper
92  * Removed errorSummary folder stuff.
93  *
94  * Revision 1.28 2008/06/02 11:08:58 tapper
95  * Added HF ring histograms....
96  *
97  * Revision 1.27 2008/05/12 12:52:46 tapper
98  * Fixed problem when no GCT data in the event.
99  *
100  * Revision 1.26 2008/05/09 16:42:27 ameyer
101  * *** empty log message ***
102  *
103  * Revision 1.25 2008/04/29 15:24:49 tapper
104  * Changed path to summary histograms.
105  *
106  * Revision 1.24 2008/04/28 09:23:07 tapper
107  * Added 1D eta and phi histograms for electrons and jets as input to Q tests.
108  *
109  * Revision 1.23 2008/04/25 15:40:21 tapper
110  * Added histograms to EventInfo//errorSummarySegments.
111  *
112  * Revision 1.22 2008/03/20 19:38:25 berryhil
113  *
114  *
115  * organized message logger
116  *
117  * Revision 1.21 2008/03/14 20:35:46 berryhil
118  *
119  *
120  * stripped out obsolete parameter settings
121  *
122  * rpc tpg restored with correct dn access and dbe handling
123  *
124  * Revision 1.20 2008/03/12 17:24:24 berryhil
125  *
126  *
127  * eliminated log files, truncated HCALTPGXana histo output
128  *
129  * Revision 1.19 2008/03/01 00:40:00 lat
130  * DQM core migration.
131  *
132  * Revision 1.18 2008/02/20 18:59:29 tapper
133  * Ported GCTMonitor histograms into L1TGCT
134  *
135  * Revision 1.17 2008/01/22 18:56:02 muzaffar
136  * include cleanup. Only for cc/cpp files
137  *
138  * Revision 1.16 2007/12/21 17:41:20 berryhil
139  *
140  *
141  * try/catch removal
142  *
143  * Revision 1.15 2007/11/19 15:08:22 lorenzo
144  * changed top folder name
145  *
146  * Revision 1.14 2007/09/27 23:01:28 ratnik
147  * QA campaign: fixes to compensate includes cleanup in DataFormats/L1Trigger
148  *
149  * Revision 1.13 2007/09/27 16:56:26 wittich
150  * verbosity fixes
151  *
152  * Revision 1.12 2007/09/26 15:26:23 berryhil
153  *
154  *
155  * restored L1TGCT.cc
156  *
157  * Revision 1.10 2007/09/05 22:31:36 wittich
158  * - Factorize getByLabels to approximate my understanding of what the
159  * HW can do.
160  * - tested (loosely speaking) on GREJ' data.
161  *
162  * Revision 1.9 2007/09/04 02:54:19 wittich
163  * - fix dupe ME in RCT
164  * - put in rank>0 req in GCT
165  * - various small other fixes
166  *
167  * Revision 1.8 2007/08/31 18:14:21 wittich
168  * update GCT packages to reflect GctRawToDigi, and move to raw plots
169  *
170  * Revision 1.7 2007/08/31 11:02:56 wittich
171  * cerr -> LogInfo
172  *
173  * Revision 1.6 2007/02/22 19:43:53 berryhil
174  *
175  *
176  *
177  * InputTag parameters added for all modules
178  *
179  *
180  *
181  */
182 
186 
187 // Trigger Headers
188 
189 // GCT and RCT data formats
193 
194 using namespace edm;
195 
196 // Define statics for bins etc.
197 const unsigned int JETETABINS = 22;
198 const float JETETAMIN = -0.5;
199 const float JETETAMAX = 21.5;
200 
201 const unsigned int EMETABINS = 22;
202 const float EMETAMIN = -0.5;
203 const float EMETAMAX = 21.5;
204 
205 const unsigned int METPHIBINS = 72;
206 const float METPHIMIN = -0.5;
207 const float METPHIMAX = 71.5;
208 
209 const unsigned int MHTPHIBINS = 18;
210 const float MHTPHIMIN = -0.5;
211 const float MHTPHIMAX = 17.5;
212 
213 const unsigned int PHIBINS = 18;
214 const float PHIMIN = -0.5;
215 const float PHIMAX = 17.5;
216 
217 const unsigned int OFBINS = 2;
218 const float OFMIN = -0.5;
219 const float OFMAX = 1.5;
220 
221 const unsigned int BXBINS = 5;
222 const float BXMIN = -2.5;
223 const float BXMAX = 2.5;
224 
225 // Bins for 3, 5, 6, 7, 10 and 12 bits
226 const unsigned int R3BINS = 8;
227 const float R3MIN = -0.5;
228 const float R3MAX = 7.5;
229 const unsigned int R5BINS = 32;
230 const float R5MIN = -0.5;
231 const float R5MAX = 31.5;
232 const unsigned int R6BINS = 64;
233 const float R6MIN = -0.5;
234 const float R6MAX = 63.5;
235 const unsigned int R7BINS = 128;
236 const float R7MIN = -0.5;
237 const float R7MAX = 127.5;
238 const unsigned int R10BINS = 1024;
239 const float R10MIN = -0.5;
240 const float R10MAX = 1023.5;
241 const unsigned int R12BINS = 4096;
242 const float R12MIN = -0.5;
243 const float R12MAX = 4095.5;
244 
246  gctCenJetsSource_(ps.getParameter<edm::InputTag>("gctCentralJetsSource")),
247  gctForJetsSource_(ps.getParameter<edm::InputTag>("gctForwardJetsSource")),
248  gctTauJetsSource_(ps.getParameter<edm::InputTag>("gctTauJetsSource")),
249  gctEnergySumsSource_(ps.getParameter<edm::InputTag>("gctEnergySumsSource")),
250  gctIsoEmSource_(ps.getParameter<edm::InputTag>("gctIsoEmSource")),
251  gctNonIsoEmSource_(ps.getParameter<edm::InputTag>("gctNonIsoEmSource")),
252  filterTriggerType_ (ps.getParameter< int >("filterTriggerType"))
253 {
254 
255  // verbosity switch
256  verbose_ = ps.getUntrackedParameter < bool > ("verbose", false);
257 
258  if (verbose_)
259  edm::LogInfo("L1TGCT") << "L1TGCT: constructor...." << std::endl;
260 
261 
262  dbe = NULL;
263  if (ps.getUntrackedParameter < bool > ("DQMStore", false)) {
265  dbe->setVerbose(0);
266  }
267 
268  outputFile_ = ps.getUntrackedParameter < std::string > ("outputFile", "");
269  if (outputFile_.size() != 0) {
270  edm::LogInfo("L1TGCT") << "L1T Monitoring histograms will be saved to "
271  << outputFile_ << std::endl;
272  }
273 
274  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
275  if(disable){
276  outputFile_="";
277  }
278 
279 
280  if (dbe != NULL) {
281  dbe->setCurrentFolder("L1T/L1TGCT");
282  }
283 
284 }
285 
287 {
288 }
289 
291 {
292 
293  nev_ = 0;
294 
295  // get hold of back-end interface
296  DQMStore *dbe = 0;
297  dbe = edm::Service < DQMStore > ().operator->();
298 
299  if (dbe) {
300  dbe->setCurrentFolder("L1T/L1TGCT");
301  dbe->rmdir("L1T/L1TGCT");
302  }
303 
304 
305  if (dbe) {
306 
307  dbe->setCurrentFolder("L1T/L1TGCT");
308 
309  triggerType_ =
310  dbe->book1D("TriggerType", "TriggerType", 17, -0.5, 16.5);
311 
312  l1GctAllJetsEtEtaPhi_ = dbe->book2D("AllJetsEtEtaPhi", "CENTRAL AND FORWARD JET E_{T}",
314  PHIBINS, PHIMIN, PHIMAX);
315  l1GctCenJetsEtEtaPhi_ = dbe->book2D("CenJetsEtEtaPhi", "CENTRAL JET E_{T}",
317  PHIBINS, PHIMIN, PHIMAX);
318  l1GctForJetsEtEtaPhi_ = dbe->book2D("ForJetsEtEtaPhi", "FORWARD JET E_{T}",
320  PHIBINS, PHIMIN, PHIMAX);
321  l1GctTauJetsEtEtaPhi_ = dbe->book2D("TauJetsEtEtaPhi", "TAU JET E_{T}",
323  PHIBINS, PHIMIN, PHIMAX);
324  l1GctIsoEmRankEtaPhi_ = dbe->book2D("IsoEmRankEtaPhi", "ISO EM E_{T}",
326  PHIBINS, PHIMIN, PHIMAX);
327  l1GctNonIsoEmRankEtaPhi_ = dbe->book2D("NonIsoEmRankEtaPhi", "NON-ISO EM E_{T}",
329  PHIBINS, PHIMIN, PHIMAX);
330  l1GctAllJetsOccEtaPhi_ = dbe->book2D("AllJetsOccEtaPhi", "CENTRAL AND FORWARD JET OCCUPANCY",
332  PHIBINS, PHIMIN, PHIMAX);
333  l1GctCenJetsOccEtaPhi_ = dbe->book2D("CenJetsOccEtaPhi", "CENTRAL JET OCCUPANCY",
335  PHIBINS, PHIMIN, PHIMAX);
336  l1GctForJetsOccEtaPhi_ = dbe->book2D("ForJetsOccEtaPhi", "FORWARD JET OCCUPANCY",
338  PHIBINS, PHIMIN, PHIMAX);
339  l1GctTauJetsOccEtaPhi_ = dbe->book2D("TauJetsOccEtaPhi", "TAU JET OCCUPANCY",
341  PHIBINS, PHIMIN, PHIMAX);
342  l1GctIsoEmOccEtaPhi_ = dbe->book2D("IsoEmOccEtaPhi", "ISO EM OCCUPANCY",
344  PHIBINS, PHIMIN, PHIMAX);
345  l1GctNonIsoEmOccEtaPhi_ = dbe->book2D("NonIsoEmOccEtaPhi", "NON-ISO EM OCCUPANCY",
347  PHIBINS, PHIMIN, PHIMAX);
348 
349  l1GctHFRing1PosEtaNegEta_ = dbe->book2D("HFRing1Corr", "HF RING1 E_{T} CORRELATION +/- #eta",
351  l1GctHFRing2PosEtaNegEta_ = dbe->book2D("HFRing2Corr", "HF RING2 E_{T} CORRELATION +/- #eta",
353  l1GctHFRing1TowerCountPosEtaNegEta_ = dbe->book2D("HFRing1TowerCountCorr", "HF RING1 TOWER COUNT CORRELATION +/- #eta",
355  l1GctHFRing2TowerCountPosEtaNegEta_ = dbe->book2D("HFRing2TowerCountCorr", "HF RING2 TOWER COUNT CORRELATION +/- #eta",
357 
358  //HF Ring stuff
359  l1GctHFRing1TowerCountPosEta_ = dbe->book1D("HFRing1TowerCountPosEta", "HF RING1 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
360  l1GctHFRing1TowerCountNegEta_ = dbe->book1D("HFRing1TowerCountNegEta", "HF RING1 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
361  l1GctHFRing2TowerCountPosEta_ = dbe->book1D("HFRing2TowerCountPosEta", "HF RING2 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
362  l1GctHFRing2TowerCountNegEta_ = dbe->book1D("HFRing2TowerCountNegEta", "HF RING2 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
363 
364  l1GctHFRing1ETSumPosEta_ = dbe->book1D("HFRing1ETSumPosEta", "HF RING1 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
365  l1GctHFRing1ETSumNegEta_ = dbe->book1D("HFRing1ETSumNegEta", "HF RING1 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
366  l1GctHFRing2ETSumPosEta_ = dbe->book1D("HFRing2ETSumPosEta", "HF RING2 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
367  l1GctHFRing2ETSumNegEta_ = dbe->book1D("HFRing2ETSumNegEta", "HF RING2 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
368  l1GctHFRingRatioPosEta_ = dbe->book1D("HFRingRatioPosEta", "HF RING E_{T} RATIO #eta +", R5BINS, R5MIN, R5MAX);
369  l1GctHFRingRatioNegEta_ = dbe->book1D("HFRingRatioNegEta", "HF RING E_{T} RATIO #eta -", R5BINS, R5MIN, R5MAX);
370 
371  l1GctHFRingTowerCountOccBx_ = dbe->book2D("HFRingTowerCountOccBx", "HF RING TOWER COUNT PER BX",BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
372  l1GctHFRingETSumOccBx_ = dbe->book2D("HFRingETSumOccBx", "HF RING E_{T} PER BX",BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
373 
374  // Rank histograms
375  l1GctCenJetsRank_ = dbe->book1D("CenJetsRank", "CENTRAL JET E_{T}", R6BINS, R6MIN, R6MAX);
376  l1GctForJetsRank_ = dbe->book1D("ForJetsRank", "FORWARD JET E_{T}", R6BINS, R6MIN, R6MAX);
377  l1GctTauJetsRank_ = dbe->book1D("TauJetsRank", "TAU JET E_{T}", R6BINS, R6MIN, R6MAX);
378  l1GctIsoEmRank_ = dbe->book1D("IsoEmRank", "ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
379  l1GctNonIsoEmRank_ = dbe->book1D("NonIsoEmRank", "NON-ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
380 
381  l1GctAllJetsOccRankBx_ = dbe->book2D("AllJetsOccRankBx","ALL JETS E_{T} PER BX",BXBINS,BXMIN,BXMAX,R6BINS,R6MIN,R6MAX);
382  l1GctAllEmOccRankBx_ = dbe->book2D("AllEmOccRankBx","ALL EM E_{T} PER BX",BXBINS,BXMIN,BXMAX,R6BINS,R6MIN,R6MAX);
383 
384  // Energy sums
385  l1GctEtMiss_ = dbe->book1D("EtMiss", "MET", R12BINS, R12MIN, R12MAX);
386  l1GctEtMissPhi_ = dbe->book1D("EtMissPhi", "MET #phi", METPHIBINS, METPHIMIN, METPHIMAX);
387  l1GctEtMissOf_ = dbe->book1D("EtMissOf", "MET OVERFLOW", OFBINS, OFMIN, OFMAX);
388  l1GctEtMissOccBx_ = dbe->book2D("EtMissOccBx","MET PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
389  l1GctHtMiss_ = dbe->book1D("HtMiss", "MHT", R7BINS, R7MIN, R7MAX);
390  l1GctHtMissPhi_ = dbe->book1D("HtMissPhi", "MHT #phi", MHTPHIBINS, MHTPHIMIN, MHTPHIMAX);
391  l1GctHtMissOf_ = dbe->book1D("HtMissOf", "MHT OVERFLOW", OFBINS, OFMIN, OFMAX);
392  l1GctHtMissOccBx_ = dbe->book2D("HtMissOccBx","MHT PER BX",BXBINS,BXMIN,BXMAX,R7BINS,R7MIN,R7MAX);
393  l1GctEtMissHtMissCorr_ = dbe->book2D("EtMissHtMissCorr", "MET MHT CORRELATION",
394  R6BINS, R12MIN, R12MAX,
395  R6BINS, R7MIN, R7MAX);
396  l1GctEtMissHtMissCorrPhi_ = dbe->book2D("EtMissHtMissPhiCorr", "MET MHT #phi CORRELATION",
399  l1GctEtTotal_ = dbe->book1D("EtTotal", "SUM E_{T}", R12BINS, R12MIN, R12MAX);
400  l1GctEtTotalOf_ = dbe->book1D("EtTotalOf", "SUM E_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
401  l1GctEtTotalOccBx_ = dbe->book2D("EtTotalOccBx","SUM E_{T} PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
402  l1GctEtHad_ = dbe->book1D("EtHad", "H_{T}", R12BINS, R12MIN, R12MAX);
403  l1GctEtHadOf_ = dbe->book1D("EtHadOf", "H_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
404  l1GctEtHadOccBx_ = dbe->book2D("EtHadOccBx","H_{T} PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
405  l1GctEtTotalEtHadCorr_ = dbe->book2D("EtTotalEtHadCorr", "Sum E_{T} H_{T} CORRELATION",
406  R6BINS, R12MIN, R12MAX,
407  R6BINS, R12MIN, R12MAX);
408  }
409 
410 }
411 
412 
413 void L1TGCT::endJob(void)
414 {
415  if (verbose_)
416  edm::LogInfo("L1TGCT") << "L1TGCT: end job...." << std::endl;
417  edm::LogInfo("EndJob") << "analyzed " << nev_ << " events";
418 
419  if (outputFile_.size() != 0 && dbe) {
420  dbe->save(outputFile_);
421  }
422 
423  return;
424 }
425 
427 {
428  nev_++;
429  if (verbose_) {
430  edm::LogInfo("L1TGCT") << "L1TGCT: analyze...." << std::endl;
431  }
432 
433 
434  // filter according trigger type
435  // enum ExperimentType {
436  // Undefined = 0,
437  // PhysicsTrigger = 1,
438  // CalibrationTrigger = 2,
439  // RandomTrigger = 3,
440  // Reserved = 4,
441  // TracedEvent = 5,
442  // TestTrigger = 6,
443  // ErrorTrigger = 15
444 
445  // fill a histogram with the trigger type, for normalization fill also last bin
446  // ErrorTrigger + 1
447  double triggerType = static_cast<double> (e.experimentType()) + 0.001;
448  double triggerTypeLast = static_cast<double> (edm::EventAuxiliary::ExperimentType::ErrorTrigger)
449  + 0.001;
450  triggerType_->Fill(triggerType);
451  triggerType_->Fill(triggerTypeLast + 1);
452 
453  // filter only if trigger type is greater than 0, negative values disable filtering
454  if (filterTriggerType_ >= 0) {
455 
456  // now filter, for real data only
457  if (e.isRealData()) {
458  if (!(e.experimentType() == filterTriggerType_)) {
459 
460  edm::LogInfo("L1TGCT") << "\n Event of TriggerType "
461  << e.experimentType() << " rejected" << std::endl;
462  return;
463 
464  }
465  }
466 
467  }
468 
469  // Get all the collections
481 
482  e.getByLabel(gctIsoEmSource_, l1IsoEm);
483  e.getByLabel(gctNonIsoEmSource_, l1NonIsoEm);
484  e.getByLabel(gctCenJetsSource_, l1CenJets);
485  e.getByLabel(gctForJetsSource_, l1ForJets);
486  e.getByLabel(gctTauJetsSource_, l1TauJets);
487  e.getByLabel(gctEnergySumsSource_, l1HFSums);
488  e.getByLabel(gctEnergySumsSource_, l1HFCounts);
489  e.getByLabel(gctEnergySumsSource_, l1EtMiss);
490  e.getByLabel(gctEnergySumsSource_, l1HtMiss);
491  e.getByLabel(gctEnergySumsSource_, l1EtHad);
492  e.getByLabel(gctEnergySumsSource_, l1EtTotal);
493 
494 
495  // Fill histograms
496 
497  // Central jets
498  if (l1CenJets.isValid()) {
499  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin();cj != l1CenJets->end(); cj++) {
500  // only plot central BX
501  if (cj->bx()==0) {
502  l1GctCenJetsRank_->Fill(cj->rank());
503  // only plot eta and phi maps for non-zero candidates
504  if (cj->rank()) {
505  l1GctAllJetsEtEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi(),cj->rank());
506  l1GctAllJetsOccEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi());
507  l1GctCenJetsEtEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi(),cj->rank());
508  l1GctCenJetsOccEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi());
509  }
510  }
511  if (cj->rank()) l1GctAllJetsOccRankBx_->Fill(cj->bx(),cj->rank()); // for all BX
512  }
513  } else {
514  edm::LogWarning("DataNotFound") << " Could not find l1CenJets label was " << gctCenJetsSource_ ;
515  }
516 
517  // Forward jets
518  if (l1ForJets.isValid()) {
519  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
520  // only plot central BX
521  if (fj->bx()==0) {
522  l1GctForJetsRank_->Fill(fj->rank());
523  // only plot eta and phi maps for non-zero candidates
524  if (fj->rank()) {
525  l1GctAllJetsEtEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi(),fj->rank());
526  l1GctAllJetsOccEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi());
527  l1GctForJetsEtEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi(),fj->rank());
528  l1GctForJetsOccEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi());
529  }
530  }
531  if (fj->rank()) l1GctAllJetsOccRankBx_->Fill(fj->bx(),fj->rank()); // for all BX
532  }
533  } else {
534  edm::LogWarning("DataNotFound") << " Could not find l1ForJets label was " << gctForJetsSource_ ;
535  }
536 
537  // Tau jets
538  if (l1TauJets.isValid()) {
539  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
540  // only plot central BX
541  if (tj->bx()==0) {
542  l1GctTauJetsRank_->Fill(tj->rank());
543  // only plot eta and phi maps for non-zero candidates
544  if (tj->rank()) {
545  l1GctTauJetsEtEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi(),tj->rank());
546  l1GctTauJetsOccEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi());
547  }
548  }
549  if (tj->rank()) l1GctAllJetsOccRankBx_->Fill(tj->bx(),tj->rank()); // for all BX
550  }
551  } else {
552  edm::LogWarning("DataNotFound") << " Could not find l1TauJets label was " << gctTauJetsSource_ ;
553  }
554 
555  // Missing ET
556  if (l1EtMiss.isValid()) {
557  for (L1GctEtMissCollection::const_iterator met = l1EtMiss->begin(); met != l1EtMiss->end(); met++) {
558  // only plot central BX
559  if (met->bx()==0) {
560  if (met->overFlow() == 0 && met->et() > 0) {
561  //Avoid problems with met=0 candidates affecting MET_PHI plots
562  l1GctEtMiss_->Fill(met->et());
563  l1GctEtMissPhi_->Fill(met->phi());
564  }
565  l1GctEtMissOf_->Fill(met->overFlow());
566  }
567  if (met->overFlow() == 0 && met->et() > 0) l1GctEtMissOccBx_->Fill(met->bx(),met->et()); // for all BX
568  }
569  } else {
570  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss label was " << gctEnergySumsSource_ ;
571  }
572 
573  // Missing HT
574  if (l1HtMiss.isValid()) {
575  for (L1GctHtMissCollection::const_iterator mht = l1HtMiss->begin(); mht != l1HtMiss->end(); mht++) {
576  // only plot central BX
577  if (mht->bx()==0) {
578  if (mht->overFlow() == 0 && mht->et() > 0) {
579  //Avoid problems with mht=0 candidates affecting MHT_PHI plots
580  l1GctHtMiss_->Fill(mht->et());
581  l1GctHtMissPhi_->Fill(mht->phi());
582  }
583  l1GctHtMissOf_->Fill(mht->overFlow());
584  }
585  if (mht->overFlow() == 0 && mht->et() > 0) l1GctHtMissOccBx_->Fill(mht->bx(),mht->et()); // for all BX
586  }
587  } else {
588  edm::LogWarning("DataNotFound") << " Could not find l1HtMiss label was " << gctEnergySumsSource_ ;
589  }
590 
591  // Missing ET HT correlations
592  if (l1HtMiss.isValid() && l1EtMiss.isValid()) {
593  if (l1HtMiss->size() == l1EtMiss->size()) {
594  for (unsigned i=0; i<l1HtMiss->size(); i++) {
595  if (l1HtMiss->at(i).overFlow() == 0 && l1EtMiss->at(i).overFlow() == 0 &&
596  l1HtMiss->at(i).bx() == 0 && l1EtMiss->at(i).bx() == 0) {
597  // Avoid problems overflows and only plot central BX
598  l1GctEtMissHtMissCorr_->Fill(l1EtMiss->at(i).et(),l1HtMiss->at(i).et());
599  if (l1HtMiss->at(i).et() && l1EtMiss->at(i).et()){ // Don't plot phi if one or other is zero
600  l1GctEtMissHtMissCorrPhi_->Fill(l1EtMiss->at(i).phi(),l1HtMiss->at(i).phi());
601  }
602  }
603  }
604  }
605  } else {
606  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss or l1HtMiss label was " << gctEnergySumsSource_ ;
607  }
608 
609  // HT
610  if (l1EtHad.isValid()) {
611  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ht++) {
612  // only plot central BX
613  if (ht->bx()==0) {
614  l1GctEtHad_->Fill(ht->et());
615  l1GctEtHadOf_->Fill(ht->overFlow());
616  }
617  l1GctEtHadOccBx_->Fill(ht->bx(),ht->et()); // for all BX
618  }
619  } else {
620  edm::LogWarning("DataNotFound") << " Could not find l1EtHad label was " << gctEnergySumsSource_ ;
621  }
622 
623  // Total ET
624  if (l1EtTotal.isValid()) {
625  for (L1GctEtTotalCollection::const_iterator et = l1EtTotal->begin(); et != l1EtTotal->end(); et++) {
626  // only plot central BX
627  if (et->bx()==0) {
628  l1GctEtTotal_->Fill(et->et());
629  l1GctEtTotalOf_->Fill(et->overFlow());
630  }
631  l1GctEtTotalOccBx_->Fill(et->bx(),et->et()); // for all BX
632  }
633  } else {
634  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal label was " << gctEnergySumsSource_ ;
635  }
636 
637  // Total ET HT correlations
638  if (l1EtTotal.isValid() && l1EtHad.isValid()) {
639  if (l1EtTotal->size() == l1EtHad->size()) {
640  for (unsigned i=0; i<l1EtHad->size(); i++) {
641  if (l1EtHad->at(i).overFlow() == 0 && l1EtTotal->at(i).overFlow() == 0 &&
642  l1EtHad->at(i).bx() == 0 && l1EtTotal->at(i).bx() == 0) {
643  // Avoid problems overflows and only plot central BX
644  l1GctEtTotalEtHadCorr_->Fill(l1EtTotal->at(i).et(),l1EtHad->at(i).et());
645  }
646  }
647  }
648  } else {
649  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal or l1EtHad label was " << gctEnergySumsSource_ ;
650  }
651 
652  //HF Ring Et Sums
653  if (l1HFSums.isValid()) {
654  for (L1GctHFRingEtSumsCollection::const_iterator hfs=l1HFSums->begin(); hfs!=l1HFSums->end(); hfs++){
655  // only plot central BX
656  if (hfs->bx()==0) {
657  // Individual ring Et sums
658  l1GctHFRing1ETSumPosEta_->Fill(hfs->etSum(0));
659  l1GctHFRing1ETSumNegEta_->Fill(hfs->etSum(1));
660  l1GctHFRing2ETSumPosEta_->Fill(hfs->etSum(2));
661  l1GctHFRing2ETSumNegEta_->Fill(hfs->etSum(3));
662  // Ratio of ring Et sums
663  if (hfs->etSum(2)!=0) l1GctHFRingRatioPosEta_->Fill((hfs->etSum(0))/(hfs->etSum(2)));
664  if (hfs->etSum(3)!=0) l1GctHFRingRatioNegEta_->Fill((hfs->etSum(1))/(hfs->etSum(3)));
665  // Correlate positive and neagative eta
666  l1GctHFRing1PosEtaNegEta_->Fill(hfs->etSum(0),hfs->etSum(1));
667  l1GctHFRing2PosEtaNegEta_->Fill(hfs->etSum(2),hfs->etSum(3));
668  }
669  // Occupancy vs BX
670  for (unsigned i=0; i<4; i++){
671  l1GctHFRingETSumOccBx_->Fill(hfs->bx(),hfs->etSum(i));
672  }
673  }
674  } else {
675  edm::LogWarning("DataNotFound") << " Could not find l1HFSums label was " << gctEnergySumsSource_ ;
676  }
677 
678  // HF Ring Counts
679  if (l1HFCounts.isValid()) {
680  for (L1GctHFBitCountsCollection::const_iterator hfc=l1HFCounts->begin(); hfc!=l1HFCounts->end(); hfc++){
681  // only plot central BX
682  if (hfc->bx()==0) {
683  // Individual ring counts
684  l1GctHFRing1TowerCountPosEta_->Fill(hfc->bitCount(0));
685  l1GctHFRing1TowerCountNegEta_->Fill(hfc->bitCount(1));
686  l1GctHFRing2TowerCountPosEta_->Fill(hfc->bitCount(2));
687  l1GctHFRing2TowerCountNegEta_->Fill(hfc->bitCount(3));
688  // Correlate positive and negative eta
689  l1GctHFRing1TowerCountPosEtaNegEta_->Fill(hfc->bitCount(0),hfc->bitCount(1));
690  l1GctHFRing2TowerCountPosEtaNegEta_->Fill(hfc->bitCount(2),hfc->bitCount(3));
691  }
692  // Occupancy vs BX
693  for (unsigned i=0; i<4; i++){
694  l1GctHFRingTowerCountOccBx_->Fill(hfc->bx(),hfc->bitCount(i));
695  }
696  }
697  } else {
698  edm::LogWarning("DataNotFound") << " Could not find l1HFCounts label was " << gctEnergySumsSource_ ;
699  }
700 
701  // Isolated EM
702  if (l1IsoEm.isValid()) {
703  for (L1GctEmCandCollection::const_iterator ie=l1IsoEm->begin(); ie!=l1IsoEm->end(); ie++) {
704  // only plot central BX
705  if (ie->bx()==0) {
706  l1GctIsoEmRank_->Fill(ie->rank());
707  // only plot eta and phi maps for non-zero candidates
708  if (ie->rank()){
709  l1GctIsoEmRankEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi(),ie->rank());
710  l1GctIsoEmOccEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi());
711  }
712  }
713  if (ie->rank()) l1GctAllEmOccRankBx_->Fill(ie->bx(),ie->rank()); // for all BX
714  }
715  } else {
716  edm::LogWarning("DataNotFound") << " Could not find l1IsoEm label was " << gctIsoEmSource_ ;
717  }
718 
719  // Non-isolated EM
720  if (l1NonIsoEm.isValid()) {
721  for (L1GctEmCandCollection::const_iterator ne=l1NonIsoEm->begin(); ne!=l1NonIsoEm->end(); ne++) {
722  // only plot central BX
723  if (ne->bx()==0) {
724  l1GctNonIsoEmRank_->Fill(ne->rank());
725  // only plot eta and phi maps for non-zero candidates
726  if (ne->rank()){
727  l1GctNonIsoEmRankEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi(),ne->rank());
728  l1GctNonIsoEmOccEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi());
729  }
730  }
731  if (ne->rank()) l1GctAllEmOccRankBx_->Fill(ne->bx(),ne->rank()); // for all BX
732  }
733  } else {
734  edm::LogWarning("DataNotFound") << " Could not find l1NonIsoEm label was " << gctNonIsoEmSource_ ;
735  }
736 }
737 
738 
const float METPHIMAX
Definition: L1TGCT.cc:207
const unsigned int R6BINS
Definition: L1TCompare.cc:92
const unsigned int BXBINS
Definition: L1TGCT.cc:221
T getUntrackedParameter(std::string const &, T const &) const
#define PHIMAX
int i
Definition: DBlmapReader.cc:9
MonitorElement * l1GctHtMiss_
Definition: L1TGCT.h:189
MonitorElement * l1GctEtHad_
Definition: L1TGCT.h:198
MonitorElement * l1GctHtMissPhi_
Definition: L1TGCT.h:190
const unsigned int OFBINS
Definition: L1TGCT.cc:217
const float R10MIN
Definition: L1TCompare.cc:96
edm::InputTag gctEnergySumsSource_
Definition: L1TGCT.h:230
MonitorElement * l1GctHFRing2TowerCountNegEta_
Definition: L1TGCT.h:211
const unsigned int R12BINS
Definition: L1TCompare.cc:98
MonitorElement * l1GctEtMissOccBx_
Definition: L1TGCT.h:188
MonitorElement * l1GctCenJetsRank_
Definition: L1TGCT.h:175
MonitorElement * l1GctHFRing1ETSumNegEta_
Definition: L1TGCT.h:213
MonitorElement * l1GctEtTotalEtHadCorr_
Definition: L1TGCT.h:201
MonitorElement * l1GctHFRing1TowerCountPosEta_
Definition: L1TGCT.h:208
const unsigned int EMETABINS
Definition: L1TGCT.cc:201
MonitorElement * l1GctTauJetsEtEtaPhi_
Definition: L1TGCT.h:164
const float BXMIN
Definition: L1TGCT.cc:222
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
void beginJob(void)
Definition: L1TGCT.cc:290
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2530
MonitorElement * l1GctHFRingETSumOccBx_
Definition: L1TGCT.h:218
MonitorElement * l1GctNonIsoEmRank_
Definition: L1TGCT.h:179
const unsigned int MHTPHIBINS
Definition: L1TGCT.cc:209
const float OFMAX
Definition: L1TGCT.cc:219
MonitorElement * l1GctEtMiss_
Definition: L1TGCT.h:185
const unsigned int R10BINS
Definition: L1TCompare.cc:95
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2113
DQMStore * dbe
Definition: L1TGCT.h:155
const float R10MAX
Definition: L1TCompare.cc:97
MonitorElement * l1GctHFRing2ETSumNegEta_
Definition: L1TGCT.h:215
MonitorElement * l1GctAllEmOccRankBx_
Definition: L1TGCT.h:182
const float BXMAX
Definition: L1TGCT.cc:223
#define NULL
Definition: scimark2.h:8
const float R12MIN
Definition: L1TCompare.cc:99
MonitorElement * l1GctEtTotal_
Definition: L1TGCT.h:195
MonitorElement * l1GctHtMissOf_
Definition: L1TGCT.h:191
MonitorElement * l1GctEtHadOccBx_
Definition: L1TGCT.h:200
MonitorElement * l1GctEtTotalOccBx_
Definition: L1TGCT.h:197
bool isRealData() const
Definition: EventBase.h:60
MonitorElement * l1GctHFRingTowerCountOccBx_
Definition: L1TGCT.h:219
MonitorElement * l1GctForJetsRank_
Definition: L1TGCT.h:176
MonitorElement * l1GctTauJetsRank_
Definition: L1TGCT.h:177
MonitorElement * l1GctHFRing2ETSumPosEta_
Definition: L1TGCT.h:214
void Fill(long long x)
edm::InputTag gctCenJetsSource_
Definition: L1TGCT.h:227
L1TGCT(const edm::ParameterSet &ps)
Definition: L1TGCT.cc:245
MonitorElement * l1GctEtMissPhi_
Definition: L1TGCT.h:186
void endJob(void)
Definition: L1TGCT.cc:413
MonitorElement * l1GctCenJetsEtEtaPhi_
Definition: L1TGCT.h:162
edm::InputTag gctTauJetsSource_
Definition: L1TGCT.h:229
MonitorElement * l1GctAllJetsEtEtaPhi_
Definition: L1TGCT.h:161
const float JETETAMAX
Definition: L1TGCT.cc:199
MonitorElement * l1GctHFRing1ETSumPosEta_
Definition: L1TGCT.h:212
const float R6MAX
Definition: L1TCompare.cc:94
const unsigned int R3BINS
Definition: L1TGCT.cc:226
MonitorElement * l1GctHFRingRatioNegEta_
Definition: L1TGCT.h:217
const float EMETAMIN
Definition: L1TGCT.cc:202
MonitorElement * l1GctCenJetsOccEtaPhi_
Definition: L1TGCT.h:169
MonitorElement * l1GctEtMissOf_
Definition: L1TGCT.h:187
MonitorElement * l1GctForJetsEtEtaPhi_
Definition: L1TGCT.h:163
const unsigned int JETETABINS
Definition: L1TGCT.cc:197
MonitorElement * l1GctIsoEmRank_
Definition: L1TGCT.h:178
MonitorElement * l1GctHtMissOccBx_
Definition: L1TGCT.h:192
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TGCT.cc:426
const float R7MAX
Definition: L1TGCT.cc:237
void setVerbose(unsigned level)
Definition: DQMStore.cc:393
const float R5MAX
Definition: L1TGCT.cc:231
MonitorElement * l1GctHFRing2TowerCountPosEta_
Definition: L1TGCT.h:210
MonitorElement * l1GctHFRing2TowerCountPosEtaNegEta_
Definition: L1TGCT.h:207
bool isValid() const
Definition: HandleBase.h:76
edm::InputTag gctIsoEmSource_
Definition: L1TGCT.h:231
#define PHIMIN
MonitorElement * triggerType_
Definition: L1TGCT.h:158
const float OFMIN
Definition: L1TGCT.cc:218
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
MonitorElement * l1GctEtMissHtMissCorrPhi_
Definition: L1TGCT.h:194
const float MHTPHIMAX
Definition: L1TGCT.cc:211
const float R5MIN
Definition: L1TGCT.cc:230
MonitorElement * l1GctNonIsoEmOccEtaPhi_
Definition: L1TGCT.h:173
const float MHTPHIMIN
Definition: L1TGCT.cc:210
int filterTriggerType_
filter TriggerType
Definition: L1TGCT.h:235
const unsigned int R7BINS
Definition: L1TGCT.cc:235
const float R6MIN
Definition: L1TCompare.cc:93
edm::InputTag gctForJetsSource_
Definition: L1TGCT.h:228
MonitorElement * l1GctNonIsoEmRankEtaPhi_
Definition: L1TGCT.h:166
int nev_
Definition: L1TGCT.h:221
MonitorElement * l1GctHFRing1PosEtaNegEta_
Definition: L1TGCT.h:204
const unsigned int R5BINS
Definition: L1TGCT.cc:229
virtual ~L1TGCT()
Definition: L1TGCT.cc:286
MonitorElement * l1GctAllJetsOccEtaPhi_
Definition: L1TGCT.h:168
MonitorElement * l1GctHFRingRatioPosEta_
Definition: L1TGCT.h:216
MonitorElement * l1GctIsoEmRankEtaPhi_
Definition: L1TGCT.h:165
MonitorElement * l1GctHFRing1TowerCountPosEtaNegEta_
Definition: L1TGCT.h:206
const float METPHIMIN
Definition: L1TGCT.cc:206
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:61
#define PHIBINS
MonitorElement * l1GctEtHadOf_
Definition: L1TGCT.h:199
std::string outputFile_
Definition: L1TGCT.h:222
MonitorElement * l1GctForJetsOccEtaPhi_
Definition: L1TGCT.h:170
const float EMETAMAX
Definition: L1TGCT.cc:203
MonitorElement * l1GctHFRing1TowerCountNegEta_
Definition: L1TGCT.h:209
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
bool verbose_
Definition: L1TGCT.h:223
MonitorElement * l1GctEtTotalOf_
Definition: L1TGCT.h:196
const float R3MAX
Definition: L1TGCT.cc:228
MonitorElement * l1GctAllJetsOccRankBx_
Definition: L1TGCT.h:181
MonitorElement * l1GctEtMissHtMissCorr_
Definition: L1TGCT.h:193
MonitorElement * l1GctHFRing2PosEtaNegEta_
Definition: L1TGCT.h:205
const unsigned int METPHIBINS
Definition: L1TGCT.cc:205
const float R12MAX
Definition: L1TCompare.cc:100
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
edm::InputTag gctNonIsoEmSource_
Definition: L1TGCT.h:232
MonitorElement * l1GctTauJetsOccEtaPhi_
Definition: L1TGCT.h:171
MonitorElement * l1GctIsoEmOccEtaPhi_
Definition: L1TGCT.h:172
const float R3MIN
Definition: L1TGCT.cc:227
const float R7MIN
Definition: L1TGCT.cc:236
const float JETETAMIN
Definition: L1TGCT.cc:198