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.
4 
5 // Trigger Headers
6 
7 // GCT and RCT data formats
11 
12 using namespace edm;
13 
14 // Define statics for bins etc.
15 const unsigned int JETETABINS = 22;
16 const float JETETAMIN = -0.5;
17 const float JETETAMAX = 21.5;
18 
19 const unsigned int EMETABINS = 22;
20 const float EMETAMIN = -0.5;
21 const float EMETAMAX = 21.5;
22 
23 const unsigned int METPHIBINS = 72;
24 const float METPHIMIN = -0.5;
25 const float METPHIMAX = 71.5;
26 
27 const unsigned int MHTPHIBINS = 18;
28 const float MHTPHIMIN = -0.5;
29 const float MHTPHIMAX = 17.5;
30 
31 const unsigned int PHIBINS = 18;
32 const float PHIMIN = -0.5;
33 const float PHIMAX = 17.5;
34 
35 const unsigned int OFBINS = 2;
36 const float OFMIN = -0.5;
37 const float OFMAX = 1.5;
38 
39 const unsigned int BXBINS = 5;
40 const float BXMIN = -2.5;
41 const float BXMAX = 2.5;
42 
43 // Bins for 3, 5, 6, 7, 10 and 12 bits
44 const unsigned int R3BINS = 8;
45 const float R3MIN = -0.5;
46 const float R3MAX = 7.5;
47 const unsigned int R5BINS = 32;
48 const float R5MIN = -0.5;
49 const float R5MAX = 31.5;
50 const unsigned int R6BINS = 64;
51 const float R6MIN = -0.5;
52 const float R6MAX = 63.5;
53 const unsigned int R7BINS = 128;
54 const float R7MIN = -0.5;
55 const float R7MAX = 127.5;
56 const unsigned int R12BINS = 4096;
57 const float R12MIN = -0.5;
58 const float R12MAX = 4095.5;
59 
61  gctCenJetsSource_(ps.getParameter<edm::InputTag>("gctCentralJetsSource")),
62  gctForJetsSource_(ps.getParameter<edm::InputTag>("gctForwardJetsSource")),
63  gctTauJetsSource_(ps.getParameter<edm::InputTag>("gctTauJetsSource")),
64  gctEnergySumsSource_(ps.getParameter<edm::InputTag>("gctEnergySumsSource")),
65  gctIsoEmSource_(ps.getParameter<edm::InputTag>("gctIsoEmSource")),
66  gctNonIsoEmSource_(ps.getParameter<edm::InputTag>("gctNonIsoEmSource")),
67  filterTriggerType_ (ps.getParameter< int >("filterTriggerType"))
68 {
69 
70  // verbosity switch
71  verbose_ = ps.getUntrackedParameter < bool > ("verbose", false);
72 
73  if (verbose_)
74  edm::LogInfo("L1TGCT") << "L1TGCT: constructor...." << std::endl;
75 
76 
77  dbe = NULL;
78  if (ps.getUntrackedParameter < bool > ("DQMStore", false)) {
80  dbe->setVerbose(0);
81  }
82 
83  outputFile_ = ps.getUntrackedParameter < std::string > ("outputFile", "");
84  if (outputFile_.size() != 0) {
85  edm::LogInfo("L1TGCT") << "L1T Monitoring histograms will be saved to "
86  << outputFile_ << std::endl;
87  }
88 
89  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
90  if(disable){
91  outputFile_="";
92  }
93 
94 
95  if (dbe != NULL) {
96  dbe->setCurrentFolder("L1T/L1TGCT");
97  }
98 
99  //set Token(-s)
100  gctIsoEmSourceToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctIsoEmSource"));
101  gctNonIsoEmSourceToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctNonIsoEmSource"));
102  gctCenJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctCentralJetsSource"));
103  gctForJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctForwardJetsSource"));
104  gctTauJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctTauJetsSource"));
105  gctEnergySumsSourceToken_ = consumes<L1GctHFRingEtSumsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
106  l1HFCountsToken_ = consumes<L1GctHFBitCountsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
107  l1EtMissToken_ = consumes<L1GctEtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
108  l1HtMissToken_ = consumes<L1GctHtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
109  l1EtHadToken_ = consumes<L1GctEtHadCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
110  l1EtTotalToken_ = consumes<L1GctEtTotalCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
111 }
112 
114 {
115 }
116 
118 {
119 
120  nev_ = 0;
121 
122  // get hold of back-end interface
123  DQMStore *dbe = 0;
124  dbe = edm::Service < DQMStore > ().operator->();
125 
126  if (dbe) {
127  dbe->setCurrentFolder("L1T/L1TGCT");
128  dbe->rmdir("L1T/L1TGCT");
129  }
130 
131 
132  if (dbe) {
133 
134  dbe->setCurrentFolder("L1T/L1TGCT");
135 
136  triggerType_ =
137  dbe->book1D("TriggerType", "TriggerType", 17, -0.5, 16.5);
138 
139  l1GctAllJetsEtEtaPhi_ = dbe->book2D("AllJetsEtEtaPhi", "CENTRAL AND FORWARD JET E_{T}",
141  PHIBINS, PHIMIN, PHIMAX);
142  l1GctCenJetsEtEtaPhi_ = dbe->book2D("CenJetsEtEtaPhi", "CENTRAL JET E_{T}",
144  PHIBINS, PHIMIN, PHIMAX);
145  l1GctForJetsEtEtaPhi_ = dbe->book2D("ForJetsEtEtaPhi", "FORWARD JET E_{T}",
147  PHIBINS, PHIMIN, PHIMAX);
148  l1GctTauJetsEtEtaPhi_ = dbe->book2D("TauJetsEtEtaPhi", "TAU JET E_{T}",
150  PHIBINS, PHIMIN, PHIMAX);
151  l1GctIsoEmRankEtaPhi_ = dbe->book2D("IsoEmRankEtaPhi", "ISO EM E_{T}",
153  PHIBINS, PHIMIN, PHIMAX);
154  l1GctNonIsoEmRankEtaPhi_ = dbe->book2D("NonIsoEmRankEtaPhi", "NON-ISO EM E_{T}",
156  PHIBINS, PHIMIN, PHIMAX);
157  l1GctAllJetsOccEtaPhi_ = dbe->book2D("AllJetsOccEtaPhi", "CENTRAL AND FORWARD JET OCCUPANCY",
159  PHIBINS, PHIMIN, PHIMAX);
160  l1GctCenJetsOccEtaPhi_ = dbe->book2D("CenJetsOccEtaPhi", "CENTRAL JET OCCUPANCY",
162  PHIBINS, PHIMIN, PHIMAX);
163  l1GctForJetsOccEtaPhi_ = dbe->book2D("ForJetsOccEtaPhi", "FORWARD JET OCCUPANCY",
165  PHIBINS, PHIMIN, PHIMAX);
166  l1GctTauJetsOccEtaPhi_ = dbe->book2D("TauJetsOccEtaPhi", "TAU JET OCCUPANCY",
168  PHIBINS, PHIMIN, PHIMAX);
169  l1GctIsoEmOccEtaPhi_ = dbe->book2D("IsoEmOccEtaPhi", "ISO EM OCCUPANCY",
171  PHIBINS, PHIMIN, PHIMAX);
172  l1GctNonIsoEmOccEtaPhi_ = dbe->book2D("NonIsoEmOccEtaPhi", "NON-ISO EM OCCUPANCY",
174  PHIBINS, PHIMIN, PHIMAX);
175 
176  l1GctHFRing1PosEtaNegEta_ = dbe->book2D("HFRing1Corr", "HF RING1 E_{T} CORRELATION +/- #eta",
178  l1GctHFRing2PosEtaNegEta_ = dbe->book2D("HFRing2Corr", "HF RING2 E_{T} CORRELATION +/- #eta",
180  l1GctHFRing1TowerCountPosEtaNegEta_ = dbe->book2D("HFRing1TowerCountCorr", "HF RING1 TOWER COUNT CORRELATION +/- #eta",
182  l1GctHFRing2TowerCountPosEtaNegEta_ = dbe->book2D("HFRing2TowerCountCorr", "HF RING2 TOWER COUNT CORRELATION +/- #eta",
184 
185  //HF Ring stuff
186  l1GctHFRing1TowerCountPosEta_ = dbe->book1D("HFRing1TowerCountPosEta", "HF RING1 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
187  l1GctHFRing1TowerCountNegEta_ = dbe->book1D("HFRing1TowerCountNegEta", "HF RING1 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
188  l1GctHFRing2TowerCountPosEta_ = dbe->book1D("HFRing2TowerCountPosEta", "HF RING2 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
189  l1GctHFRing2TowerCountNegEta_ = dbe->book1D("HFRing2TowerCountNegEta", "HF RING2 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
190 
191  l1GctHFRing1ETSumPosEta_ = dbe->book1D("HFRing1ETSumPosEta", "HF RING1 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
192  l1GctHFRing1ETSumNegEta_ = dbe->book1D("HFRing1ETSumNegEta", "HF RING1 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
193  l1GctHFRing2ETSumPosEta_ = dbe->book1D("HFRing2ETSumPosEta", "HF RING2 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
194  l1GctHFRing2ETSumNegEta_ = dbe->book1D("HFRing2ETSumNegEta", "HF RING2 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
195  l1GctHFRingRatioPosEta_ = dbe->book1D("HFRingRatioPosEta", "HF RING E_{T} RATIO #eta +", R5BINS, R5MIN, R5MAX);
196  l1GctHFRingRatioNegEta_ = dbe->book1D("HFRingRatioNegEta", "HF RING E_{T} RATIO #eta -", R5BINS, R5MIN, R5MAX);
197 
198  l1GctHFRingTowerCountOccBx_ = dbe->book2D("HFRingTowerCountOccBx", "HF RING TOWER COUNT PER BX",BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
199  l1GctHFRingETSumOccBx_ = dbe->book2D("HFRingETSumOccBx", "HF RING E_{T} PER BX",BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
200 
201  // Rank histograms
202  l1GctCenJetsRank_ = dbe->book1D("CenJetsRank", "CENTRAL JET E_{T}", R6BINS, R6MIN, R6MAX);
203  l1GctForJetsRank_ = dbe->book1D("ForJetsRank", "FORWARD JET E_{T}", R6BINS, R6MIN, R6MAX);
204  l1GctTauJetsRank_ = dbe->book1D("TauJetsRank", "TAU JET E_{T}", R6BINS, R6MIN, R6MAX);
205  l1GctIsoEmRank_ = dbe->book1D("IsoEmRank", "ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
206  l1GctNonIsoEmRank_ = dbe->book1D("NonIsoEmRank", "NON-ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
207 
208  l1GctAllJetsOccRankBx_ = dbe->book2D("AllJetsOccRankBx","ALL JETS E_{T} PER BX",BXBINS,BXMIN,BXMAX,R6BINS,R6MIN,R6MAX);
209  l1GctAllEmOccRankBx_ = dbe->book2D("AllEmOccRankBx","ALL EM E_{T} PER BX",BXBINS,BXMIN,BXMAX,R6BINS,R6MIN,R6MAX);
210 
211  // Energy sums
212  l1GctEtMiss_ = dbe->book1D("EtMiss", "MET", R12BINS, R12MIN, R12MAX);
213  l1GctEtMissPhi_ = dbe->book1D("EtMissPhi", "MET #phi", METPHIBINS, METPHIMIN, METPHIMAX);
214  l1GctEtMissOf_ = dbe->book1D("EtMissOf", "MET OVERFLOW", OFBINS, OFMIN, OFMAX);
215  l1GctEtMissOccBx_ = dbe->book2D("EtMissOccBx","MET PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
216  l1GctHtMiss_ = dbe->book1D("HtMiss", "MHT", R7BINS, R7MIN, R7MAX);
217  l1GctHtMissPhi_ = dbe->book1D("HtMissPhi", "MHT #phi", MHTPHIBINS, MHTPHIMIN, MHTPHIMAX);
218  l1GctHtMissOf_ = dbe->book1D("HtMissOf", "MHT OVERFLOW", OFBINS, OFMIN, OFMAX);
219  l1GctHtMissOccBx_ = dbe->book2D("HtMissOccBx","MHT PER BX",BXBINS,BXMIN,BXMAX,R7BINS,R7MIN,R7MAX);
220  l1GctEtMissHtMissCorr_ = dbe->book2D("EtMissHtMissCorr", "MET MHT CORRELATION",
221  R6BINS, R12MIN, R12MAX,
222  R6BINS, R7MIN, R7MAX);
223  l1GctEtMissHtMissCorrPhi_ = dbe->book2D("EtMissHtMissPhiCorr", "MET MHT #phi CORRELATION",
226  l1GctEtTotal_ = dbe->book1D("EtTotal", "SUM E_{T}", R12BINS, R12MIN, R12MAX);
227  l1GctEtTotalOf_ = dbe->book1D("EtTotalOf", "SUM E_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
228  l1GctEtTotalOccBx_ = dbe->book2D("EtTotalOccBx","SUM E_{T} PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
229  l1GctEtHad_ = dbe->book1D("EtHad", "H_{T}", R12BINS, R12MIN, R12MAX);
230  l1GctEtHadOf_ = dbe->book1D("EtHadOf", "H_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
231  l1GctEtHadOccBx_ = dbe->book2D("EtHadOccBx","H_{T} PER BX",BXBINS,BXMIN,BXMAX,R12BINS,R12MIN,R12MAX);
232  l1GctEtTotalEtHadCorr_ = dbe->book2D("EtTotalEtHadCorr", "Sum E_{T} H_{T} CORRELATION",
233  R6BINS, R12MIN, R12MAX,
234  R6BINS, R12MIN, R12MAX);
235  }
236 
237 }
238 
239 
240 void L1TGCT::endJob(void)
241 {
242  if (verbose_)
243  edm::LogInfo("L1TGCT") << "L1TGCT: end job...." << std::endl;
244  edm::LogInfo("EndJob") << "analyzed " << nev_ << " events";
245 
246  if (outputFile_.size() != 0 && dbe) {
247  dbe->save(outputFile_);
248  }
249 
250  return;
251 }
252 
254 {
255  nev_++;
256  if (verbose_) {
257  edm::LogInfo("L1TGCT") << "L1TGCT: analyze...." << std::endl;
258  }
259 
260 
261  // filter according trigger type
262  // enum ExperimentType {
263  // Undefined = 0,
264  // PhysicsTrigger = 1,
265  // CalibrationTrigger = 2,
266  // RandomTrigger = 3,
267  // Reserved = 4,
268  // TracedEvent = 5,
269  // TestTrigger = 6,
270  // ErrorTrigger = 15
271 
272  // fill a histogram with the trigger type, for normalization fill also last bin
273  // ErrorTrigger + 1
274  double triggerType = static_cast<double> (e.experimentType()) + 0.001;
275  double triggerTypeLast = static_cast<double> (edm::EventAuxiliary::ExperimentType::ErrorTrigger)
276  + 0.001;
277  triggerType_->Fill(triggerType);
278  triggerType_->Fill(triggerTypeLast + 1);
279 
280  // filter only if trigger type is greater than 0, negative values disable filtering
281  if (filterTriggerType_ >= 0) {
282 
283  // now filter, for real data only
284  if (e.isRealData()) {
285  if (!(e.experimentType() == filterTriggerType_)) {
286 
287  edm::LogInfo("L1TGCT") << "\n Event of TriggerType "
288  << e.experimentType() << " rejected" << std::endl;
289  return;
290 
291  }
292  }
293 
294  }
295 
296  // Get all the collections
308 
309  e.getByToken(gctIsoEmSourceToken_, l1IsoEm);
310  e.getByToken(gctNonIsoEmSourceToken_, l1NonIsoEm);
311  e.getByToken(gctCenJetsSourceToken_, l1CenJets);
312  e.getByToken(gctForJetsSourceToken_, l1ForJets);
313  e.getByToken(gctTauJetsSourceToken_, l1TauJets);
315  e.getByToken(l1HFCountsToken_, l1HFCounts);
316  e.getByToken(l1EtMissToken_, l1EtMiss);
317  e.getByToken(l1HtMissToken_, l1HtMiss);
318  e.getByToken(l1EtHadToken_, l1EtHad);
319  e.getByToken(l1EtTotalToken_, l1EtTotal);
320 
321  // Fill histograms
322 
323  // Central jets
324  if (l1CenJets.isValid()) {
325  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin();cj != l1CenJets->end(); cj++) {
326  // only plot central BX
327  if (cj->bx()==0) {
328  l1GctCenJetsRank_->Fill(cj->rank());
329  // only plot eta and phi maps for non-zero candidates
330  if (cj->rank()) {
331  l1GctAllJetsEtEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi(),cj->rank());
332  l1GctAllJetsOccEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi());
333  l1GctCenJetsEtEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi(),cj->rank());
334  l1GctCenJetsOccEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi());
335  }
336  }
337  if (cj->rank()) l1GctAllJetsOccRankBx_->Fill(cj->bx(),cj->rank()); // for all BX
338  }
339  } else {
340  edm::LogWarning("DataNotFound") << " Could not find l1CenJets label was " << gctCenJetsSource_ ;
341  }
342 
343  // Forward jets
344  if (l1ForJets.isValid()) {
345  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
346  // only plot central BX
347  if (fj->bx()==0) {
348  l1GctForJetsRank_->Fill(fj->rank());
349  // only plot eta and phi maps for non-zero candidates
350  if (fj->rank()) {
351  l1GctAllJetsEtEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi(),fj->rank());
352  l1GctAllJetsOccEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi());
353  l1GctForJetsEtEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi(),fj->rank());
354  l1GctForJetsOccEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi());
355  }
356  }
357  if (fj->rank()) l1GctAllJetsOccRankBx_->Fill(fj->bx(),fj->rank()); // for all BX
358  }
359  } else {
360  edm::LogWarning("DataNotFound") << " Could not find l1ForJets label was " << gctForJetsSource_ ;
361  }
362 
363  // Tau jets
364  if (l1TauJets.isValid()) {
365  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
366  // only plot central BX
367  if (tj->bx()==0) {
368  l1GctTauJetsRank_->Fill(tj->rank());
369  // only plot eta and phi maps for non-zero candidates
370  if (tj->rank()) {
371  l1GctTauJetsEtEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi(),tj->rank());
372  l1GctTauJetsOccEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi());
373  }
374  }
375  if (tj->rank()) l1GctAllJetsOccRankBx_->Fill(tj->bx(),tj->rank()); // for all BX
376  }
377  } else {
378  edm::LogWarning("DataNotFound") << " Could not find l1TauJets label was " << gctTauJetsSource_ ;
379  }
380 
381  // Missing ET
382  if (l1EtMiss.isValid()) {
383  for (L1GctEtMissCollection::const_iterator met = l1EtMiss->begin(); met != l1EtMiss->end(); met++) {
384  // only plot central BX
385  if (met->bx()==0) {
386  if (met->overFlow() == 0 && met->et() > 0) {
387  //Avoid problems with met=0 candidates affecting MET_PHI plots
388  l1GctEtMiss_->Fill(met->et());
389  l1GctEtMissPhi_->Fill(met->phi());
390  }
391  l1GctEtMissOf_->Fill(met->overFlow());
392  }
393  if (met->overFlow() == 0 && met->et() > 0) l1GctEtMissOccBx_->Fill(met->bx(),met->et()); // for all BX
394  }
395  } else {
396  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss label was " << gctEnergySumsSource_ ;
397  }
398 
399  // Missing HT
400  if (l1HtMiss.isValid()) {
401  for (L1GctHtMissCollection::const_iterator mht = l1HtMiss->begin(); mht != l1HtMiss->end(); mht++) {
402  // only plot central BX
403  if (mht->bx()==0) {
404  if (mht->overFlow() == 0 && mht->et() > 0) {
405  //Avoid problems with mht=0 candidates affecting MHT_PHI plots
406  l1GctHtMiss_->Fill(mht->et());
407  l1GctHtMissPhi_->Fill(mht->phi());
408  }
409  l1GctHtMissOf_->Fill(mht->overFlow());
410  }
411  if (mht->overFlow() == 0 && mht->et() > 0) l1GctHtMissOccBx_->Fill(mht->bx(),mht->et()); // for all BX
412  }
413  } else {
414  edm::LogWarning("DataNotFound") << " Could not find l1HtMiss label was " << gctEnergySumsSource_ ;
415  }
416 
417  // Missing ET HT correlations
418  if (l1HtMiss.isValid() && l1EtMiss.isValid()) {
419  if (l1HtMiss->size() == l1EtMiss->size()) {
420  for (unsigned i=0; i<l1HtMiss->size(); i++) {
421  if (l1HtMiss->at(i).overFlow() == 0 && l1EtMiss->at(i).overFlow() == 0 &&
422  l1HtMiss->at(i).bx() == 0 && l1EtMiss->at(i).bx() == 0) {
423  // Avoid problems overflows and only plot central BX
424  l1GctEtMissHtMissCorr_->Fill(l1EtMiss->at(i).et(),l1HtMiss->at(i).et());
425  if (l1HtMiss->at(i).et() && l1EtMiss->at(i).et()){ // Don't plot phi if one or other is zero
426  l1GctEtMissHtMissCorrPhi_->Fill(l1EtMiss->at(i).phi(),l1HtMiss->at(i).phi());
427  }
428  }
429  }
430  }
431  } else {
432  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss or l1HtMiss label was " << gctEnergySumsSource_ ;
433  }
434 
435  // HT
436  if (l1EtHad.isValid()) {
437  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ht++) {
438  // only plot central BX
439  if (ht->bx()==0) {
440  l1GctEtHad_->Fill(ht->et());
441  l1GctEtHadOf_->Fill(ht->overFlow());
442  }
443  l1GctEtHadOccBx_->Fill(ht->bx(),ht->et()); // for all BX
444  }
445  } else {
446  edm::LogWarning("DataNotFound") << " Could not find l1EtHad label was " << gctEnergySumsSource_ ;
447  }
448 
449  // Total ET
450  if (l1EtTotal.isValid()) {
451  for (L1GctEtTotalCollection::const_iterator et = l1EtTotal->begin(); et != l1EtTotal->end(); et++) {
452  // only plot central BX
453  if (et->bx()==0) {
454  l1GctEtTotal_->Fill(et->et());
455  l1GctEtTotalOf_->Fill(et->overFlow());
456  }
457  l1GctEtTotalOccBx_->Fill(et->bx(),et->et()); // for all BX
458  }
459  } else {
460  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal label was " << gctEnergySumsSource_ ;
461  }
462 
463  // Total ET HT correlations
464  if (l1EtTotal.isValid() && l1EtHad.isValid()) {
465  if (l1EtTotal->size() == l1EtHad->size()) {
466  for (unsigned i=0; i<l1EtHad->size(); i++) {
467  if (l1EtHad->at(i).overFlow() == 0 && l1EtTotal->at(i).overFlow() == 0 &&
468  l1EtHad->at(i).bx() == 0 && l1EtTotal->at(i).bx() == 0) {
469  // Avoid problems overflows and only plot central BX
470  l1GctEtTotalEtHadCorr_->Fill(l1EtTotal->at(i).et(),l1EtHad->at(i).et());
471  }
472  }
473  }
474  } else {
475  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal or l1EtHad label was " << gctEnergySumsSource_ ;
476  }
477 
478  //HF Ring Et Sums
479  if (l1HFSums.isValid()) {
480  for (L1GctHFRingEtSumsCollection::const_iterator hfs=l1HFSums->begin(); hfs!=l1HFSums->end(); hfs++){
481  // only plot central BX
482  if (hfs->bx()==0) {
483  // Individual ring Et sums
484  l1GctHFRing1ETSumPosEta_->Fill(hfs->etSum(0));
485  l1GctHFRing1ETSumNegEta_->Fill(hfs->etSum(1));
486  l1GctHFRing2ETSumPosEta_->Fill(hfs->etSum(2));
487  l1GctHFRing2ETSumNegEta_->Fill(hfs->etSum(3));
488  // Ratio of ring Et sums
489  if (hfs->etSum(2)!=0) l1GctHFRingRatioPosEta_->Fill((hfs->etSum(0))/(hfs->etSum(2)));
490  if (hfs->etSum(3)!=0) l1GctHFRingRatioNegEta_->Fill((hfs->etSum(1))/(hfs->etSum(3)));
491  // Correlate positive and neagative eta
492  l1GctHFRing1PosEtaNegEta_->Fill(hfs->etSum(0),hfs->etSum(1));
493  l1GctHFRing2PosEtaNegEta_->Fill(hfs->etSum(2),hfs->etSum(3));
494  }
495  // Occupancy vs BX
496  for (unsigned i=0; i<4; i++){
497  l1GctHFRingETSumOccBx_->Fill(hfs->bx(),hfs->etSum(i));
498  }
499  }
500  } else {
501  edm::LogWarning("DataNotFound") << " Could not find l1HFSums label was " << gctEnergySumsSource_ ;
502  }
503 
504  // HF Ring Counts
505  if (l1HFCounts.isValid()) {
506  for (L1GctHFBitCountsCollection::const_iterator hfc=l1HFCounts->begin(); hfc!=l1HFCounts->end(); hfc++){
507  // only plot central BX
508  if (hfc->bx()==0) {
509  // Individual ring counts
510  l1GctHFRing1TowerCountPosEta_->Fill(hfc->bitCount(0));
511  l1GctHFRing1TowerCountNegEta_->Fill(hfc->bitCount(1));
512  l1GctHFRing2TowerCountPosEta_->Fill(hfc->bitCount(2));
513  l1GctHFRing2TowerCountNegEta_->Fill(hfc->bitCount(3));
514  // Correlate positive and negative eta
515  l1GctHFRing1TowerCountPosEtaNegEta_->Fill(hfc->bitCount(0),hfc->bitCount(1));
516  l1GctHFRing2TowerCountPosEtaNegEta_->Fill(hfc->bitCount(2),hfc->bitCount(3));
517  }
518  // Occupancy vs BX
519  for (unsigned i=0; i<4; i++){
520  l1GctHFRingTowerCountOccBx_->Fill(hfc->bx(),hfc->bitCount(i));
521  }
522  }
523  } else {
524  edm::LogWarning("DataNotFound") << " Could not find l1HFCounts label was " << gctEnergySumsSource_ ;
525  }
526 
527  // Isolated EM
528  if (l1IsoEm.isValid()) {
529  for (L1GctEmCandCollection::const_iterator ie=l1IsoEm->begin(); ie!=l1IsoEm->end(); ie++) {
530  // only plot central BX
531  if (ie->bx()==0) {
532  l1GctIsoEmRank_->Fill(ie->rank());
533  // only plot eta and phi maps for non-zero candidates
534  if (ie->rank()){
535  l1GctIsoEmRankEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi(),ie->rank());
536  l1GctIsoEmOccEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi());
537  }
538  }
539  if (ie->rank()) l1GctAllEmOccRankBx_->Fill(ie->bx(),ie->rank()); // for all BX
540  }
541  } else {
542  edm::LogWarning("DataNotFound") << " Could not find l1IsoEm label was " << gctIsoEmSource_ ;
543  }
544 
545  // Non-isolated EM
546  if (l1NonIsoEm.isValid()) {
547  for (L1GctEmCandCollection::const_iterator ne=l1NonIsoEm->begin(); ne!=l1NonIsoEm->end(); ne++) {
548  // only plot central BX
549  if (ne->bx()==0) {
550  l1GctNonIsoEmRank_->Fill(ne->rank());
551  // only plot eta and phi maps for non-zero candidates
552  if (ne->rank()){
553  l1GctNonIsoEmRankEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi(),ne->rank());
554  l1GctNonIsoEmOccEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi());
555  }
556  }
557  if (ne->rank()) l1GctAllEmOccRankBx_->Fill(ne->bx(),ne->rank()); // for all BX
558  }
559  } else {
560  edm::LogWarning("DataNotFound") << " Could not find l1NonIsoEm label was " << gctNonIsoEmSource_ ;
561  }
562 }
563 
564 
const float METPHIMAX
Definition: L1TGCT.cc:25
T getParameter(std::string const &) const
const unsigned int R6BINS
Definition: L1TCompare.cc:71
const unsigned int BXBINS
Definition: L1TGCT.cc:39
T getUntrackedParameter(std::string const &, T const &) const
#define PHIMAX
int i
Definition: DBlmapReader.cc:9
MonitorElement * l1GctHtMiss_
Definition: L1TGCT.h:180
MonitorElement * l1GctEtHad_
Definition: L1TGCT.h:189
MonitorElement * l1GctHtMissPhi_
Definition: L1TGCT.h:181
const unsigned int OFBINS
Definition: L1TGCT.cc:35
edm::InputTag gctEnergySumsSource_
Definition: L1TGCT.h:221
MonitorElement * l1GctHFRing2TowerCountNegEta_
Definition: L1TGCT.h:202
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
MonitorElement * l1GctEtMissOccBx_
Definition: L1TGCT.h:179
MonitorElement * l1GctCenJetsRank_
Definition: L1TGCT.h:166
MonitorElement * l1GctHFRing1ETSumNegEta_
Definition: L1TGCT.h:204
MonitorElement * l1GctEtTotalEtHadCorr_
Definition: L1TGCT.h:192
MonitorElement * l1GctHFRing1TowerCountPosEta_
Definition: L1TGCT.h:199
const unsigned int EMETABINS
Definition: L1TGCT.cc:19
MonitorElement * l1GctTauJetsEtEtaPhi_
Definition: L1TGCT.h:155
const float BXMIN
Definition: L1TGCT.cc:40
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void beginJob(void)
Definition: L1TGCT.cc:117
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:3101
MonitorElement * l1GctHFRingETSumOccBx_
Definition: L1TGCT.h:209
MonitorElement * l1GctNonIsoEmRank_
Definition: L1TGCT.h:170
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
const unsigned int MHTPHIBINS
Definition: L1TGCT.cc:27
const float OFMAX
Definition: L1TGCT.cc:37
MonitorElement * l1GctEtMiss_
Definition: L1TGCT.h:176
DQMStore * dbe
Definition: L1TGCT.h:146
MonitorElement * l1GctHFRing2ETSumNegEta_
Definition: L1TGCT.h:206
MonitorElement * l1GctAllEmOccRankBx_
Definition: L1TGCT.h:173
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceToken_
Definition: L1TGCT.h:231
const float BXMAX
Definition: L1TGCT.cc:41
#define NULL
Definition: scimark2.h:8
MonitorElement * l1GctEtTotal_
Definition: L1TGCT.h:186
MonitorElement * l1GctHtMissOf_
Definition: L1TGCT.h:182
edm::EDGetTokenT< L1GctHtMissCollection > l1HtMissToken_
Definition: L1TGCT.h:237
MonitorElement * l1GctEtHadOccBx_
Definition: L1TGCT.h:191
MonitorElement * l1GctEtTotalOccBx_
Definition: L1TGCT.h:188
bool isRealData() const
Definition: EventBase.h:60
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalToken_
Definition: L1TGCT.h:239
MonitorElement * l1GctHFRingTowerCountOccBx_
Definition: L1TGCT.h:210
MonitorElement * l1GctForJetsRank_
Definition: L1TGCT.h:167
MonitorElement * l1GctTauJetsRank_
Definition: L1TGCT.h:168
MonitorElement * l1GctHFRing2ETSumPosEta_
Definition: L1TGCT.h:205
void Fill(long long x)
edm::InputTag gctCenJetsSource_
Definition: L1TGCT.h:218
L1TGCT(const edm::ParameterSet &ps)
Definition: L1TGCT.cc:60
MonitorElement * l1GctEtMissPhi_
Definition: L1TGCT.h:177
void endJob(void)
Definition: L1TGCT.cc:240
MonitorElement * l1GctCenJetsEtEtaPhi_
Definition: L1TGCT.h:153
edm::InputTag gctTauJetsSource_
Definition: L1TGCT.h:220
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceToken_
Definition: L1TGCT.h:229
MonitorElement * l1GctAllJetsEtEtaPhi_
Definition: L1TGCT.h:152
const float JETETAMAX
Definition: L1TGCT.cc:17
MonitorElement * l1GctHFRing1ETSumPosEta_
Definition: L1TGCT.h:203
const float R6MAX
Definition: L1TCompare.cc:73
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceToken_
Definition: L1TGCT.h:233
const unsigned int R3BINS
Definition: L1TGCT.cc:44
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsToken_
Definition: L1TGCT.h:235
MonitorElement * l1GctHFRingRatioNegEta_
Definition: L1TGCT.h:208
const float EMETAMIN
Definition: L1TGCT.cc:20
MonitorElement * l1GctCenJetsOccEtaPhi_
Definition: L1TGCT.h:160
MonitorElement * l1GctEtMissOf_
Definition: L1TGCT.h:178
MonitorElement * l1GctForJetsEtEtaPhi_
Definition: L1TGCT.h:154
const unsigned int JETETABINS
Definition: L1TGCT.cc:15
MonitorElement * l1GctIsoEmRank_
Definition: L1TGCT.h:169
const float R12MAX
Definition: L1TGCT.cc:58
MonitorElement * l1GctHtMissOccBx_
Definition: L1TGCT.h:183
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TGCT.cc:253
const float R7MAX
Definition: L1TGCT.cc:55
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceToken_
Definition: L1TGCT.h:230
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
const float R5MAX
Definition: L1TGCT.cc:49
MonitorElement * l1GctHFRing2TowerCountPosEta_
Definition: L1TGCT.h:201
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadToken_
Definition: L1TGCT.h:238
const float R12MIN
Definition: L1TGCT.cc:57
MonitorElement * l1GctHFRing2TowerCountPosEtaNegEta_
Definition: L1TGCT.h:198
bool isValid() const
Definition: HandleBase.h:76
edm::InputTag gctIsoEmSource_
Definition: L1TGCT.h:222
#define PHIMIN
MonitorElement * triggerType_
Definition: L1TGCT.h:149
const float OFMIN
Definition: L1TGCT.cc:36
MonitorElement * l1GctEtMissHtMissCorrPhi_
Definition: L1TGCT.h:185
const float MHTPHIMAX
Definition: L1TGCT.cc:29
const float R5MIN
Definition: L1TGCT.cc:48
MonitorElement * l1GctNonIsoEmOccEtaPhi_
Definition: L1TGCT.h:164
const float MHTPHIMIN
Definition: L1TGCT.cc:28
int filterTriggerType_
filter TriggerType
Definition: L1TGCT.h:226
const unsigned int R7BINS
Definition: L1TGCT.cc:53
const float R6MIN
Definition: L1TCompare.cc:72
edm::InputTag gctForJetsSource_
Definition: L1TGCT.h:219
MonitorElement * l1GctNonIsoEmRankEtaPhi_
Definition: L1TGCT.h:157
int nev_
Definition: L1TGCT.h:212
MonitorElement * l1GctHFRing1PosEtaNegEta_
Definition: L1TGCT.h:195
const unsigned int R12BINS
Definition: L1TGCT.cc:56
const unsigned int R5BINS
Definition: L1TGCT.cc:47
virtual ~L1TGCT()
Definition: L1TGCT.cc:113
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceToken_
Definition: L1TGCT.h:234
MonitorElement * l1GctAllJetsOccEtaPhi_
Definition: L1TGCT.h:159
MonitorElement * l1GctHFRingRatioPosEta_
Definition: L1TGCT.h:207
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
MonitorElement * l1GctIsoEmRankEtaPhi_
Definition: L1TGCT.h:156
MonitorElement * l1GctHFRing1TowerCountPosEtaNegEta_
Definition: L1TGCT.h:197
const float METPHIMIN
Definition: L1TGCT.cc:24
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:61
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceToken_
Definition: L1TGCT.h:232
#define PHIBINS
MonitorElement * l1GctEtHadOf_
Definition: L1TGCT.h:190
std::string outputFile_
Definition: L1TGCT.h:213
MonitorElement * l1GctForJetsOccEtaPhi_
Definition: L1TGCT.h:161
const float EMETAMAX
Definition: L1TGCT.cc:21
MonitorElement * l1GctHFRing1TowerCountNegEta_
Definition: L1TGCT.h:200
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissToken_
Definition: L1TGCT.h:236
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:1082
bool verbose_
Definition: L1TGCT.h:214
MonitorElement * l1GctEtTotalOf_
Definition: L1TGCT.h:187
const float R3MAX
Definition: L1TGCT.cc:46
MonitorElement * l1GctAllJetsOccRankBx_
Definition: L1TGCT.h:172
MonitorElement * l1GctEtMissHtMissCorr_
Definition: L1TGCT.h:184
MonitorElement * l1GctHFRing2PosEtaNegEta_
Definition: L1TGCT.h:196
const unsigned int METPHIBINS
Definition: L1TGCT.cc:23
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
edm::InputTag gctNonIsoEmSource_
Definition: L1TGCT.h:223
MonitorElement * l1GctTauJetsOccEtaPhi_
Definition: L1TGCT.h:162
MonitorElement * l1GctIsoEmOccEtaPhi_
Definition: L1TGCT.h:163
const float R3MIN
Definition: L1TGCT.cc:45
const float R7MIN
Definition: L1TGCT.cc:54
const float JETETAMIN
Definition: L1TGCT.cc:16