CMS 3D CMS Logo

DQMSourcePi0.cc
Go to the documentation of this file.
5 
6 // DQM include files
7 
9 
10 // work on collections
14 
16 
18 
24 
30 
33 
34 #include "TVector3.h"
35 
36 #define TWOPI 6.283185308
37 
38 using namespace std;
39 using namespace edm;
40 
41 // ******************************************
42 // constructors
43 // *****************************************
44 
45 DQMSourcePi0::DQMSourcePi0(const edm::ParameterSet &ps) : eventCounter_(0) {
46  folderName_ = ps.getUntrackedParameter<string>("FolderName", "HLT/AlCaEcalPi0");
47  prescaleFactor_ = ps.getUntrackedParameter<int>("prescaleFactor", 1);
49  consumes<EcalRecHitCollection>(ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEBpi0Tag"));
51  consumes<EcalRecHitCollection>(ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEBetaTag"));
53  consumes<EcalRecHitCollection>(ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEEpi0Tag"));
55  consumes<EcalRecHitCollection>(ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEEetaTag"));
58 
59  isMonEBpi0_ = ps.getUntrackedParameter<bool>("isMonEBpi0", false);
60  isMonEBeta_ = ps.getUntrackedParameter<bool>("isMonEBeta", false);
61  isMonEEpi0_ = ps.getUntrackedParameter<bool>("isMonEEpi0", false);
62  isMonEEeta_ = ps.getUntrackedParameter<bool>("isMonEEeta", false);
63 
64  saveToFile_ = ps.getUntrackedParameter<bool>("SaveToFile", false);
65  fileName_ = ps.getUntrackedParameter<string>("FileName", "MonitorAlCaEcalPi0.root");
66 
67  clusSeedThr_ = ps.getParameter<double>("clusSeedThr");
68  clusSeedThrEndCap_ = ps.getParameter<double>("clusSeedThrEndCap");
69  clusEtaSize_ = ps.getParameter<int>("clusEtaSize");
70  clusPhiSize_ = ps.getParameter<int>("clusPhiSize");
71  if (clusPhiSize_ % 2 == 0 || clusEtaSize_ % 2 == 0)
72  edm::LogError("AlCaPi0RecHitsProducerError") << "Size of eta/phi for simple clustering should be odd numbers";
73 
74  seleXtalMinEnergy_ = ps.getParameter<double>("seleXtalMinEnergy");
75  seleXtalMinEnergyEndCap_ = ps.getParameter<double>("seleXtalMinEnergyEndCap");
76 
78  selePtGamma_ = ps.getParameter<double>("selePtGamma");
79  selePtPi0_ = ps.getParameter<double>("selePtPi0");
80  seleMinvMaxPi0_ = ps.getParameter<double>("seleMinvMaxPi0");
81  seleMinvMinPi0_ = ps.getParameter<double>("seleMinvMinPi0");
82  seleS4S9Gamma_ = ps.getParameter<double>("seleS4S9Gamma");
83  selePi0Iso_ = ps.getParameter<double>("selePi0Iso");
84  ptMinForIsolation_ = ps.getParameter<double>("ptMinForIsolation");
85  selePi0BeltDR_ = ps.getParameter<double>("selePi0BeltDR");
86  selePi0BeltDeta_ = ps.getParameter<double>("selePi0BeltDeta");
87 
89  selePtGammaEndCap_ = ps.getParameter<double>("selePtGammaEndCap");
90  selePtPi0EndCap_ = ps.getParameter<double>("selePtPi0EndCap");
91  seleS4S9GammaEndCap_ = ps.getParameter<double>("seleS4S9GammaEndCap");
92  seleMinvMaxPi0EndCap_ = ps.getParameter<double>("seleMinvMaxPi0EndCap");
93  seleMinvMinPi0EndCap_ = ps.getParameter<double>("seleMinvMinPi0EndCap");
94  ptMinForIsolationEndCap_ = ps.getParameter<double>("ptMinForIsolationEndCap");
95  selePi0BeltDREndCap_ = ps.getParameter<double>("selePi0BeltDREndCap");
96  selePi0BeltDetaEndCap_ = ps.getParameter<double>("selePi0BeltDetaEndCap");
97  selePi0IsoEndCap_ = ps.getParameter<double>("selePi0IsoEndCap");
98 
100  selePtGammaEta_ = ps.getParameter<double>("selePtGammaEta");
101  selePtEta_ = ps.getParameter<double>("selePtEta");
102  seleS4S9GammaEta_ = ps.getParameter<double>("seleS4S9GammaEta");
103  seleS9S25GammaEta_ = ps.getParameter<double>("seleS9S25GammaEta");
104  seleMinvMaxEta_ = ps.getParameter<double>("seleMinvMaxEta");
105  seleMinvMinEta_ = ps.getParameter<double>("seleMinvMinEta");
106  ptMinForIsolationEta_ = ps.getParameter<double>("ptMinForIsolationEta");
107  seleEtaIso_ = ps.getParameter<double>("seleEtaIso");
108  seleEtaBeltDR_ = ps.getParameter<double>("seleEtaBeltDR");
109  seleEtaBeltDeta_ = ps.getParameter<double>("seleEtaBeltDeta");
110 
112  selePtGammaEtaEndCap_ = ps.getParameter<double>("selePtGammaEtaEndCap");
113  selePtEtaEndCap_ = ps.getParameter<double>("selePtEtaEndCap");
114  seleS4S9GammaEtaEndCap_ = ps.getParameter<double>("seleS4S9GammaEtaEndCap");
115  seleS9S25GammaEtaEndCap_ = ps.getParameter<double>("seleS9S25GammaEtaEndCap");
116  seleMinvMaxEtaEndCap_ = ps.getParameter<double>("seleMinvMaxEtaEndCap");
117  seleMinvMinEtaEndCap_ = ps.getParameter<double>("seleMinvMinEtaEndCap");
118  ptMinForIsolationEtaEndCap_ = ps.getParameter<double>("ptMinForIsolationEtaEndCap");
119  seleEtaIsoEndCap_ = ps.getParameter<double>("seleEtaIsoEndCap");
120  seleEtaBeltDREndCap_ = ps.getParameter<double>("seleEtaBeltDREndCap");
121  seleEtaBeltDetaEndCap_ = ps.getParameter<double>("seleEtaBeltDetaEndCap");
122 
123  // Parameters for the position calculation:
126 }
127 
129 
130 //--------------------------------------------------------
131 void DQMSourcePi0::bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &irun, edm::EventSetup const &isetup) {
132  // create and cd into new folder
133  ibooker.setCurrentFolder(folderName_);
134 
135  // book some histograms 1D
136 
137  hiPhiDistrEBpi0_ = ibooker.book1D("iphiDistributionEBpi0", "RechitEB pi0 iphi", 361, 1, 361);
138  hiPhiDistrEBpi0_->setAxisTitle("i#phi ", 1);
139  hiPhiDistrEBpi0_->setAxisTitle("# rechits", 2);
140 
141  hiXDistrEEpi0_ = ibooker.book1D("iXDistributionEEpi0", "RechitEE pi0 ix", 100, 0, 100);
142  hiXDistrEEpi0_->setAxisTitle("ix ", 1);
143  hiXDistrEEpi0_->setAxisTitle("# rechits", 2);
144 
145  hiPhiDistrEBeta_ = ibooker.book1D("iphiDistributionEBeta", "RechitEB eta iphi", 361, 1, 361);
146  hiPhiDistrEBeta_->setAxisTitle("i#phi ", 1);
147  hiPhiDistrEBeta_->setAxisTitle("# rechits", 2);
148 
149  hiXDistrEEeta_ = ibooker.book1D("iXDistributionEEeta", "RechitEE eta ix", 100, 0, 100);
150  hiXDistrEEeta_->setAxisTitle("ix ", 1);
151  hiXDistrEEeta_->setAxisTitle("# rechits", 2);
152 
153  hiEtaDistrEBpi0_ = ibooker.book1D("iEtaDistributionEBpi0", "RechitEB pi0 ieta", 171, -85, 86);
154  hiEtaDistrEBpi0_->setAxisTitle("i#eta", 1);
155  hiEtaDistrEBpi0_->setAxisTitle("#rechits", 2);
156 
157  hiYDistrEEpi0_ = ibooker.book1D("iYDistributionEEpi0", "RechitEE pi0 iY", 100, 0, 100);
158  hiYDistrEEpi0_->setAxisTitle("iy", 1);
159  hiYDistrEEpi0_->setAxisTitle("#rechits", 2);
160 
161  hiEtaDistrEBeta_ = ibooker.book1D("iEtaDistributionEBeta", "RechitEB eta ieta", 171, -85, 86);
162  hiEtaDistrEBeta_->setAxisTitle("i#eta", 1);
163  hiEtaDistrEBeta_->setAxisTitle("#rechits", 2);
164 
165  hiYDistrEEeta_ = ibooker.book1D("iYDistributionEEeta", "RechitEE eta iY", 100, 0, 100);
166  hiYDistrEEeta_->setAxisTitle("iy", 1);
167  hiYDistrEEeta_->setAxisTitle("#rechits", 2);
168 
169  hRechitEnergyEBpi0_ = ibooker.book1D("rhEnergyEBpi0", "Pi0 rechits energy EB", 160, 0., 2.0);
170  hRechitEnergyEBpi0_->setAxisTitle("energy (GeV) ", 1);
171  hRechitEnergyEBpi0_->setAxisTitle("#rechits", 2);
172 
173  hRechitEnergyEEpi0_ = ibooker.book1D("rhEnergyEEpi0", "Pi0 rechits energy EE", 160, 0., 3.0);
174  hRechitEnergyEEpi0_->setAxisTitle("energy (GeV) ", 1);
175  hRechitEnergyEEpi0_->setAxisTitle("#rechits", 2);
176 
177  hRechitEnergyEBeta_ = ibooker.book1D("rhEnergyEBeta", "Eta rechits energy EB", 160, 0., 2.0);
178  hRechitEnergyEBeta_->setAxisTitle("energy (GeV) ", 1);
179  hRechitEnergyEBeta_->setAxisTitle("#rechits", 2);
180 
181  hRechitEnergyEEeta_ = ibooker.book1D("rhEnergyEEeta", "Eta rechits energy EE", 160, 0., 3.0);
182  hRechitEnergyEEeta_->setAxisTitle("energy (GeV) ", 1);
183  hRechitEnergyEEeta_->setAxisTitle("#rechits", 2);
184 
185  hEventEnergyEBpi0_ = ibooker.book1D("eventEnergyEBpi0", "Pi0 event energy EB", 100, 0., 20.0);
186  hEventEnergyEBpi0_->setAxisTitle("energy (GeV) ", 1);
187 
188  hEventEnergyEEpi0_ = ibooker.book1D("eventEnergyEEpi0", "Pi0 event energy EE", 100, 0., 50.0);
189  hEventEnergyEEpi0_->setAxisTitle("energy (GeV) ", 1);
190 
191  hEventEnergyEBeta_ = ibooker.book1D("eventEnergyEBeta", "Eta event energy EB", 100, 0., 20.0);
192  hEventEnergyEBeta_->setAxisTitle("energy (GeV) ", 1);
193 
194  hEventEnergyEEeta_ = ibooker.book1D("eventEnergyEEeta", "Eta event energy EE", 100, 0., 50.0);
195  hEventEnergyEEeta_->setAxisTitle("energy (GeV) ", 1);
196 
197  hNRecHitsEBpi0_ = ibooker.book1D("nRechitsEBpi0", "#rechits in pi0 collection EB", 100, 0., 250.);
198  hNRecHitsEBpi0_->setAxisTitle("rechits ", 1);
199 
200  hNRecHitsEEpi0_ = ibooker.book1D("nRechitsEEpi0", "#rechits in pi0 collection EE", 100, 0., 250.);
201  hNRecHitsEEpi0_->setAxisTitle("rechits ", 1);
202 
203  hNRecHitsEBeta_ = ibooker.book1D("nRechitsEBeta", "#rechits in eta collection EB", 100, 0., 250.);
204  hNRecHitsEBeta_->setAxisTitle("rechits ", 1);
205 
206  hNRecHitsEEeta_ = ibooker.book1D("nRechitsEEeta", "#rechits in eta collection EE", 100, 0., 250.);
207  hNRecHitsEEeta_->setAxisTitle("rechits ", 1);
208 
209  hMeanRecHitEnergyEBpi0_ = ibooker.book1D("meanEnergyEBpi0", "Mean rechit energy in pi0 collection EB", 50, 0., 2.);
210  hMeanRecHitEnergyEBpi0_->setAxisTitle("Mean Energy [GeV] ", 1);
211 
212  hMeanRecHitEnergyEEpi0_ = ibooker.book1D("meanEnergyEEpi0", "Mean rechit energy in pi0 collection EE", 100, 0., 5.);
213  hMeanRecHitEnergyEEpi0_->setAxisTitle("Mean Energy [GeV] ", 1);
214 
215  hMeanRecHitEnergyEBeta_ = ibooker.book1D("meanEnergyEBeta", "Mean rechit energy in eta collection EB", 50, 0., 2.);
216  hMeanRecHitEnergyEBeta_->setAxisTitle("Mean Energy [GeV] ", 1);
217 
218  hMeanRecHitEnergyEEeta_ = ibooker.book1D("meanEnergyEEeta", "Mean rechit energy in eta collection EE", 100, 0., 5.);
219  hMeanRecHitEnergyEEeta_->setAxisTitle("Mean Energy [GeV] ", 1);
220 
221  hMinvPi0EB_ = ibooker.book1D("Pi0InvmassEB", "Pi0 Invariant Mass in EB", 100, 0., 0.5);
222  hMinvPi0EB_->setAxisTitle("Inv Mass [GeV] ", 1);
223 
224  hMinvPi0EE_ = ibooker.book1D("Pi0InvmassEE", "Pi0 Invariant Mass in EE", 100, 0., 0.5);
225  hMinvPi0EE_->setAxisTitle("Inv Mass [GeV] ", 1);
226 
227  hMinvEtaEB_ = ibooker.book1D("EtaInvmassEB", "Eta Invariant Mass in EB", 100, 0., 0.85);
228  hMinvEtaEB_->setAxisTitle("Inv Mass [GeV] ", 1);
229 
230  hMinvEtaEE_ = ibooker.book1D("EtaInvmassEE", "Eta Invariant Mass in EE", 100, 0., 0.85);
231  hMinvEtaEE_->setAxisTitle("Inv Mass [GeV] ", 1);
232 
233  hPt1Pi0EB_ = ibooker.book1D("Pt1Pi0EB", "Pt 1st most energetic Pi0 photon in EB", 100, 0., 20.);
234  hPt1Pi0EB_->setAxisTitle("1st photon Pt [GeV] ", 1);
235 
236  hPt1Pi0EE_ = ibooker.book1D("Pt1Pi0EE", "Pt 1st most energetic Pi0 photon in EE", 100, 0., 20.);
237  hPt1Pi0EE_->setAxisTitle("1st photon Pt [GeV] ", 1);
238 
239  hPt1EtaEB_ = ibooker.book1D("Pt1EtaEB", "Pt 1st most energetic Eta photon in EB", 100, 0., 20.);
240  hPt1EtaEB_->setAxisTitle("1st photon Pt [GeV] ", 1);
241 
242  hPt1EtaEE_ = ibooker.book1D("Pt1EtaEE", "Pt 1st most energetic Eta photon in EE", 100, 0., 20.);
243  hPt1EtaEE_->setAxisTitle("1st photon Pt [GeV] ", 1);
244 
245  hPt2Pi0EB_ = ibooker.book1D("Pt2Pi0EB", "Pt 2nd most energetic Pi0 photon in EB", 100, 0., 20.);
246  hPt2Pi0EB_->setAxisTitle("2nd photon Pt [GeV] ", 1);
247 
248  hPt2Pi0EE_ = ibooker.book1D("Pt2Pi0EE", "Pt 2nd most energetic Pi0 photon in EE", 100, 0., 20.);
249  hPt2Pi0EE_->setAxisTitle("2nd photon Pt [GeV] ", 1);
250 
251  hPt2EtaEB_ = ibooker.book1D("Pt2EtaEB", "Pt 2nd most energetic Eta photon in EB", 100, 0., 20.);
252  hPt2EtaEB_->setAxisTitle("2nd photon Pt [GeV] ", 1);
253 
254  hPt2EtaEE_ = ibooker.book1D("Pt2EtaEE", "Pt 2nd most energetic Eta photon in EE", 100, 0., 20.);
255  hPt2EtaEE_->setAxisTitle("2nd photon Pt [GeV] ", 1);
256 
257  hPtPi0EB_ = ibooker.book1D("PtPi0EB", "Pi0 Pt in EB", 100, 0., 20.);
258  hPtPi0EB_->setAxisTitle("Pi0 Pt [GeV] ", 1);
259 
260  hPtPi0EE_ = ibooker.book1D("PtPi0EE", "Pi0 Pt in EE", 100, 0., 20.);
261  hPtPi0EE_->setAxisTitle("Pi0 Pt [GeV] ", 1);
262 
263  hPtEtaEB_ = ibooker.book1D("PtEtaEB", "Eta Pt in EB", 100, 0., 20.);
264  hPtEtaEB_->setAxisTitle("Eta Pt [GeV] ", 1);
265 
266  hPtEtaEE_ = ibooker.book1D("PtEtaEE", "Eta Pt in EE", 100, 0., 20.);
267  hPtEtaEE_->setAxisTitle("Eta Pt [GeV] ", 1);
268 
269  hIsoPi0EB_ = ibooker.book1D("IsoPi0EB", "Pi0 Iso in EB", 50, 0., 1.);
270  hIsoPi0EB_->setAxisTitle("Pi0 Iso", 1);
271 
272  hIsoPi0EE_ = ibooker.book1D("IsoPi0EE", "Pi0 Iso in EE", 50, 0., 1.);
273  hIsoPi0EE_->setAxisTitle("Pi0 Iso", 1);
274 
275  hIsoEtaEB_ = ibooker.book1D("IsoEtaEB", "Eta Iso in EB", 50, 0., 1.);
276  hIsoEtaEB_->setAxisTitle("Eta Iso", 1);
277 
278  hIsoEtaEE_ = ibooker.book1D("IsoEtaEE", "Eta Iso in EE", 50, 0., 1.);
279  hIsoEtaEE_->setAxisTitle("Eta Iso", 1);
280 
281  hS4S91Pi0EB_ = ibooker.book1D("S4S91Pi0EB", "S4S9 1st most energetic Pi0 photon in EB", 50, 0., 1.);
282  hS4S91Pi0EB_->setAxisTitle("S4S9 of the 1st Pi0 Photon ", 1);
283 
284  hS4S91Pi0EE_ = ibooker.book1D("S4S91Pi0EE", "S4S9 1st most energetic Pi0 photon in EE", 50, 0., 1.);
285  hS4S91Pi0EE_->setAxisTitle("S4S9 of the 1st Pi0 Photon ", 1);
286 
287  hS4S91EtaEB_ = ibooker.book1D("S4S91EtaEB", "S4S9 1st most energetic Eta photon in EB", 50, 0., 1.);
288  hS4S91EtaEB_->setAxisTitle("S4S9 of the 1st Eta Photon ", 1);
289 
290  hS4S91EtaEE_ = ibooker.book1D("S4S91EtaEE", "S4S9 1st most energetic Eta photon in EE", 50, 0., 1.);
291  hS4S91EtaEE_->setAxisTitle("S4S9 of the 1st Eta Photon ", 1);
292 
293  hS4S92Pi0EB_ = ibooker.book1D("S4S92Pi0EB", "S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
294  hS4S92Pi0EB_->setAxisTitle("S4S9 of the 2nd Pi0 Photon", 1);
295 
296  hS4S92Pi0EE_ = ibooker.book1D("S4S92Pi0EE", "S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
297  hS4S92Pi0EE_->setAxisTitle("S4S9 of the 2nd Pi0 Photon", 1);
298 
299  hS4S92EtaEB_ = ibooker.book1D("S4S92EtaEB", "S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
300  hS4S92EtaEB_->setAxisTitle("S4S9 of the 2nd Eta Photon", 1);
301 
302  hS4S92EtaEE_ = ibooker.book1D("S4S92EtaEE", "S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
303  hS4S92EtaEE_->setAxisTitle("S4S9 of the 2nd Eta Photon", 1);
304 }
305 
306 //-------------------------------------------------------------
307 void DQMSourcePi0::analyze(const Event &iEvent, const EventSetup &iSetup) {
309  return;
310  eventCounter_++;
311 
312  auto const &theCaloTopology = iSetup.getHandle(caloTopoToken_);
313 
314  std::vector<EcalRecHit> seeds;
315  seeds.clear();
316 
317  vector<EBDetId> usedXtals;
318  usedXtals.clear();
319 
320  detIdEBRecHits.clear();
321  EBRecHits.clear();
322 
327 
328  if (isMonEBpi0_)
329  iEvent.getByToken(productMonitoredEBpi0_, rhEBpi0);
330  if (isMonEBeta_)
331  iEvent.getByToken(productMonitoredEBeta_, rhEBeta);
332  if (isMonEEpi0_)
333  iEvent.getByToken(productMonitoredEEpi0_, rhEEpi0);
334  if (isMonEEeta_)
335  iEvent.getByToken(productMonitoredEEeta_, rhEEeta);
336 
337  // Initialize the Position Calc
338 
339  //edm::ESHandle<CaloGeometry> geoHandle;
340  //iSetup.get<CaloGeometryRecord>().get(geoHandle);
341  const auto &geoHandle = iSetup.getHandle(caloGeomToken_);
342  const CaloSubdetectorGeometry *geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
343  const CaloSubdetectorGeometry *geometryEE_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
344  const CaloSubdetectorGeometry *geometryES_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
345 
346  const CaloSubdetectorTopology *topology_p = theCaloTopology->getSubdetectorTopology(DetId::Ecal, EcalBarrel);
347  const CaloSubdetectorTopology *topology_ee = theCaloTopology->getSubdetectorTopology(DetId::Ecal, EcalEndcap);
348 
350 
351  // fill EB pi0 histos
352  if (isMonEBpi0_) {
353  if (rhEBpi0.isValid() && (!rhEBpi0->empty())) {
354  const EcalRecHitCollection *hitCollection_p = rhEBpi0.product();
355  float etot = 0;
356  for (itb = rhEBpi0->begin(); itb != rhEBpi0->end(); ++itb) {
357  EBDetId id(itb->id());
358  double energy = itb->energy();
360  continue;
361 
362  EBDetId det = itb->id();
363 
364  detIdEBRecHits.push_back(det);
365  EBRecHits.push_back(*itb);
366 
367  if (energy > clusSeedThr_)
368  seeds.push_back(*itb);
369 
370  hiPhiDistrEBpi0_->Fill(id.iphi());
371  hiEtaDistrEBpi0_->Fill(id.ieta());
372  hRechitEnergyEBpi0_->Fill(itb->energy());
373 
374  etot += itb->energy();
375  } // Eb rechits
376 
377  hNRecHitsEBpi0_->Fill(rhEBpi0->size());
378  hMeanRecHitEnergyEBpi0_->Fill(etot / rhEBpi0->size());
379  hEventEnergyEBpi0_->Fill(etot);
380 
381  // cout << " EB RH Pi0 collection: #, mean rh_e, event E
382  // "<<rhEBpi0->size()<<" "<<etot/rhEBpi0->size()<<" "<<etot<<endl;
383 
384  // Pi0 maker
385 
386  // cout<< " RH coll size: "<<rhEBpi0->size()<<endl;
387  // cout<< " Pi0 seeds: "<<seeds.size()<<endl;
388 
389  int nClus;
390  vector<float> eClus;
391  vector<float> etClus;
392  vector<float> etaClus;
393  vector<float> thetaClus;
394  vector<float> phiClus;
395  vector<EBDetId> max_hit;
396 
397  vector<vector<EcalRecHit>> RecHitsCluster;
398  vector<vector<EcalRecHit>> RecHitsCluster5x5;
399  vector<float> s4s9Clus;
400  vector<float> s9s25Clus;
401 
402  nClus = 0;
403 
404  // Make own simple clusters (3x3, 5x5 or clusPhiSize_ x clusEtaSize_)
405  sort(seeds.begin(), seeds.end(), ecalRecHitGreater);
406 
407  for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
408  EBDetId seed_id = itseed->id();
409  std::vector<EBDetId>::const_iterator usedIds;
410 
411  bool seedAlreadyUsed = false;
412  for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
413  if (*usedIds == seed_id) {
414  seedAlreadyUsed = true;
415  // cout<< " Seed with energy "<<itseed->energy()<<" was used
416  // !"<<endl;
417  break;
418  }
419  }
420  if (seedAlreadyUsed)
421  continue;
422  std::vector<DetId> clus_v = topology_p->getWindow(seed_id, clusEtaSize_, clusPhiSize_);
423  std::vector<std::pair<DetId, float>> clus_used;
424  // Reject the seed if not able to build the cluster around it correctly
425  // if(clus_v.size() < clusEtaSize_*clusPhiSize_){cout<<" Not enough
426  // RecHits "<<endl; continue;}
427  vector<EcalRecHit> RecHitsInWindow;
428  vector<EcalRecHit> RecHitsInWindow5x5;
429 
430  double simple_energy = 0;
431 
432  for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
433  EBDetId EBdet = *det;
434  // cout<<" det "<< EBdet<<" ieta "<<EBdet.ieta()<<" iphi
435  // "<<EBdet.iphi()<<endl;
436  bool HitAlreadyUsed = false;
437  for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
438  if (*usedIds == *det) {
439  HitAlreadyUsed = true;
440  break;
441  }
442  }
443  if (HitAlreadyUsed)
444  continue;
445 
446  std::vector<EBDetId>::iterator itdet = find(detIdEBRecHits.begin(), detIdEBRecHits.end(), EBdet);
447  if (itdet == detIdEBRecHits.end())
448  continue;
449 
450  int nn = int(itdet - detIdEBRecHits.begin());
451  usedXtals.push_back(*det);
452  RecHitsInWindow.push_back(EBRecHits[nn]);
453  clus_used.push_back(std::make_pair(*det, 1));
454  simple_energy = simple_energy + EBRecHits[nn].energy();
455  }
456 
457  if (simple_energy <= 0)
458  continue;
459 
460  math::XYZPoint clus_pos =
461  posCalculator_.Calculate_Location(clus_used, hitCollection_p, geometry_p, geometryES_p);
462  // cout<< " Simple Clustering: Total energy for this simple
463  // cluster : "<<simple_energy<<endl; cout<< " Simple Clustering:
464  // eta phi : "<<clus_pos.eta()<<" "<<clus_pos.phi()<<endl; cout<< "
465  // Simple Clustering: x y z : "<<clus_pos.x()<<" "<<clus_pos.y()<<"
466  // "<<clus_pos.z()<<endl;
467 
468  float theta_s = 2. * atan(exp(-clus_pos.eta()));
469  // float p0x_s = simple_energy * sin(theta_s) *
470  // cos(clus_pos.phi()); float p0y_s = simple_energy * sin(theta_s) *
471  // sin(clus_pos.phi());
472  // float p0z_s = simple_energy * cos(theta_s);
473  // float et_s = sqrt( p0x_s*p0x_s + p0y_s*p0y_s);
474 
475  float et_s = simple_energy * sin(theta_s);
476  // cout << " Simple Clustering: E,Et,px,py,pz: "<<simple_energy<<"
477  // "<<et_s<<" "<<p0x_s<<" "<<p0y_s<<" "<<endl;
478 
479  // Compute S4/S9 variable
480  // We are not sure to have 9 RecHits so need to check eta and phi:
482  float s4s9_tmp[4];
483  for (int i = 0; i < 4; i++)
484  s4s9_tmp[i] = 0;
485 
486  int seed_ieta = seed_id.ieta();
487  int seed_iphi = seed_id.iphi();
488 
489  convxtalid(seed_iphi, seed_ieta);
490 
491  float e3x3 = 0;
492  float e5x5 = 0;
493 
494  for (unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
495  EBDetId det = (EBDetId)RecHitsInWindow[j].id();
496 
497  int ieta = det.ieta();
498  int iphi = det.iphi();
499 
500  convxtalid(iphi, ieta);
501 
502  float en = RecHitsInWindow[j].energy();
503 
504  int dx = diff_neta_s(seed_ieta, ieta);
505  int dy = diff_nphi_s(seed_iphi, iphi);
506 
507  if (dx <= 0 && dy <= 0)
508  s4s9_tmp[0] += en;
509  if (dx >= 0 && dy <= 0)
510  s4s9_tmp[1] += en;
511  if (dx <= 0 && dy >= 0)
512  s4s9_tmp[2] += en;
513  if (dx >= 0 && dy >= 0)
514  s4s9_tmp[3] += en;
515 
516  if (std::abs(dx) <= 1 && std::abs(dy) <= 1)
517  e3x3 += en;
518  if (std::abs(dx) <= 2 && std::abs(dy) <= 2)
519  e5x5 += en;
520  }
521 
522  if (e3x3 <= 0)
523  continue;
524 
525  float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
526 
528  std::vector<DetId> clus_v5x5 = topology_p->getWindow(seed_id, 5, 5);
529  for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
530  EBDetId det = *idItr;
531 
532  std::vector<EBDetId>::iterator itdet0 = find(usedXtals.begin(), usedXtals.end(), det);
533 
535  if (itdet0 != usedXtals.end())
536  continue;
537 
538  // inside collections
539  std::vector<EBDetId>::iterator itdet = find(detIdEBRecHits.begin(), detIdEBRecHits.end(), det);
540  if (itdet == detIdEBRecHits.end())
541  continue;
542 
543  int nn = int(itdet - detIdEBRecHits.begin());
544 
545  RecHitsInWindow5x5.push_back(EBRecHits[nn]);
546  e5x5 += EBRecHits[nn].energy();
547  }
548 
549  if (e5x5 <= 0)
550  continue;
551 
552  eClus.push_back(simple_energy);
553  etClus.push_back(et_s);
554  etaClus.push_back(clus_pos.eta());
555  thetaClus.push_back(theta_s);
556  phiClus.push_back(clus_pos.phi());
557  s4s9Clus.push_back(s4s9_max);
558  s9s25Clus.push_back(e3x3 / e5x5);
559  RecHitsCluster.push_back(RecHitsInWindow);
560  RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
561 
562  // std::cout<<" EB pi0 cluster (n,nxt,e,et eta,phi,s4s9)
563  //"<<nClus<<" "<<int(RecHitsInWindow.size())<<" "<<eClus[nClus]<<" "<<"
564  //"<<etClus[nClus]<<" "<<etaClus[nClus]<<" "<<phiClus[nClus]<<"
565  //"<<s4s9Clus[nClus]<<std::endl;
566 
567  nClus++;
568  }
569 
570  // cout<< " Pi0 clusters: "<<nClus<<endl;
571 
572  // Selection, based on Simple clustering
573  // pi0 candidates
574  int npi0_s = 0;
575 
576  // if (nClus <= 1) return;
577  for (Int_t i = 0; i < nClus; i++) {
578  for (Int_t j = i + 1; j < nClus; j++) {
579  // cout<<" i "<<i<<" etClus[i] "<<etClus[i]<<" j "<<j<<"
580  // etClus[j] "<<etClus[j]<<endl;
581  if (etClus[i] > selePtGamma_ && etClus[j] > selePtGamma_ && s4s9Clus[i] > seleS4S9Gamma_ &&
582  s4s9Clus[j] > seleS4S9Gamma_) {
583  float p0x = etClus[i] * cos(phiClus[i]);
584  float p1x = etClus[j] * cos(phiClus[j]);
585  float p0y = etClus[i] * sin(phiClus[i]);
586  float p1y = etClus[j] * sin(phiClus[j]);
587  float p0z = eClus[i] * cos(thetaClus[i]);
588  float p1z = eClus[j] * cos(thetaClus[j]);
589 
590  float pt_pair = sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
591 
592  if (pt_pair < selePtPi0_)
593  continue;
594 
595  float m_inv = sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
596  (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
597  if ((m_inv < seleMinvMaxPi0_) && (m_inv > seleMinvMinPi0_)) {
598  // New Loop on cluster to measure isolation:
599  vector<int> IsoClus;
600  IsoClus.clear();
601  float Iso = 0;
602  TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
603  for (Int_t k = 0; k < nClus; k++) {
604  if (etClus[k] < ptMinForIsolation_)
605  continue;
606 
607  if (k == i || k == j)
608  continue;
609  TVector3 ClusVect =
610  TVector3(etClus[k] * cos(phiClus[k]), etClus[k] * sin(phiClus[k]), eClus[k] * cos(thetaClus[k]));
611 
612  float dretacl = fabs(etaClus[k] - pairVect.Eta());
613  float drcl = ClusVect.DeltaR(pairVect);
614  // cout<< " Iso: k, E, drclpi0, detaclpi0, dphiclpi0
615  // "<<k<<" "<<eClus[k]<<" "<<drclpi0<<"
616  // "<<dretaclpi0<<endl;
617  if ((drcl < selePi0BeltDR_) && (dretacl < selePi0BeltDeta_)) {
618  // cout<< " ... good iso cluster #: "<<k<<"
619  // etClus[k] "<<etClus[k] <<endl;
620  Iso = Iso + etClus[k];
621  IsoClus.push_back(k);
622  }
623  }
624 
625  // cout<<" Iso/pt_pi0 "<<Iso/pt_pi0<<endl;
626  if (Iso / pt_pair < selePi0Iso_) {
627  // for(unsigned int
628  // Rec=0;Rec<RecHitsCluster[i].size();Rec++)pi0EBRecHitCollection->push_back(RecHitsCluster[i][Rec]);
629  // for(unsigned int
630  // Rec2=0;Rec2<RecHitsCluster[j].size();Rec2++)pi0EBRecHitCollection->push_back(RecHitsCluster[j][Rec2]);
631 
632  hMinvPi0EB_->Fill(m_inv);
633  hPt1Pi0EB_->Fill(etClus[i]);
634  hPt2Pi0EB_->Fill(etClus[j]);
635  hPtPi0EB_->Fill(pt_pair);
636  hIsoPi0EB_->Fill(Iso / pt_pair);
637  hS4S91Pi0EB_->Fill(s4s9Clus[i]);
638  hS4S92Pi0EB_->Fill(s4s9Clus[j]);
639 
640  // cout <<" EB Simple Clustering: pi0 Candidate
641  // pt, eta, phi, Iso, m_inv, i, j : "<<pt_pair<<"
642  //"<<pairVect.Eta()<<" "<<pairVect.Phi()<<" "<<Iso<<"
643  //"<<m_inv<<" "<<i<<" "<<j<<" "<<endl;
644 
645  npi0_s++;
646  }
647  }
648  }
649  } // End of the "j" loop over Simple Clusters
650  } // End of the "i" loop over Simple Clusters
651 
652  // cout<<" (Simple Clustering) EB Pi0 candidates #: "<<npi0_s<<endl;
653 
654  } // rhEBpi0.valid() ends
655 
656  } // isMonEBpi0 ends
657 
658  //------------------ End of pi0 in EB --------------------------//
659 
660  // fill EB eta histos
661  if (isMonEBeta_) {
662  if (rhEBeta.isValid() && (!rhEBeta->empty())) {
663  const EcalRecHitCollection *hitCollection_p = rhEBeta.product();
664  float etot = 0;
665  for (itb = rhEBeta->begin(); itb != rhEBeta->end(); ++itb) {
666  EBDetId id(itb->id());
667  double energy = itb->energy();
669  continue;
670 
671  EBDetId det = itb->id();
672 
673  detIdEBRecHits.push_back(det);
674  EBRecHits.push_back(*itb);
675 
676  if (energy > clusSeedThr_)
677  seeds.push_back(*itb);
678 
679  hiPhiDistrEBeta_->Fill(id.iphi());
680  hiEtaDistrEBeta_->Fill(id.ieta());
681  hRechitEnergyEBeta_->Fill(itb->energy());
682 
683  etot += itb->energy();
684  } // Eb rechits
685 
686  hNRecHitsEBeta_->Fill(rhEBeta->size());
687  hMeanRecHitEnergyEBeta_->Fill(etot / rhEBeta->size());
688  hEventEnergyEBeta_->Fill(etot);
689 
690  // cout << " EB RH Eta collection: #, mean rh_e, event E
691  // "<<rhEBeta->size()<<" "<<etot/rhEBeta->size()<<" "<<etot<<endl;
692 
693  // Eta maker
694 
695  // cout<< " RH coll size: "<<rhEBeta->size()<<endl;
696  // cout<< " Eta seeds: "<<seeds.size()<<endl;
697 
698  int nClus;
699  vector<float> eClus;
700  vector<float> etClus;
701  vector<float> etaClus;
702  vector<float> thetaClus;
703  vector<float> phiClus;
704  vector<EBDetId> max_hit;
705 
706  vector<vector<EcalRecHit>> RecHitsCluster;
707  vector<vector<EcalRecHit>> RecHitsCluster5x5;
708  vector<float> s4s9Clus;
709  vector<float> s9s25Clus;
710 
711  nClus = 0;
712 
713  // Make own simple clusters (3x3, 5x5 or clusPhiSize_ x clusEtaSize_)
714  sort(seeds.begin(), seeds.end(), ecalRecHitGreater);
715 
716  for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
717  EBDetId seed_id = itseed->id();
718  std::vector<EBDetId>::const_iterator usedIds;
719 
720  bool seedAlreadyUsed = false;
721  for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
722  if (*usedIds == seed_id) {
723  seedAlreadyUsed = true;
724  // cout<< " Seed with energy "<<itseed->energy()<<" was used
725  // !"<<endl;
726  break;
727  }
728  }
729  if (seedAlreadyUsed)
730  continue;
731  std::vector<DetId> clus_v = topology_p->getWindow(seed_id, clusEtaSize_, clusPhiSize_);
732  std::vector<std::pair<DetId, float>> clus_used;
733  // Reject the seed if not able to build the cluster around it correctly
734  // if(clus_v.size() < clusEtaSize_*clusPhiSize_){cout<<" Not enough
735  // RecHits "<<endl; continue;}
736  vector<EcalRecHit> RecHitsInWindow;
737  vector<EcalRecHit> RecHitsInWindow5x5;
738 
739  double simple_energy = 0;
740 
741  for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
742  EBDetId EBdet = *det;
743  // cout<<" det "<< EBdet<<" ieta "<<EBdet.ieta()<<" iphi
744  // "<<EBdet.iphi()<<endl;
745  bool HitAlreadyUsed = false;
746  for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
747  if (*usedIds == *det) {
748  HitAlreadyUsed = true;
749  break;
750  }
751  }
752  if (HitAlreadyUsed)
753  continue;
754 
755  std::vector<EBDetId>::iterator itdet = find(detIdEBRecHits.begin(), detIdEBRecHits.end(), EBdet);
756  if (itdet == detIdEBRecHits.end())
757  continue;
758 
759  int nn = int(itdet - detIdEBRecHits.begin());
760  usedXtals.push_back(*det);
761  RecHitsInWindow.push_back(EBRecHits[nn]);
762  clus_used.push_back(std::make_pair(*det, 1));
763  simple_energy = simple_energy + EBRecHits[nn].energy();
764  }
765 
766  if (simple_energy <= 0)
767  continue;
768 
769  math::XYZPoint clus_pos =
770  posCalculator_.Calculate_Location(clus_used, hitCollection_p, geometry_p, geometryES_p);
771  // cout<< " Simple Clustering: Total energy for this simple
772  // cluster : "<<simple_energy<<endl; cout<< " Simple Clustering:
773  // eta phi : "<<clus_pos.eta()<<" "<<clus_pos.phi()<<endl; cout<< "
774  // Simple Clustering: x y z : "<<clus_pos.x()<<" "<<clus_pos.y()<<"
775  // "<<clus_pos.z()<<endl;
776 
777  float theta_s = 2. * atan(exp(-clus_pos.eta()));
778  // float p0x_s = simple_energy * sin(theta_s) *
779  // cos(clus_pos.phi()); float p0y_s = simple_energy * sin(theta_s) *
780  // sin(clus_pos.phi());
781  // float p0z_s = simple_energy * cos(theta_s);
782  // float et_s = sqrt( p0x_s*p0x_s + p0y_s*p0y_s);
783 
784  float et_s = simple_energy * sin(theta_s);
785  // cout << " Simple Clustering: E,Et,px,py,pz: "<<simple_energy<<"
786  // "<<et_s<<" "<<p0x_s<<" "<<p0y_s<<" "<<endl;
787 
788  // Compute S4/S9 variable
789  // We are not sure to have 9 RecHits so need to check eta and phi:
791  float s4s9_tmp[4];
792  for (int i = 0; i < 4; i++)
793  s4s9_tmp[i] = 0;
794 
795  int seed_ieta = seed_id.ieta();
796  int seed_iphi = seed_id.iphi();
797 
798  convxtalid(seed_iphi, seed_ieta);
799 
800  float e3x3 = 0;
801  float e5x5 = 0;
802 
803  for (unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
804  EBDetId det = (EBDetId)RecHitsInWindow[j].id();
805 
806  int ieta = det.ieta();
807  int iphi = det.iphi();
808 
809  convxtalid(iphi, ieta);
810 
811  float en = RecHitsInWindow[j].energy();
812 
813  int dx = diff_neta_s(seed_ieta, ieta);
814  int dy = diff_nphi_s(seed_iphi, iphi);
815 
816  if (dx <= 0 && dy <= 0)
817  s4s9_tmp[0] += en;
818  if (dx >= 0 && dy <= 0)
819  s4s9_tmp[1] += en;
820  if (dx <= 0 && dy >= 0)
821  s4s9_tmp[2] += en;
822  if (dx >= 0 && dy >= 0)
823  s4s9_tmp[3] += en;
824 
825  if (std::abs(dx) <= 1 && std::abs(dy) <= 1)
826  e3x3 += en;
827  if (std::abs(dx) <= 2 && std::abs(dy) <= 2)
828  e5x5 += en;
829  }
830 
831  if (e3x3 <= 0)
832  continue;
833 
834  float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
835 
837  std::vector<DetId> clus_v5x5 = topology_p->getWindow(seed_id, 5, 5);
838  for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
839  EBDetId det = *idItr;
840 
841  std::vector<EBDetId>::iterator itdet0 = find(usedXtals.begin(), usedXtals.end(), det);
842 
844  if (itdet0 != usedXtals.end())
845  continue;
846 
847  // inside collections
848  std::vector<EBDetId>::iterator itdet = find(detIdEBRecHits.begin(), detIdEBRecHits.end(), det);
849  if (itdet == detIdEBRecHits.end())
850  continue;
851 
852  int nn = int(itdet - detIdEBRecHits.begin());
853 
854  RecHitsInWindow5x5.push_back(EBRecHits[nn]);
855  e5x5 += EBRecHits[nn].energy();
856  }
857 
858  if (e5x5 <= 0)
859  continue;
860 
861  eClus.push_back(simple_energy);
862  etClus.push_back(et_s);
863  etaClus.push_back(clus_pos.eta());
864  thetaClus.push_back(theta_s);
865  phiClus.push_back(clus_pos.phi());
866  s4s9Clus.push_back(s4s9_max);
867  s9s25Clus.push_back(e3x3 / e5x5);
868  RecHitsCluster.push_back(RecHitsInWindow);
869  RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
870 
871  // std::cout<<" EB Eta cluster (n,nxt,e,et eta,phi,s4s9)
872  //"<<nClus<<" "<<int(RecHitsInWindow.size())<<" "<<eClus[nClus]<<" "<<"
873  //"<<etClus[nClus]<<" "<<etaClus[nClus]<<" "<<phiClus[nClus]<<"
874  //"<<s4s9Clus[nClus]<<std::endl;
875 
876  nClus++;
877  }
878 
879  // cout<< " Eta clusters: "<<nClus<<endl;
880 
881  // Selection, based on Simple clustering
882  // eta candidates
883  int npi0_s = 0;
884 
885  // if (nClus <= 1) return;
886  for (Int_t i = 0; i < nClus; i++) {
887  for (Int_t j = i + 1; j < nClus; j++) {
888  // cout<<" i "<<i<<" etClus[i] "<<etClus[i]<<" j "<<j<<"
889  // etClus[j] "<<etClus[j]<<endl;
890  if (etClus[i] > selePtGammaEta_ && etClus[j] > selePtGammaEta_ && s4s9Clus[i] > seleS4S9GammaEta_ &&
891  s4s9Clus[j] > seleS4S9GammaEta_) {
892  float p0x = etClus[i] * cos(phiClus[i]);
893  float p1x = etClus[j] * cos(phiClus[j]);
894  float p0y = etClus[i] * sin(phiClus[i]);
895  float p1y = etClus[j] * sin(phiClus[j]);
896  float p0z = eClus[i] * cos(thetaClus[i]);
897  float p1z = eClus[j] * cos(thetaClus[j]);
898 
899  float pt_pair = sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
900 
901  if (pt_pair < selePtEta_)
902  continue;
903 
904  float m_inv = sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
905  (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
906  if ((m_inv < seleMinvMaxEta_) && (m_inv > seleMinvMinEta_)) {
907  // New Loop on cluster to measure isolation:
908  vector<int> IsoClus;
909  IsoClus.clear();
910  float Iso = 0;
911  TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
912  for (Int_t k = 0; k < nClus; k++) {
913  if (etClus[k] < ptMinForIsolationEta_)
914  continue;
915 
916  if (k == i || k == j)
917  continue;
918  TVector3 ClusVect =
919  TVector3(etClus[k] * cos(phiClus[k]), etClus[k] * sin(phiClus[k]), eClus[k] * cos(thetaClus[k]));
920 
921  float dretacl = fabs(etaClus[k] - pairVect.Eta());
922  float drcl = ClusVect.DeltaR(pairVect);
923  // cout<< " Iso: k, E, drclpi0, detaclpi0, dphiclpi0
924  // "<<k<<" "<<eClus[k]<<" "<<drclpi0<<"
925  // "<<dretaclpi0<<endl;
926  if ((drcl < seleEtaBeltDR_) && (dretacl < seleEtaBeltDeta_)) {
927  // cout<< " ... good iso cluster #: "<<k<<"
928  // etClus[k] "<<etClus[k] <<endl;
929  Iso = Iso + etClus[k];
930  IsoClus.push_back(k);
931  }
932  }
933 
934  // cout<<" Iso/pt_pi0 "<<Iso/pt_pi0<<endl;
935  if (Iso / pt_pair < seleEtaIso_) {
936  // for(unsigned int
937  // Rec=0;Rec<RecHitsCluster[i].size();Rec++)pi0EBRecHitCollection->push_back(RecHitsCluster[i][Rec]);
938  // for(unsigned int
939  // Rec2=0;Rec2<RecHitsCluster[j].size();Rec2++)pi0EBRecHitCollection->push_back(RecHitsCluster[j][Rec2]);
940 
941  hMinvEtaEB_->Fill(m_inv);
942  hPt1EtaEB_->Fill(etClus[i]);
943  hPt2EtaEB_->Fill(etClus[j]);
944  hPtEtaEB_->Fill(pt_pair);
945  hIsoEtaEB_->Fill(Iso / pt_pair);
946  hS4S91EtaEB_->Fill(s4s9Clus[i]);
947  hS4S92EtaEB_->Fill(s4s9Clus[j]);
948 
949  // cout <<" EB Simple Clustering: Eta Candidate
950  // pt, eta, phi, Iso, m_inv, i, j : "<<pt_pair<<"
951  //"<<pairVect.Eta()<<" "<<pairVect.Phi()<<" "<<Iso<<"
952  //"<<m_inv<<" "<<i<<" "<<j<<" "<<endl;
953 
954  npi0_s++;
955  }
956  }
957  }
958  } // End of the "j" loop over Simple Clusters
959  } // End of the "i" loop over Simple Clusters
960 
961  // cout<<" (Simple Clustering) EB Eta candidates #: "<<npi0_s<<endl;
962 
963  } // rhEBeta.valid() ends
964 
965  } // isMonEBeta ends
966 
967  //------------------ End of Eta in EB --------------------------//
968 
969  //----------------- End of the EB --------------------------//
970 
971  //----------------- Start of the EE --------------------//
972 
973  // fill pi0 EE histos
974  if (isMonEEpi0_) {
975  if (rhEEpi0.isValid() && (!rhEEpi0->empty())) {
976  const EcalRecHitCollection *hitCollection_ee = rhEEpi0.product();
977  float etot = 0;
978 
979  detIdEERecHits.clear();
980  EERecHits.clear();
981 
982  std::vector<EcalRecHit> seedsEndCap;
983  seedsEndCap.clear();
984 
985  vector<EEDetId> usedXtalsEndCap;
986  usedXtalsEndCap.clear();
987 
990  for (ite = rhEEpi0->begin(); ite != rhEEpi0->end(); ite++) {
991  double energy = ite->energy();
993  continue;
994 
995  EEDetId det = ite->id();
996  EEDetId id(ite->id());
997 
998  detIdEERecHits.push_back(det);
999  EERecHits.push_back(*ite);
1000 
1001  hiXDistrEEpi0_->Fill(id.ix());
1002  hiYDistrEEpi0_->Fill(id.iy());
1003  hRechitEnergyEEpi0_->Fill(ite->energy());
1004 
1005  if (energy > clusSeedThrEndCap_)
1006  seedsEndCap.push_back(*ite);
1007 
1008  etot += ite->energy();
1009  } // EE rechits
1010 
1011  hNRecHitsEEpi0_->Fill(rhEEpi0->size());
1012  hMeanRecHitEnergyEEpi0_->Fill(etot / rhEEpi0->size());
1013  hEventEnergyEEpi0_->Fill(etot);
1014 
1015  // cout << " EE RH Pi0 collection: #, mean rh_e, event E
1016  // "<<rhEEpi0->size()<<" "<<etot/rhEEpi0->size()<<" "<<etot<<endl;
1017 
1018  int nClusEndCap;
1019  vector<float> eClusEndCap;
1020  vector<float> etClusEndCap;
1021  vector<float> etaClusEndCap;
1022  vector<float> thetaClusEndCap;
1023  vector<float> phiClusEndCap;
1024  vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1025  vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1026  vector<float> s4s9ClusEndCap;
1027  vector<float> s9s25ClusEndCap;
1028 
1029  nClusEndCap = 0;
1030 
1031  // Make own simple clusters (3x3, 5x5 or clusPhiSize_ x clusEtaSize_)
1032  sort(seedsEndCap.begin(), seedsEndCap.end(), ecalRecHitGreater);
1033 
1034  for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1035  EEDetId seed_id = itseed->id();
1036  std::vector<EEDetId>::const_iterator usedIds;
1037 
1038  bool seedAlreadyUsed = false;
1039  for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1040  if (*usedIds == seed_id) {
1041  seedAlreadyUsed = true;
1042  break;
1043  }
1044  }
1045 
1046  if (seedAlreadyUsed)
1047  continue;
1048  std::vector<DetId> clus_v = topology_ee->getWindow(seed_id, clusEtaSize_, clusPhiSize_);
1049  std::vector<std::pair<DetId, float>> clus_used;
1050 
1051  vector<EcalRecHit> RecHitsInWindow;
1052  vector<EcalRecHit> RecHitsInWindow5x5;
1053 
1054  float simple_energy = 0;
1055 
1056  for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1057  EEDetId EEdet = *det;
1058 
1059  bool HitAlreadyUsed = false;
1060  for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1061  if (*usedIds == *det) {
1062  HitAlreadyUsed = true;
1063  break;
1064  }
1065  }
1066 
1067  if (HitAlreadyUsed)
1068  continue;
1069 
1070  std::vector<EEDetId>::iterator itdet = find(detIdEERecHits.begin(), detIdEERecHits.end(), EEdet);
1071  if (itdet == detIdEERecHits.end())
1072  continue;
1073 
1074  int nn = int(itdet - detIdEERecHits.begin());
1075  usedXtalsEndCap.push_back(*det);
1076  RecHitsInWindow.push_back(EERecHits[nn]);
1077  clus_used.push_back(std::make_pair(*det, 1));
1078  simple_energy = simple_energy + EERecHits[nn].energy();
1079  }
1080 
1081  if (simple_energy <= 0)
1082  continue;
1083 
1084  math::XYZPoint clus_pos =
1085  posCalculator_.Calculate_Location(clus_used, hitCollection_ee, geometryEE_p, geometryES_p);
1086 
1087  float theta_s = 2. * atan(exp(-clus_pos.eta()));
1088  float et_s = simple_energy * sin(theta_s);
1089  // float p0x_s = simple_energy * sin(theta_s) *
1090  // cos(clus_pos.phi()); float p0y_s = simple_energy * sin(theta_s) *
1091  // sin(clus_pos.phi()); float et_s = sqrt( p0x_s*p0x_s + p0y_s*p0y_s);
1092 
1093  // Compute S4/S9 variable
1094  // We are not sure to have 9 RecHits so need to check eta and phi:
1095  float s4s9_tmp[4];
1096  for (int i = 0; i < 4; i++)
1097  s4s9_tmp[i] = 0;
1098 
1099  int ixSeed = seed_id.ix();
1100  int iySeed = seed_id.iy();
1101  float e3x3 = 0;
1102  float e5x5 = 0;
1103 
1104  for (unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
1105  EEDetId det_this = (EEDetId)RecHitsInWindow[j].id();
1106  int dx = ixSeed - det_this.ix();
1107  int dy = iySeed - det_this.iy();
1108 
1109  float en = RecHitsInWindow[j].energy();
1110 
1111  if (dx <= 0 && dy <= 0)
1112  s4s9_tmp[0] += en;
1113  if (dx >= 0 && dy <= 0)
1114  s4s9_tmp[1] += en;
1115  if (dx <= 0 && dy >= 0)
1116  s4s9_tmp[2] += en;
1117  if (dx >= 0 && dy >= 0)
1118  s4s9_tmp[3] += en;
1119 
1120  if (std::abs(dx) <= 1 && std::abs(dy) <= 1)
1121  e3x3 += en;
1122  if (std::abs(dx) <= 2 && std::abs(dy) <= 2)
1123  e5x5 += en;
1124  }
1125 
1126  if (e3x3 <= 0)
1127  continue;
1128 
1129  eClusEndCap.push_back(simple_energy);
1130  etClusEndCap.push_back(et_s);
1131  etaClusEndCap.push_back(clus_pos.eta());
1132  thetaClusEndCap.push_back(theta_s);
1133  phiClusEndCap.push_back(clus_pos.phi());
1134  s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1135  s9s25ClusEndCap.push_back(e3x3 / e5x5);
1136  RecHitsClusterEndCap.push_back(RecHitsInWindow);
1137  RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1138 
1139  // std::cout<<" EE pi0 cluster (n,nxt,e,et eta,phi,s4s9)
1140  //"<<nClusEndCap<<" "<<int(RecHitsInWindow.size())<<"
1141  //"<<eClusEndCap[nClusEndCap]<<" "<<" "<<etClusEndCap[nClusEndCap]<<"
1142  //"<<etaClusEndCap[nClusEndCap]<<" "<<phiClusEndCap[nClusEndCap]<<"
1143  //"<<s4s9ClusEndCap[nClusEndCap]<<std::endl;
1144 
1145  nClusEndCap++;
1146  }
1147 
1148  // Selection, based on Simple clustering
1149  // pi0 candidates
1150  int npi0_se = 0;
1151 
1152  for (Int_t i = 0; i < nClusEndCap; i++) {
1153  for (Int_t j = i + 1; j < nClusEndCap; j++) {
1154  if (etClusEndCap[i] > selePtGammaEndCap_ && etClusEndCap[j] > selePtGammaEndCap_ &&
1155  s4s9ClusEndCap[i] > seleS4S9GammaEndCap_ && s4s9ClusEndCap[j] > seleS4S9GammaEndCap_) {
1156  float p0x = etClusEndCap[i] * cos(phiClusEndCap[i]);
1157  float p1x = etClusEndCap[j] * cos(phiClusEndCap[j]);
1158  float p0y = etClusEndCap[i] * sin(phiClusEndCap[i]);
1159  float p1y = etClusEndCap[j] * sin(phiClusEndCap[j]);
1160  float p0z = eClusEndCap[i] * cos(thetaClusEndCap[i]);
1161  float p1z = eClusEndCap[j] * cos(thetaClusEndCap[j]);
1162 
1163  float pt_pair = sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1164  if (pt_pair < selePtPi0EndCap_)
1165  continue;
1166  float m_inv = sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1167  (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1168 
1169  if ((m_inv < seleMinvMaxPi0EndCap_) && (m_inv > seleMinvMinPi0EndCap_)) {
1170  // New Loop on cluster to measure isolation:
1171  vector<int> IsoClus;
1172  IsoClus.clear();
1173  float Iso = 0;
1174  TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1175  for (Int_t k = 0; k < nClusEndCap; k++) {
1176  if (etClusEndCap[k] < ptMinForIsolationEndCap_)
1177  continue;
1178 
1179  if (k == i || k == j)
1180  continue;
1181 
1182  TVector3 clusVect = TVector3(etClusEndCap[k] * cos(phiClusEndCap[k]),
1183  etClusEndCap[k] * sin(phiClusEndCap[k]),
1184  eClusEndCap[k] * cos(thetaClusEndCap[k]));
1185  float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1186  float drcl = clusVect.DeltaR(pairVect);
1187 
1188  if (drcl < selePi0BeltDREndCap_ && dretacl < selePi0BeltDetaEndCap_) {
1189  Iso = Iso + etClusEndCap[k];
1190  IsoClus.push_back(k);
1191  }
1192  }
1193 
1194  if (Iso / pt_pair < selePi0IsoEndCap_) {
1195  // cout <<" EE Simple Clustering: pi0 Candidate pt, eta, phi,
1196  // Iso, m_inv, i, j : "<<pt_pair<<" "<<pairVect.Eta()<<"
1197  // "<<pairVect.Phi()<<" "<<Iso<<" "<<m_inv<<" "<<i<<" "<<j<<"
1198  // "<<endl;
1199 
1200  hMinvPi0EE_->Fill(m_inv);
1201  hPt1Pi0EE_->Fill(etClusEndCap[i]);
1202  hPt2Pi0EE_->Fill(etClusEndCap[j]);
1203  hPtPi0EE_->Fill(pt_pair);
1204  hIsoPi0EE_->Fill(Iso / pt_pair);
1205  hS4S91Pi0EE_->Fill(s4s9ClusEndCap[i]);
1206  hS4S92Pi0EE_->Fill(s4s9ClusEndCap[j]);
1207 
1208  npi0_se++;
1209  }
1210  }
1211  }
1212  } // End of the "j" loop over Simple Clusters
1213  } // End of the "i" loop over Simple Clusters
1214 
1215  // cout<<" (Simple Clustering) EE Pi0 candidates #:
1216  // "<<npi0_se<<endl;
1217 
1218  } // rhEEpi0
1219  } // isMonEEpi0
1220 
1221  //================End of Pi0 endcap=======================//
1222 
1223  //================ Eta in EE===============================//
1224 
1225  // fill pi0 EE histos
1226  if (isMonEEeta_) {
1227  if (rhEEeta.isValid() && (!rhEEeta->empty())) {
1228  const EcalRecHitCollection *hitCollection_ee = rhEEeta.product();
1229  float etot = 0;
1230 
1231  detIdEERecHits.clear();
1232  EERecHits.clear();
1233 
1234  std::vector<EcalRecHit> seedsEndCap;
1235  seedsEndCap.clear();
1236 
1237  vector<EEDetId> usedXtalsEndCap;
1238  usedXtalsEndCap.clear();
1239 
1242  for (ite = rhEEeta->begin(); ite != rhEEeta->end(); ite++) {
1243  double energy = ite->energy();
1245  continue;
1246 
1247  EEDetId det = ite->id();
1248  EEDetId id(ite->id());
1249 
1250  detIdEERecHits.push_back(det);
1251  EERecHits.push_back(*ite);
1252 
1253  hiXDistrEEeta_->Fill(id.ix());
1254  hiYDistrEEeta_->Fill(id.iy());
1255  hRechitEnergyEEeta_->Fill(ite->energy());
1256 
1257  if (energy > clusSeedThrEndCap_)
1258  seedsEndCap.push_back(*ite);
1259 
1260  etot += ite->energy();
1261  } // EE rechits
1262 
1263  hNRecHitsEEeta_->Fill(rhEEeta->size());
1264  hMeanRecHitEnergyEEeta_->Fill(etot / rhEEeta->size());
1265  hEventEnergyEEeta_->Fill(etot);
1266 
1267  // cout << " EE RH Eta collection: #, mean rh_e, event E
1268  // "<<rhEEeta->size()<<" "<<etot/rhEEeta->size()<<" "<<etot<<endl;
1269 
1270  int nClusEndCap;
1271  vector<float> eClusEndCap;
1272  vector<float> etClusEndCap;
1273  vector<float> etaClusEndCap;
1274  vector<float> thetaClusEndCap;
1275  vector<float> phiClusEndCap;
1276  vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1277  vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1278  vector<float> s4s9ClusEndCap;
1279  vector<float> s9s25ClusEndCap;
1280 
1281  nClusEndCap = 0;
1282 
1283  // Make own simple clusters (3x3, 5x5 or clusPhiSize_ x clusEtaSize_)
1284  sort(seedsEndCap.begin(), seedsEndCap.end(), ecalRecHitGreater);
1285 
1286  for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1287  EEDetId seed_id = itseed->id();
1288  std::vector<EEDetId>::const_iterator usedIds;
1289 
1290  bool seedAlreadyUsed = false;
1291  for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1292  if (*usedIds == seed_id) {
1293  seedAlreadyUsed = true;
1294  break;
1295  }
1296  }
1297 
1298  if (seedAlreadyUsed)
1299  continue;
1300  std::vector<DetId> clus_v = topology_ee->getWindow(seed_id, clusEtaSize_, clusPhiSize_);
1301  std::vector<std::pair<DetId, float>> clus_used;
1302 
1303  vector<EcalRecHit> RecHitsInWindow;
1304  vector<EcalRecHit> RecHitsInWindow5x5;
1305 
1306  float simple_energy = 0;
1307 
1308  for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1309  EEDetId EEdet = *det;
1310 
1311  bool HitAlreadyUsed = false;
1312  for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1313  if (*usedIds == *det) {
1314  HitAlreadyUsed = true;
1315  break;
1316  }
1317  }
1318 
1319  if (HitAlreadyUsed)
1320  continue;
1321 
1322  std::vector<EEDetId>::iterator itdet = find(detIdEERecHits.begin(), detIdEERecHits.end(), EEdet);
1323  if (itdet == detIdEERecHits.end())
1324  continue;
1325 
1326  int nn = int(itdet - detIdEERecHits.begin());
1327  usedXtalsEndCap.push_back(*det);
1328  RecHitsInWindow.push_back(EERecHits[nn]);
1329  clus_used.push_back(std::make_pair(*det, 1));
1330  simple_energy = simple_energy + EERecHits[nn].energy();
1331  }
1332 
1333  if (simple_energy <= 0)
1334  continue;
1335 
1336  math::XYZPoint clus_pos =
1337  posCalculator_.Calculate_Location(clus_used, hitCollection_ee, geometryEE_p, geometryES_p);
1338 
1339  float theta_s = 2. * atan(exp(-clus_pos.eta()));
1340  float et_s = simple_energy * sin(theta_s);
1341  // float p0x_s = simple_energy * sin(theta_s) *
1342  // cos(clus_pos.phi()); float p0y_s = simple_energy * sin(theta_s) *
1343  // sin(clus_pos.phi()); float et_s = sqrt( p0x_s*p0x_s + p0y_s*p0y_s);
1344 
1345  // Compute S4/S9 variable
1346  // We are not sure to have 9 RecHits so need to check eta and phi:
1347  float s4s9_tmp[4];
1348  for (int i = 0; i < 4; i++)
1349  s4s9_tmp[i] = 0;
1350 
1351  int ixSeed = seed_id.ix();
1352  int iySeed = seed_id.iy();
1353  float e3x3 = 0;
1354  float e5x5 = 0;
1355 
1356  for (unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
1357  EEDetId det_this = (EEDetId)RecHitsInWindow[j].id();
1358  int dx = ixSeed - det_this.ix();
1359  int dy = iySeed - det_this.iy();
1360 
1361  float en = RecHitsInWindow[j].energy();
1362 
1363  if (dx <= 0 && dy <= 0)
1364  s4s9_tmp[0] += en;
1365  if (dx >= 0 && dy <= 0)
1366  s4s9_tmp[1] += en;
1367  if (dx <= 0 && dy >= 0)
1368  s4s9_tmp[2] += en;
1369  if (dx >= 0 && dy >= 0)
1370  s4s9_tmp[3] += en;
1371 
1372  if (std::abs(dx) <= 1 && std::abs(dy) <= 1)
1373  e3x3 += en;
1374  if (std::abs(dx) <= 2 && std::abs(dy) <= 2)
1375  e5x5 += en;
1376  }
1377 
1378  if (e3x3 <= 0)
1379  continue;
1380 
1381  eClusEndCap.push_back(simple_energy);
1382  etClusEndCap.push_back(et_s);
1383  etaClusEndCap.push_back(clus_pos.eta());
1384  thetaClusEndCap.push_back(theta_s);
1385  phiClusEndCap.push_back(clus_pos.phi());
1386  s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1387  s9s25ClusEndCap.push_back(e3x3 / e5x5);
1388  RecHitsClusterEndCap.push_back(RecHitsInWindow);
1389  RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1390 
1391  // std::cout<<" EE Eta cluster (n,nxt,e,et eta,phi,s4s9)
1392  //"<<nClusEndCap<<" "<<int(RecHitsInWindow.size())<<"
1393  //"<<eClusEndCap[nClusEndCap]<<" "<<" "<<etClusEndCap[nClusEndCap]<<"
1394  //"<<etaClusEndCap[nClusEndCap]<<" "<<phiClusEndCap[nClusEndCap]<<"
1395  //"<<s4s9ClusEndCap[nClusEndCap]<<std::endl;
1396 
1397  nClusEndCap++;
1398  }
1399 
1400  // Selection, based on Simple clustering
1401  // pi0 candidates
1402  int npi0_se = 0;
1403 
1404  for (Int_t i = 0; i < nClusEndCap; i++) {
1405  for (Int_t j = i + 1; j < nClusEndCap; j++) {
1406  if (etClusEndCap[i] > selePtGammaEtaEndCap_ && etClusEndCap[j] > selePtGammaEtaEndCap_ &&
1407  s4s9ClusEndCap[i] > seleS4S9GammaEtaEndCap_ && s4s9ClusEndCap[j] > seleS4S9GammaEtaEndCap_) {
1408  float p0x = etClusEndCap[i] * cos(phiClusEndCap[i]);
1409  float p1x = etClusEndCap[j] * cos(phiClusEndCap[j]);
1410  float p0y = etClusEndCap[i] * sin(phiClusEndCap[i]);
1411  float p1y = etClusEndCap[j] * sin(phiClusEndCap[j]);
1412  float p0z = eClusEndCap[i] * cos(thetaClusEndCap[i]);
1413  float p1z = eClusEndCap[j] * cos(thetaClusEndCap[j]);
1414 
1415  float pt_pair = sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1416  if (pt_pair < selePtEtaEndCap_)
1417  continue;
1418  float m_inv = sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1419  (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1420 
1421  if ((m_inv < seleMinvMaxEtaEndCap_) && (m_inv > seleMinvMinEtaEndCap_)) {
1422  // New Loop on cluster to measure isolation:
1423  vector<int> IsoClus;
1424  IsoClus.clear();
1425  float Iso = 0;
1426  TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1427  for (Int_t k = 0; k < nClusEndCap; k++) {
1428  if (etClusEndCap[k] < ptMinForIsolationEtaEndCap_)
1429  continue;
1430 
1431  if (k == i || k == j)
1432  continue;
1433 
1434  TVector3 clusVect = TVector3(etClusEndCap[k] * cos(phiClusEndCap[k]),
1435  etClusEndCap[k] * sin(phiClusEndCap[k]),
1436  eClusEndCap[k] * cos(thetaClusEndCap[k]));
1437  float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1438  float drcl = clusVect.DeltaR(pairVect);
1439 
1440  if (drcl < seleEtaBeltDREndCap_ && dretacl < seleEtaBeltDetaEndCap_) {
1441  Iso = Iso + etClusEndCap[k];
1442  IsoClus.push_back(k);
1443  }
1444  }
1445 
1446  if (Iso / pt_pair < seleEtaIsoEndCap_) {
1447  // cout <<" EE Simple Clustering: Eta Candidate pt, eta,
1448  // phi, Iso, m_inv, i, j : "<<pt_pair<<" "<<pairVect.Eta()<<"
1449  //"<<pairVect.Phi()<<" "<<Iso<<" "<<m_inv<<" "<<i<<" "<<j<<"
1450  //"<<endl;
1451 
1452  hMinvEtaEE_->Fill(m_inv);
1453  hPt1EtaEE_->Fill(etClusEndCap[i]);
1454  hPt2EtaEE_->Fill(etClusEndCap[j]);
1455  hPtEtaEE_->Fill(pt_pair);
1456  hIsoEtaEE_->Fill(Iso / pt_pair);
1457  hS4S91EtaEE_->Fill(s4s9ClusEndCap[i]);
1458  hS4S92EtaEE_->Fill(s4s9ClusEndCap[j]);
1459 
1460  npi0_se++;
1461  }
1462  }
1463  }
1464  } // End of the "j" loop over Simple Clusters
1465  } // End of the "i" loop over Simple Clusters
1466 
1467  // cout<<" (Simple Clustering) EE Eta candidates #:
1468  // "<<npi0_se<<endl;
1469 
1470  } // rhEEeta
1471  } // isMonEEeta
1472 
1473  //================End of Pi0 endcap=======================//
1474 
1476 }
1477 
1478 void DQMSourcePi0::convxtalid(Int_t &nphi, Int_t &neta) {
1479  // Barrel only
1480  // Output nphi 0...359; neta 0...84; nside=+1 (for eta>0), or 0 (for eta<0).
1481  // neta will be [-85,-1] , or [0,84], the minus sign indicates the z<0 side.
1482 
1483  if (neta > 0)
1484  neta -= 1;
1485  if (nphi > 359)
1486  nphi = nphi - 360;
1487 
1488 } // end of convxtalid
1489 
1490 int DQMSourcePi0::diff_neta_s(Int_t neta1, Int_t neta2) {
1491  Int_t mdiff;
1492  mdiff = (neta1 - neta2);
1493  return mdiff;
1494 }
1495 
1496 // Calculate the distance in xtals taking into account the periodicity of the
1497 // Barrel
1498 int DQMSourcePi0::diff_nphi_s(Int_t nphi1, Int_t nphi2) {
1499  Int_t mdiff;
1500  if (std::abs(nphi1 - nphi2) < (360 - std::abs(nphi1 - nphi2))) {
1501  mdiff = nphi1 - nphi2;
1502  } else {
1503  mdiff = 360 - std::abs(nphi1 - nphi2);
1504  if (nphi1 > nphi2)
1505  mdiff = -mdiff;
1506  }
1507  return mdiff;
1508 }
DQMSourcePi0::seleMinvMaxEtaEndCap_
double seleMinvMaxEtaEndCap_
Definition: DQMSourcePi0.h:264
DQMSourcePi0::hRechitEnergyEBpi0_
MonitorElement * hRechitEnergyEBpi0_
Energy Distribution of rechits EB (pi0)
Definition: DQMSourcePi0.h:71
DQMSourcePi0::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DQMSourcePi0.cc:131
DQMSourcePi0::hS4S91Pi0EE_
MonitorElement * hS4S91Pi0EE_
S4S9 of the 1st most energetic pi0 photon EE.
Definition: DQMSourcePi0.h:182
DQMSourcePi0::selePi0BeltDetaEndCap_
double selePi0BeltDetaEndCap_
Definition: DQMSourcePi0.h:244
neta
const int neta
Definition: CMTRawAnalyzer.h:423
Handle.h
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
ecalRecHitGreater
bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y)
Definition: DQMSourcePi0.h:27
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
DQMSourcePi0::seleEtaBeltDR_
double seleEtaBeltDR_
Definition: DQMSourcePi0.h:256
DQMSourcePi0::hNRecHitsEEeta_
MonitorElement * hNRecHitsEEeta_
Distribution of number of RecHits EE (eta)
Definition: DQMSourcePi0.h:104
DQMSourcePi0::ptMinForIsolation_
double ptMinForIsolation_
Definition: DQMSourcePi0.h:234
DQMSourcePi0::selePtEta_
double selePtEta_
Definition: DQMSourcePi0.h:249
DQMSourcePi0::hPt2EtaEB_
MonitorElement * hPt2EtaEB_
Pt of the 2nd most energetic Eta photon in EB.
Definition: DQMSourcePi0.h:149
edm::Run
Definition: Run.h:45
BasicCluster.h
DQMSourcePi0::hRechitEnergyEBeta_
MonitorElement * hRechitEnergyEBeta_
Energy Distribution of rechits EB (eta)
Definition: DQMSourcePi0.h:77
DQMSourcePi0::isMonEEeta_
bool isMonEEeta_
Definition: DQMSourcePi0.h:297
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EBDetId.h
EEDetId.h
DQMSourcePi0::hS4S92Pi0EB_
MonitorElement * hS4S92Pi0EB_
S4S9 of the 2nd most energetic pi0 photon.
Definition: DQMSourcePi0.h:191
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMSourcePi0::hMeanRecHitEnergyEEeta_
MonitorElement * hMeanRecHitEnergyEEeta_
Distribution of Mean energy per rechit EE (eta)
Definition: DQMSourcePi0.h:116
DQMSourcePi0::selePtGammaEtaEndCap_
double selePtGammaEtaEndCap_
for eta->gg endcap
Definition: DQMSourcePi0.h:260
edm::SortedCollection< EcalRecHit >
DQMStore.h
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
DQMSourcePi0::EBRecHits
std::vector< EcalRecHit > EBRecHits
Definition: DQMSourcePi0.h:279
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DQMSourcePi0::hiEtaDistrEBpi0_
MonitorElement * hiEtaDistrEBpi0_
Distribution of rechits in iEta (pi0)
Definition: DQMSourcePi0.h:59
DQMSourcePi0::convxtalid
void convxtalid(int &, int &)
Definition: DQMSourcePi0.cc:1478
DQMSourcePi0::seleEtaIsoEndCap_
double seleEtaIsoEndCap_
Definition: DQMSourcePi0.h:267
MonitorAlCaEcalPi0_cfi.posCalcParameters
posCalcParameters
Definition: MonitorAlCaEcalPi0_cfi.py:72
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
DQMSourcePi0::ptMinForIsolationEta_
double ptMinForIsolationEta_
Definition: DQMSourcePi0.h:254
DQMSourcePi0::hNRecHitsEBpi0_
MonitorElement * hNRecHitsEBpi0_
Distribution of number of RecHits EB (pi0)
Definition: DQMSourcePi0.h:95
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
edm::Handle
Definition: AssociativeIterator.h:50
DQMSourcePi0::seleS9S25GammaEtaEndCap_
double seleS9S25GammaEtaEndCap_
Definition: DQMSourcePi0.h:262
DQMSourcePi0::hRechitEnergyEEpi0_
MonitorElement * hRechitEnergyEEpi0_
Energy Distribution of rechits EE (pi0)
Definition: DQMSourcePi0.h:74
DQMSourcePi0::diff_neta_s
int diff_neta_s(int, int)
Definition: DQMSourcePi0.cc:1490
DQMSourcePi0::ptMinForIsolationEtaEndCap_
double ptMinForIsolationEtaEndCap_
Definition: DQMSourcePi0.h:266
EcalBarrel
Definition: EcalSubdetector.h:10
EcalRecHitCollections.h
DQMSourcePi0::hNRecHitsEEpi0_
MonitorElement * hNRecHitsEEpi0_
Distribution of number of RecHits EE (pi0)
Definition: DQMSourcePi0.h:98
DQMSourcePi0::hiPhiDistrEBeta_
MonitorElement * hiPhiDistrEBeta_
Distribution of rechits in iPhi (eta)
Definition: DQMSourcePi0.h:53
DQMSourcePi0::hRechitEnergyEEeta_
MonitorElement * hRechitEnergyEEeta_
Energy Distribution of rechits EE (eta)
Definition: DQMSourcePi0.h:80
DQMSourcePi0::seleEtaBeltDeta_
double seleEtaBeltDeta_
Definition: DQMSourcePi0.h:257
DQMSourcePi0::clusPhiSize_
int clusPhiSize_
Definition: DQMSourcePi0.h:221
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DQMSourcePi0::caloTopoToken_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
Definition: DQMSourcePi0.h:210
DQMSourcePi0::selePtGamma_
double selePtGamma_
Definition: DQMSourcePi0.h:226
DQMSourcePi0::hEventEnergyEEeta_
MonitorElement * hEventEnergyEEeta_
Distribution of total event energy EE (eta)
Definition: DQMSourcePi0.h:92
nphi
const int nphi
Definition: CMTRawAnalyzer.h:424
DQMSourcePi0::seleMinvMaxEta_
double seleMinvMaxEta_
Definition: DQMSourcePi0.h:252
DQMSourcePi0::seleS9S25GammaEta_
double seleS9S25GammaEta_
Definition: DQMSourcePi0.h:251
DQMSourcePi0::hMeanRecHitEnergyEEpi0_
MonitorElement * hMeanRecHitEnergyEEpi0_
Distribution of Mean energy per rechit EE (pi0)
Definition: DQMSourcePi0.h:110
DQMSourcePi0::seleEtaBeltDetaEndCap_
double seleEtaBeltDetaEndCap_
Definition: DQMSourcePi0.h:269
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DQMSourcePi0::selePi0BeltDREndCap_
double selePi0BeltDREndCap_
Definition: DQMSourcePi0.h:243
DQMSourcePi0::hMinvEtaEB_
MonitorElement * hMinvEtaEB_
Eta invariant mass in EB.
Definition: DQMSourcePi0.h:125
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
DQMSourcePi0::productMonitoredEBeta_
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEBeta_
Definition: DQMSourcePi0.h:204
Service.h
DQMSourcePi0::EERecHits
std::vector< EcalRecHit > EERecHits
Definition: DQMSourcePi0.h:282
PositionCalc::Calculate_Location
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
Definition: PositionCalc.h:65
DQMSourcePi0::seleEtaBeltDREndCap_
double seleEtaBeltDREndCap_
Definition: DQMSourcePi0.h:268
DQMSourcePi0::hPt1EtaEE_
MonitorElement * hPt1EtaEE_
Pt of the 1st most energetic Eta photon in EE.
Definition: DQMSourcePi0.h:140
DQMSourcePi0::hEventEnergyEBpi0_
MonitorElement * hEventEnergyEBpi0_
Distribution of total event energy EB (pi0)
Definition: DQMSourcePi0.h:83
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DQMSourcePi0::ptMinForIsolationEndCap_
double ptMinForIsolationEndCap_
Definition: DQMSourcePi0.h:245
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
EcalRecHit.h
DQMSourcePi0::hMinvPi0EB_
MonitorElement * hMinvPi0EB_
Pi0 invariant mass in EB.
Definition: DQMSourcePi0.h:119
dqmdumpme.k
k
Definition: dqmdumpme.py:60
DQMSourcePi0::hPt1EtaEB_
MonitorElement * hPt1EtaEB_
Pt of the 1st most energetic Eta photon in EB.
Definition: DQMSourcePi0.h:137
DQMSourcePi0::hPtEtaEB_
MonitorElement * hPtEtaEB_
Eta Pt in EB.
Definition: DQMSourcePi0.h:161
DQMSourcePi0::prescaleFactor_
unsigned int prescaleFactor_
Monitor every prescaleFactor_ events.
Definition: DQMSourcePi0.h:285
EEDetId
Definition: EEDetId.h:14
DQMSourcePi0::isMonEBeta_
bool isMonEBeta_
Definition: DQMSourcePi0.h:295
DQMSourcePi0::~DQMSourcePi0
~DQMSourcePi0() override
Definition: DQMSourcePi0.cc:128
DQMSourcePi0::hS4S92Pi0EE_
MonitorElement * hS4S92Pi0EE_
S4S9 of the 2nd most energetic pi0 photon EE.
Definition: DQMSourcePi0.h:194
EcalEndcap
Definition: EcalSubdetector.h:10
DQMSourcePi0::hPt2Pi0EE_
MonitorElement * hPt2Pi0EE_
Pt of the 2nd most energetic Pi0 photon in EE.
Definition: DQMSourcePi0.h:146
DQMSourcePi0::hiXDistrEEeta_
MonitorElement * hiXDistrEEeta_
Distribution of rechits in ix EE (eta)
Definition: DQMSourcePi0.h:56
DQMSourcePi0::seleMinvMinPi0EndCap_
double seleMinvMinPi0EndCap_
Definition: DQMSourcePi0.h:240
DQMSourcePi0::hNRecHitsEBeta_
MonitorElement * hNRecHitsEBeta_
Distribution of number of RecHits EB (eta)
Definition: DQMSourcePi0.h:101
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
DQMSourcePi0::detIdEBRecHits
std::vector< EBDetId > detIdEBRecHits
Definition: DQMSourcePi0.h:278
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
DQMSourcePi0::DQMSourcePi0
DQMSourcePi0(const edm::ParameterSet &)
Definition: DQMSourcePi0.cc:45
Event.h
DQMSourcePi0::hMinvPi0EE_
MonitorElement * hMinvPi0EE_
Pi0 invariant mass in EE.
Definition: DQMSourcePi0.h:122
DQMSourcePi0::selePi0IsoEndCap_
double selePi0IsoEndCap_
Definition: DQMSourcePi0.h:242
DQMSourcePi0::hiEtaDistrEBeta_
MonitorElement * hiEtaDistrEBeta_
Distribution of rechits in iEta (eta)
Definition: DQMSourcePi0.h:65
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
DQMSourcePi0::diff_nphi_s
int diff_nphi_s(int, int)
Definition: DQMSourcePi0.cc:1498
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
DQMSourcePi0::hiYDistrEEpi0_
MonitorElement * hiYDistrEEpi0_
Distribution of rechits in iy EE (pi0)
Definition: DQMSourcePi0.h:62
DQMSourcePi0::selePi0BeltDeta_
double selePi0BeltDeta_
Definition: DQMSourcePi0.h:232
DQMSourcePi0::posCalculator_
PositionCalc posCalculator_
Definition: DQMSourcePi0.h:44
DQMSourcePi0::hS4S91EtaEE_
MonitorElement * hS4S91EtaEE_
S4S9 of the 1st most energetic eta photon EE.
Definition: DQMSourcePi0.h:188
PositionCalc
Definition: PositionCalc.h:29
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
DQMSourcePi0::seleMinvMaxPi0_
double seleMinvMaxPi0_
Definition: DQMSourcePi0.h:228
DQMSourcePi0::seleS4S9GammaEndCap_
double seleS4S9GammaEndCap_
Definition: DQMSourcePi0.h:241
DQMSourcePi0::caloGeomToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
Definition: DQMSourcePi0.h:211
DQMSourcePi0.h
DQMSourcePi0::selePtGammaEta_
double selePtGammaEta_
for eta->gg barrel
Definition: DQMSourcePi0.h:248
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
DQMSourcePi0::hPt2Pi0EB_
MonitorElement * hPt2Pi0EB_
Pt of the 2nd most energetic Pi0 photon in EB.
Definition: DQMSourcePi0.h:143
DQMSourcePi0::hiYDistrEEeta_
MonitorElement * hiYDistrEEeta_
Distribution of rechits in iy EE (eta)
Definition: DQMSourcePi0.h:68
DQMSourcePi0::hPtEtaEE_
MonitorElement * hPtEtaEE_
Eta Pt in EE.
Definition: DQMSourcePi0.h:164
DQMSourcePi0::seleXtalMinEnergyEndCap_
double seleXtalMinEnergyEndCap_
Definition: DQMSourcePi0.h:217
PVValHelper::dy
Definition: PVValidationHelpers.h:50
DQMSourcePi0::seleS4S9GammaEtaEndCap_
double seleS4S9GammaEtaEndCap_
Definition: DQMSourcePi0.h:261
edm::EventSetup
Definition: EventSetup.h:58
DQMSourcePi0::folderName_
std::string folderName_
DQM folder name.
Definition: DQMSourcePi0.h:288
CaloSubdetectorTopology
Definition: CaloSubdetectorTopology.h:17
DQMSourcePi0::selePtPi0EndCap_
double selePtPi0EndCap_
Definition: DQMSourcePi0.h:238
DQMSourcePi0::hPtPi0EE_
MonitorElement * hPtPi0EE_
Pi0 Pt in EE.
Definition: DQMSourcePi0.h:158
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
DQMSourcePi0::clusSeedThrEndCap_
double clusSeedThrEndCap_
Definition: DQMSourcePi0.h:223
DQMSourcePi0::hMinvEtaEE_
MonitorElement * hMinvEtaEE_
Eta invariant mass in EE.
Definition: DQMSourcePi0.h:128
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
DQMSourcePi0::seleXtalMinEnergy_
double seleXtalMinEnergy_
Definition: DQMSourcePi0.h:216
DQMSourcePi0::seleS4S9Gamma_
double seleS4S9Gamma_
Definition: DQMSourcePi0.h:230
DQMSourcePi0::hS4S92EtaEE_
MonitorElement * hS4S92EtaEE_
S4S9 of the 2nd most energetic eta photon EE.
Definition: DQMSourcePi0.h:200
DQMSourcePi0::hS4S91Pi0EB_
MonitorElement * hS4S91Pi0EB_
S4S9 of the 1st most energetic pi0 photon.
Definition: DQMSourcePi0.h:179
DQMSourcePi0::hEventEnergyEBeta_
MonitorElement * hEventEnergyEBeta_
Distribution of total event energy EB (eta)
Definition: DQMSourcePi0.h:89
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
CaloSubdetectorTopology::getWindow
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Definition: CaloSubdetectorTopology.cc:4
DQMSourcePi0::clusSeedThr_
double clusSeedThr_
Definition: DQMSourcePi0.h:219
EcalPreshower
Definition: EcalSubdetector.h:10
DQMSourcePi0::selePtEtaEndCap_
double selePtEtaEndCap_
Definition: DQMSourcePi0.h:263
DQMSourcePi0::productMonitoredEBpi0_
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEBpi0_
object to monitor
Definition: DQMSourcePi0.h:203
DQMSourcePi0::seleMinvMinEtaEndCap_
double seleMinvMinEtaEndCap_
Definition: DQMSourcePi0.h:265
DQMSourcePi0::fileName_
std::string fileName_
Output file name if required.
Definition: DQMSourcePi0.h:300
std
Definition: JetResolutionObject.h:76
DQMSourcePi0::productMonitoredEEeta_
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEeta_
Definition: DQMSourcePi0.h:208
RecoEcalCandidate.h
DetachedQuadStep_cff.seeds
seeds
Definition: DetachedQuadStep_cff.py:195
DQMSourcePi0::hMeanRecHitEnergyEBpi0_
MonitorElement * hMeanRecHitEnergyEBpi0_
Distribution of Mean energy per rechit EB (pi0)
Definition: DQMSourcePi0.h:107
DetId.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
DQMSourcePi0::selePi0Iso_
double selePi0Iso_
Definition: DQMSourcePi0.h:233
DQMSourcePi0::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: DQMSourcePi0.cc:307
DQMSourcePi0::saveToFile_
bool saveToFile_
Write to file.
Definition: DQMSourcePi0.h:291
DQMSourcePi0::hIsoPi0EE_
MonitorElement * hIsoPi0EE_
Pi0 Iso EE.
Definition: DQMSourcePi0.h:170
Point3D.h
DQMSourcePi0::selePi0BeltDR_
double selePi0BeltDR_
Definition: DQMSourcePi0.h:231
EventSetup.h
DQMSourcePi0::hIsoEtaEE_
MonitorElement * hIsoEtaEE_
Eta Iso EE.
Definition: DQMSourcePi0.h:176
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DQMSourcePi0::hMeanRecHitEnergyEBeta_
MonitorElement * hMeanRecHitEnergyEBeta_
Distribution of Mean energy per rechit EB (eta)
Definition: DQMSourcePi0.h:113
DQMSourcePi0::hEventEnergyEEpi0_
MonitorElement * hEventEnergyEEpi0_
Distribution of total event energy EE (pi0)
Definition: DQMSourcePi0.h:86
DQMSourcePi0::hIsoPi0EB_
MonitorElement * hIsoPi0EB_
Pi0 Iso EB.
Definition: DQMSourcePi0.h:167
dqm::implementation::IBooker
Definition: DQMStore.h:43
RecoEcalCandidateFwd.h
DQMSourcePi0::selePtGammaEndCap_
double selePtGammaEndCap_
for pi0->gg endcap
Definition: DQMSourcePi0.h:237
DQMSourcePi0::productMonitoredEEpi0_
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEpi0_
object to monitor
Definition: DQMSourcePi0.h:207
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
DQMSourcePi0::hiPhiDistrEBpi0_
MonitorElement * hiPhiDistrEBpi0_
Distribution of rechits in iPhi (pi0)
Definition: DQMSourcePi0.h:47
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
DQMSourcePi0::detIdEERecHits
std::vector< EEDetId > detIdEERecHits
Definition: DQMSourcePi0.h:281
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
DQMSourcePi0::hPt2EtaEE_
MonitorElement * hPt2EtaEE_
Pt of the 2nd most energetic Eta photon in EE.
Definition: DQMSourcePi0.h:152
DQMSourcePi0::isMonEEpi0_
bool isMonEEpi0_
Definition: DQMSourcePi0.h:296
DQMSourcePi0::selePtPi0_
double selePtPi0_
Definition: DQMSourcePi0.h:227
DQMSourcePi0::clusEtaSize_
int clusEtaSize_
Definition: DQMSourcePi0.h:220
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
DQMSourcePi0::seleMinvMinPi0_
double seleMinvMinPi0_
Definition: DQMSourcePi0.h:229
DQMSourcePi0::seleEtaIso_
double seleEtaIso_
Definition: DQMSourcePi0.h:255
edm::Event
Definition: Event.h:73
DQMSourcePi0::seleMinvMaxPi0EndCap_
double seleMinvMaxPi0EndCap_
Definition: DQMSourcePi0.h:239
DQMSourcePi0::eventCounter_
int eventCounter_
Definition: DQMSourcePi0.h:43
DQMSourcePi0::seleS4S9GammaEta_
double seleS4S9GammaEta_
Definition: DQMSourcePi0.h:250
DQMSourcePi0::hiXDistrEEpi0_
MonitorElement * hiXDistrEEpi0_
Distribution of rechits in ix EE (pi0)
Definition: DQMSourcePi0.h:50
DQMSourcePi0::hPtPi0EB_
MonitorElement * hPtPi0EB_
Pi0 Pt in EB.
Definition: DQMSourcePi0.h:155
DQMSourcePi0::hIsoEtaEB_
MonitorElement * hIsoEtaEB_
Eta Iso EB.
Definition: DQMSourcePi0.h:173
DQMSourcePi0::hPt1Pi0EE_
MonitorElement * hPt1Pi0EE_
Pt of the 1st most energetic Pi0 photon in EE.
Definition: DQMSourcePi0.h:134
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
DQMSourcePi0::seleMinvMinEta_
double seleMinvMinEta_
Definition: DQMSourcePi0.h:253
DQMSourcePi0::isMonEBpi0_
bool isMonEBpi0_
which subdet will be monitored
Definition: DQMSourcePi0.h:294
edm::InputTag
Definition: InputTag.h:15
PVValHelper::dx
Definition: PVValidationHelpers.h:49
DQMSourcePi0::hPt1Pi0EB_
MonitorElement * hPt1Pi0EB_
Pt of the 1st most energetic Pi0 photon in EB.
Definition: DQMSourcePi0.h:131
DQMSourcePi0::hS4S92EtaEB_
MonitorElement * hS4S92EtaEB_
S4S9 of the 2nd most energetic eta photon.
Definition: DQMSourcePi0.h:197
DQMSourcePi0::hS4S91EtaEB_
MonitorElement * hS4S91EtaEB_
S4S9 of the 1st most energetic eta photon.
Definition: DQMSourcePi0.h:185
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
edm::SortedCollection::empty
bool empty() const
Definition: SortedCollection.h:210