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