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