CMS 3D CMS Logo

L1THIonImp.cc
Go to the documentation of this file.
2 
3 using namespace edm;
4 
5 const unsigned int JETETABINS = 22;
6 const float JETETAMIN = -0.5;
7 const float JETETAMAX = 21.5;
8 
9 const unsigned int EMETABINS = 22;
10 const float EMETAMIN = -0.5;
11 const float EMETAMAX = 21.5;
12 
13 const unsigned int METPHIBINS = 72;
14 const float METPHIMIN = -0.5;
15 const float METPHIMAX = 71.5;
16 
17 const unsigned int PHIBINS = 18;
18 const float PHIMIN = -0.5;
19 const float PHIMAX = 17.5;
20 
21 const unsigned int OFBINS = 2;
22 const float OFMIN = -0.5;
23 const float OFMAX = 1.5;
24 
25 const unsigned int BXBINS = 5;
26 const float BXMIN = -2.5;
27 const float BXMAX = 2.5;
28 
29 // Bins for 3, 5, 6, 7, 10 and 12 bits
30 const unsigned int R3BINS = 8;
31 const float R3MIN = -0.5;
32 const float R3MAX = 7.5;
33 const unsigned int R6BINS = 64;
34 const float R6MIN = -0.5;
35 const float R6MAX = 63.5;
36 const unsigned int R12BINS = 4096;
37 const float R12MIN = -0.5;
38 const float R12MAX = 4095.5;
39 
41  : // data
42  gctCenJetsDataSource_(ps.getParameter<edm::InputTag>("gctCentralJetsDataSource")),
43  gctForJetsDataSource_(ps.getParameter<edm::InputTag>("gctForwardJetsDataSource")),
44  gctTauJetsDataSource_(ps.getParameter<edm::InputTag>("gctTauJetsDataSource")),
45  gctEnergySumsDataSource_(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource")),
46  gctIsoEmDataSource_(ps.getParameter<edm::InputTag>("gctIsoEmDataSource")),
47  gctNonIsoEmDataSource_(ps.getParameter<edm::InputTag>("gctNonIsoEmDataSource")),
48  // RCT
49  rctSource_L1CRCollection_(consumes<L1CaloRegionCollection>(ps.getParameter<InputTag>("rctSource"))),
50  // emul
51  gctCenJetsEmulSource_(ps.getParameter<edm::InputTag>("gctCentralJetsEmulSource")),
52  gctForJetsEmulSource_(ps.getParameter<edm::InputTag>("gctForwardJetsEmulSource")),
53  gctTauJetsEmulSource_(ps.getParameter<edm::InputTag>("gctTauJetsEmulSource")),
54  gctEnergySumsEmulSource_(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource")),
55  gctIsoEmEmulSource_(ps.getParameter<edm::InputTag>("gctIsoEmEmulSource")),
56  gctNonIsoEmEmulSource_(ps.getParameter<edm::InputTag>("gctNonIsoEmEmulSource")) {
57  //set Token(-s)
58  gctIsoEmSourceDataToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctIsoEmDataSource"));
60  consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctNonIsoEmDataSource"));
62  consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctCentralJetsDataSource"));
64  consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctForwardJetsDataSource"));
65  gctTauJetsSourceDataToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctTauJetsDataSource"));
67  consumes<L1GctHFRingEtSumsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
69  consumes<L1GctHFBitCountsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
70  l1EtMissDataToken_ = consumes<L1GctEtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
71  l1HtMissDataToken_ = consumes<L1GctHtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
72  l1EtHadDataToken_ = consumes<L1GctEtHadCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
73  l1EtTotalDataToken_ = consumes<L1GctEtTotalCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsDataSource"));
74 
75  gctIsoEmSourceEmulToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctIsoEmEmulSource"));
77  consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctNonIsoEmEmulSource"));
79  consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctCentralJetsEmulSource"));
81  consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctForwardJetsEmulSource"));
82  gctTauJetsSourceEmulToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctTauJetsEmulSource"));
84  consumes<L1GctHFRingEtSumsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
86  consumes<L1GctHFBitCountsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
87  l1EtMissEmulToken_ = consumes<L1GctEtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
88  l1HtMissEmulToken_ = consumes<L1GctHtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
89  l1EtHadEmulToken_ = consumes<L1GctEtHadCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
90  l1EtTotalEmulToken_ = consumes<L1GctEtTotalCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsEmulSource"));
91 }
92 
94 
96  ibooker.setCurrentFolder("L1T/L1THIon");
97 
99  ibooker.book2D("CenJetsEtEtaPhi", "CENTRAL JET E_{T}", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
101  ibooker.book2D("ForJetsEtEtaPhi", "FORWARD JET E_{T}", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
102  l1GctTauJetsEtEtaPhi_ = ibooker.book2D(
103  "SingleTrackTriggerEtEtaPhi", "TAU JET E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
105  ibooker.book2D("IsoEmRankEtaPhi", "ISO EM E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
107  ibooker.book2D("NonIsoEmRankEtaPhi", "NON-ISO EM E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
108 
109  l1GctCenJetsOccEtaPhi_ = ibooker.book2D(
110  "CenJetsOccEtaPhi", "CENTRAL JET OCCUPANCY", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
111  l1GctForJetsOccEtaPhi_ = ibooker.book2D(
112  "ForJetsOccEtaPhi", "FORWARD JET OCCUPANCY", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
113  l1GctTauJetsOccEtaPhi_ = ibooker.book2D(
114  "SingleTrackTriggerOccEtaPhi", "TAU JET OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
116  ibooker.book2D("IsoEmOccEtaPhi", "ISO EM OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
118  "NonIsoEmOccEtaPhi", "NON-ISO EM OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
119 
121  "HFRing1TowerCountCorr", "HF RING1 TOWER COUNT CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
123  "HFRing2TowerCountCorr", "HF RING2 TOWER COUNT CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
124 
126  ibooker.book1D("HFRing1TowerCountPosEta", "HF RING1 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
128  ibooker.book1D("HFRing1TowerCountNegEta", "HF RING1 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
130  ibooker.book1D("HFRing2TowerCountPosEta", "HF RING2 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
132  ibooker.book1D("HFRing2TowerCountNegEta", "HF RING2 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
133 
135  ibooker.book2D("HFRingTowerCountOccBx", "HF RING TOWER COUNT PER BX", BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
136 
137  l1GctHFRing1PosEtaNegEta_ = ibooker.book2D("centrality and centrality ext Corr",
138  "centrality and centrality ext E_{T} CORRELATION",
139  R3BINS,
140  R3MIN,
141  R3MAX,
142  R3BINS,
143  R3MIN,
144  R3MAX);
145  l1GctHFRing1ETSumPosEta_ = ibooker.book1D("centrality", "centrality E_{T}", 8, -0.5, 7.5);
146  l1GctHFRing1ETSumNegEta_ = ibooker.book1D("centrality ext", "centrality ext E_{T}", 8, -0.5, 7.5);
147  l1GctHFRingETSum_ = ibooker.book1D("centrality+centralityExt Et", "centrality+centralityExt E_{T}", 8, -0.5, 7.5);
148  l1GctHFRingETDiff_ = ibooker.book1D("centrality-centralityExt Et", "centrality-centralityExt E_{T}", 8, -0.5, 7.5);
149 
151  ibooker.book2D("centrality OccBx", "centrality PER BX", BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
153  ibooker.book1D("centrality centralityExt ratio", "centrality centralityExt ratio", 9, -0.5, 8.5);
154 
155  l1GctMinBiasBitHFEt_ = ibooker.book1D("HI Minimum Bias bits HF Et", "HI Minimum Bias bits HF Et", 6, -0.5, 5.5);
156 
157  l1GctCenJetsRank_ = ibooker.book1D("CenJetsRank", "CENTRAL JET E_{T}", R6BINS, R6MIN, R6MAX);
158  l1GctForJetsRank_ = ibooker.book1D("ForJetsRank", "FORWARD JET E_{T}", R6BINS, R6MIN, R6MAX);
159  l1GctTauJetsRank_ = ibooker.book1D("SingleTrackTriggerRank", "Single Track Trigger E_{T}", R6BINS, R6MIN, R6MAX);
160  l1GctIsoEmRank_ = ibooker.book1D("IsoEmRank", "ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
161  l1GctNonIsoEmRank_ = ibooker.book1D("NonIsoEmRank", "NON-ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
162 
164  ibooker.book2D("AllJetsOccRankBx", "ALL JETS E_{T} PER BX", BXBINS, BXMIN, BXMAX, R6BINS, R6MIN, R6MAX);
166  ibooker.book2D("AllEmOccRankBx", "ALL EM E_{T} PER BX", BXBINS, BXMIN, BXMAX, R6BINS, R6MIN, R6MAX);
167 
168  l1GctEtMiss_ = ibooker.book1D("EtMiss", "MET", R12BINS, R12MIN, R12MAX);
169  l1GctEtMissPhi_ = ibooker.book1D("EtMissPhi", "MET #phi", METPHIBINS, METPHIMIN, METPHIMAX);
170  l1GctEtMissOf_ = ibooker.book1D("EtMissOf", "MET OVERFLOW", OFBINS, OFMIN, OFMAX);
171  l1GctEtMissOccBx_ = ibooker.book2D("EtMissOccBx", "MET PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
172 
173  l1GctEtTotal_ = ibooker.book1D("EtTotal", "SUM E_{T}", R12BINS, R12MIN, R12MAX);
174  l1GctEtTotalOf_ = ibooker.book1D("EtTotalOf", "SUM E_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
176  ibooker.book2D("EtTotalOccBx", "SUM E_{T} PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
177 
178  l1GctEtHad_ = ibooker.book1D("EtHad", "H_{T}", R12BINS, R12MIN, R12MAX);
179  l1GctEtHadOf_ = ibooker.book1D("EtHadOf", "H_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
180  l1GctEtHadOccBx_ = ibooker.book2D("EtHadOccBx", "H_{T} PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
181 
183  ibooker.book2D("EtTotalEtHadCorr", "Sum E_{T} H_{T} CORRELATION", R6BINS, R12MIN, R12MAX, R6BINS, R12MIN, R12MAX);
184 
185  HFPosEnergy_ = ibooker.book1D("HF+ Energy Sum", "HF+ Energy Sum", R12BINS, R12MIN, R12MAX);
186  HFNegEnergy_ = ibooker.book1D("HF- Energy Sum", "HF- Energy Sum", R12BINS, R12MIN, R12MAX);
187  HFEnergy_ = ibooker.book1D("HF Energy Sum", "HF Energy Sum", R12BINS, R12MIN, R12MAX);
188 
189  ibooker.setCurrentFolder("L1TEMU/L1TEMUHIon");
190 
191  const std::string clabel[8] = {"cenJet", "forJet", "single track", "isoEm", "nonIsoEm", "EtSum", "MET", "HTT"};
192  const std::string olabel[3] = {"rank", "eta", "phi"};
193 
194  unsigned int Bin[3][8] = {{64, 64, 64, 64, 64, 128, 128, 128},
197  float Min[3][8] = {{-0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
198  {-0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
199  {-0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5}};
200  float Max[3][8] = {{63.5, 63.5, 63.5, 63.5, 63.5, 1023.5, 1023.5, 1023.5},
201  {21.5, 21.5, 21.5, 21.5, 21.5, 21.5, 21.5, 21.5},
202  {17.5, 17.5, 17.5, 17.5, 17.5, 17.5, 71.5, 17.5}};
203 
204  for (int i = 0; i < 3; i++) {
205  for (int j = 0; j < 8; j++) {
206  DECorr_[i][j] = ibooker.book2D(clabel[j] + olabel[i] + " data vs emul",
207  clabel[j] + olabel[i] + " data vs emul",
208  Bin[i][j],
209  Min[i][j],
210  Max[i][j],
211  Bin[i][j],
212  Min[i][j],
213  Max[i][j]);
214  }
215  }
216 
217  centralityCorr_ = ibooker.book2D("centrality data vs emul", "centrality data vs emul", 8, -0.5, 7.5, 8, -0.5, 7.5);
219  ibooker.book2D("centrality ext data vs emul", "centrality ext data vs emul", 8, -0.5, 7.5, 8, -0.5, 7.5);
220  MinBiasCorr_ = ibooker.book2D(
221  "Minimum Bias Trigger Data vs Emul", "Minimum Bias Trigger Data vs Emul", 6, -0.5, 5.5, 6, -0.5, 5.5);
222 }
223 
236 
238  edm::Handle<L1GctEmCandCollection> l1NonIsoEmEmul;
248 
250  e.getByToken(rctSource_L1CRCollection_, rgn);
251 
252  e.getByToken(gctIsoEmSourceDataToken_, l1IsoEm);
253  e.getByToken(gctNonIsoEmSourceDataToken_, l1NonIsoEm);
254  e.getByToken(gctCenJetsSourceDataToken_, l1CenJets);
255  e.getByToken(gctForJetsSourceDataToken_, l1ForJets);
256  e.getByToken(gctTauJetsSourceDataToken_, l1TauJets);
257  e.getByToken(gctEnergySumsSourceDataToken_, l1HFSums);
258  e.getByToken(l1HFCountsDataToken_, l1HFCounts);
259  e.getByToken(l1EtMissDataToken_, l1EtMiss);
260  e.getByToken(l1HtMissDataToken_, l1HtMiss);
261  e.getByToken(l1EtHadDataToken_, l1EtHad);
262  e.getByToken(l1EtTotalDataToken_, l1EtTotal);
263 
264  e.getByToken(gctIsoEmSourceEmulToken_, l1IsoEmEmul);
265  e.getByToken(gctNonIsoEmSourceEmulToken_, l1NonIsoEmEmul);
266  e.getByToken(gctCenJetsSourceEmulToken_, l1CenJetsEmul);
267  e.getByToken(gctForJetsSourceEmulToken_, l1ForJetsEmul);
268  e.getByToken(gctTauJetsSourceEmulToken_, l1TauJetsEmul);
269  e.getByToken(gctEnergySumsSourceEmulToken_, l1HFSumsEmul);
270  e.getByToken(l1HFCountsEmulToken_, l1HFCountsEmul);
271  e.getByToken(l1EtMissEmulToken_, l1EtMissEmul);
272  e.getByToken(l1HtMissEmulToken_, l1HtMissEmul);
273  e.getByToken(l1EtHadEmulToken_, l1EtHadEmul);
274  e.getByToken(l1EtTotalEmulToken_, l1EtTotalEmul);
275 
276  // Fill histograms
277 
278  // Central jets
279 
280  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin(); cj != l1CenJets->end(); cj++) {
281  // only plot central BX
282  if (cj->bx() == 0) {
283  l1GctCenJetsRank_->Fill(cj->rank());
284  // only plot eta and phi maps for non-zero candidates
285  if (cj->rank()) {
286  l1GctCenJetsEtEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi(), cj->rank());
287  l1GctCenJetsOccEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi());
288  }
289  }
290  if (cj->rank())
291  l1GctAllJetsOccRankBx_->Fill(cj->bx(), cj->rank()); // for all BX
292  for (L1GctJetCandCollection::const_iterator j = l1CenJetsEmul->begin(); j != l1CenJetsEmul->end(); j++) {
293  if (cj->bx() == 0 && j->bx() == 0 &&
294  std::distance(l1CenJets->begin(), cj) == std::distance(l1CenJetsEmul->begin(), j)) {
295  //std::cout<<std::to_string(j)<<std::endl;
296  DECorr_[0][0]->Fill(cj->rank(), j->rank());
297  DECorr_[1][0]->Fill(cj->regionId().ieta(), j->regionId().ieta());
298  DECorr_[2][0]->Fill(cj->regionId().iphi(), j->regionId().iphi());
299  }
300  }
301  }
302  for (L1GctJetCandCollection::const_iterator j = l1CenJetsEmul->begin(); j != l1CenJetsEmul->end(); j++) {
303  }
304 
305  // Forward jets
306  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
307  // only plot central BX
308  if (fj->bx() == 0) {
309  l1GctForJetsRank_->Fill(fj->rank());
310  // only plot eta and phi maps for non-zero candidates
311  if (fj->rank()) {
312  l1GctForJetsEtEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi(), fj->rank());
313  l1GctForJetsOccEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi());
314  }
315  }
316  if (fj->rank())
317  l1GctAllJetsOccRankBx_->Fill(fj->bx(), fj->rank()); // for all BX
318  for (L1GctJetCandCollection::const_iterator j = l1ForJetsEmul->begin(); j != l1ForJetsEmul->end(); j++) {
319  if (fj->bx() == 0 && j->bx() == 0 &&
320  std::distance(l1ForJets->begin(), fj) == std::distance(l1ForJetsEmul->begin(), j)) {
321  DECorr_[0][1]->Fill(fj->rank(), j->rank());
322  DECorr_[1][1]->Fill(fj->regionId().ieta(), j->regionId().ieta());
323  DECorr_[2][1]->Fill(fj->regionId().iphi(), j->regionId().iphi());
324  }
325  }
326  }
327 
328  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
329  // only plot central BX
330  if (tj->bx() == 0) {
331  l1GctTauJetsRank_->Fill(tj->rank());
332  // only plot eta and phi maps for non-zero candidates
333  if (tj->rank()) {
334  l1GctTauJetsEtEtaPhi_->Fill(tj->regionId().ieta(), tj->regionId().iphi(), tj->rank());
335  l1GctTauJetsOccEtaPhi_->Fill(tj->regionId().ieta(), tj->regionId().iphi());
336  }
337  }
338  if (tj->rank())
339  l1GctAllJetsOccRankBx_->Fill(tj->bx(), tj->rank()); // for all BX
340  for (L1GctJetCandCollection::const_iterator j = l1TauJetsEmul->begin(); j != l1TauJetsEmul->end(); j++) {
341  if (tj->bx() == 0 && j->bx() == 0 &&
342  std::distance(l1TauJets->begin(), tj) == std::distance(l1TauJetsEmul->begin(), j)) {
343  DECorr_[0][2]->Fill(tj->rank(), j->rank());
344  DECorr_[1][2]->Fill(tj->regionId().ieta(), j->regionId().ieta());
345  DECorr_[2][2]->Fill(tj->regionId().iphi(), j->regionId().iphi());
346  }
347  }
348  }
349 
350  for (L1GctEtMissCollection::const_iterator met = l1EtMiss->begin(); met != l1EtMiss->end(); met++) {
351  // only plot central BX
352  if (met->bx() == 0) {
353  if (met->overFlow() == 0 && met->et() > 0) {
354  //Avoid problems with met=0 candidates affecting MET_PHI plots
355  l1GctEtMiss_->Fill(met->et());
356  l1GctEtMissPhi_->Fill(met->phi());
357  }
358  l1GctEtMissOf_->Fill(met->overFlow());
359  }
360  if (met->overFlow() == 0 && met->et() > 0)
361  l1GctEtMissOccBx_->Fill(met->bx(), met->et()); // for all BX
362  for (L1GctEtMissCollection::const_iterator j = l1EtMissEmul->begin(); j != l1EtMissEmul->end(); j++) {
363  if (met->bx() == 0 && j->bx() == 0) {
364  DECorr_[0][6]->Fill(met->et(), j->et());
365  DECorr_[2][6]->Fill(met->phi(), j->phi());
366  }
367  }
368  }
369 
370  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ht++) {
371  // only plot central BX
372  if (ht->bx() == 0) {
373  l1GctEtHad_->Fill(ht->et());
374  l1GctEtHadOf_->Fill(ht->overFlow());
375  }
376  l1GctEtHadOccBx_->Fill(ht->bx(), ht->et()); // for all BX
377  for (L1GctEtHadCollection::const_iterator j = l1EtHadEmul->begin(); j != l1EtHadEmul->end(); j++) {
378  if (ht->bx() == 0 && j->bx() == 0) {
379  DECorr_[0][7]->Fill(ht->et(), j->et());
380  //DECorr_[2][7]->Fill(ht->ieta(),j->ieta());
381  //DECorr_[3][7]->Fill(ht->iphi(),j->iphi());
382  }
383  }
384  }
385 
386  for (L1GctEtTotalCollection::const_iterator et = l1EtTotal->begin(); et != l1EtTotal->end(); et++) {
387  // only plot central BX
388  if (et->bx() == 0) {
389  l1GctEtTotal_->Fill(et->et());
390  l1GctEtTotalOf_->Fill(et->overFlow());
391  }
392  l1GctEtTotalOccBx_->Fill(et->bx(), et->et()); // for all BX
393  for (L1GctEtTotalCollection::const_iterator j = l1EtTotalEmul->begin(); j != l1EtTotalEmul->end(); j++) {
394  if (et->bx() == 0 && j->bx() == 0) {
395  DECorr_[0][5]->Fill(et->et(), j->et());
396  //DECorr_[2][5]->Fill(et->eta(),j->eta());
397  //DECorr_[3][5]->Fill(et->iphi(),j->iphi());
398  }
399  }
400  }
401 
402  for (L1GctEmCandCollection::const_iterator ie = l1IsoEm->begin(); ie != l1IsoEm->end(); ie++) {
403  // only plot central BX
404  if (ie->bx() == 0) {
405  l1GctIsoEmRank_->Fill(ie->rank());
406  // only plot eta and phi maps for non-zero candidates
407  if (ie->rank()) {
408  l1GctIsoEmRankEtaPhi_->Fill(ie->regionId().ieta(), ie->regionId().iphi(), ie->rank());
409  l1GctIsoEmOccEtaPhi_->Fill(ie->regionId().ieta(), ie->regionId().iphi());
410  }
411  }
412  if (ie->rank())
413  l1GctAllEmOccRankBx_->Fill(ie->bx(), ie->rank()); // for all BX
414  for (L1GctEmCandCollection::const_iterator j = l1IsoEmEmul->begin(); j != l1IsoEmEmul->end(); j++) {
415  if (ie->bx() == 0 && j->bx() == 0 &&
416  std::distance(l1IsoEm->begin(), ie) == std::distance(l1IsoEmEmul->begin(), j)) {
417  DECorr_[0][3]->Fill(ie->rank(), j->rank());
418  DECorr_[1][3]->Fill(ie->regionId().ieta(), j->regionId().ieta());
419  DECorr_[2][3]->Fill(ie->regionId().iphi(), j->regionId().iphi());
420  }
421  }
422  }
423 
424  for (L1GctEmCandCollection::const_iterator ne = l1NonIsoEm->begin(); ne != l1NonIsoEm->end(); ne++) {
425  // only plot central BX
426  if (ne->bx() == 0) {
427  l1GctNonIsoEmRank_->Fill(ne->rank());
428  // only plot eta and phi maps for non-zero candidates
429  if (ne->rank()) {
430  l1GctNonIsoEmRankEtaPhi_->Fill(ne->regionId().ieta(), ne->regionId().iphi(), ne->rank());
431  l1GctNonIsoEmOccEtaPhi_->Fill(ne->regionId().ieta(), ne->regionId().iphi());
432  }
433  }
434  if (ne->rank())
435  l1GctAllEmOccRankBx_->Fill(ne->bx(), ne->rank()); // for all BX
436  for (L1GctEmCandCollection::const_iterator j = l1NonIsoEmEmul->begin(); j != l1NonIsoEmEmul->end(); j++) {
437  if (ne->bx() == 0 && j->bx() == 0 &&
438  std::distance(l1NonIsoEm->begin(), ne) == std::distance(l1NonIsoEmEmul->begin(), j)) {
439  DECorr_[0][4]->Fill(ne->rank(), j->rank());
440  DECorr_[1][4]->Fill(ne->regionId().ieta(), j->regionId().ieta());
441  DECorr_[2][4]->Fill(ne->regionId().iphi(), j->regionId().iphi());
442  }
443  }
444  }
445 
446  for (L1GctHFBitCountsCollection::const_iterator hfc = l1HFCounts->begin(); hfc != l1HFCounts->end(); hfc++) {
447  // only plot central BX
448  if (hfc->bx() == 0) {
449  // Individual ring counts
450  l1GctHFRing1TowerCountPosEta_->Fill(hfc->bitCount(0));
451  l1GctHFRing1TowerCountNegEta_->Fill(hfc->bitCount(1));
452  l1GctHFRing2TowerCountPosEta_->Fill(hfc->bitCount(2));
453  l1GctHFRing2TowerCountNegEta_->Fill(hfc->bitCount(3));
454  // Correlate positive and negative eta
455  l1GctHFRing1TowerCountPosEtaNegEta_->Fill(hfc->bitCount(0), hfc->bitCount(1));
456  l1GctHFRing2TowerCountPosEtaNegEta_->Fill(hfc->bitCount(2), hfc->bitCount(3));
457  }
458  // Occupancy vs BX
459  for (unsigned i = 0; i < 4; i++) {
460  l1GctHFRingTowerCountOccBx_->Fill(hfc->bx(), hfc->bitCount(i));
461  }
462  }
463 
464  for (L1GctHFRingEtSumsCollection::const_iterator hfs = l1HFSums->begin(); hfs != l1HFSums->end(); hfs++) {
465  if (hfs->bx() == 0) {
466  l1GctHFRing1ETSumPosEta_->Fill(hfs->etSum(0));
467  l1GctHFRing1ETSumNegEta_->Fill(hfs->etSum(1));
468  l1GctHFRingETSum_->Fill(hfs->etSum(0) + hfs->etSum(1));
469  l1GctHFRingETDiff_->Fill(abs(hfs->etSum(0) - hfs->etSum(1)));
470  if (hfs->etSum(1) != 0)
471  l1GctHFRingRatioPosEta_->Fill((hfs->etSum(0)) / (hfs->etSum(1)));
472  l1GctHFRing1PosEtaNegEta_->Fill(hfs->etSum(0), hfs->etSum(1));
473  std::vector<int> bit = SortMinBiasBit(hfs->etSum(2), hfs->etSum(3));
474  for (std::vector<int>::const_iterator it = bit.begin(); it != bit.end(); it++) {
475  l1GctMinBiasBitHFEt_->Fill(it - bit.begin(), *it);
476  }
477  }
478  for (unsigned i = 0; i < 4; i++) {
479  l1GctHFRingETSumOccBx_->Fill(hfs->bx(), hfs->etSum(i));
480  }
481  for (L1GctHFRingEtSumsCollection::const_iterator j = l1HFSumsEmul->begin(); j != l1HFSumsEmul->end(); j++) {
482  if (hfs->bx() == 0 && j->bx() == 0 &&
483  std::distance(l1HFSums->begin(), hfs) == std::distance(l1HFSumsEmul->begin(), j)) {
484  centralityCorr_->Fill(hfs->etSum(0), j->etSum(0));
485  centralityExtCorr_->Fill(hfs->etSum(1), j->etSum(1));
486  std::vector<int> dbit = SortMinBiasBit(hfs->etSum(2), hfs->etSum(3));
487  std::vector<int> ebit = SortMinBiasBit(j->etSum(2), j->etSum(3));
488  }
489  }
490  }
491 
492  for (L1CaloRegionCollection::const_iterator it = rgn->begin(); it != rgn->end(); it++) {
493  if (it->bx() == 0) {
494  int totm = 0;
495  int totp = 0;
496  if (it->gctEta() < 4) {
497  totm += it->et();
498  }
499  if (it->gctEta() > 17) {
500  totp += it->et();
501  }
502  HFNegEnergy_->Fill(totm);
503  HFPosEnergy_->Fill(totp);
504  HFEnergy_->Fill(totm + totp);
505  }
506  }
507 }
508 
509 std::vector<int> L1THIonImp::SortMinBiasBit(uint16_t a, uint16_t b) {
510  std::vector<int> Bit;
511 
512  if ((a + 1) / 4 > 0.5) {
513  Bit.push_back(1);
514  } else {
515  Bit.push_back(0);
516  }
517 
518  if (a == 2 || a == 3 || a == 6 || a == 7) {
519  Bit.push_back(1);
520  } else {
521  Bit.push_back(0);
522  }
523 
524  Bit.push_back(a % 2);
525 
526  if ((b + 1) / 4 > 0.5) {
527  Bit.push_back(1);
528  } else {
529  Bit.push_back(0);
530  }
531 
532  if (b == 2 || b == 3 || b == 6 || b == 7) {
533  Bit.push_back(1);
534  } else {
535  Bit.push_back(0);
536  }
537 
538  Bit.push_back(b % 2);
539 
540  return Bit;
541 }
const float PHIMIN
Definition: L1THIonImp.cc:18
MonitorElement * l1GctEtTotal_
Definition: L1THIonImp.h:64
MonitorElement * l1GctHFRing1TowerCountPosEtaNegEta_
Definition: L1THIonImp.h:76
MonitorElement * HFPosEnergy_
Definition: L1THIonImp.h:90
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * l1GctIsoEmOccEtaPhi_
Definition: L1THIonImp.h:47
const float OFMAX
Definition: L1THIonImp.cc:23
edm::EDGetTokenT< L1GctHtMissCollection > l1HtMissEmulToken_
Definition: L1THIonImp.h:140
MonitorElement * l1GctEtHadOf_
Definition: L1THIonImp.h:68
const float R6MAX
Definition: L1THIonImp.cc:35
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::EDGetTokenT< L1GctHtMissCollection > l1HtMissDataToken_
Definition: L1THIonImp.h:127
MonitorElement * l1GctIsoEmRankEtaPhi_
Definition: L1THIonImp.h:41
MonitorElement * HFEnergy_
Definition: L1THIonImp.h:91
MonitorElement * l1GctHFRingTowerCountOccBx_
Definition: L1THIonImp.h:86
const float EMETAMIN
Definition: L1THIonImp.cc:10
edm::EDGetTokenT< L1CaloRegionCollection > rctSource_L1CRCollection_
Definition: L1THIonImp.h:107
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissEmulToken_
Definition: L1THIonImp.h:139
MonitorElement * l1GctHFRing1ETSumPosEta_
Definition: L1THIonImp.h:82
const float PHIMAX
Definition: L1THIonImp.cc:19
MonitorElement * l1GctTauJetsEtEtaPhi_
Definition: L1THIonImp.h:40
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceEmulToken_
Definition: L1THIonImp.h:131
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceEmulToken_
Definition: L1THIonImp.h:133
const unsigned int EMETABINS
Definition: L1THIonImp.cc:9
~L1THIonImp() override
Definition: L1THIonImp.cc:93
MonitorElement * l1GctForJetsRank_
Definition: L1THIonImp.h:51
MonitorElement * DECorr_[3][8]
Definition: L1THIonImp.h:93
MonitorElement * l1GctTauJetsRank_
Definition: L1THIonImp.h:52
MonitorElement * l1GctHFRing2TowerCountPosEta_
Definition: L1THIonImp.h:80
MonitorElement * l1GctEtHadOccBx_
Definition: L1THIonImp.h:69
MonitorElement * l1GctHFRing1PosEtaNegEta_
Definition: L1THIonImp.h:75
MonitorElement * l1GctEtMissOf_
Definition: L1THIonImp.h:62
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceEmulToken_
Definition: L1THIonImp.h:135
const float R6MIN
Definition: L1THIonImp.cc:34
MonitorElement * l1GctHFRing1TowerCountNegEta_
Definition: L1THIonImp.h:79
MonitorElement * l1GctIsoEmRank_
Definition: L1THIonImp.h:53
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceDataToken_
Definition: L1THIonImp.h:118
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsDataToken_
Definition: L1THIonImp.h:125
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadEmulToken_
Definition: L1THIonImp.h:141
MonitorElement * l1GctAllJetsOccRankBx_
Definition: L1THIonImp.h:56
MonitorElement * l1GctHFRing2TowerCountPosEtaNegEta_
Definition: L1THIonImp.h:77
MonitorElement * l1GctHFRingETSumOccBx_
Definition: L1THIonImp.h:85
MonitorElement * l1GctEtMissOccBx_
Definition: L1THIonImp.h:63
const float METPHIMIN
Definition: L1THIonImp.cc:14
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceEmulToken_
Definition: L1THIonImp.h:132
void Fill(long long x)
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceEmulToken_
Definition: L1THIonImp.h:134
MonitorElement * centralityCorr_
Definition: L1THIonImp.h:95
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissDataToken_
Definition: L1THIonImp.h:126
const unsigned int R6BINS
Definition: L1THIonImp.cc:33
virtual std::vector< int > SortMinBiasBit(uint16_t, uint16_t)
Definition: L1THIonImp.cc:509
MonitorElement * centralityExtCorr_
Definition: L1THIonImp.h:96
MonitorElement * HFNegEnergy_
Definition: L1THIonImp.h:89
MonitorElement * l1GctCenJetsOccEtaPhi_
Definition: L1THIonImp.h:44
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceDataToken_
Definition: L1THIonImp.h:119
MonitorElement * l1GctForJetsEtEtaPhi_
Definition: L1THIonImp.h:39
MonitorElement * l1GctAllEmOccRankBx_
Definition: L1THIonImp.h:57
MonitorElement * l1GctEtMissPhi_
Definition: L1THIonImp.h:61
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalEmulToken_
Definition: L1THIonImp.h:142
MonitorElement * l1GctHFRingETDiff_
Definition: L1THIonImp.h:72
const float JETETAMIN
Definition: L1THIonImp.cc:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * l1GctEtMiss_
Definition: L1THIonImp.h:60
const float R12MAX
Definition: L1THIonImp.cc:38
const float R12MIN
Definition: L1THIonImp.cc:37
MonitorElement * l1GctForJetsOccEtaPhi_
Definition: L1THIonImp.h:45
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalDataToken_
Definition: L1THIonImp.h:129
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceDataToken_
Definition: L1THIonImp.h:121
MonitorElement * l1GctHFRing2TowerCountNegEta_
Definition: L1THIonImp.h:81
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsEmulToken_
Definition: L1THIonImp.h:138
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceEmulToken_
Definition: L1THIonImp.h:137
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1THIonImp.cc:224
const unsigned int JETETABINS
Definition: L1THIonImp.cc:5
const unsigned int METPHIBINS
Definition: L1THIonImp.cc:13
const unsigned int R3BINS
Definition: L1THIonImp.cc:30
MonitorElement * l1GctEtTotalEtHadCorr_
Definition: L1THIonImp.h:70
const unsigned int R12BINS
Definition: L1THIonImp.cc:36
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
const float JETETAMAX
Definition: L1THIonImp.cc:7
double b
Definition: hdecay.h:118
const float METPHIMAX
Definition: L1THIonImp.cc:15
MonitorElement * l1GctHFRingRatioPosEta_
Definition: L1THIonImp.h:84
MonitorElement * l1GctCenJetsEtEtaPhi_
Definition: L1THIonImp.h:38
MonitorElement * l1GctHFRing1ETSumNegEta_
Definition: L1THIonImp.h:83
MonitorElement * l1GctEtTotalOccBx_
Definition: L1THIonImp.h:66
MonitorElement * l1GctHFRingETSum_
Definition: L1THIonImp.h:71
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceDataToken_
Definition: L1THIonImp.h:122
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceDataToken_
Definition: L1THIonImp.h:124
MonitorElement * l1GctEtHad_
Definition: L1THIonImp.h:67
MonitorElement * l1GctHFRing1TowerCountPosEta_
Definition: L1THIonImp.h:78
const float BXMIN
Definition: L1THIonImp.cc:26
HLT enums.
const float EMETAMAX
Definition: L1THIonImp.cc:11
double a
Definition: hdecay.h:119
MonitorElement * l1GctTauJetsOccEtaPhi_
Definition: L1THIonImp.h:46
MonitorElement * MinBiasCorr_
Definition: L1THIonImp.h:97
const float OFMIN
Definition: L1THIonImp.cc:22
MonitorElement * l1GctMinBiasBitHFEt_
Definition: L1THIonImp.h:87
const unsigned int BXBINS
Definition: L1THIonImp.cc:25
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceDataToken_
Definition: L1THIonImp.h:120
std::vector< L1CaloRegion > L1CaloRegionCollection
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadDataToken_
Definition: L1THIonImp.h:128
MonitorElement * l1GctNonIsoEmOccEtaPhi_
Definition: L1THIonImp.h:48
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const unsigned int PHIBINS
Definition: L1THIonImp.cc:17
L1THIonImp(const edm::ParameterSet &ps)
Definition: L1THIonImp.cc:40
const float R3MIN
Definition: L1THIonImp.cc:31
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: L1THIonImp.cc:95
MonitorElement * l1GctEtTotalOf_
Definition: L1THIonImp.h:65
MonitorElement * l1GctNonIsoEmRank_
Definition: L1THIonImp.h:54
const unsigned int OFBINS
Definition: L1THIonImp.cc:21
const float BXMAX
Definition: L1THIonImp.cc:27
MonitorElement * l1GctNonIsoEmRankEtaPhi_
Definition: L1THIonImp.h:42
Definition: Run.h:45
const float R3MAX
Definition: L1THIonImp.cc:32
MonitorElement * l1GctCenJetsRank_
Definition: L1THIonImp.h:50