CMS 3D CMS Logo

EcalSimHitStudy.cc
Go to the documentation of this file.
3 
8 
13 
16 
22 
29 
33 
34 #include <TH1F.h>
35 #include <TH2F.h>
36 #include <cmath>
37 #include <iostream>
38 #include <fstream>
39 #include <map>
40 #include <memory>
41 #include <string>
42 #include <vector>
43 
44 //#define EDM_ML_DEBUG
45 
46 class EcalSimHitStudy : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
47 public:
49  ~EcalSimHitStudy() override {}
50  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
51 
52 protected:
53  void beginJob() override;
54  void analyze(edm::Event const&, edm::EventSetup const&) override;
55  void beginRun(edm::Run const&, edm::EventSetup const&) override {}
56  void endRun(edm::Run const&, edm::EventSetup const&) override {}
57  void analyzeHits(std::vector<PCaloHit>&, int);
58 
59 private:
60  struct EcalHit {
61  uint16_t id;
62  double time, energy;
63  EcalHit(uint16_t i = 0, double t = 0, double e = 0) : id(i), time(t), energy(e) {}
64  };
65  static const int ndets_ = 2;
69  double maxEnergy_, tmax_, w0_;
70  int selX_;
79 };
80 
82  usesResource(TFileService::kSharedResource);
83 
84  g4Label_ = ps.getUntrackedParameter<std::string>("ModuleLabel", "g4SimHits");
85  hitLab_[0] = ps.getUntrackedParameter<std::string>("EBCollection", "EcalHitsEB");
86  hitLab_[1] = ps.getUntrackedParameter<std::string>("EECollection", "EcalHitsEE");
87  tok_evt_ =
88  consumes<edm::HepMCProduct>(edm::InputTag(ps.getUntrackedParameter<std::string>("SourceLabel", "VtxSmeared")));
89  maxEnergy_ = ps.getUntrackedParameter<double>("MaxEnergy", 200.0);
90  tmax_ = ps.getUntrackedParameter<double>("TimeCut", 100.0);
91  w0_ = ps.getUntrackedParameter<double>("W0", 4.7);
92  selX_ = ps.getUntrackedParameter<int>("SelectX", -1);
93 
94  for (int i = 0; i < ndets_; ++i)
95  toks_calo_[i] = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hitLab_[i]));
96 
97  edm::LogVerbatim("HitStudy") << "Module Label: " << g4Label_ << " Hits: " << hitLab_[0] << ", " << hitLab_[1]
98  << " MaxEnergy: " << maxEnergy_ << " Tmax: " << tmax_ << " Select " << selX_;
99 }
100 
103  desc.addUntracked<std::string>("ModuleLabel", "g4SimHits");
104  desc.addUntracked<std::string>("EBCollection", "EcalHitsEB");
105  desc.addUntracked<std::string>("EECollection", "EcalHitsEE");
106  desc.addUntracked<std::string>("SourceLabel", "VtxSmeared");
107  desc.addUntracked<double>("MaxEnergy", 200.0);
108  desc.addUntracked<double>("TimeCut", 100.0);
109  desc.addUntracked<int>("SelectX", -1);
110  descriptions.add("EcalSimHitStudy", desc);
111 }
112 
115  if (!tfile.isAvailable())
116  throw cms::Exception("BadConfig") << "TFileService unavailable: "
117  << "please add it to config file";
118  char name[20], title[120];
119  sprintf(title, "Incident PT (GeV)");
120  ptInc_ = tfile->make<TH1F>("PtInc", title, 1000, 0., maxEnergy_);
121  ptInc_->GetXaxis()->SetTitle(title);
122  ptInc_->GetYaxis()->SetTitle("Events");
123  sprintf(title, "Incident Energy (GeV)");
124  eneInc_ = tfile->make<TH1F>("EneInc", title, 1000, 0., maxEnergy_);
125  eneInc_->GetXaxis()->SetTitle(title);
126  eneInc_->GetYaxis()->SetTitle("Events");
127  sprintf(title, "Incident #eta");
128  etaInc_ = tfile->make<TH1F>("EtaInc", title, 200, -5., 5.);
129  etaInc_->GetXaxis()->SetTitle(title);
130  etaInc_->GetYaxis()->SetTitle("Events");
131  sprintf(title, "Incident #phi");
132  phiInc_ = tfile->make<TH1F>("PhiInc", title, 200, -3.1415926, 3.1415926);
133  phiInc_->GetXaxis()->SetTitle(title);
134  phiInc_->GetYaxis()->SetTitle("Events");
135  std::string dets[ndets_] = {"EB", "EE"};
136  for (int i = 0; i < ndets_; i++) {
137  sprintf(name, "Hit%d", i);
138  sprintf(title, "Number of hits in %s", dets[i].c_str());
139  hit_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 20000.);
140  hit_[i]->GetXaxis()->SetTitle(title);
141  hit_[i]->GetYaxis()->SetTitle("Events");
142  hit_[i]->Sumw2();
143  sprintf(name, "Time%d", i);
144  sprintf(title, "Time of the hit (ns) in %s", dets[i].c_str());
145  time_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 1000.);
146  time_[i]->GetXaxis()->SetTitle(title);
147  time_[i]->GetYaxis()->SetTitle("Hits");
148  time_[i]->Sumw2();
149  sprintf(name, "TimeAll%d", i);
150  sprintf(title, "Hit time (ns) in %s (for first hit in the cell)", dets[i].c_str());
151  timeAll_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 1000.);
152  timeAll_[i]->GetXaxis()->SetTitle(title);
153  timeAll_[i]->GetYaxis()->SetTitle("Hits");
154  timeAll_[i]->Sumw2();
155  sprintf(name, "Edep%d", i);
156  sprintf(title, "Energy deposit (GeV) in %s", dets[i].c_str());
157  edep_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
158  edep_[i]->GetXaxis()->SetTitle(title);
159  edep_[i]->GetYaxis()->SetTitle("Hits");
160  edep_[i]->Sumw2();
161  sprintf(name, "EdepAll%d", i);
162  sprintf(title, "Total Energy deposit in the cell (GeV) in %s", dets[i].c_str());
163  edepAll_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
164  edepAll_[i]->GetXaxis()->SetTitle(title);
165  edepAll_[i]->GetYaxis()->SetTitle("Hits");
166  edepAll_[i]->Sumw2();
167  sprintf(name, "EdepEM%d", i);
168  sprintf(title, "Energy deposit (GeV) by EM particles in %s", dets[i].c_str());
169  edepEM_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
170  edepEM_[i]->GetXaxis()->SetTitle(title);
171  edepEM_[i]->GetYaxis()->SetTitle("Hits");
172  edepEM_[i]->Sumw2();
173  sprintf(name, "EdepHad%d", i);
174  sprintf(title, "Energy deposit (GeV) by hadrons in %s", dets[i].c_str());
175  edepHad_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
176  edepHad_[i]->GetXaxis()->SetTitle(title);
177  edepHad_[i]->GetYaxis()->SetTitle("Hits");
178  edepHad_[i]->Sumw2();
179  sprintf(name, "Etot%d", i);
180  sprintf(title, "Total energy deposit (GeV) in %s", dets[i].c_str());
181  etot_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
182  etot_[i]->GetXaxis()->SetTitle(title);
183  etot_[i]->GetYaxis()->SetTitle("Events");
184  etot_[i]->Sumw2();
185  sprintf(name, "EtotG%d", i);
186  sprintf(title, "Total energy deposit (GeV) in %s (t < 100 ns)", dets[i].c_str());
187  etotg_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
188  etotg_[i]->GetXaxis()->SetTitle(title);
189  etotg_[i]->GetYaxis()->SetTitle("Events");
190  etotg_[i]->Sumw2();
191  sprintf(name, "r1by9%d", i);
192  sprintf(title, "E1/E9 in %s", dets[i].c_str());
193  r1by9_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
194  r1by9_[i]->GetXaxis()->SetTitle(title);
195  r1by9_[i]->GetYaxis()->SetTitle("Events");
196  r1by9_[i]->Sumw2();
197  sprintf(name, "r1by25%d", i);
198  sprintf(title, "E1/E25 in %s", dets[i].c_str());
199  r1by25_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
200  r1by25_[i]->GetXaxis()->SetTitle(title);
201  r1by25_[i]->GetYaxis()->SetTitle("Events");
202  r1by25_[i]->Sumw2();
203  sprintf(name, "r9by25%d", i);
204  sprintf(title, "E9/E25 in %s", dets[i].c_str());
205  r9by25_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
206  r9by25_[i]->GetXaxis()->SetTitle(title);
207  r9by25_[i]->GetYaxis()->SetTitle("Events");
208  r9by25_[i]->Sumw2();
209  double ymax = (i == 0) ? 0.0005 : 0.005;
210  sprintf(name, "sEtaEta%d", i);
211  sprintf(title, "Cov(#eta,#eta) in %s", dets[i].c_str());
212  sEtaEta_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
213  sEtaEta_[i]->GetXaxis()->SetTitle(title);
214  sEtaEta_[i]->GetYaxis()->SetTitle("Events");
215  sEtaEta_[i]->Sumw2();
216  sprintf(name, "sEtaPhi%d", i);
217  sprintf(title, "Cov(#eta,#phi) in %s", dets[i].c_str());
218  sEtaPhi_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
219  sEtaPhi_[i]->GetXaxis()->SetTitle(title);
220  sEtaPhi_[i]->GetYaxis()->SetTitle("Events");
221  sEtaPhi_[i]->Sumw2();
222  ymax = (i == 0) ? 0.001 : 0.01;
223  sprintf(name, "sPhiPhi%d", i);
224  sprintf(title, "Cov(#phi,#phi) in %s", dets[i].c_str());
225  sPhiPhi_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
226  sPhiPhi_[i]->GetXaxis()->SetTitle(title);
227  sPhiPhi_[i]->GetYaxis()->SetTitle("Events");
228  sPhiPhi_[i]->Sumw2();
229  if (i == 0) {
230  sprintf(title, "%s+", dets[i].c_str());
231  poszp_[i] = tfile->make<TH2F>("poszp0", title, 100, 0, 100, 360, 0, 360);
232  poszp_[i]->GetXaxis()->SetTitle("i#eta");
233  poszp_[i]->GetYaxis()->SetTitle("i#phi");
234  sprintf(title, "%s-", dets[i].c_str());
235  poszn_[i] = tfile->make<TH2F>("poszn0", title, 100, 0, 100, 360, 0, 360);
236  poszn_[i]->GetXaxis()->SetTitle("i#eta");
237  poszn_[i]->GetYaxis()->SetTitle("i#phi");
238  } else {
239  sprintf(title, "%s+", dets[i].c_str());
240  poszp_[i] = tfile->make<TH2F>("poszp1", title, 100, -200, 200, 100, -200, 200);
241  poszp_[i]->GetXaxis()->SetTitle("x (cm)");
242  poszp_[i]->GetYaxis()->SetTitle("y (cm)");
243  sprintf(title, "%s-", dets[i].c_str());
244  poszn_[i] = tfile->make<TH2F>("poszn1", title, 100, -200, 200, 100, -200, 200);
245  poszn_[i]->GetXaxis()->SetTitle("x (cm)");
246  poszn_[i]->GetYaxis()->SetTitle("y (cm)");
247  }
248  poszp_[i]->GetYaxis()->SetTitleOffset(1.2);
249  poszp_[i]->Sumw2();
250  poszn_[i]->GetYaxis()->SetTitleOffset(1.2);
251  poszn_[i]->Sumw2();
252  }
253 }
254 
256 #ifdef EDM_ML_DEBUG
257  edm::LogVerbatim("HitStudy") << "Run = " << e.id().run() << " Event = " << e.id().event();
258 #endif
259  // get handles to calogeometry
261  iS.get<CaloGeometryRecord>().get(pG);
262  geometry_ = pG.product();
263 
264  double eInc = 0, etaInc = 0, phiInc = 0;
265  int type(-1);
267  e.getByToken(tok_evt_, EvtHandle);
268  if (EvtHandle.isValid()) {
269  const HepMC::GenEvent* myGenEvent = EvtHandle->GetEvent();
270 
271  HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
272  if (p != myGenEvent->particles_end()) {
273  eInc = (*p)->momentum().e();
274  etaInc = (*p)->momentum().eta();
275  phiInc = (*p)->momentum().phi();
276  }
277  double ptInc = eInc / std::cosh(etaInc);
278  ptInc_->Fill(ptInc);
279  eneInc_->Fill(eInc);
280  etaInc_->Fill(etaInc);
281  phiInc_->Fill(phiInc);
282 
283  if (std::abs(etaInc) < 1.46)
284  type = 0;
285  else if (std::abs(etaInc) > 1.49 && std::abs(etaInc) < 3.0)
286  type = 1;
287  }
288 
289  int typeMin = (type < 0) ? 0 : type;
290  int typeMax = (type < 0) ? 1 : type;
291  for (int type = typeMin; type <= typeMax; ++type) {
293  e.getByToken(toks_calo_[type], hitsCalo);
294  bool getHits = (hitsCalo.isValid());
295 #ifdef EDM_ML_DEBUG
296  edm::LogVerbatim("HitStudy") << "EcalSimHitStudy: Input flags Hits " << getHits << " with " << hitsCalo->size()
297  << " hits";
298 #endif
299  if (getHits) {
300  std::vector<PCaloHit> caloHits;
301  caloHits.insert(caloHits.end(), hitsCalo->begin(), hitsCalo->end());
302  if (!caloHits.empty())
303  analyzeHits(caloHits, type);
304  }
305  }
306 }
307 
308 void EcalSimHitStudy::analyzeHits(std::vector<PCaloHit>& hits, int indx) {
309  unsigned int nEC(0);
310  std::map<unsigned int, EcalHit> hitMap;
311  double etot(0), etotG(0);
312  for (auto hit : hits) {
313  double edep = hit.energy();
314  double time = hit.time();
315  unsigned int id_ = hit.id();
316  double edepEM = hit.energyEM();
317  double edepHad = hit.energyHad();
318  if (indx == 0) {
319  if ((hit.depth() == 1) || (hit.depth() == 2))
320  continue;
321  }
322  if (time <= tmax_) {
323  auto it = hitMap.find(id_);
324  if (it == hitMap.end()) {
325  uint16_t dep = hit.depth();
326  hitMap[id_] = EcalHit(dep, time, edep);
327  } else {
328  (it->second).energy += edep;
329  }
330  etotG += edep;
331  ++nEC;
332  }
333  time_[indx]->Fill(time);
334  edep_[indx]->Fill(edep);
335  edepEM_[indx]->Fill(edepEM);
336  edepHad_[indx]->Fill(edepHad);
337  etot += edep;
338  }
339 
340  double edepM(0);
341  unsigned int idM(0);
342  uint16_t depM(0);
343  for (auto it : hitMap) {
344  if (it.second.energy > edepM) {
345  idM = it.first;
346  edepM = it.second.energy;
347  depM = it.second.id;
348  }
349  }
350 
351  bool select(true);
352  if (selX_ >= 0) {
353  if ((depM & 0X4) != 0)
354  select = (selX_ > 0);
355  else
356  select = (selX_ == 0);
357  }
358 #ifdef EDM_ML_DEBUG
359  edm::LogVerbatim("HitStudy") << "EcalSimHitStudy::analyzeHits: Index " << indx << " Emax " << edepM << " IDMax "
360  << std::hex << idM << ":" << depM << std::dec << " Select " << select << ":" << selX_
361  << " Hits " << hits.size() << ":" << nEC << ":" << hitMap.size() << " ETotal " << etot
362  << ":" << etotG;
363 #endif
364  if (select) {
365  etot_[indx]->Fill(etot);
366  etotg_[indx]->Fill(etotG);
367  hit_[indx]->Fill(double(nEC));
368  for (auto it : hitMap) {
369  timeAll_[indx]->Fill((it.second).time);
370  edepAll_[indx]->Fill((it.second).energy);
371  DetId id(it.first);
372  if (indx == 0) {
373  if (EBDetId(id).zside() >= 0)
374  poszp_[indx]->Fill(EBDetId(id).ietaAbs(), EBDetId(id).iphi());
375  else
376  poszn_[indx]->Fill(EBDetId(id).ietaAbs(), EBDetId(id).iphi());
377  } else {
378  GlobalPoint gpos = geometry_->getGeometry(id)->getPosition();
379  if (EEDetId(id).zside() >= 0)
380  poszp_[indx]->Fill(gpos.x(), gpos.y());
381  else
382  poszn_[indx]->Fill(gpos.x(), gpos.y());
383  }
384  }
385 
386  math::XYZVector meanPosition(0.0, 0.0, 0.0);
387  std::vector<math::XYZVector> position;
388  std::vector<double> energy;
389  double e9(0), e25(0);
390  for (auto it : hitMap) {
391  DetId id(it.first);
392  int deta(99), dphi(99), dz(0);
393  if (indx == 0) {
394  deta = std::abs(EBDetId(id).ietaAbs() - EBDetId(idM).ietaAbs());
395  dphi = std::abs(EBDetId(id).iphi() - EBDetId(idM).iphi());
396  if (dphi > 180)
397  dphi = std::abs(dphi - 360);
398  dz = std::abs(EBDetId(id).zside() - EBDetId(idM).zside());
399  } else {
400  deta = std::abs(EEDetId(id).ix() - EEDetId(idM).ix());
401  dphi = std::abs(EEDetId(id).iy() - EEDetId(idM).iy());
402  dz = std::abs(EEDetId(id).zside() - EEDetId(idM).zside());
403  }
404  if (deta <= 1 && dphi <= 1 && dz < 1)
405  e9 += (it.second).energy;
406  if (deta <= 2 && dphi <= 2 && dz < 1) {
407  e25 += (it.second).energy;
408  GlobalPoint gpos = geometry_->getGeometry(id)->getPosition();
409  math::XYZVector pos(gpos.x(), gpos.y(), gpos.z());
410  meanPosition += (it.second).energy * pos;
411  position.push_back(pos);
412  energy.push_back((it.second).energy);
413  }
414  }
415  double r1by9 = (e9 > 0) ? (edepM / e9) : -1;
416  double r1by25 = (e25 > 0) ? (edepM / e25) : -1;
417  double r9by25 = (e25 > 0) ? (e9 / e25) : -1;
418 
419  meanPosition /= e25;
420  double denom(0), numEtaEta(0), numEtaPhi(0), numPhiPhi(0);
421  for (unsigned int k = 0; k < position.size(); ++k) {
422  double dEta = position[k].eta() - meanPosition.eta();
423  double dPhi = position[k].phi() - meanPosition.phi();
424  if (dPhi > +M_PI) {
425  dPhi = 2 * M_PI - dPhi;
426  }
427  if (dPhi < -M_PI) {
428  dPhi = 2 * M_PI + dPhi;
429  }
430 
431  double w = std::max(0.0, (w0_ + std::log(energy[k] / e25)));
432  denom += w;
433  numEtaEta += std::abs(w * dEta * dEta);
434  numEtaPhi += std::abs(w * dEta * dPhi);
435  numPhiPhi += std::abs(w * dPhi * dPhi);
436 #ifdef EDM_ML_DEBUG
437  edm::LogVerbatim("HitStudy") << "[" << k << "] dEta " << dEta << " dPhi " << dPhi << " Wt " << energy[k] / e25
438  << ":" << std::log(energy[k] / e25) << ":" << w;
439 #endif
440  }
441  double sEtaEta = (denom > 0) ? (numEtaEta / denom) : -1.0;
442  double sEtaPhi = (denom > 0) ? (numEtaPhi / denom) : -1.0;
443  double sPhiPhi = (denom > 0) ? (numPhiPhi / denom) : -1.0;
444 
445 #ifdef EDM_ML_DEBUG
446  edm::LogVerbatim("HitStudy") << "EcalSimHitStudy::Ratios " << r1by9 << " : " << r1by25 << " : " << r9by25
447  << " Covariances " << sEtaEta << " : " << sEtaPhi << " : " << sPhiPhi;
448 #endif
449  r1by9_[indx]->Fill(r1by9);
450  r1by25_[indx]->Fill(r1by25);
451  r9by25_[indx]->Fill(r9by25);
452  sEtaEta_[indx]->Fill(sEtaEta);
453  sEtaPhi_[indx]->Fill(sEtaPhi);
454  sPhiPhi_[indx]->Fill(sPhiPhi);
455  }
456 }
457 
458 //define this as a plug-in
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
makePileupJSON.denom
denom
Definition: makePileupJSON.py:147
ESHandle.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
edm::EDGetTokenT< edm::HepMCProduct >
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pos
Definition: PixelAliasList.h:18
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
PSimHitContainer.h
EBDetId.h
EEDetId.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalSimHitStudy::edepHad_
TH1F * edepHad_[ndets_]
Definition: EcalSimHitStudy.cc:74
EcalSimHitStudy::poszp_
TH2F * poszp_[ndets_]
Definition: EcalSimHitStudy.cc:78
EcalSimHitStudy::sEtaEta_
TH1F * sEtaEta_[ndets_]
Definition: EcalSimHitStudy.cc:77
EcalSimHitStudy::EcalHit::time
double time
Definition: EcalSimHitStudy.cc:62
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CaloHitID.h
EcalSimHitStudy::edepEM_
TH1F * edepEM_[ndets_]
Definition: EcalSimHitStudy.cc:74
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13702
edm::Handle< edm::HepMCProduct >
EcalSimHitStudy::geometry_
const CaloGeometry * geometry_
Definition: EcalSimHitStudy.cc:71
EcalSimHitStudy::ptInc_
TH1F * ptInc_
Definition: EcalSimHitStudy.cc:72
EcalSimHitStudy::poszn_
TH2F * poszn_[ndets_]
Definition: EcalSimHitStudy.cc:78
EcalSimHitStudy::toks_calo_
edm::EDGetTokenT< edm::PCaloHitContainer > toks_calo_[2]
Definition: EcalSimHitStudy.cc:68
EcalSimHitStudy::analyzeHits
void analyzeHits(std::vector< PCaloHit > &, int)
Definition: EcalSimHitStudy.cc:308
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
EcalSimHitStudy::EcalHit::energy
double energy
Definition: EcalSimHitStudy.cc:62
EcalSimHitStudy::w0_
double w0_
Definition: EcalSimHitStudy.cc:69
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
PSimHit.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
EcalSimHitStudy::tok_evt_
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
Definition: EcalSimHitStudy.cc:67
EcalSimHitStudy::sPhiPhi_
TH1F * sPhiPhi_[ndets_]
Definition: EcalSimHitStudy.cc:77
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EcalSimHitStudy::r9by25_
TH1F * r9by25_[ndets_]
Definition: EcalSimHitStudy.cc:76
EcalSimHitStudy::g4Label_
std::string g4Label_
Definition: EcalSimHitStudy.cc:66
EcalSimHitStudy
Definition: EcalSimHitStudy.cc:46
Service.h
w
const double w
Definition: UKUtility.cc:23
tfile
Definition: tfile.py:1
EcalSimHitStudy::EcalHit::id
uint16_t id
Definition: EcalSimHitStudy.cc:61
edm::ESHandle< CaloGeometry >
EcalSimHitStudy::phiInc_
TH1F * phiInc_
Definition: EcalSimHitStudy.cc:72
EcalSimHitStudy::timeAll_
TH1F * timeAll_[ndets_]
Definition: EcalSimHitStudy.cc:73
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, GlobalTag >
EcalSimHitStudy::sEtaPhi_
TH1F * sEtaPhi_[ndets_]
Definition: EcalSimHitStudy.cc:77
EEDetId
Definition: EEDetId.h:14
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSimHitStudy::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EcalSimHitStudy.cc:101
EcalSubdetector.h
TFileService.h
EcalSimHitStudy::r1by25_
TH1F * r1by25_[ndets_]
Definition: EcalSimHitStudy.cc:76
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EcalSimHitStudy::~EcalSimHitStudy
~EcalSimHitStudy() override
Definition: EcalSimHitStudy.cc:49
CaloGeometry::getGeometry
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
EcalSimHitStudy::etot_
TH1F * etot_[ndets_]
Definition: EcalSimHitStudy.cc:75
EcalSimHitStudy::beginJob
void beginJob() override
Definition: EcalSimHitStudy.cc:113
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
EcalSimHitStudy::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalSimHitStudy.cc:56
EcalSimHitStudy::EcalHit::EcalHit
EcalHit(uint16_t i=0, double t=0, double e=0)
Definition: EcalSimHitStudy.cc:63
PCaloHit.h
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
EcalSimHitStudy::etaInc_
TH1F * etaInc_
Definition: EcalSimHitStudy.cc:72
edm::Service< TFileService >
EcalSimHitStudy::eneInc_
TH1F * eneInc_
Definition: EcalSimHitStudy.cc:72
EcalSimHitStudy::EcalHit
Definition: EcalSimHitStudy.cc:60
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
edm::EventSetup
Definition: EventSetup.h:57
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
EcalSimHitStudy::r1by9_
TH1F * r1by9_[ndets_]
Definition: EcalSimHitStudy.cc:76
get
#define get
EcalSimHitStudy::EcalSimHitStudy
EcalSimHitStudy(const edm::ParameterSet &ps)
Definition: EcalSimHitStudy.cc:81
InputTag.h
compare.tfile
tfile
Definition: compare.py:325
CaloCellGeometry.h
EcalSimHitStudy::time_
TH1F * time_[ndets_]
Definition: EcalSimHitStudy.cc:73
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
EcalSimHitStudy::hit_
TH1F * hit_[ndets_]
Definition: EcalSimHitStudy.cc:73
PVValHelper::dz
Definition: PVValidationHelpers.h:50
Frameworkfwd.h
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13701
EcalSimHitStudy::edep_
TH1F * edep_[ndets_]
Definition: EcalSimHitStudy.cc:74
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
EcalSimHitStudy::edepAll_
TH1F * edepAll_[ndets_]
Definition: EcalSimHitStudy.cc:75
EcalSimHitStudy::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalSimHitStudy.cc:55
Point3D.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EcalSimHitStudy::selX_
int selX_
Definition: EcalSimHitStudy.cc:70
EventSetup.h
Exception.h
EcalSimHitStudy::maxEnergy_
double maxEnergy_
Definition: EcalSimHitStudy.cc:69
PCaloHitContainer.h
EcalSimHitStudy::ndets_
static const int ndets_
Definition: EcalSimHitStudy.cc:65
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
HepMCProduct.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ntuplemaker.time
time
Definition: ntuplemaker.py:310
edm::Event
Definition: Event.h:73
EcalSimHitStudy::etotg_
TH1F * etotg_[ndets_]
Definition: EcalSimHitStudy.cc:75
Vector3D.h
EcalSimHitStudy::tmax_
double tmax_
Definition: EcalSimHitStudy.cc:69
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
EcalSimHitStudy::hitLab_
std::string hitLab_[ndets_]
Definition: EcalSimHitStudy.cc:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
EcalSimHitStudy::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: EcalSimHitStudy.cc:255
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37