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