CMS 3D CMS Logo

HCALRecHitAnalyzer.cc
Go to the documentation of this file.
2 // author: Bobby Scurlock, University of Florida
3 // first version 12/7/2006
4 // modified: Mike Schmitt
5 // date: 03.05.2007
6 // note: 1) code rewrite. 2.) changed to loop over all hcal detids;
7 // not only those within calotowers.
8 
12 
13 //#include "PluginManager/ModuleDef.h"
18 //#include "FWCore/Framework/interface/Handle.h"
21 
22 //#include "Geometry/Vector/interface/GlobalPoint.h"
29 
33 
34 #include <memory>
35 #include <vector>
36 #include <utility>
37 #include <ostream>
38 #include <fstream>
39 #include <string>
40 #include <algorithm>
41 #include <cmath>
42 #include <TLorentzVector.h>
44 
45 #define DEBUG(X) \
46  { \
47  if (debug_) { \
48  std::cout << X << std::endl; \
49  } \
50  }
51 
53  // Retrieve Information from the Configuration File
54  hBHERecHitsLabel_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("HBHERecHitsLabel"));
55  hORecHitsLabel_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("HORecHitsLabel"));
56  hFRecHitsLabel_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("HFRecHitsLabel"));
57 
58  debug_ = iConfig.getParameter<bool>("Debug");
59  finebinning_ = iConfig.getUntrackedParameter<bool>("FineBinning");
60  FolderName_ = iConfig.getUntrackedParameter<std::string>("FolderName");
61 }
62 
63 void HCALRecHitAnalyzer::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
64  Nevents = 0;
65  FillGeometry(iSetup);
66 }
67 
69  // get ahold of back-end interface
70  // dbe_ = edm::Service<DQMStore>().operator->();
71 
72  ibooker.setCurrentFolder(FolderName_ + "/geometry");
73  hHCAL_ieta_iphi_HBMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HBMap", "", 83, -41, 42, 72, 1, 73);
74  hHCAL_ieta_iphi_HEMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HEMap", "", 83, -41, 42, 72, 1, 73);
75  hHCAL_ieta_iphi_HFMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HFMap", "", 83, -41, 42, 72, 1, 73);
76  hHCAL_ieta_iphi_HOMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HOMap", "", 83, -41, 42, 72, 1, 73);
77  hHCAL_ieta_iphi_etaMap = ibooker.book2D("METTask_HCAL_ieta_iphi_etaMap", "", 83, -41, 42, 72, 1, 73);
78  hHCAL_ieta_iphi_phiMap = ibooker.book2D("METTask_HCAL_ieta_iphi_phiMap", "", 83, -41, 42, 72, 1, 73);
79  hHCAL_ieta_detaMap = ibooker.book1D("METTask_HCAL_ieta_detaMap", "", 83, -41, 42);
80  hHCAL_ieta_dphiMap = ibooker.book1D("METTask_HCAL_ieta_dphiMap", "", 83, -41, 42);
81 
82  // Initialize bins for geometry to -999 because z = 0 is a valid entry
83  for (int i = 1; i <= 83; i++) {
86 
87  for (int j = 1; j <= 72; j++) {
94  }
95  }
96 
97  // ibooker.setCurrentFolder("RecoMETV/MET_HCAL/data");
99  //--Store number of events used
100  hHCAL_Nevents = ibooker.book1D("METTask_HCAL_Nevents", "", 1, 0, 1);
101  //--Data integrated over all events and stored by HCAL(ieta,iphi)
102 
103  hHCAL_D1_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_energy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
104  hHCAL_D2_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_energy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
105  hHCAL_D3_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_energy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
106  hHCAL_D4_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_energy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
107 
108  hHCAL_D1_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Minenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
109  hHCAL_D2_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Minenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
110  hHCAL_D3_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Minenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
111  hHCAL_D4_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Minenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
112 
113  hHCAL_D1_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Maxenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
114  hHCAL_D2_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Maxenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
115  hHCAL_D3_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Maxenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
116  hHCAL_D4_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Maxenergy_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
117 
118  // need to initialize those
119  for (int i = 1; i <= 83; i++)
120  for (int j = 1; j <= 73; j++) {
125 
130  }
131 
132  hHCAL_D1_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Occ_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
133  hHCAL_D2_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Occ_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
134  hHCAL_D3_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Occ_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
135  hHCAL_D4_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Occ_ieta_iphi", "", 83, -41, 42, 72, 1, 73);
136  //--Data over eta-rings
137 
138  // CaloTower values
139 
140  if (finebinning_) {
141  hHCAL_D1_energyvsieta = ibooker.book2D("METTask_HCAL_D1_energyvsieta", "", 83, -41, 42, 20101, -100, 2001);
142  hHCAL_D2_energyvsieta = ibooker.book2D("METTask_HCAL_D2_energyvsieta", "", 83, -41, 42, 20101, -100, 2001);
143  hHCAL_D3_energyvsieta = ibooker.book2D("METTask_HCAL_D3_energyvsieta", "", 83, -41, 42, 20101, -100, 2001);
144  hHCAL_D4_energyvsieta = ibooker.book2D("METTask_HCAL_D4_energyvsieta", "", 83, -41, 42, 20101, -100, 2001);
145 
146  hHCAL_D1_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Minenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
147  hHCAL_D2_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Minenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
148  hHCAL_D3_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Minenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
149  hHCAL_D4_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Minenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
150 
151  hHCAL_D1_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Maxenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
152  hHCAL_D2_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Maxenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
153  hHCAL_D3_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Maxenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
154  hHCAL_D4_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Maxenergyvsieta", "", 83, -41, 42, 20101, -100, 2001);
155 
156  // Integrated over phi
157  hHCAL_D1_Occvsieta = ibooker.book2D("METTask_HCAL_D1_Occvsieta", "", 83, -41, 42, 73, 0, 73);
158  hHCAL_D2_Occvsieta = ibooker.book2D("METTask_HCAL_D2_Occvsieta", "", 83, -41, 42, 73, 0, 73);
159  hHCAL_D3_Occvsieta = ibooker.book2D("METTask_HCAL_D3_Occvsieta", "", 83, -41, 42, 73, 0, 73);
160  hHCAL_D4_Occvsieta = ibooker.book2D("METTask_HCAL_D4_Occvsieta", "", 83, -41, 42, 73, 0, 73);
161 
162  hHCAL_D1_SETvsieta = ibooker.book2D("METTask_HCAL_D1_SETvsieta", "", 83, -41, 42, 20001, 0, 2001);
163  hHCAL_D2_SETvsieta = ibooker.book2D("METTask_HCAL_D2_SETvsieta", "", 83, -41, 42, 20001, 0, 2001);
164  hHCAL_D3_SETvsieta = ibooker.book2D("METTask_HCAL_D3_SETvsieta", "", 83, -41, 42, 20001, 0, 2001);
165  hHCAL_D4_SETvsieta = ibooker.book2D("METTask_HCAL_D4_SETvsieta", "", 83, -41, 42, 20001, 0, 2001);
166 
167  hHCAL_D1_METvsieta = ibooker.book2D("METTask_HCAL_D1_METvsieta", "", 83, -41, 42, 20001, 0, 2001);
168  hHCAL_D2_METvsieta = ibooker.book2D("METTask_HCAL_D2_METvsieta", "", 83, -41, 42, 20001, 0, 2001);
169  hHCAL_D3_METvsieta = ibooker.book2D("METTask_HCAL_D3_METvsieta", "", 83, -41, 42, 20001, 0, 2001);
170  hHCAL_D4_METvsieta = ibooker.book2D("METTask_HCAL_D4_METvsieta", "", 83, -41, 42, 20001, 0, 2001);
171 
172  hHCAL_D1_METPhivsieta = ibooker.book2D("METTask_HCAL_D1_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
173  hHCAL_D2_METPhivsieta = ibooker.book2D("METTask_HCAL_D2_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
174  hHCAL_D3_METPhivsieta = ibooker.book2D("METTask_HCAL_D3_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
175  hHCAL_D4_METPhivsieta = ibooker.book2D("METTask_HCAL_D4_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
176 
177  hHCAL_D1_MExvsieta = ibooker.book2D("METTask_HCAL_D1_MExvsieta", "", 83, -41, 42, 10001, -500, 501);
178  hHCAL_D2_MExvsieta = ibooker.book2D("METTask_HCAL_D2_MExvsieta", "", 83, -41, 42, 10001, -500, 501);
179  hHCAL_D3_MExvsieta = ibooker.book2D("METTask_HCAL_D3_MExvsieta", "", 83, -41, 42, 10001, -500, 501);
180  hHCAL_D4_MExvsieta = ibooker.book2D("METTask_HCAL_D4_MExvsieta", "", 83, -41, 42, 10001, -500, 501);
181 
182  hHCAL_D1_MEyvsieta = ibooker.book2D("METTask_HCAL_D1_MEyvsieta", "", 83, -41, 42, 10001, -500, 501);
183  hHCAL_D2_MEyvsieta = ibooker.book2D("METTask_HCAL_D2_MEyvsieta", "", 83, -41, 42, 10001, -500, 501);
184  hHCAL_D3_MEyvsieta = ibooker.book2D("METTask_HCAL_D3_MEyvsieta", "", 83, -41, 42, 10001, -500, 501);
185  hHCAL_D4_MEyvsieta = ibooker.book2D("METTask_HCAL_D4_MEyvsieta", "", 83, -41, 42, 10001, -500, 501);
186  } else {
187  hHCAL_D1_energyvsieta = ibooker.book2D("METTask_HCAL_D1_energyvsieta", "", 83, -41, 42, 1000, -10, 1990);
188  hHCAL_D2_energyvsieta = ibooker.book2D("METTask_HCAL_D2_energyvsieta", "", 83, -41, 42, 1000, -10, 1990);
189  hHCAL_D3_energyvsieta = ibooker.book2D("METTask_HCAL_D3_energyvsieta", "", 83, -41, 42, 1000, -10, 1990);
190  hHCAL_D4_energyvsieta = ibooker.book2D("METTask_HCAL_D4_energyvsieta", "", 83, -41, 42, 1000, -10, 1990);
191 
192  hHCAL_D1_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Minenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
193  hHCAL_D2_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Minenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
194  hHCAL_D3_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Minenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
195  hHCAL_D4_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Minenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
196 
197  hHCAL_D1_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Maxenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
198  hHCAL_D2_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Maxenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
199  hHCAL_D3_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Maxenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
200  hHCAL_D4_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Maxenergyvsieta", "", 83, -41, 42, 1000, -10, 1990);
201 
202  // Integrated over phi
203  hHCAL_D1_Occvsieta = ibooker.book2D("METTask_HCAL_D1_Occvsieta", "", 83, -41, 42, 73, 0, 73);
204  hHCAL_D2_Occvsieta = ibooker.book2D("METTask_HCAL_D2_Occvsieta", "", 83, -41, 42, 73, 0, 73);
205  hHCAL_D3_Occvsieta = ibooker.book2D("METTask_HCAL_D3_Occvsieta", "", 83, -41, 42, 73, 0, 73);
206  hHCAL_D4_Occvsieta = ibooker.book2D("METTask_HCAL_D4_Occvsieta", "", 83, -41, 42, 73, 0, 73);
207 
208  hHCAL_D1_SETvsieta = ibooker.book2D("METTask_HCAL_D1_SETvsieta", "", 83, -41, 42, 1000, 0, 2000);
209  hHCAL_D2_SETvsieta = ibooker.book2D("METTask_HCAL_D2_SETvsieta", "", 83, -41, 42, 1000, 0, 2000);
210  hHCAL_D3_SETvsieta = ibooker.book2D("METTask_HCAL_D3_SETvsieta", "", 83, -41, 42, 1000, 0, 2000);
211  hHCAL_D4_SETvsieta = ibooker.book2D("METTask_HCAL_D4_SETvsieta", "", 83, -41, 42, 1000, 0, 2000);
212 
213  hHCAL_D1_METvsieta = ibooker.book2D("METTask_HCAL_D1_METvsieta", "", 83, -41, 42, 1000, 0, 2000);
214  hHCAL_D2_METvsieta = ibooker.book2D("METTask_HCAL_D2_METvsieta", "", 83, -41, 42, 1000, 0, 2000);
215  hHCAL_D3_METvsieta = ibooker.book2D("METTask_HCAL_D3_METvsieta", "", 83, -41, 42, 1000, 0, 2000);
216  hHCAL_D4_METvsieta = ibooker.book2D("METTask_HCAL_D4_METvsieta", "", 83, -41, 42, 1000, 0, 2000);
217 
218  hHCAL_D1_METPhivsieta = ibooker.book2D("METTask_HCAL_D1_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
219  hHCAL_D2_METPhivsieta = ibooker.book2D("METTask_HCAL_D2_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
220  hHCAL_D3_METPhivsieta = ibooker.book2D("METTask_HCAL_D3_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
221  hHCAL_D4_METPhivsieta = ibooker.book2D("METTask_HCAL_D4_METPhivsieta", "", 83, -41, 42, 80, -4, 4);
222 
223  hHCAL_D1_MExvsieta = ibooker.book2D("METTask_HCAL_D1_MExvsieta", "", 83, -41, 42, 500, -500, 500);
224  hHCAL_D2_MExvsieta = ibooker.book2D("METTask_HCAL_D2_MExvsieta", "", 83, -41, 42, 500, -500, 500);
225  hHCAL_D3_MExvsieta = ibooker.book2D("METTask_HCAL_D3_MExvsieta", "", 83, -41, 42, 500, -500, 500);
226  hHCAL_D4_MExvsieta = ibooker.book2D("METTask_HCAL_D4_MExvsieta", "", 83, -41, 42, 500, -500, 500);
227 
228  hHCAL_D1_MEyvsieta = ibooker.book2D("METTask_HCAL_D1_MEyvsieta", "", 83, -41, 42, 500, -500, 500);
229  hHCAL_D2_MEyvsieta = ibooker.book2D("METTask_HCAL_D2_MEyvsieta", "", 83, -41, 42, 500, -500, 500);
230  hHCAL_D3_MEyvsieta = ibooker.book2D("METTask_HCAL_D3_MEyvsieta", "", 83, -41, 42, 500, -500, 500);
231  hHCAL_D4_MEyvsieta = ibooker.book2D("METTask_HCAL_D4_MEyvsieta", "", 83, -41, 42, 500, -500, 500);
232  }
233  // Inspect Setup for CaloTower Geometry
234  // FillGeometry(iSetup);
235 }
236 
238  // ==========================================================
239  // Retrieve!
240  // ==========================================================
241 
243  iSetup.get<CaloGeometryRecord>().get(pG);
244 
245  if (!pG.isValid()) {
246  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Setup Handle, Aborting Task "
247  << "HCALRecHitAnalyzer::FillGeometry!\n";
248  return;
249  }
250 
251  const CaloGeometry cG = *pG;
252 
253  const HcalGeometry* HBgeom = dynamic_cast<const HcalGeometry*>(cG.getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
254  const HcalGeometry* HEgeom = dynamic_cast<const HcalGeometry*>(cG.getSubdetectorGeometry(DetId::Hcal, HcalEndcap));
257 
258  // ==========================================================
259  // Fill Histograms!
260  // ==========================================================
261 
262  std::vector<DetId>::iterator i;
263 
264  int HBmin_ieta = 99, HBmax_ieta = -99;
265  int HBmin_iphi = 99, HBmax_iphi = -99;
266 
267  // Loop Over all Hcal Barrel DetId's
268  int nHBdetid = 0;
269  std::vector<DetId> HBids = HBgeom->getValidDetIds(DetId::Hcal, HcalBarrel);
270 
271  for (i = HBids.begin(); i != HBids.end(); i++) {
272  nHBdetid++;
273 
274  HcalDetId HcalID(*i);
275 
276  int Calo_ieta = 42 + HcalID.ieta();
277  int Calo_iphi = HcalID.iphi();
278  double Calo_eta = HBgeom->getPosition(HcalID).eta();
279  double Calo_phi = HBgeom->getPosition(HcalID).phi();
280 
281  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta, Calo_iphi) == -999) {
282  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta, Calo_iphi, Calo_eta);
283  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta, Calo_iphi, Calo_phi * 180.0 / M_PI);
284  }
285 
286  if (Calo_ieta > HBmax_ieta)
287  HBmax_ieta = Calo_ieta;
288  if (Calo_ieta < HBmin_ieta)
289  HBmin_ieta = Calo_ieta;
290  if (Calo_iphi > HBmax_iphi)
291  HBmax_iphi = Calo_iphi;
292  if (Calo_iphi > HBmax_iphi)
293  HBmin_iphi = Calo_iphi;
294  }
295 
296  int HEmin_ieta = 99, HEmax_ieta = -99;
297  int HEmin_iphi = 99, HEmax_iphi = -99;
298 
299  // Loop Over all Hcal Endcap DetId's
300  int nHEdetid = 0;
301  std::vector<DetId> HEids = HEgeom->getValidDetIds(DetId::Hcal, HcalEndcap);
302 
303  for (i = HEids.begin(); i != HEids.end(); i++) {
304  nHEdetid++;
305 
306  HcalDetId HcalID(*i);
307 
308  int Calo_ieta = 42 + HcalID.ieta();
309  int Calo_iphi = HcalID.iphi();
310  double Calo_eta = HEgeom->getPosition(HcalID).eta();
311  double Calo_phi = HEgeom->getPosition(HcalID).phi();
312 
313  // HCAL to HE eta, phi map comparison
314  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta, Calo_iphi) == -999) {
315  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta, Calo_iphi, Calo_eta);
316  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta, Calo_iphi, Calo_phi * 180.0 / M_PI);
317  }
318 
319  if (Calo_ieta > HEmax_ieta)
320  HEmax_ieta = Calo_ieta;
321  if (Calo_ieta < HEmin_ieta)
322  HEmin_ieta = Calo_ieta;
323  if (Calo_iphi > HEmax_iphi)
324  HEmax_iphi = Calo_iphi;
325  if (Calo_iphi > HEmax_iphi)
326  HEmin_iphi = Calo_iphi;
327  }
328 
329  int HFmin_ieta = 99, HFmax_ieta = -99;
330  int HFmin_iphi = 99, HFmax_iphi = -99;
331 
332  // Loop Over all Hcal Forward DetId's
333  int nHFdetid = 0;
334  std::vector<DetId> HFids = HFgeom->getValidDetIds(DetId::Hcal, HcalForward);
335 
336  for (i = HFids.begin(); i != HFids.end(); i++) {
337  nHFdetid++;
338 
339  auto cell = HFgeom->getGeometry(*i);
340  HcalDetId HcalID(i->rawId());
341  //GlobalPoint p = cell->getPosition();
342 
343  int Calo_ieta = 42 + HcalID.ieta();
344  int Calo_iphi = HcalID.iphi();
345  double Calo_eta = cell->getPosition().eta();
346  double Calo_phi = cell->getPosition().phi();
347 
348  // HCAL to HF eta, phi map comparison
349  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta, Calo_iphi) == -999) {
350  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta, Calo_iphi, Calo_eta);
351  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta, Calo_iphi, Calo_phi * 180.0 / M_PI);
352  }
353 
354  if (Calo_ieta > HFmax_ieta)
355  HFmax_ieta = Calo_ieta;
356  if (Calo_ieta < HFmin_ieta)
357  HFmin_ieta = Calo_ieta;
358  if (Calo_iphi > HFmax_iphi)
359  HFmax_iphi = Calo_iphi;
360  if (Calo_iphi > HFmax_iphi)
361  HFmin_iphi = Calo_iphi;
362  }
363 
364  int HOmin_ieta = 99, HOmax_ieta = -99;
365  int HOmin_iphi = 99, HOmax_iphi = -99;
366 
367  // Loop Over all Hcal Outer DetId's
368  int nHOdetid = 0;
369  std::vector<DetId> HOids = HOgeom->getValidDetIds(DetId::Hcal, HcalOuter);
370 
371  for (i = HOids.begin(); i != HOids.end(); i++) {
372  nHOdetid++;
373 
374  auto cell = HOgeom->getGeometry(*i);
375  HcalDetId HcalID(i->rawId());
376  //GlobalPoint p = cell->getPosition();
377 
378  int Calo_ieta = 42 + HcalID.ieta();
379  int Calo_iphi = HcalID.iphi();
380  double Calo_eta = cell->getPosition().eta();
381  double Calo_phi = cell->getPosition().phi();
382 
383  // HCAL to HO eta, phi map comparison
384  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta, Calo_iphi) == -999) {
385  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta, Calo_iphi, Calo_eta);
386  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta, Calo_iphi, Calo_phi * 180.0 / M_PI);
387  }
388 
389  if (Calo_ieta > HOmax_ieta)
390  HOmax_ieta = Calo_ieta;
391  if (Calo_ieta < HOmin_ieta)
392  HOmin_ieta = Calo_ieta;
393  if (Calo_iphi > HOmax_iphi)
394  HOmax_iphi = Calo_iphi;
395  if (Calo_iphi > HOmax_iphi)
396  HOmin_iphi = Calo_iphi;
397  }
398 
399  // Set the Cell Size for each (ieta, iphi) Bin
400  double currentLowEdge_eta = 0; //double currentHighEdge_eta = 0;
401  for (int ieta = 1; ieta < 42; ieta++) {
402  int ieta_ = 42 + ieta;
403  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(ieta_, 3);
404  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(ieta_, 3);
405  double deta = 2.0 * (eta - currentLowEdge_eta);
406  deta = ((float)((int)(1.0E3 * deta + 0.5))) / 1.0E3;
407  double dphi = 2.0 * phi;
408  if (ieta == 40 || ieta == 41)
409  dphi = 20;
410  if (ieta <= 39 && ieta >= 21)
411  dphi = 10;
412  if (ieta <= 20)
413  dphi = 5;
414  // BS: This is WRONG...need to correct overlap
415  if (ieta == 28)
416  deta = 0.218;
417  if (ieta == 29)
418  deta = 0.096;
419  currentLowEdge_eta += deta;
420 
421  // BS: This is WRONG...need to correct overlap
422  if (ieta == 29)
423  currentLowEdge_eta = 2.964;
424 
425  hHCAL_ieta_detaMap->setBinContent(ieta_, deta); // positive rings
426  hHCAL_ieta_dphiMap->setBinContent(ieta_, dphi); // positive rings
427  hHCAL_ieta_detaMap->setBinContent(42 - ieta, deta); // negative rings
428  hHCAL_ieta_dphiMap->setBinContent(42 - ieta, dphi); // negative rings
429 
430  } // end loop over ieta
431 
432  edm::LogInfo("OutputInfo") << "HB ieta range: " << HBmin_ieta << " " << HBmax_ieta;
433  edm::LogInfo("OutputInfo") << "HB iphi range: " << HBmin_iphi << " " << HBmax_iphi;
434  edm::LogInfo("OutputInfo") << "HE ieta range: " << HEmin_ieta << " " << HEmax_ieta;
435  edm::LogInfo("OutputInfo") << "HE iphi range: " << HEmin_iphi << " " << HEmax_iphi;
436  edm::LogInfo("OutputInfo") << "HF ieta range: " << HFmin_ieta << " " << HFmax_ieta;
437  edm::LogInfo("OutputInfo") << "HF iphi range: " << HFmin_iphi << " " << HFmax_iphi;
438  edm::LogInfo("OutputInfo") << "HO ieta range: " << HOmin_ieta << " " << HOmax_ieta;
439  edm::LogInfo("OutputInfo") << "HO iphi range: " << HOmin_iphi << " " << HOmax_iphi;
440 }
441 
443  Nevents++;
444  hHCAL_Nevents->Fill(0);
445  // ==========================================================
446  // Retrieve!
447  // ==========================================================
448 
450  const HORecHitCollection* HORecHits;
452 
453  edm::Handle<HBHERecHitCollection> HBHERecHitsHandle;
454  iEvent.getByToken(hBHERecHitsLabel_, HBHERecHitsHandle);
455  if (!HBHERecHitsHandle.isValid()) {
456  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
457  << "HCALRecHitAnalyzer::analyze!\n";
458  return;
459  } else {
460  HBHERecHits = HBHERecHitsHandle.product();
461  }
462  edm::Handle<HORecHitCollection> HORecHitsHandle;
463  iEvent.getByToken(hORecHitsLabel_, HORecHitsHandle);
464  if (!HORecHitsHandle.isValid()) {
465  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
466  << "HCALRecHitAnalyzer::analyze!\n";
467  return;
468  } else {
469  HORecHits = HORecHitsHandle.product();
470  }
471  edm::Handle<HFRecHitCollection> HFRecHitsHandle;
472  iEvent.getByToken(hFRecHitsLabel_, HFRecHitsHandle);
473  if (!HFRecHitsHandle.isValid()) {
474  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
475  << "HCALRecHitAnalyzer::analyze!\n";
476  return;
477  } else {
478  HFRecHits = HFRecHitsHandle.product();
479  }
480 
481  // ==========================================================
482  // Fill Histograms!
483  // ==========================================================
484 
485  TLorentzVector vHBHEMET_EtaRing[83][4];
486  int HBHEActiveRing[83][4];
487  int HBHENActiveCells[83][4];
488  double HBHESET_EtaRing[83][4];
489  double HBHEMinEnergy_EtaRing[83][4];
490  double HBHEMaxEnergy_EtaRing[83][4];
491 
492  for (int i = 0; i < 83; i++) {
493  for (int j = 0; j < 4; j++) {
494  HBHEActiveRing[i][j] = 0;
495  HBHENActiveCells[i][j] = 0;
496  HBHESET_EtaRing[i][j] = 0;
497  HBHEMinEnergy_EtaRing[i][j] = 14E3;
498  HBHEMaxEnergy_EtaRing[i][j] = -999;
499  }
500  }
501 
502  // Loop over HBHERecHit's
504  int nHBrechit = 0, nHErechit = 0;
505 
506  for (hbherechit = HBHERecHits->begin(); hbherechit != HBHERecHits->end(); hbherechit++) {
507  HcalDetId det = hbherechit->id();
508  double Energy = hbherechit->energy();
509  Int_t depth = det.depth();
510  Int_t ieta = det.ieta();
511  Int_t iphi = det.iphi();
512  int EtaRing = 41 + ieta; // this counts from 0
513  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing + 1, iphi);
514  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing + 1, iphi);
515  double theta = 2 * TMath::ATan(exp(-1 * eta));
516  double ET = Energy * TMath::Sin(theta);
517  HcalSubdetector HcalNum = det.subdet();
518  TLorentzVector v_;
519 
520  if (Energy > 0) // zero suppress
521  {
522  HBHEActiveRing[EtaRing][depth - 1] = 1;
523  HBHENActiveCells[EtaRing][depth - 1]++;
524  HBHESET_EtaRing[EtaRing][depth - 1] += ET;
525  v_.SetPtEtaPhiE(ET, 0, phi, ET);
526  vHBHEMET_EtaRing[EtaRing][depth - 1] -= v_;
527 
528  DEBUG(EtaRing << " " << Energy << " " << ET << " " << theta << " " << eta << " " << phi << " : "
529  << vHBHEMET_EtaRing[EtaRing][depth - 1].Phi() << " " << vHBHEMET_EtaRing[EtaRing][depth - 1].Pt());
530 
531  switch (depth) {
532  case 1:
534  break;
535  case 2:
537  break;
538  case 3:
540  break;
541  } // end switch
542  }
543 
544  if (Energy > HBHEMaxEnergy_EtaRing[EtaRing][depth - 1])
545  HBHEMaxEnergy_EtaRing[EtaRing][depth - 1] = Energy;
546  if (Energy < HBHEMinEnergy_EtaRing[EtaRing][depth - 1])
547  HBHEMinEnergy_EtaRing[EtaRing][depth - 1] = Energy;
548 
549  switch (depth) {
550  case 1:
555  if (Energy < hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
557 
558  break;
559  case 2:
561 
565  if (Energy < hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
567  break;
568  case 3:
570 
574  if (Energy < hHCAL_D3_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
576  break;
577  } // end switch
578 
579  if (HcalNum == HcalBarrel) {
580  nHBrechit++;
581  } else { // HcalEndcap
582  nHErechit++;
583  }
584  } // end loop over HBHERecHit's
585 
586  // Fill eta-ring MET quantities
587  for (int iEtaRing = 0; iEtaRing < 83; iEtaRing++) {
588  for (int jDepth = 0; jDepth < 3; jDepth++) {
589  switch (jDepth + 1) {
590  case 1:
591  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing - 41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
592  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing - 41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
593  break;
594  case 2:
595  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing - 41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
596  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing - 41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
597  break;
598  case 3:
599  hHCAL_D3_Maxenergyvsieta->Fill(iEtaRing - 41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
600  hHCAL_D3_Minenergyvsieta->Fill(iEtaRing - 41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
601  break;
602  }
603 
604  if (HBHEActiveRing[iEtaRing][jDepth]) {
605  switch (jDepth + 1) {
606  case 1:
607  hHCAL_D1_METPhivsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
608  hHCAL_D1_MExvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
609  hHCAL_D1_MEyvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
610  hHCAL_D1_METvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
611  hHCAL_D1_SETvsieta->Fill(iEtaRing - 41, HBHESET_EtaRing[iEtaRing][jDepth]);
612  hHCAL_D1_Occvsieta->Fill(iEtaRing - 41, HBHENActiveCells[iEtaRing][jDepth]);
613  break;
614  case 2:
615  hHCAL_D2_METPhivsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
616  hHCAL_D2_MExvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
617  hHCAL_D2_MEyvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
618  hHCAL_D2_METvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
619  hHCAL_D2_SETvsieta->Fill(iEtaRing - 41, HBHESET_EtaRing[iEtaRing][jDepth]);
620  hHCAL_D2_Occvsieta->Fill(iEtaRing - 41, HBHENActiveCells[iEtaRing][jDepth]);
621  break;
622  case 3:
623  hHCAL_D3_METPhivsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
624  hHCAL_D3_MExvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
625  hHCAL_D3_MEyvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
626  hHCAL_D3_METvsieta->Fill(iEtaRing - 41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
627  hHCAL_D3_SETvsieta->Fill(iEtaRing - 41, HBHESET_EtaRing[iEtaRing][jDepth]);
628  hHCAL_D3_Occvsieta->Fill(iEtaRing - 41, HBHENActiveCells[iEtaRing][jDepth]);
629  break;
630  } //switch
631  } //activering
632  } //depth
633  } //etaring
634 
635  //-------------------------------------------------HO
636  TLorentzVector vHOMET_EtaRing[83];
637  int HOActiveRing[83];
638  int HONActiveCells[83];
639  double HOSET_EtaRing[83];
640  double HOMinEnergy_EtaRing[83];
641  double HOMaxEnergy_EtaRing[83];
642 
643  for (int i = 0; i < 83; i++) {
644  HOActiveRing[i] = 0;
645  HONActiveCells[i] = 0;
646  HOSET_EtaRing[i] = 0;
647  HOMinEnergy_EtaRing[i] = 14E3;
648  HOMaxEnergy_EtaRing[i] = -999;
649  }
650 
651  // Loop over HORecHit's
653  int nHOrechit = 0;
654 
655  for (horechit = HORecHits->begin(); horechit != HORecHits->end(); horechit++) {
656  nHOrechit++;
657 
658  HcalDetId det = horechit->id();
659  double Energy = horechit->energy();
661  Int_t ieta = det.ieta();
662  Int_t iphi = det.iphi();
663  int EtaRing = 41 + ieta; // this counts from 0
664  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing + 1, iphi);
665  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing + 1, iphi);
666  double theta = 2 * TMath::ATan(exp(-1 * eta));
667  double ET = Energy * TMath::Sin(theta);
668  TLorentzVector v_;
669 
670  if (Energy > 0) // zero suppress
671  {
672  HOActiveRing[EtaRing] = 1;
673  HONActiveCells[EtaRing]++;
674  HOSET_EtaRing[EtaRing] += ET;
675  v_.SetPtEtaPhiE(ET, 0, phi, ET);
676  vHOMET_EtaRing[EtaRing] -= v_;
677 
679  }
680 
681  if (Energy > HOMaxEnergy_EtaRing[EtaRing])
682  HOMaxEnergy_EtaRing[EtaRing] = Energy;
683  if (Energy < HOMinEnergy_EtaRing[EtaRing])
684  HOMinEnergy_EtaRing[EtaRing] = Energy;
685 
687 
691  if (Energy < hHCAL_D4_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
693 
694  } // end loop over HORecHit's
695 
696  // Fill eta-ring MET quantities
697  for (int iEtaRing = 0; iEtaRing < 83; iEtaRing++) {
698  hHCAL_D4_Maxenergyvsieta->Fill(iEtaRing - 41, HOMaxEnergy_EtaRing[iEtaRing]);
699  hHCAL_D4_Minenergyvsieta->Fill(iEtaRing - 41, HOMinEnergy_EtaRing[iEtaRing]);
700 
701  if (HOActiveRing[iEtaRing]) {
702  hHCAL_D4_METPhivsieta->Fill(iEtaRing - 41, vHOMET_EtaRing[iEtaRing].Phi());
703  hHCAL_D4_MExvsieta->Fill(iEtaRing - 41, vHOMET_EtaRing[iEtaRing].Px());
704  hHCAL_D4_MEyvsieta->Fill(iEtaRing - 41, vHOMET_EtaRing[iEtaRing].Py());
705  hHCAL_D4_METvsieta->Fill(iEtaRing - 41, vHOMET_EtaRing[iEtaRing].Pt());
706  hHCAL_D4_SETvsieta->Fill(iEtaRing - 41, HOSET_EtaRing[iEtaRing]);
707  hHCAL_D4_Occvsieta->Fill(iEtaRing - 41, HONActiveCells[iEtaRing]);
708  }
709  }
710 
711  //------------------------------------------------HF
712 
713  TLorentzVector vHFMET_EtaRing[83][2];
714  int HFActiveRing[83][2];
715  int HFNActiveCells[83][2];
716  double HFSET_EtaRing[83][2];
717  double HFMinEnergy_EtaRing[83][2];
718  double HFMaxEnergy_EtaRing[83][2];
719 
720  for (int i = 0; i < 83; i++) {
721  for (int j = 0; j < 2; j++) {
722  HFActiveRing[i][j] = 0;
723  HFNActiveCells[i][j] = 0;
724  HFSET_EtaRing[i][j] = 0;
725  HFMinEnergy_EtaRing[i][j] = 14E3;
726  HFMaxEnergy_EtaRing[i][j] = -999;
727  }
728  }
729 
730  // Loop over HFRecHit's
732  int nHFrechit = 0;
733 
734  for (hfrechit = HFRecHits->begin(); hfrechit != HFRecHits->end(); hfrechit++) {
735  nHFrechit++;
736 
737  HcalDetId det = hfrechit->id();
738  double Energy = hfrechit->energy();
739  Int_t depth = det.depth();
740  Int_t ieta = det.ieta();
741  Int_t iphi = det.iphi();
742  int EtaRing = 41 + ieta; // this counts from 0
743  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing + 1, iphi);
744  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing + 1, iphi);
745  double theta = 2 * TMath::ATan(exp(-1 * eta));
746  double ET = Energy * TMath::Sin(theta);
747 
748  TLorentzVector v_;
749  if (Energy > 0) // zero suppress
750  {
751  HFActiveRing[EtaRing][depth - 1] = 1;
752  HFNActiveCells[EtaRing][depth - 1]++;
753  HFSET_EtaRing[EtaRing][depth - 1] += ET;
754  v_.SetPtEtaPhiE(ET, 0, phi, ET);
755  vHFMET_EtaRing[EtaRing][depth - 1] -= v_;
756 
757  switch (depth) {
758  case 1:
760  break;
761  case 2:
763  break;
764  }
765  }
766 
767  if (Energy > HFMaxEnergy_EtaRing[EtaRing][depth - 1])
768  HFMaxEnergy_EtaRing[EtaRing][depth - 1] = Energy;
769  if (Energy < HFMinEnergy_EtaRing[EtaRing][depth - 1])
770  HFMinEnergy_EtaRing[EtaRing][depth - 1] = Energy;
771 
772  switch (depth) {
773  case 1:
775 
779  if (Energy < hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
781  break;
782  case 2:
784 
788  if (Energy < hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
790  break;
791  }
792 
793  } // end loop over HFRecHit's
794 
795  // Fill eta-ring MET quantities
796  for (int iEtaRing = 0; iEtaRing < 83; iEtaRing++) {
797  for (int jDepth = 0; jDepth < 2; jDepth++) {
798  switch (jDepth + 1) {
799  case 1:
800  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing - 41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
801  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing - 41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
802  break;
803  case 2:
804  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing - 41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
805  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing - 41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
806  break;
807  }
808 
809  if (HFActiveRing[iEtaRing][jDepth]) {
810  switch (jDepth + 1) {
811  case 1:
812 
813  hHCAL_D1_METPhivsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
814  hHCAL_D1_MExvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
815  hHCAL_D1_MEyvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
816  hHCAL_D1_METvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
817  hHCAL_D1_SETvsieta->Fill(iEtaRing - 41, HFSET_EtaRing[iEtaRing][jDepth]);
818  hHCAL_D1_Occvsieta->Fill(iEtaRing - 41, HFNActiveCells[iEtaRing][jDepth]);
819  break;
820 
821  case 2:
822 
823  hHCAL_D2_METPhivsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
824  hHCAL_D2_MExvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
825  hHCAL_D2_MEyvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
826  hHCAL_D2_METvsieta->Fill(iEtaRing - 41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
827  hHCAL_D2_SETvsieta->Fill(iEtaRing - 41, HFSET_EtaRing[iEtaRing][jDepth]);
828  hHCAL_D2_Occvsieta->Fill(iEtaRing - 41, HFNActiveCells[iEtaRing][jDepth]);
829  break;
830  }
831  }
832  }
833  }
834 }
Handle.h
HCALRecHitAnalyzer::hHCAL_D4_energyvsieta
MonitorElement * hHCAL_D4_energyvsieta
Definition: HCALRecHitAnalyzer.h:83
mps_fire.i
i
Definition: mps_fire.py:355
HCALRecHitAnalyzer::hBHERecHitsLabel_
edm::EDGetTokenT< HBHERecHitCollection > hBHERecHitsLabel_
Definition: HCALRecHitAnalyzer.h:37
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
HCALRecHitAnalyzer::hHCAL_D4_Minenergyvsieta
MonitorElement * hHCAL_D4_Minenergyvsieta
Definition: HCALRecHitAnalyzer.h:88
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HCALRecHitAnalyzer::hHCAL_D2_Occvsieta
MonitorElement * hHCAL_D2_Occvsieta
Definition: HCALRecHitAnalyzer.h:96
HCALRecHitAnalyzer::hHCAL_D1_Minenergy_ieta_iphi
MonitorElement * hHCAL_D1_Minenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:65
EcalCondDBWriter_cfi.Energy
Energy
Definition: EcalCondDBWriter_cfi.py:152
HCALRecHitAnalyzer::hHCAL_D2_Occ_ieta_iphi
MonitorElement * hHCAL_D2_Occ_ieta_iphi
Definition: HCALRecHitAnalyzer.h:76
ESHandle.h
HCALRecHitAnalyzer::hHCAL_D1_Occvsieta
MonitorElement * hHCAL_D1_Occvsieta
Definition: HCALRecHitAnalyzer.h:95
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
HCALRecHitAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HCALRecHitAnalyzer.cc:442
HCALRecHitAnalyzer::hHCAL_D4_METPhivsieta
MonitorElement * hHCAL_D4_METPhivsieta
Definition: HCALRecHitAnalyzer.h:113
HCALRecHitAnalyzer::hHCAL_D2_METvsieta
MonitorElement * hHCAL_D2_METvsieta
Definition: HCALRecHitAnalyzer.h:106
edm::Run
Definition: Run.h:45
HCALRecHitAnalyzer::hHCAL_D1_Maxenergyvsieta
MonitorElement * hHCAL_D1_Maxenergyvsieta
Definition: HCALRecHitAnalyzer.h:90
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
egHLT::errCodes::HFRecHits
Definition: EgHLTErrCodes.h:21
egHLT::errCodes::HBHERecHits
Definition: EgHLTErrCodes.h:20
DetId::Hcal
Definition: DetId.h:28
edm::LogInfo
Definition: MessageLogger.h:254
HCALRecHitAnalyzer::hHCAL_ieta_iphi_phiMap
MonitorElement * hHCAL_ieta_iphi_phiMap
Definition: HCALRecHitAnalyzer.h:54
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
edm::SortedCollection
Definition: SortedCollection.h:49
DQMStore.h
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HCALRecHitAnalyzer.h
HCALRecHitAnalyzer::hHCAL_ieta_iphi_HBMap
MonitorElement * hHCAL_ieta_iphi_HBMap
Definition: HCALRecHitAnalyzer.h:49
HCALRecHitAnalyzer::hHCAL_D3_Minenergyvsieta
MonitorElement * hHCAL_D3_Minenergyvsieta
Definition: HCALRecHitAnalyzer.h:87
HcalBarrel
Definition: HcalAssistant.h:33
HCALRecHitAnalyzer::hHCAL_D2_Minenergyvsieta
MonitorElement * hHCAL_D2_Minenergyvsieta
Definition: HCALRecHitAnalyzer.h:86
edm::Handle
Definition: AssociativeIterator.h:50
HcalGeometry.h
HCALRecHitAnalyzer::hHCAL_D1_Minenergyvsieta
MonitorElement * hHCAL_D1_Minenergyvsieta
Definition: HCALRecHitAnalyzer.h:85
HcalGeometry::getValidDetIds
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
Definition: HcalGeometry.cc:75
HCALRecHitAnalyzer::hHCAL_D2_Maxenergyvsieta
MonitorElement * hHCAL_D2_Maxenergyvsieta
Definition: HCALRecHitAnalyzer.h:91
HCALRecHitAnalyzer::hHCAL_D3_Occvsieta
MonitorElement * hHCAL_D3_Occvsieta
Definition: HCALRecHitAnalyzer.h:97
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HCALRecHitAnalyzer::hHCAL_D4_MEyvsieta
MonitorElement * hHCAL_D4_MEyvsieta
Definition: HCALRecHitAnalyzer.h:123
HCALRecHitAnalyzer::hHCAL_D3_SETvsieta
MonitorElement * hHCAL_D3_SETvsieta
Definition: HCALRecHitAnalyzer.h:102
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
HCALRecHitAnalyzer::hHCAL_D4_energy_ieta_iphi
MonitorElement * hHCAL_D4_energy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:63
HCALRecHitAnalyzer::hHCAL_D4_METvsieta
MonitorElement * hHCAL_D4_METvsieta
Definition: HCALRecHitAnalyzer.h:108
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HCALRecHitAnalyzer::hHCAL_D4_SETvsieta
MonitorElement * hHCAL_D4_SETvsieta
Definition: HCALRecHitAnalyzer.h:103
HCALRecHitAnalyzer::hHCAL_D4_Occ_ieta_iphi
MonitorElement * hHCAL_D4_Occ_ieta_iphi
Definition: HCALRecHitAnalyzer.h:78
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
HCALRecHitAnalyzer::hHCAL_D1_MEyvsieta
MonitorElement * hHCAL_D1_MEyvsieta
Definition: HCALRecHitAnalyzer.h:120
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HCALRecHitAnalyzer::Nevents
int Nevents
Definition: HCALRecHitAnalyzer.h:46
HCALRecHitAnalyzer::hHCAL_D4_MExvsieta
MonitorElement * hHCAL_D4_MExvsieta
Definition: HCALRecHitAnalyzer.h:118
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HCALRecHitAnalyzer::hHCAL_Nevents
MonitorElement * hHCAL_Nevents
Definition: HCALRecHitAnalyzer.h:58
HCALRecHitAnalyzer::hHCAL_D3_Minenergy_ieta_iphi
MonitorElement * hHCAL_D3_Minenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:67
edm::ESHandle< CaloGeometry >
HcalOuter
Definition: HcalAssistant.h:35
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
VtxSmearedParameters_cfi.Phi
Phi
Definition: VtxSmearedParameters_cfi.py:112
HCALRecHitAnalyzer::hHCAL_D3_MEyvsieta
MonitorElement * hHCAL_D3_MEyvsieta
Definition: HCALRecHitAnalyzer.h:122
HCALRecHitAnalyzer::hHCAL_ieta_iphi_HFMap
MonitorElement * hHCAL_ieta_iphi_HFMap
Definition: HCALRecHitAnalyzer.h:51
CaloSubdetectorGeometry::getValidDetIds
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
Definition: CaloSubdetectorGeometry.cc:32
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HCALRecHitAnalyzer::hFRecHitsLabel_
edm::EDGetTokenT< HFRecHitCollection > hFRecHitsLabel_
Definition: HCALRecHitAnalyzer.h:38
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ET
#define ET
Definition: GenericBenchmark.cc:27
HCALRecHitAnalyzer::hHCAL_ieta_iphi_HEMap
MonitorElement * hHCAL_ieta_iphi_HEMap
Definition: HCALRecHitAnalyzer.h:50
HCALRecHitAnalyzer::hHCAL_D4_Maxenergyvsieta
MonitorElement * hHCAL_D4_Maxenergyvsieta
Definition: HCALRecHitAnalyzer.h:93
HCALRecHitAnalyzer::hHCAL_D1_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D1_Maxenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:70
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
edm::ParameterSet
Definition: ParameterSet.h:36
HCALRecHitAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HCALRecHitAnalyzer.cc:68
HCALRecHitAnalyzer::debug_
bool debug_
Definition: HCALRecHitAnalyzer.h:40
HCALRecHitAnalyzer::hHCAL_D1_SETvsieta
MonitorElement * hHCAL_D1_SETvsieta
Definition: HCALRecHitAnalyzer.h:100
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:178
Event.h
HCALRecHitAnalyzer::hHCAL_D1_Occ_ieta_iphi
MonitorElement * hHCAL_D1_Occ_ieta_iphi
Definition: HCALRecHitAnalyzer.h:75
HCALRecHitAnalyzer::hHCAL_D1_METvsieta
MonitorElement * hHCAL_D1_METvsieta
Definition: HCALRecHitAnalyzer.h:105
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
HCALRecHitAnalyzer::hHCAL_D4_Minenergy_ieta_iphi
MonitorElement * hHCAL_D4_Minenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:68
HcalDetId.h
HCALRecHitAnalyzer::hHCAL_D1_MExvsieta
MonitorElement * hHCAL_D1_MExvsieta
Definition: HCALRecHitAnalyzer.h:115
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
ModuleDef.h
iEvent
int iEvent
Definition: GenABIO.cc:224
HCALRecHitAnalyzer::hORecHitsLabel_
edm::EDGetTokenT< HORecHitCollection > hORecHitsLabel_
Definition: HCALRecHitAnalyzer.h:39
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
HCALRecHitAnalyzer::hHCAL_D3_METvsieta
MonitorElement * hHCAL_D3_METvsieta
Definition: HCALRecHitAnalyzer.h:107
HCALRecHitAnalyzer::hHCAL_D4_Occvsieta
MonitorElement * hHCAL_D4_Occvsieta
Definition: HCALRecHitAnalyzer.h:98
HCALRecHitAnalyzer::FillGeometry
void FillGeometry(const edm::EventSetup &)
Definition: HCALRecHitAnalyzer.cc:237
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
HCALRecHitAnalyzer::hHCAL_ieta_iphi_etaMap
MonitorElement * hHCAL_ieta_iphi_etaMap
Definition: HCALRecHitAnalyzer.h:53
HCALRecHitAnalyzer::hHCAL_D2_METPhivsieta
MonitorElement * hHCAL_D2_METPhivsieta
Definition: HCALRecHitAnalyzer.h:111
edm::EventSetup
Definition: EventSetup.h:57
HcalSubdetector.h
HCALRecHitAnalyzer::hHCAL_D4_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D4_Maxenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:73
HCALRecHitAnalyzer::hHCAL_D2_MEyvsieta
MonitorElement * hHCAL_D2_MEyvsieta
Definition: HCALRecHitAnalyzer.h:121
HCALRecHitAnalyzer::hHCAL_D3_METPhivsieta
MonitorElement * hHCAL_D3_METPhivsieta
Definition: HCALRecHitAnalyzer.h:112
get
#define get
HCALRecHitAnalyzer::finebinning_
bool finebinning_
Definition: HCALRecHitAnalyzer.h:41
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HCALRecHitAnalyzer::hHCAL_D3_energyvsieta
MonitorElement * hHCAL_D3_energyvsieta
Definition: HCALRecHitAnalyzer.h:82
HCALRecHitAnalyzer::hHCAL_D1_METPhivsieta
MonitorElement * hHCAL_D1_METPhivsieta
Definition: HCALRecHitAnalyzer.h:110
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HCALRecHitAnalyzer::hHCAL_D1_energyvsieta
MonitorElement * hHCAL_D1_energyvsieta
Definition: HCALRecHitAnalyzer.h:80
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
CaloCellGeometry.h
HCALRecHitAnalyzer::hHCAL_D3_MExvsieta
MonitorElement * hHCAL_D3_MExvsieta
Definition: HCALRecHitAnalyzer.h:117
HcalEndcap
Definition: HcalAssistant.h:34
DetId.h
HCALRecHitAnalyzer::hHCAL_D3_Occ_ieta_iphi
MonitorElement * hHCAL_D3_Occ_ieta_iphi
Definition: HCALRecHitAnalyzer.h:77
HCALRecHitAnalyzer::hHCAL_ieta_dphiMap
MonitorElement * hHCAL_ieta_dphiMap
Definition: HCALRecHitAnalyzer.h:56
dqm::implementation::IBooker::book2D
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:177
CaloGeometry.h
HCALRecHitAnalyzer::hHCAL_D1_energy_ieta_iphi
MonitorElement * hHCAL_D1_energy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:60
HCALRecHitAnalyzer::hHCAL_D2_energy_ieta_iphi
MonitorElement * hHCAL_D2_energy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:61
EventSetup.h
HCALRecHitAnalyzer::hHCAL_D2_SETvsieta
MonitorElement * hHCAL_D2_SETvsieta
Definition: HCALRecHitAnalyzer.h:101
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
DEBUG
#define DEBUG(X)
Definition: HCALRecHitAnalyzer.cc:45
HCALRecHitAnalyzer::hHCAL_D2_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D2_Maxenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:71
dqm::implementation::IBooker
Definition: DQMStore.h:43
HCALRecHitAnalyzer::hHCAL_ieta_iphi_HOMap
MonitorElement * hHCAL_ieta_iphi_HOMap
Definition: HCALRecHitAnalyzer.h:52
HCALRecHitAnalyzer::hHCAL_D2_MExvsieta
MonitorElement * hHCAL_D2_MExvsieta
Definition: HCALRecHitAnalyzer.h:116
ParameterSet.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
HCALRecHitAnalyzer::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HCALRecHitAnalyzer.cc:63
HCALRecHitAnalyzer::hHCAL_D2_energyvsieta
MonitorElement * hHCAL_D2_energyvsieta
Definition: HCALRecHitAnalyzer.h:81
edm::Event
Definition: Event.h:73
HCALRecHitAnalyzer::FolderName_
std::string FolderName_
Definition: HCALRecHitAnalyzer.h:42
HcalGeometry
Definition: HcalGeometry.h:17
HCALRecHitAnalyzer::hHCAL_D3_energy_ieta_iphi
MonitorElement * hHCAL_D3_energy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:62
GlobalPoint.h
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
edm::InputTag
Definition: InputTag.h:15
HCALRecHitAnalyzer::hHCAL_D2_Minenergy_ieta_iphi
MonitorElement * hHCAL_D2_Minenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:66
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
HCALRecHitAnalyzer::hHCAL_ieta_detaMap
MonitorElement * hHCAL_ieta_detaMap
Definition: HCALRecHitAnalyzer.h:55
HCALRecHitAnalyzer::HCALRecHitAnalyzer
HCALRecHitAnalyzer(const edm::ParameterSet &)
Definition: HCALRecHitAnalyzer.cc:52
HCALRecHitAnalyzer::hHCAL_D3_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D3_Maxenergy_ieta_iphi
Definition: HCALRecHitAnalyzer.h:72
HCALRecHitAnalyzer::hHCAL_D3_Maxenergyvsieta
MonitorElement * hHCAL_D3_Maxenergyvsieta
Definition: HCALRecHitAnalyzer.h:92
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98