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 
182 
184 
196 
208 
211 
218  e.getByToken(l1HFCountsDataToken_, l1HFCounts);
219  e.getByToken(l1EtMissDataToken_, l1EtMiss);
220  e.getByToken(l1HtMissDataToken_, l1HtMiss);
221  e.getByToken(l1EtHadDataToken_, l1EtHad);
222  e.getByToken(l1EtTotalDataToken_, l1EtTotal);
223 
224  e.getByToken(gctIsoEmSourceEmulToken_, l1IsoEmEmul);
225  e.getByToken(gctNonIsoEmSourceEmulToken_, l1NonIsoEmEmul);
226  e.getByToken(gctCenJetsSourceEmulToken_, l1CenJetsEmul);
227  e.getByToken(gctForJetsSourceEmulToken_, l1ForJetsEmul);
228  e.getByToken(gctTauJetsSourceEmulToken_, l1TauJetsEmul);
229  e.getByToken(gctEnergySumsSourceEmulToken_, l1HFSumsEmul);
230  e.getByToken(l1HFCountsEmulToken_, l1HFCountsEmul);
231  e.getByToken(l1EtMissEmulToken_, l1EtMissEmul);
232  e.getByToken(l1HtMissEmulToken_, l1HtMissEmul);
233  e.getByToken(l1EtHadEmulToken_, l1EtHadEmul);
234  e.getByToken(l1EtTotalEmulToken_, l1EtTotalEmul);
235 
236  // Fill histograms
237 
238  // Central jets
239 
240  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin();cj != l1CenJets->end(); cj++) {
241  // only plot central BX
242  if (cj->bx()==0) {
243  l1GctCenJetsRank_->Fill(cj->rank());
244  // only plot eta and phi maps for non-zero candidates
245  if (cj->rank()) {
246  l1GctCenJetsEtEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi(),cj->rank());
247  l1GctCenJetsOccEtaPhi_->Fill(cj->regionId().ieta(),cj->regionId().iphi());
248  }
249  }
250  if (cj->rank()) l1GctAllJetsOccRankBx_->Fill(cj->bx(),cj->rank()); // for all BX
251  for (L1GctJetCandCollection::const_iterator j = l1CenJetsEmul->begin();j != l1CenJetsEmul->end(); j++) {
252  if (cj->bx()==0 && j->bx()==0 && std::distance(l1CenJets->begin(), cj)==std::distance(l1CenJetsEmul->begin(),j)){
253  //std::cout<<std::to_string(j)<<std::endl;
254  DECorr_[0][0]->Fill(cj->rank(), j->rank());
255  DECorr_[1][0]->Fill(cj->regionId().ieta(),j->regionId().ieta());
256  DECorr_[2][0]->Fill(cj->regionId().iphi(),j->regionId().iphi());
257  }
258  }
259  }
260  for (L1GctJetCandCollection::const_iterator j = l1CenJetsEmul->begin();j != l1CenJetsEmul->end(); j++) {
261  }
262 
263  // Forward jets
264  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
265  // only plot central BX
266  if (fj->bx()==0) {
267  l1GctForJetsRank_->Fill(fj->rank());
268  // only plot eta and phi maps for non-zero candidates
269  if (fj->rank()) {
270  l1GctForJetsEtEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi(),fj->rank());
271  l1GctForJetsOccEtaPhi_->Fill(fj->regionId().ieta(),fj->regionId().iphi());
272  }
273  }
274  if (fj->rank()) l1GctAllJetsOccRankBx_->Fill(fj->bx(),fj->rank()); // for all BX
275  for (L1GctJetCandCollection::const_iterator j = l1ForJetsEmul->begin();j != l1ForJetsEmul->end(); j++) {
276  if (fj->bx()==0 && j->bx()==0 && std::distance(l1ForJets->begin(), fj)==std::distance(l1ForJetsEmul->begin(),j)){
277  DECorr_[0][1]->Fill(fj->rank(), j->rank());
278  DECorr_[1][1]->Fill(fj->regionId().ieta(),j->regionId().ieta());
279  DECorr_[2][1]->Fill(fj->regionId().iphi(),j->regionId().iphi());
280  }
281  }
282  }
283 
284  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
285  // only plot central BX
286  if (tj->bx()==0) {
287  l1GctTauJetsRank_->Fill(tj->rank());
288  // only plot eta and phi maps for non-zero candidates
289  if (tj->rank()) {
290  l1GctTauJetsEtEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi(),tj->rank());
291  l1GctTauJetsOccEtaPhi_->Fill(tj->regionId().ieta(),tj->regionId().iphi());
292  }
293  }
294  if (tj->rank()) l1GctAllJetsOccRankBx_->Fill(tj->bx(),tj->rank()); // for all BX
295  for (L1GctJetCandCollection::const_iterator j = l1TauJetsEmul->begin(); j!= l1TauJetsEmul->end(); j++) {
296  if (tj->bx()==0 && j->bx()==0 && std::distance(l1TauJets->begin(), tj)==std::distance(l1TauJetsEmul->begin(),j)){
297  DECorr_[0][2]->Fill(tj->rank(), j->rank());
298  DECorr_[1][2]->Fill(tj->regionId().ieta(),j->regionId().ieta());
299  DECorr_[2][2]->Fill(tj->regionId().iphi(),j->regionId().iphi());
300  }
301  }
302  }
303 
304  for (L1GctEtMissCollection::const_iterator met = l1EtMiss->begin(); met != l1EtMiss->end(); met++) {
305  // only plot central BX
306  if (met->bx()==0) {
307  if (met->overFlow() == 0 && met->et() > 0) {
308  //Avoid problems with met=0 candidates affecting MET_PHI plots
309  l1GctEtMiss_->Fill(met->et());
310  l1GctEtMissPhi_->Fill(met->phi());
311  }
312  l1GctEtMissOf_->Fill(met->overFlow());
313  }
314  if (met->overFlow() == 0 && met->et() > 0) l1GctEtMissOccBx_->Fill(met->bx(),met->et()); // for all BX
315  for (L1GctEtMissCollection::const_iterator j = l1EtMissEmul->begin(); j != l1EtMissEmul->end(); j++){
316  if (met->bx()==0 && j->bx()==0){
317  DECorr_[0][6]->Fill(met->et(), j->et());
318  DECorr_[2][6]->Fill(met->phi(),j->phi());
319  }
320  }
321  }
322 
323  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ht++) {
324  // only plot central BX
325  if (ht->bx()==0) {
326  l1GctEtHad_->Fill(ht->et());
327  l1GctEtHadOf_->Fill(ht->overFlow());
328  }
329  l1GctEtHadOccBx_->Fill(ht->bx(),ht->et()); // for all BX
330  for (L1GctEtHadCollection::const_iterator j = l1EtHadEmul->begin(); j != l1EtHadEmul->end(); j++){
331  if (ht->bx()==0 && j->bx()==0){
332  DECorr_[0][7]->Fill(ht->et(), j->et());
333  //DECorr_[2][7]->Fill(ht->ieta(),j->ieta());
334  //DECorr_[3][7]->Fill(ht->iphi(),j->iphi());
335  }
336  }
337  }
338 
339  for (L1GctEtTotalCollection::const_iterator et = l1EtTotal->begin(); et != l1EtTotal->end(); et++) {
340  // only plot central BX
341  if (et->bx()==0) {
342  l1GctEtTotal_->Fill(et->et());
343  l1GctEtTotalOf_->Fill(et->overFlow());
344  }
345  l1GctEtTotalOccBx_->Fill(et->bx(),et->et()); // for all BX
346  for (L1GctEtTotalCollection::const_iterator j = l1EtTotalEmul->begin(); j != l1EtTotalEmul->end(); j++){
347  if (et->bx()==0 && j->bx()==0){
348  DECorr_[0][5]->Fill(et->et(), j->et());
349  //DECorr_[2][5]->Fill(et->eta(),j->eta());
350  //DECorr_[3][5]->Fill(et->iphi(),j->iphi());
351  }
352  }
353  }
354 
355  for (L1GctEmCandCollection::const_iterator ie=l1IsoEm->begin(); ie!=l1IsoEm->end(); ie++) {
356  // only plot central BX
357  if (ie->bx()==0) {
358  l1GctIsoEmRank_->Fill(ie->rank());
359  // only plot eta and phi maps for non-zero candidates
360  if (ie->rank()){
361  l1GctIsoEmRankEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi(),ie->rank());
362  l1GctIsoEmOccEtaPhi_->Fill(ie->regionId().ieta(),ie->regionId().iphi());
363  }
364  }
365  if (ie->rank()) l1GctAllEmOccRankBx_->Fill(ie->bx(),ie->rank()); // for all BX
366  for (L1GctEmCandCollection::const_iterator j = l1IsoEmEmul->begin(); j!= l1IsoEmEmul->end(); j++) {
367  if (ie->bx()==0 && j->bx()==0 && std::distance(l1IsoEm->begin(), ie)==std::distance(l1IsoEmEmul->begin(),j)){
368  DECorr_[0][3]->Fill(ie->rank(), j->rank());
369  DECorr_[1][3]->Fill(ie->regionId().ieta(),j->regionId().ieta());
370  DECorr_[2][3]->Fill(ie->regionId().iphi(),j->regionId().iphi());
371  }
372  }
373  }
374 
375  for (L1GctEmCandCollection::const_iterator ne=l1NonIsoEm->begin(); ne!=l1NonIsoEm->end(); ne++) {
376  // only plot central BX
377  if (ne->bx()==0) {
378  l1GctNonIsoEmRank_->Fill(ne->rank());
379  // only plot eta and phi maps for non-zero candidates
380  if (ne->rank()){
381  l1GctNonIsoEmRankEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi(),ne->rank());
382  l1GctNonIsoEmOccEtaPhi_->Fill(ne->regionId().ieta(),ne->regionId().iphi());
383  }
384  }
385  if (ne->rank()) l1GctAllEmOccRankBx_->Fill(ne->bx(),ne->rank()); // for all BX
386  for (L1GctEmCandCollection::const_iterator j = l1NonIsoEmEmul->begin(); j!= l1NonIsoEmEmul->end(); j++) {
387  if (ne->bx()==0 && j->bx()==0 && std::distance(l1NonIsoEm->begin(), ne)==std::distance(l1NonIsoEmEmul->begin(),j)){
388  DECorr_[0][4]->Fill(ne->rank(), j->rank());
389  DECorr_[1][4]->Fill(ne->regionId().ieta(),j->regionId().ieta());
390  DECorr_[2][4]->Fill(ne->regionId().iphi(),j->regionId().iphi());
391  }
392  }
393  }
394 
395  for (L1GctHFBitCountsCollection::const_iterator hfc=l1HFCounts->begin(); hfc!=l1HFCounts->end(); hfc++){
396  // only plot central BX
397  if (hfc->bx()==0) {
398  // Individual ring counts
399  l1GctHFRing1TowerCountPosEta_->Fill(hfc->bitCount(0));
400  l1GctHFRing1TowerCountNegEta_->Fill(hfc->bitCount(1));
401  l1GctHFRing2TowerCountPosEta_->Fill(hfc->bitCount(2));
402  l1GctHFRing2TowerCountNegEta_->Fill(hfc->bitCount(3));
403  // Correlate positive and negative eta
404  l1GctHFRing1TowerCountPosEtaNegEta_->Fill(hfc->bitCount(0),hfc->bitCount(1));
405  l1GctHFRing2TowerCountPosEtaNegEta_->Fill(hfc->bitCount(2),hfc->bitCount(3));
406  }
407  // Occupancy vs BX
408  for (unsigned i=0; i<4; i++){
409  l1GctHFRingTowerCountOccBx_->Fill(hfc->bx(),hfc->bitCount(i));
410  }
411  }
412 
413  for (L1GctHFRingEtSumsCollection::const_iterator hfs=l1HFSums->begin(); hfs!=l1HFSums->end(); hfs++){
414  if (hfs->bx()==0) {
415  l1GctHFRing1ETSumPosEta_->Fill(hfs->etSum(0));
416  l1GctHFRing1ETSumNegEta_->Fill(hfs->etSum(1));
417  l1GctHFRingETSum_->Fill(hfs->etSum(0)+hfs->etSum(1));
418  l1GctHFRingETDiff_->Fill(abs(hfs->etSum(0)-hfs->etSum(1)));
419  if (hfs->etSum(1)!=0) l1GctHFRingRatioPosEta_->Fill((hfs->etSum(0))/(hfs->etSum(1)));
420  l1GctHFRing1PosEtaNegEta_->Fill(hfs->etSum(0),hfs->etSum(1));
421  std::vector<int> bit = SortMinBiasBit(hfs->etSum(2),hfs->etSum(3));
422  for(std::vector<int>::const_iterator it=bit.begin(); it !=bit.end(); it++){
423  l1GctMinBiasBitHFEt_->Fill(it - bit.begin(),*it);
424  }
425  }
426  for (unsigned i=0; i<4; i++){
427  l1GctHFRingETSumOccBx_->Fill(hfs->bx(),hfs->etSum(i));
428  }
429  for (L1GctHFRingEtSumsCollection::const_iterator j=l1HFSumsEmul->begin(); j!=l1HFSumsEmul->end(); j++){
430  if (hfs->bx()==0 && j->bx()==0 && std::distance(l1HFSums->begin(),hfs)==std::distance(l1HFSumsEmul->begin(),j)){
431  centralityCorr_->Fill(hfs->etSum(0),j->etSum(0));
432  centralityExtCorr_->Fill(hfs->etSum(1),j->etSum(1));
433  std::vector<int> dbit = SortMinBiasBit(hfs->etSum(2),hfs->etSum(3));
434  std::vector<int> ebit = SortMinBiasBit(j->etSum(2),j->etSum(3));
435  }
436  }
437  }
438 
439  for (L1CaloRegionCollection::const_iterator it=rgn->begin(); it!=rgn->end(); it++){
440  if (it -> bx()==0){
441  int totm = 0;
442  int totp = 0;
443  if (it->gctEta() < 4){
444  totm += it->et();
445  }
446  if (it->gctEta() > 17){
447  totp += it->et();
448  }
449  HFNegEnergy_->Fill(totm);
450  HFPosEnergy_->Fill(totp);
451  HFEnergy_->Fill(totm+totp);
452  }
453  }
454 }
455 
456 std::vector<int> L1THIonImp::SortMinBiasBit(uint16_t a, uint16_t b) {
457  std::vector<int> Bit;
458 
459  if ((a+1)/4>0.5){
460  Bit.push_back(1);
461  } else {
462  Bit.push_back(0);
463  }
464 
465  if (a==2 || a==3 || a==6 || a==7){
466  Bit.push_back(1);
467  } else {
468  Bit.push_back(0);
469  }
470 
471  Bit.push_back(a%2);
472 
473  if ((b+1)/4>0.5){
474  Bit.push_back(1);
475  } else {
476  Bit.push_back(0);
477  }
478 
479  if (b==2 || b==3 || b==6 || b==7){
480  Bit.push_back(1);
481  } else {
482  Bit.push_back(0);
483  }
484 
485  Bit.push_back(b%2);
486 
487  return Bit;
488 }
const float PHIMIN
Definition: L1THIonImp.cc:18
MonitorElement * l1GctEtTotal_
Definition: L1THIonImp.h:68
T getParameter(std::string const &) const
MonitorElement * l1GctHFRing1TowerCountPosEtaNegEta_
Definition: L1THIonImp.h:80
MonitorElement * HFPosEnergy_
Definition: L1THIonImp.h:94
MonitorElement * l1GctIsoEmOccEtaPhi_
Definition: L1THIonImp.h:51
const float OFMAX
Definition: L1THIonImp.cc:23
edm::EDGetTokenT< L1GctHtMissCollection > l1HtMissEmulToken_
Definition: L1THIonImp.h:144
MonitorElement * l1GctEtHadOf_
Definition: L1THIonImp.h:72
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:131
MonitorElement * l1GctIsoEmRankEtaPhi_
Definition: L1THIonImp.h:45
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * HFEnergy_
Definition: L1THIonImp.h:95
MonitorElement * l1GctHFRingTowerCountOccBx_
Definition: L1THIonImp.h:90
const float EMETAMIN
Definition: L1THIonImp.cc:10
edm::EDGetTokenT< L1CaloRegionCollection > rctSource_L1CRCollection_
Definition: L1THIonImp.h:111
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissEmulToken_
Definition: L1THIonImp.h:143
MonitorElement * l1GctHFRing1ETSumPosEta_
Definition: L1THIonImp.h:86
const float PHIMAX
Definition: L1THIonImp.cc:19
MonitorElement * l1GctTauJetsEtEtaPhi_
Definition: L1THIonImp.h:44
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceEmulToken_
Definition: L1THIonImp.h:135
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceEmulToken_
Definition: L1THIonImp.h:137
const unsigned int EMETABINS
Definition: L1THIonImp.cc:9
~L1THIonImp() override
Definition: L1THIonImp.cc:84
MonitorElement * l1GctForJetsRank_
Definition: L1THIonImp.h:55
MonitorElement * DECorr_[3][8]
Definition: L1THIonImp.h:97
MonitorElement * l1GctTauJetsRank_
Definition: L1THIonImp.h:56
MonitorElement * l1GctHFRing2TowerCountPosEta_
Definition: L1THIonImp.h:84
MonitorElement * l1GctEtHadOccBx_
Definition: L1THIonImp.h:73
MonitorElement * l1GctHFRing1PosEtaNegEta_
Definition: L1THIonImp.h:79
MonitorElement * l1GctEtMissOf_
Definition: L1THIonImp.h:66
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceEmulToken_
Definition: L1THIonImp.h:139
const float R6MIN
Definition: L1THIonImp.cc:34
T Min(T a, T b)
Definition: MathUtil.h:39
MonitorElement * l1GctHFRing1TowerCountNegEta_
Definition: L1THIonImp.h:83
MonitorElement * l1GctIsoEmRank_
Definition: L1THIonImp.h:57
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceDataToken_
Definition: L1THIonImp.h:122
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsDataToken_
Definition: L1THIonImp.h:129
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadEmulToken_
Definition: L1THIonImp.h:145
MonitorElement * l1GctAllJetsOccRankBx_
Definition: L1THIonImp.h:60
MonitorElement * l1GctHFRing2TowerCountPosEtaNegEta_
Definition: L1THIonImp.h:81
MonitorElement * l1GctHFRingETSumOccBx_
Definition: L1THIonImp.h:89
void Fill(long long x)
MonitorElement * l1GctEtMissOccBx_
Definition: L1THIonImp.h:67
const float METPHIMIN
Definition: L1THIonImp.cc:14
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceEmulToken_
Definition: L1THIonImp.h:136
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceEmulToken_
Definition: L1THIonImp.h:138
MonitorElement * centralityCorr_
Definition: L1THIonImp.h:99
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissDataToken_
Definition: L1THIonImp.h:130
const unsigned int R6BINS
Definition: L1THIonImp.cc:33
virtual std::vector< int > SortMinBiasBit(uint16_t, uint16_t)
Definition: L1THIonImp.cc:456
MonitorElement * centralityExtCorr_
Definition: L1THIonImp.h:100
MonitorElement * HFNegEnergy_
Definition: L1THIonImp.h:93
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * l1GctCenJetsOccEtaPhi_
Definition: L1THIonImp.h:48
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceDataToken_
Definition: L1THIonImp.h:123
MonitorElement * l1GctForJetsEtEtaPhi_
Definition: L1THIonImp.h:43
MonitorElement * l1GctAllEmOccRankBx_
Definition: L1THIonImp.h:61
MonitorElement * l1GctEtMissPhi_
Definition: L1THIonImp.h:65
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalEmulToken_
Definition: L1THIonImp.h:146
MonitorElement * l1GctHFRingETDiff_
Definition: L1THIonImp.h:76
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
const float JETETAMIN
Definition: L1THIonImp.cc:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * l1GctEtMiss_
Definition: L1THIonImp.h:64
const float R12MAX
Definition: L1THIonImp.cc:38
const float R12MIN
Definition: L1THIonImp.cc:37
MonitorElement * l1GctForJetsOccEtaPhi_
Definition: L1THIonImp.h:49
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalDataToken_
Definition: L1THIonImp.h:133
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceDataToken_
Definition: L1THIonImp.h:125
MonitorElement * l1GctHFRing2TowerCountNegEta_
Definition: L1THIonImp.h:85
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsEmulToken_
Definition: L1THIonImp.h:142
T Max(T a, T b)
Definition: MathUtil.h:44
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceEmulToken_
Definition: L1THIonImp.h:141
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1THIonImp.cc:183
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 * book2D(Args &&...args)
Definition: DQMStore.h:109
met
===> hadronic RAZOR
MonitorElement * l1GctEtTotalEtHadCorr_
Definition: L1THIonImp.h:74
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:88
MonitorElement * l1GctCenJetsEtEtaPhi_
Definition: L1THIonImp.h:42
et
define resolution functions of each parameter
MonitorElement * l1GctHFRing1ETSumNegEta_
Definition: L1THIonImp.h:87
MonitorElement * l1GctEtTotalOccBx_
Definition: L1THIonImp.h:70
MonitorElement * l1GctHFRingETSum_
Definition: L1THIonImp.h:75
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceDataToken_
Definition: L1THIonImp.h:126
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceDataToken_
Definition: L1THIonImp.h:128
MonitorElement * l1GctEtHad_
Definition: L1THIonImp.h:71
MonitorElement * l1GctHFRing1TowerCountPosEta_
Definition: L1THIonImp.h:82
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:50
MonitorElement * MinBiasCorr_
Definition: L1THIonImp.h:101
const float OFMIN
Definition: L1THIonImp.cc:22
MonitorElement * l1GctMinBiasBitHFEt_
Definition: L1THIonImp.h:91
const unsigned int BXBINS
Definition: L1THIonImp.cc:25
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceDataToken_
Definition: L1THIonImp.h:124
std::vector< L1CaloRegion > L1CaloRegionCollection
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadDataToken_
Definition: L1THIonImp.h:132
MonitorElement * l1GctNonIsoEmOccEtaPhi_
Definition: L1THIonImp.h:52
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:69
MonitorElement * l1GctNonIsoEmRank_
Definition: L1THIonImp.h:58
const unsigned int OFBINS
Definition: L1THIonImp.cc:21
const float BXMAX
Definition: L1THIonImp.cc:27
MonitorElement * l1GctNonIsoEmRankEtaPhi_
Definition: L1THIonImp.h:46
Definition: Run.h:45
const float R3MAX
Definition: L1THIonImp.cc:32
MonitorElement * l1GctCenJetsRank_
Definition: L1THIonImp.h:54