CMS 3D CMS Logo

StudyCaloGen.cc
Go to the documentation of this file.
4 
10 
13 
20 //TFile Service
23 
30 
33 
35 
38 // track associator
40 
41 // root objects
42 #include "TROOT.h"
43 #include "TSystem.h"
44 #include "TFile.h"
45 #include "TH1I.h"
46 #include "TH2D.h"
47 #include "TTree.h"
48 
49 #include <cmath>
50 #include <iostream>
51 #include <iomanip>
52 #include <list>
53 #include <vector>
54 
55 class StudyCaloGen : public edm::one::EDAnalyzer<edm::one::SharedResources> {
56 public:
57  explicit StudyCaloGen(const edm::ParameterSet &);
58 
59  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
60 
61 private:
62  void beginJob() override;
63  void analyze(const edm::Event &, const edm::EventSetup &) override;
64  void endJob() override {}
65 
66  void fillTrack(
67  GlobalPoint &posVec, math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId, bool okECAL, bool accpet);
68  void fillIsolatedTrack(math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId);
69  void bookHistograms();
70  void clearTreeVectors();
71  int particleCode(int);
72 
73  static constexpr int NPBins_ = 3;
74  static constexpr int NEtaBins_ = 4;
75  static constexpr int PBins_ = 32, EtaBins_ = 60, Particles = 12;
81 
84 
90 
91  bool useHepMC_;
94 
95  TH1I *h_NEventProc;
96  TH2D *h_pEta[Particles];
97  TTree *tree_;
98 
99  std::vector<double> *t_isoTrkPAll;
100  std::vector<double> *t_isoTrkPtAll;
101  std::vector<double> *t_isoTrkPhiAll;
102  std::vector<double> *t_isoTrkEtaAll;
103  std::vector<double> *t_isoTrkPdgIdAll;
104  std::vector<double> *t_isoTrkDEtaAll;
105  std::vector<double> *t_isoTrkDPhiAll;
106 
107  std::vector<double> *t_isoTrkP;
108  std::vector<double> *t_isoTrkPt;
109  std::vector<double> *t_isoTrkEne;
110  std::vector<double> *t_isoTrkEta;
111  std::vector<double> *t_isoTrkPhi;
112  std::vector<double> *t_isoTrkEtaEC;
113  std::vector<double> *t_isoTrkPhiEC;
114  std::vector<double> *t_isoTrkPdgId;
115 
116  std::vector<double> *t_maxNearP31x31;
118  std::vector<double> *t_nHadronEne31x31;
119  std::vector<double> *t_photonEne31x31;
120  std::vector<double> *t_eleEne31x31;
121  std::vector<double> *t_muEne31x31;
122 
123  std::vector<double> *t_maxNearP25x25;
125  std::vector<double> *t_nHadronEne25x25;
126  std::vector<double> *t_photonEne25x25;
127  std::vector<double> *t_eleEne25x25;
128  std::vector<double> *t_muEne25x25;
129 
130  std::vector<double> *t_maxNearP21x21;
132  std::vector<double> *t_nHadronEne21x21;
133  std::vector<double> *t_photonEne21x21;
134  std::vector<double> *t_eleEne21x21;
135  std::vector<double> *t_muEne21x21;
136 
137  std::vector<double> *t_maxNearP15x15;
139  std::vector<double> *t_nHadronEne15x15;
140  std::vector<double> *t_photonEne15x15;
141  std::vector<double> *t_eleEne15x15;
142  std::vector<double> *t_muEne15x15;
143 
144  std::vector<double> *t_maxNearP11x11;
146  std::vector<double> *t_nHadronEne11x11;
147  std::vector<double> *t_photonEne11x11;
148  std::vector<double> *t_eleEne11x11;
149  std::vector<double> *t_muEne11x11;
150 
151  std::vector<double> *t_maxNearP9x9;
153  std::vector<double> *t_nHadronEne9x9;
154  std::vector<double> *t_photonEne9x9;
155  std::vector<double> *t_eleEne9x9;
156  std::vector<double> *t_muEne9x9;
157 
158  std::vector<double> *t_maxNearP7x7;
160  std::vector<double> *t_nHadronEne7x7;
161  std::vector<double> *t_photonEne7x7;
162  std::vector<double> *t_eleEne7x7;
163  std::vector<double> *t_muEne7x7;
164 
165  std::vector<double> *t_maxNearP3x3;
167  std::vector<double> *t_nHadronEne3x3;
168  std::vector<double> *t_photonEne3x3;
169  std::vector<double> *t_eleEne3x3;
170  std::vector<double> *t_muEne3x3;
171 
172  std::vector<double> *t_maxNearP1x1;
174  std::vector<double> *t_nHadronEne1x1;
175  std::vector<double> *t_photonEne1x1;
176  std::vector<double> *t_eleEne1x1;
177  std::vector<double> *t_muEne1x1;
178 
179  std::vector<double> *t_maxNearPHC1x1;
181  std::vector<double> *t_nHadronEneHC1x1;
182  std::vector<double> *t_photonEneHC1x1;
183  std::vector<double> *t_eleEneHC1x1;
184  std::vector<double> *t_muEneHC1x1;
185 
186  std::vector<double> *t_maxNearPHC3x3;
188  std::vector<double> *t_nHadronEneHC3x3;
189  std::vector<double> *t_photonEneHC3x3;
190  std::vector<double> *t_eleEneHC3x3;
191  std::vector<double> *t_muEneHC3x3;
192 
193  std::vector<double> *t_maxNearPHC5x5;
195  std::vector<double> *t_nHadronEneHC5x5;
196  std::vector<double> *t_photonEneHC5x5;
197  std::vector<double> *t_eleEneHC5x5;
198  std::vector<double> *t_muEneHC5x5;
199 
200  std::vector<double> *t_maxNearPHC7x7;
202  std::vector<double> *t_nHadronEneHC7x7;
203  std::vector<double> *t_photonEneHC7x7;
204  std::vector<double> *t_eleEneHC7x7;
205  std::vector<double> *t_muEneHC7x7;
206 
207  std::vector<double> *t_maxNearPR;
209  std::vector<double> *t_nHadronEneR;
210  std::vector<double> *t_photonEneR;
211  std::vector<double> *t_eleEneR;
212  std::vector<double> *t_muEneR;
213 
214  std::vector<double> *t_maxNearPIsoR;
216  std::vector<double> *t_nHadronEneIsoR;
217  std::vector<double> *t_photonEneIsoR;
218  std::vector<double> *t_eleEneIsoR;
219  std::vector<double> *t_muEneIsoR;
220 
221  std::vector<double> *t_maxNearPHCR;
223  std::vector<double> *t_nHadronEneHCR;
224  std::vector<double> *t_photonEneHCR;
225  std::vector<double> *t_eleEneHCR;
226  std::vector<double> *t_muEneHCR;
227 
228  std::vector<double> *t_maxNearPIsoHCR;
230  std::vector<double> *t_nHadronEneIsoHCR;
231  std::vector<double> *t_photonEneIsoHCR;
232  std::vector<double> *t_eleEneIsoHCR;
233  std::vector<double> *t_muEneIsoHCR;
234 
239 };
240 
242  : ptMin_(iConfig.getUntrackedParameter<double>("PTMin", 1.0)),
243  etaMax_(iConfig.getUntrackedParameter<double>("MaxChargedHadronEta", 2.5)),
244  pCutIsolate_(iConfig.getUntrackedParameter<double>("PMaxIsolation", 20.0)),
245  a_Isolation_(iConfig.getUntrackedParameter<bool>("UseConeIsolation", false)),
246  genSrc_(iConfig.getUntrackedParameter("GenSrc", std::string("generatorSmeared"))),
247  useHepMC_(iConfig.getUntrackedParameter<bool>("UseHepMC", false)),
248  a_coneR_(iConfig.getUntrackedParameter<double>("ConeRadius", 34.98)),
249  a_mipR_(iConfig.getUntrackedParameter<double>("ConeRadiusMIP", 14.0)),
250  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)) {
251  usesResource(TFileService::kSharedResource);
252 
253  a_charIsoR_ = a_coneR_ + 28.9;
254  a_neutIsoR_ = a_charIsoR_ * 0.726;
255 
256  tok_hepmc_ = consumes<edm::HepMCProduct>(edm::InputTag(genSrc_));
257  tok_genParticles_ = consumes<reco::GenParticleCollection>(edm::InputTag(genSrc_));
258 
259  if (!strcmp("Dummy", genSrc_.c_str())) {
260  if (useHepMC_)
261  genSrc_ = "generatorSmeared";
262  else
263  genSrc_ = "genParticles";
264  }
265  edm::LogVerbatim("IsoTrack") << "Generator Source " << genSrc_ << " Use HepMC " << useHepMC_ << " ptMin " << ptMin_
266  << " etaMax " << etaMax_ << "\n a_coneR " << a_coneR_ << " a_charIsoR " << a_charIsoR_
267  << " a_neutIsoR " << a_neutIsoR_ << " a_mipR " << a_mipR_ << " debug " << verbosity_
268  << "\nIsolation Flag " << a_Isolation_ << " with cut " << pCutIsolate_ << " GeV";
269 
270  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
271  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
272  tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
273  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
274  tok_pdt_ = esConsumes<HepPDT::ParticleDataTable, PDTRecord>();
275 }
276 
279  desc.addUntracked<std::string>("GenSrc", "genParticles");
280  desc.addUntracked<bool>("UseHepMC", false);
281  desc.addUntracked<double>("ChargedHadronSeedP", 1.0);
282  desc.addUntracked<double>("PTMin", 1.0);
283  desc.addUntracked<double>("MaxChargedHadronEta", 2.5);
284  desc.addUntracked<double>("ConeRadius", 34.98);
285  desc.addUntracked<double>("ConeRadiusMIP", 14.0);
286  desc.addUntracked<bool>("UseConeIsolation", true);
287  desc.addUntracked<double>("PMaxIsolation", 5.0);
288  desc.addUntracked<int>("Verbosity", 0);
289  descriptions.add("studyCaloGen", desc);
290 }
291 
294 
295  nEventProc++;
296  const MagneticField *bField = &iSetup.getData(tok_magField_);
297 
298  // get particle data table
299  const HepPDT::ParticleDataTable *pdt = &iSetup.getData(tok_pdt_);
300 
301  // get handle to HEPMCProduct
304  if (useHepMC_)
305  iEvent.getByToken(tok_hepmc_, hepmc);
306  else
308 
309  const CaloGeometry *geo = &iSetup.getData(tok_geom_);
310  const CaloTopology *caloTopology = &iSetup.getData(tok_caloTopology_);
311  const HcalTopology *theHBHETopology = &iSetup.getData(tok_topo_);
312 
313  GlobalPoint posVec, posECAL;
315  if (verbosity_ > 0)
316  edm::LogVerbatim("IsoTrack") << "event number " << iEvent.id().event();
317  if (useHepMC_) {
318  const HepMC::GenEvent *myGenEvent = hepmc->GetEvent();
319  std::vector<spr::propagatedGenTrackID> trackIDs = spr::propagateCALO(myGenEvent, pdt, geo, bField, etaMax_, false);
320 
321  for (unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
322  int charge = trackIDs[indx].charge;
323  HepMC::GenEvent::particle_const_iterator p = trackIDs[indx].trkItr;
324  momVec = math::XYZTLorentzVector(
325  (*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
326  if (verbosity_ > 1)
327  edm::LogVerbatim("IsoTrack") << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge
328  << " momVec " << momVec;
329  // only stable particles avoiding electrons and muons
330  if (trackIDs[indx].ok && (std::abs(trackIDs[indx].pdgId) < 11 || std::abs(trackIDs[indx].pdgId) >= 21)) {
331  // consider particles within a phased space
332  if (momVec.Pt() > ptMin_ && std::abs(momVec.eta()) < etaMax_) {
333  posVec = GlobalPoint(0.1 * (*p)->production_vertex()->position().x(),
334  0.1 * (*p)->production_vertex()->position().y(),
335  0.1 * (*p)->production_vertex()->position().z());
336  posECAL = trackIDs[indx].pointECAL;
337  fillTrack(posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
338  if (verbosity_ > 1)
339  edm::LogVerbatim("IsoTrack") << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL "
340  << trackIDs[indx].okHCAL;
341  if (trackIDs[indx].okECAL) {
342  if (std::abs(charge) > 0) {
343  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1, false);
344  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3, false);
345  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7, false);
346  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9, false);
347  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, false);
348  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, false);
349  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 10, 10, isoinfo21x21, false);
350  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 12, 12, isoinfo25x25, false);
351  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 15, 15, isoinfo31x31, false);
352  spr::eGenSimInfo(trackIDs[indx].detIdECAL,
353  p,
354  trackIDs,
355  geo,
356  caloTopology,
357  a_mipR_,
358  trackIDs[indx].directionECAL,
359  isoinfoR,
360  false);
361  spr::eGenSimInfo(trackIDs[indx].detIdECAL,
362  p,
363  trackIDs,
364  geo,
365  caloTopology,
366  a_neutIsoR_,
367  trackIDs[indx].directionECAL,
368  isoinfoIsoR,
369  false);
370  if (trackIDs[indx].okHCAL) {
371  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, false);
372  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, false);
373  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, false);
374  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, false);
375  spr::hGenSimInfo(trackIDs[indx].detIdHCAL,
376  p,
377  trackIDs,
378  geo,
379  theHBHETopology,
380  a_coneR_,
381  trackIDs[indx].directionHCAL,
382  isoinfoHCR,
383  false);
384  spr::hGenSimInfo(trackIDs[indx].detIdHCAL,
385  p,
386  trackIDs,
387  geo,
388  theHBHETopology,
389  a_charIsoR_,
390  trackIDs[indx].directionHCAL,
392  false);
393  }
394 
395  bool saveTrack = true;
396  if (a_Isolation_)
397  saveTrack = (isoinfoR.maxNearP < pCutIsolate_);
398  else
399  saveTrack = (isoinfo7x7.maxNearP < pCutIsolate_);
400  if (saveTrack)
401  fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
402  }
403  }
404  } else { // stabale particles within |eta|=2.5
405  fillTrack(posVec, momVec, posECAL, 0, false, false);
406  }
407  }
408  }
409 
410  unsigned int indx;
411  HepMC::GenEvent::particle_const_iterator p;
412  for (p = myGenEvent->particles_begin(), indx = 0; p != myGenEvent->particles_end(); ++p, ++indx) {
413  int pdgId = ((*p)->pdg_id());
414  int ix = particleCode(pdgId);
415  if (ix >= 0) {
416  double pp = (*p)->momentum().rho();
417  double eta = (*p)->momentum().eta();
418  h_pEta[ix]->Fill(pp, eta);
419  }
420  }
421  } else { // loop over gen particles
422  std::vector<spr::propagatedGenParticleID> trackIDs =
424 
425  for (unsigned int indx = 0; indx < trackIDs.size(); ++indx) {
426  int charge = trackIDs[indx].charge;
427  reco::GenParticleCollection::const_iterator p = trackIDs[indx].trkItr;
428 
429  momVec = math::XYZTLorentzVector(p->momentum().x(), p->momentum().y(), p->momentum().z(), p->energy());
430  if (verbosity_ > 1)
431  edm::LogVerbatim("IsoTrack") << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge
432  << " momVec " << momVec;
433  // only stable particles avoiding electrons and muons
434  if (trackIDs[indx].ok && std::abs(trackIDs[indx].pdgId) > 21) {
435  // consider particles within a phased space
436  if (verbosity_ > 1)
437  edm::LogVerbatim("IsoTrack") << " pt " << momVec.Pt() << " eta " << momVec.eta();
438  if (momVec.Pt() > ptMin_ && std::abs(momVec.eta()) < etaMax_) {
439  posVec = GlobalPoint(p->vertex().x(), p->vertex().y(), p->vertex().z());
440  posECAL = trackIDs[indx].pointECAL;
441  if (verbosity_ > 0)
442  edm::LogVerbatim("IsoTrack") << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL "
443  << trackIDs[indx].okHCAL;
444  fillTrack(posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
445  if (trackIDs[indx].okECAL) {
446  if (std::abs(charge) > 0) {
448  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1, verbosity_ > 1);
450  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3, verbosity_ > 0);
452  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7, verbosity_ > 1);
454  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9, verbosity_ > 1);
456  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, verbosity_ > 1);
458  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, verbosity_ > 1);
460  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 10, 10, isoinfo21x21, verbosity_ > 1);
462  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 12, 12, isoinfo25x25, verbosity_ > 1);
464  trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 15, 15, isoinfo31x31, verbosity_ > 1);
465  spr::eGenSimInfo(trackIDs[indx].detIdECAL,
466  p,
467  trackIDs,
468  geo,
469  caloTopology,
470  a_mipR_,
471  trackIDs[indx].directionECAL,
472  isoinfoR,
473  verbosity_ > 1);
474  spr::eGenSimInfo(trackIDs[indx].detIdECAL,
475  p,
476  trackIDs,
477  geo,
478  caloTopology,
479  a_neutIsoR_,
480  trackIDs[indx].directionECAL,
481  isoinfoIsoR,
482  verbosity_ > 1);
483  if (trackIDs[indx].okHCAL) {
485  trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, verbosity_ > 1);
487  trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, verbosity_ > 1);
489  trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, verbosity_ > 1);
491  trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, verbosity_ > 1);
492  spr::hGenSimInfo(trackIDs[indx].detIdHCAL,
493  p,
494  trackIDs,
495  geo,
496  theHBHETopology,
497  a_coneR_,
498  trackIDs[indx].directionHCAL,
499  isoinfoHCR,
500  verbosity_ > 1);
501  spr::hGenSimInfo(trackIDs[indx].detIdHCAL,
502  p,
503  trackIDs,
504  geo,
505  theHBHETopology,
506  a_charIsoR_,
507  trackIDs[indx].directionHCAL,
509  verbosity_ > 1);
510  }
511 
512  bool saveTrack = true;
513  if (a_Isolation_)
514  saveTrack = (isoinfoIsoR.maxNearP < pCutIsolate_);
515  else
516  saveTrack = (isoinfo7x7.maxNearP < pCutIsolate_);
517  if (saveTrack)
518  fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
519  }
520  }
521  } else { // stabale particles within |eta|=2.5
522  fillTrack(posVec, momVec, posECAL, 0, false, false);
523  }
524  }
525  } // loop over gen particles
526 
527  unsigned int indx;
528  reco::GenParticleCollection::const_iterator p;
529  for (p = genParticles->begin(), indx = 0; p != genParticles->end(); ++p, ++indx) {
530  int pdgId = (p->pdgId());
531  int ix = particleCode(pdgId);
532  if (ix >= 0) {
533  double pp = (p->momentum()).R();
534  double eta = (p->momentum()).Eta();
535  h_pEta[ix]->Fill(pp, eta);
536  }
537  }
538  }
539 
540  //t_nEvtProc->push_back(nEventProc);
541  h_NEventProc->SetBinContent(1, nEventProc);
542  tree_->Fill();
543 }
544 
546  nEventProc = 0;
547 
548  double tempgen_TH[NPBins_ + 1] = {0.0, 5.0, 12.0, 300.0};
549  for (int i = 0; i <= NPBins_; i++)
550  genPartPBins_[i] = tempgen_TH[i];
551 
552  double tempgen_Eta[NEtaBins_ + 1] = {0.0, 0.5, 1.1, 1.7, 2.3};
553  for (int i = 0; i <= NEtaBins_; i++)
554  genPartEtaBins_[i] = tempgen_Eta[i];
555 
556  bookHistograms();
557 }
558 
560  GlobalPoint &posVec, math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId, bool okECAL, bool accept) {
561  if (accept) {
562  t_isoTrkPAll->push_back(momVec.P());
563  t_isoTrkPtAll->push_back(momVec.Pt());
564  t_isoTrkPhiAll->push_back(momVec.phi());
565  t_isoTrkEtaAll->push_back(momVec.eta());
566  t_isoTrkPdgIdAll->push_back(pdgId);
567  if (okECAL) {
568  double phi1 = momVec.phi();
569  double phi2 = (posECAL - posVec).phi();
570  double dphi = reco::deltaPhi(phi1, phi2);
571  double deta = momVec.eta() - (posECAL - posVec).eta();
572  t_isoTrkDPhiAll->push_back(dphi);
573  t_isoTrkDEtaAll->push_back(deta);
574  } else {
575  t_isoTrkDPhiAll->push_back(999.0);
576  t_isoTrkDEtaAll->push_back(999.0);
577  }
578  } else {
579  t_isoTrkDPhiAll->push_back(-999.0);
580  t_isoTrkDEtaAll->push_back(-999.0);
581  }
582 }
583 
585  t_isoTrkP->push_back(momVec.P());
586  t_isoTrkPt->push_back(momVec.Pt());
587  t_isoTrkEne->push_back(momVec.E());
588  t_isoTrkEta->push_back(momVec.eta());
589  t_isoTrkPhi->push_back(momVec.phi());
590  t_isoTrkEtaEC->push_back(posECAL.eta());
591  t_isoTrkPhiEC->push_back(posECAL.phi());
592  t_isoTrkPdgId->push_back(pdgId);
593 
601  t_eleEne31x31->push_back(isoinfo31x31.eleEne);
602  t_muEne31x31->push_back(isoinfo31x31.muEne);
603 
611  t_eleEne25x25->push_back(isoinfo25x25.eleEne);
612  t_muEne25x25->push_back(isoinfo25x25.muEne);
613 
621  t_eleEne21x21->push_back(isoinfo21x21.eleEne);
622  t_muEne21x21->push_back(isoinfo21x21.muEne);
623 
631  t_eleEne15x15->push_back(isoinfo15x15.eleEne);
632  t_muEne15x15->push_back(isoinfo15x15.muEne);
633 
641  t_eleEne11x11->push_back(isoinfo11x11.eleEne);
642  t_muEne11x11->push_back(isoinfo11x11.muEne);
643 
644  t_maxNearP9x9->push_back(isoinfo9x9.maxNearP);
650  t_photonEne9x9->push_back(isoinfo9x9.photonEne);
651  t_eleEne9x9->push_back(isoinfo9x9.eleEne);
652  t_muEne9x9->push_back(isoinfo9x9.muEne);
653 
654  t_maxNearP7x7->push_back(isoinfo7x7.maxNearP);
660  t_photonEne7x7->push_back(isoinfo7x7.photonEne);
661  t_eleEne7x7->push_back(isoinfo7x7.eleEne);
662  t_muEne7x7->push_back(isoinfo7x7.muEne);
663 
664  t_maxNearP3x3->push_back(isoinfo3x3.maxNearP);
670  t_photonEne3x3->push_back(isoinfo3x3.photonEne);
671  t_eleEne3x3->push_back(isoinfo3x3.eleEne);
672  t_muEne3x3->push_back(isoinfo3x3.muEne);
673 
674  t_maxNearP1x1->push_back(isoinfo1x1.maxNearP);
680  t_photonEne1x1->push_back(isoinfo1x1.photonEne);
681  t_eleEne1x1->push_back(isoinfo1x1.eleEne);
682  t_muEne1x1->push_back(isoinfo1x1.muEne);
683 
691  t_eleEneHC1x1->push_back(isoinfoHC1x1.eleEne);
692  t_muEneHC1x1->push_back(isoinfoHC1x1.muEne);
693 
701  t_eleEneHC3x3->push_back(isoinfoHC3x3.eleEne);
702  t_muEneHC3x3->push_back(isoinfoHC3x3.muEne);
703 
711  t_eleEneHC5x5->push_back(isoinfoHC5x5.eleEne);
712  t_muEneHC5x5->push_back(isoinfoHC5x5.muEne);
713 
721  t_eleEneHC7x7->push_back(isoinfoHC7x7.eleEne);
722  t_muEneHC7x7->push_back(isoinfoHC7x7.muEne);
723 
724  t_maxNearPR->push_back(isoinfoR.maxNearP);
725  t_cHadronEneR->push_back(isoinfoR.cHadronEne);
726  t_cHadronEneR_1->push_back(isoinfoR.cHadronEne_[0]);
727  t_cHadronEneR_2->push_back(isoinfoR.cHadronEne_[1]);
728  t_cHadronEneR_3->push_back(isoinfoR.cHadronEne_[2]);
729  t_nHadronEneR->push_back(isoinfoR.nHadronEne);
730  t_photonEneR->push_back(isoinfoR.photonEne);
731  t_eleEneR->push_back(isoinfoR.eleEne);
732  t_muEneR->push_back(isoinfoR.muEne);
733 
734  t_maxNearPIsoR->push_back(isoinfoIsoR.maxNearP);
741  t_eleEneIsoR->push_back(isoinfoIsoR.eleEne);
742  t_muEneIsoR->push_back(isoinfoIsoR.muEne);
743 
744  t_maxNearPHCR->push_back(isoinfoHCR.maxNearP);
750  t_photonEneHCR->push_back(isoinfoHCR.photonEne);
751  t_eleEneHCR->push_back(isoinfoHCR.eleEne);
752  t_muEneHCR->push_back(isoinfoHCR.muEne);
753 
761  t_eleEneIsoHCR->push_back(isoinfoIsoHCR.eleEne);
762  t_muEneIsoHCR->push_back(isoinfoIsoHCR.muEne);
763 }
764 
767  //char hname[100], htit[100];
768 
769  h_NEventProc = fs->make<TH1I>("h_NEventProc", "h_NEventProc", 2, -0.5, 0.5);
770 
771  double pBin[PBins_ + 1] = {0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0,
772  70.0, 80.0, 90.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0,
773  500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0, 900.0, 950.0, 1000.0};
774  double etaBin[EtaBins_ + 1] = {-3.0, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8,
775  -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6, -0.5,
776  -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
777  0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1,
778  2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0};
779  std::string particle[Particles] = {
780  "electron", "positron", "#gamma", "#pi^+", "#pi^-", "K^+", "K^-", "p", "n", "pbar", "nbar", "K^0_L"};
781  TFileDirectory dir1 = fs->mkdir("pEta");
782  char name[20], title[50];
783  for (int i = 0; i < Particles; ++i) {
784  sprintf(name, "pEta%d", i);
785  sprintf(title, "#eta vs momentum for %s", particle[i].c_str());
786  h_pEta[i] = dir1.make<TH2D>(name, title, PBins_, pBin, EtaBins_, etaBin);
787  }
788 
789  // build the tree
790  tree_ = fs->make<TTree>("StudyCaloGen", "StudyCaloGen");
791 
792  t_isoTrkPAll = new std::vector<double>();
793  t_isoTrkPtAll = new std::vector<double>();
794  t_isoTrkPhiAll = new std::vector<double>();
795  t_isoTrkEtaAll = new std::vector<double>();
796  t_isoTrkDPhiAll = new std::vector<double>();
797  t_isoTrkDEtaAll = new std::vector<double>();
798  t_isoTrkPdgIdAll = new std::vector<double>();
799 
800  t_isoTrkP = new std::vector<double>();
801  t_isoTrkPt = new std::vector<double>();
802  t_isoTrkEne = new std::vector<double>();
803  t_isoTrkEta = new std::vector<double>();
804  t_isoTrkPhi = new std::vector<double>();
805  t_isoTrkEtaEC = new std::vector<double>();
806  t_isoTrkPhiEC = new std::vector<double>();
807  t_isoTrkPdgId = new std::vector<double>();
808 
809  t_maxNearP31x31 = new std::vector<double>();
810  t_cHadronEne31x31 = new std::vector<double>();
811  t_cHadronEne31x31_1 = new std::vector<double>();
812  t_cHadronEne31x31_2 = new std::vector<double>();
813  t_cHadronEne31x31_3 = new std::vector<double>();
814  t_nHadronEne31x31 = new std::vector<double>();
815  t_photonEne31x31 = new std::vector<double>();
816  t_eleEne31x31 = new std::vector<double>();
817  t_muEne31x31 = new std::vector<double>();
818 
819  t_maxNearP25x25 = new std::vector<double>();
820  t_cHadronEne25x25 = new std::vector<double>();
821  t_cHadronEne25x25_1 = new std::vector<double>();
822  t_cHadronEne25x25_2 = new std::vector<double>();
823  t_cHadronEne25x25_3 = new std::vector<double>();
824  t_nHadronEne25x25 = new std::vector<double>();
825  t_photonEne25x25 = new std::vector<double>();
826  t_eleEne25x25 = new std::vector<double>();
827  t_muEne25x25 = new std::vector<double>();
828 
829  t_maxNearP21x21 = new std::vector<double>();
830  t_cHadronEne21x21 = new std::vector<double>();
831  t_cHadronEne21x21_1 = new std::vector<double>();
832  t_cHadronEne21x21_2 = new std::vector<double>();
833  t_cHadronEne21x21_3 = new std::vector<double>();
834  t_nHadronEne21x21 = new std::vector<double>();
835  t_photonEne21x21 = new std::vector<double>();
836  t_eleEne21x21 = new std::vector<double>();
837  t_muEne21x21 = new std::vector<double>();
838 
839  t_maxNearP15x15 = new std::vector<double>();
840  t_cHadronEne15x15 = new std::vector<double>();
841  t_cHadronEne15x15_1 = new std::vector<double>();
842  t_cHadronEne15x15_2 = new std::vector<double>();
843  t_cHadronEne15x15_3 = new std::vector<double>();
844  t_nHadronEne15x15 = new std::vector<double>();
845  t_photonEne15x15 = new std::vector<double>();
846  t_eleEne15x15 = new std::vector<double>();
847  t_muEne15x15 = new std::vector<double>();
848 
849  t_maxNearP11x11 = new std::vector<double>();
850  t_cHadronEne11x11 = new std::vector<double>();
851  t_cHadronEne11x11_1 = new std::vector<double>();
852  t_cHadronEne11x11_2 = new std::vector<double>();
853  t_cHadronEne11x11_3 = new std::vector<double>();
854  t_nHadronEne11x11 = new std::vector<double>();
855  t_photonEne11x11 = new std::vector<double>();
856  t_eleEne11x11 = new std::vector<double>();
857  t_muEne11x11 = new std::vector<double>();
858 
859  t_maxNearP9x9 = new std::vector<double>();
860  t_cHadronEne9x9 = new std::vector<double>();
861  t_cHadronEne9x9_1 = new std::vector<double>();
862  t_cHadronEne9x9_2 = new std::vector<double>();
863  t_cHadronEne9x9_3 = new std::vector<double>();
864  t_nHadronEne9x9 = new std::vector<double>();
865  t_photonEne9x9 = new std::vector<double>();
866  t_eleEne9x9 = new std::vector<double>();
867  t_muEne9x9 = new std::vector<double>();
868 
869  t_maxNearP7x7 = new std::vector<double>();
870  t_cHadronEne7x7 = new std::vector<double>();
871  t_cHadronEne7x7_1 = new std::vector<double>();
872  t_cHadronEne7x7_2 = new std::vector<double>();
873  t_cHadronEne7x7_3 = new std::vector<double>();
874  t_nHadronEne7x7 = new std::vector<double>();
875  t_photonEne7x7 = new std::vector<double>();
876  t_eleEne7x7 = new std::vector<double>();
877  t_muEne7x7 = new std::vector<double>();
878 
879  t_maxNearP3x3 = new std::vector<double>();
880  t_cHadronEne3x3 = new std::vector<double>();
881  t_cHadronEne3x3_1 = new std::vector<double>();
882  t_cHadronEne3x3_2 = new std::vector<double>();
883  t_cHadronEne3x3_3 = new std::vector<double>();
884  t_nHadronEne3x3 = new std::vector<double>();
885  t_photonEne3x3 = new std::vector<double>();
886  t_eleEne3x3 = new std::vector<double>();
887  t_muEne3x3 = new std::vector<double>();
888 
889  t_maxNearP1x1 = new std::vector<double>();
890  t_cHadronEne1x1 = new std::vector<double>();
891  t_cHadronEne1x1_1 = new std::vector<double>();
892  t_cHadronEne1x1_2 = new std::vector<double>();
893  t_cHadronEne1x1_3 = new std::vector<double>();
894  t_nHadronEne1x1 = new std::vector<double>();
895  t_photonEne1x1 = new std::vector<double>();
896  t_eleEne1x1 = new std::vector<double>();
897  t_muEne1x1 = new std::vector<double>();
898 
899  t_maxNearPHC1x1 = new std::vector<double>();
900  t_cHadronEneHC1x1 = new std::vector<double>();
901  t_cHadronEneHC1x1_1 = new std::vector<double>();
902  t_cHadronEneHC1x1_2 = new std::vector<double>();
903  t_cHadronEneHC1x1_3 = new std::vector<double>();
904  t_nHadronEneHC1x1 = new std::vector<double>();
905  t_photonEneHC1x1 = new std::vector<double>();
906  t_eleEneHC1x1 = new std::vector<double>();
907  t_muEneHC1x1 = new std::vector<double>();
908 
909  t_maxNearPHC3x3 = new std::vector<double>();
910  t_cHadronEneHC3x3 = new std::vector<double>();
911  t_cHadronEneHC3x3_1 = new std::vector<double>();
912  t_cHadronEneHC3x3_2 = new std::vector<double>();
913  t_cHadronEneHC3x3_3 = new std::vector<double>();
914  t_nHadronEneHC3x3 = new std::vector<double>();
915  t_photonEneHC3x3 = new std::vector<double>();
916  t_eleEneHC3x3 = new std::vector<double>();
917  t_muEneHC3x3 = new std::vector<double>();
918 
919  t_maxNearPHC5x5 = new std::vector<double>();
920  t_cHadronEneHC5x5 = new std::vector<double>();
921  t_cHadronEneHC5x5_1 = new std::vector<double>();
922  t_cHadronEneHC5x5_2 = new std::vector<double>();
923  t_cHadronEneHC5x5_3 = new std::vector<double>();
924  t_nHadronEneHC5x5 = new std::vector<double>();
925  t_photonEneHC5x5 = new std::vector<double>();
926  t_eleEneHC5x5 = new std::vector<double>();
927  t_muEneHC5x5 = new std::vector<double>();
928 
929  t_maxNearPHC7x7 = new std::vector<double>();
930  t_cHadronEneHC7x7 = new std::vector<double>();
931  t_cHadronEneHC7x7_1 = new std::vector<double>();
932  t_cHadronEneHC7x7_2 = new std::vector<double>();
933  t_cHadronEneHC7x7_3 = new std::vector<double>();
934  t_nHadronEneHC7x7 = new std::vector<double>();
935  t_photonEneHC7x7 = new std::vector<double>();
936  t_eleEneHC7x7 = new std::vector<double>();
937  t_muEneHC7x7 = new std::vector<double>();
938 
939  t_maxNearPR = new std::vector<double>();
940  t_cHadronEneR = new std::vector<double>();
941  t_cHadronEneR_1 = new std::vector<double>();
942  t_cHadronEneR_2 = new std::vector<double>();
943  t_cHadronEneR_3 = new std::vector<double>();
944  t_nHadronEneR = new std::vector<double>();
945  t_photonEneR = new std::vector<double>();
946  t_eleEneR = new std::vector<double>();
947  t_muEneR = new std::vector<double>();
948 
949  t_maxNearPIsoR = new std::vector<double>();
950  t_cHadronEneIsoR = new std::vector<double>();
951  t_cHadronEneIsoR_1 = new std::vector<double>();
952  t_cHadronEneIsoR_2 = new std::vector<double>();
953  t_cHadronEneIsoR_3 = new std::vector<double>();
954  t_nHadronEneIsoR = new std::vector<double>();
955  t_photonEneIsoR = new std::vector<double>();
956  t_eleEneIsoR = new std::vector<double>();
957  t_muEneIsoR = new std::vector<double>();
958 
959  t_maxNearPHCR = new std::vector<double>();
960  t_cHadronEneHCR = new std::vector<double>();
961  t_cHadronEneHCR_1 = new std::vector<double>();
962  t_cHadronEneHCR_2 = new std::vector<double>();
963  t_cHadronEneHCR_3 = new std::vector<double>();
964  t_nHadronEneHCR = new std::vector<double>();
965  t_photonEneHCR = new std::vector<double>();
966  t_eleEneHCR = new std::vector<double>();
967  t_muEneHCR = new std::vector<double>();
968 
969  t_maxNearPIsoHCR = new std::vector<double>();
970  t_cHadronEneIsoHCR = new std::vector<double>();
971  t_cHadronEneIsoHCR_1 = new std::vector<double>();
972  t_cHadronEneIsoHCR_2 = new std::vector<double>();
973  t_cHadronEneIsoHCR_3 = new std::vector<double>();
974  t_nHadronEneIsoHCR = new std::vector<double>();
975  t_photonEneIsoHCR = new std::vector<double>();
976  t_eleEneIsoHCR = new std::vector<double>();
977  t_muEneIsoHCR = new std::vector<double>();
978 
979  tree_->Branch("t_isoTrkPAll", "std::vector<double>", &t_isoTrkPAll);
980  tree_->Branch("t_isoTrkPtAll", "std::vector<double>", &t_isoTrkPtAll);
981  tree_->Branch("t_isoTrkPhiAll", "std::vector<double>", &t_isoTrkPhiAll);
982  tree_->Branch("t_isoTrkEtaAll", "std::vector<double>", &t_isoTrkEtaAll);
983  tree_->Branch("t_isoTrkDPhiAll", "std::vector<double>", &t_isoTrkDPhiAll);
984  tree_->Branch("t_isoTrkDEtaAll", "std::vector<double>", &t_isoTrkDEtaAll);
985  tree_->Branch("t_isoTrkPdgIdAll", "std::vector<double>", &t_isoTrkPdgIdAll);
986 
987  tree_->Branch("t_isoTrkP", "std::vector<double>", &t_isoTrkP);
988  tree_->Branch("t_isoTrkPt", "std::vector<double>", &t_isoTrkPt);
989  tree_->Branch("t_isoTrkEne", "std::vector<double>", &t_isoTrkEne);
990  tree_->Branch("t_isoTrkEta", "std::vector<double>", &t_isoTrkEta);
991  tree_->Branch("t_isoTrkPhi", "std::vector<double>", &t_isoTrkPhi);
992  tree_->Branch("t_isoTrkEtaEC", "std::vector<double>", &t_isoTrkEtaEC);
993  tree_->Branch("t_isoTrkPhiEC", "std::vector<double>", &t_isoTrkPhiEC);
994  tree_->Branch("t_isoTrkPdgId", "std::vector<double>", &t_isoTrkPdgId);
995 
996  tree_->Branch("t_maxNearP31x31", "std::vector<double>", &t_maxNearP31x31);
997  tree_->Branch("t_cHadronEne31x31", "std::vector<double>", &t_cHadronEne31x31);
998  tree_->Branch("t_cHadronEne31x31_1", "std::vector<double>", &t_cHadronEne31x31_1);
999  tree_->Branch("t_cHadronEne31x31_2", "std::vector<double>", &t_cHadronEne31x31_2);
1000  tree_->Branch("t_cHadronEne31x31_3", "std::vector<double>", &t_cHadronEne31x31_3);
1001  tree_->Branch("t_nHadronEne31x31", "std::vector<double>", &t_nHadronEne31x31);
1002  tree_->Branch("t_photonEne31x31", "std::vector<double>", &t_photonEne31x31);
1003  tree_->Branch("t_eleEne31x31", "std::vector<double>", &t_eleEne31x31);
1004  tree_->Branch("t_muEne31x31", "std::vector<double>", &t_muEne31x31);
1005 
1006  tree_->Branch("t_maxNearP25x25", "std::vector<double>", &t_maxNearP25x25);
1007  tree_->Branch("t_cHadronEne25x25", "std::vector<double>", &t_cHadronEne25x25);
1008  tree_->Branch("t_cHadronEne25x25_1", "std::vector<double>", &t_cHadronEne25x25_1);
1009  tree_->Branch("t_cHadronEne25x25_2", "std::vector<double>", &t_cHadronEne25x25_2);
1010  tree_->Branch("t_cHadronEne25x25_3", "std::vector<double>", &t_cHadronEne25x25_3);
1011  tree_->Branch("t_nHadronEne25x25", "std::vector<double>", &t_nHadronEne25x25);
1012  tree_->Branch("t_photonEne25x25", "std::vector<double>", &t_photonEne25x25);
1013  tree_->Branch("t_eleEne25x25", "std::vector<double>", &t_eleEne25x25);
1014  tree_->Branch("t_muEne25x25", "std::vector<double>", &t_muEne25x25);
1015 
1016  tree_->Branch("t_maxNearP21x21", "std::vector<double>", &t_maxNearP21x21);
1017  tree_->Branch("t_cHadronEne21x21", "std::vector<double>", &t_cHadronEne21x21);
1018  tree_->Branch("t_cHadronEne21x21_1", "std::vector<double>", &t_cHadronEne21x21_1);
1019  tree_->Branch("t_cHadronEne21x21_2", "std::vector<double>", &t_cHadronEne21x21_2);
1020  tree_->Branch("t_cHadronEne21x21_3", "std::vector<double>", &t_cHadronEne21x21_3);
1021  tree_->Branch("t_nHadronEne21x21", "std::vector<double>", &t_nHadronEne21x21);
1022  tree_->Branch("t_photonEne21x21", "std::vector<double>", &t_photonEne21x21);
1023  tree_->Branch("t_eleEne21x21", "std::vector<double>", &t_eleEne21x21);
1024  tree_->Branch("t_muEne21x21", "std::vector<double>", &t_muEne21x21);
1025 
1026  tree_->Branch("t_maxNearP15x15", "std::vector<double>", &t_maxNearP15x15);
1027  tree_->Branch("t_cHadronEne15x15", "std::vector<double>", &t_cHadronEne15x15);
1028  tree_->Branch("t_cHadronEne15x15_1", "std::vector<double>", &t_cHadronEne15x15_1);
1029  tree_->Branch("t_cHadronEne15x15_2", "std::vector<double>", &t_cHadronEne15x15_2);
1030  tree_->Branch("t_cHadronEne15x15_3", "std::vector<double>", &t_cHadronEne15x15_3);
1031  tree_->Branch("t_nHadronEne15x15", "std::vector<double>", &t_nHadronEne15x15);
1032  tree_->Branch("t_photonEne15x15", "std::vector<double>", &t_photonEne15x15);
1033  tree_->Branch("t_eleEne15x15", "std::vector<double>", &t_eleEne15x15);
1034  tree_->Branch("t_muEne15x15", "std::vector<double>", &t_muEne15x15);
1035 
1036  tree_->Branch("t_maxNearP11x11", "std::vector<double>", &t_maxNearP11x11);
1037  tree_->Branch("t_cHadronEne11x11", "std::vector<double>", &t_cHadronEne11x11);
1038  tree_->Branch("t_cHadronEne11x11_1", "std::vector<double>", &t_cHadronEne11x11_1);
1039  tree_->Branch("t_cHadronEne11x11_2", "std::vector<double>", &t_cHadronEne11x11_2);
1040  tree_->Branch("t_cHadronEne11x11_3", "std::vector<double>", &t_cHadronEne11x11_3);
1041  tree_->Branch("t_nHadronEne11x11", "std::vector<double>", &t_nHadronEne11x11);
1042  tree_->Branch("t_photonEne11x11", "std::vector<double>", &t_photonEne11x11);
1043  tree_->Branch("t_eleEne11x11", "std::vector<double>", &t_eleEne11x11);
1044  tree_->Branch("t_muEne11x11", "std::vector<double>", &t_muEne11x11);
1045 
1046  tree_->Branch("t_maxNearP9x9", "std::vector<double>", &t_maxNearP9x9);
1047  tree_->Branch("t_cHadronEne9x9", "std::vector<double>", &t_cHadronEne9x9);
1048  tree_->Branch("t_cHadronEne9x9_1", "std::vector<double>", &t_cHadronEne9x9_1);
1049  tree_->Branch("t_cHadronEne9x9_2", "std::vector<double>", &t_cHadronEne9x9_2);
1050  tree_->Branch("t_cHadronEne9x9_3", "std::vector<double>", &t_cHadronEne9x9_3);
1051  tree_->Branch("t_nHadronEne9x9", "std::vector<double>", &t_nHadronEne9x9);
1052  tree_->Branch("t_photonEne9x9", "std::vector<double>", &t_photonEne9x9);
1053  tree_->Branch("t_eleEne9x9", "std::vector<double>", &t_eleEne9x9);
1054  tree_->Branch("t_muEne9x9", "std::vector<double>", &t_muEne9x9);
1055 
1056  tree_->Branch("t_maxNearP7x7", "std::vector<double>", &t_maxNearP7x7);
1057  tree_->Branch("t_cHadronEne7x7", "std::vector<double>", &t_cHadronEne7x7);
1058  tree_->Branch("t_cHadronEne7x7_1", "std::vector<double>", &t_cHadronEne7x7_1);
1059  tree_->Branch("t_cHadronEne7x7_2", "std::vector<double>", &t_cHadronEne7x7_2);
1060  tree_->Branch("t_cHadronEne7x7_3", "std::vector<double>", &t_cHadronEne7x7_3);
1061  tree_->Branch("t_nHadronEne7x7", "std::vector<double>", &t_nHadronEne7x7);
1062  tree_->Branch("t_photonEne7x7", "std::vector<double>", &t_photonEne7x7);
1063  tree_->Branch("t_eleEne7x7", "std::vector<double>", &t_eleEne7x7);
1064  tree_->Branch("t_muEne7x7", "std::vector<double>", &t_muEne7x7);
1065 
1066  tree_->Branch("t_maxNearP3x3", "std::vector<double>", &t_maxNearP3x3);
1067  tree_->Branch("t_cHadronEne3x3", "std::vector<double>", &t_cHadronEne3x3);
1068  tree_->Branch("t_cHadronEne3x3_1", "std::vector<double>", &t_cHadronEne3x3_1);
1069  tree_->Branch("t_cHadronEne3x3_2", "std::vector<double>", &t_cHadronEne3x3_2);
1070  tree_->Branch("t_cHadronEne3x3_3", "std::vector<double>", &t_cHadronEne3x3_3);
1071  tree_->Branch("t_nHadronEne3x3", "std::vector<double>", &t_nHadronEne3x3);
1072  tree_->Branch("t_photonEne3x3", "std::vector<double>", &t_photonEne3x3);
1073  tree_->Branch("t_eleEne3x3", "std::vector<double>", &t_eleEne3x3);
1074  tree_->Branch("t_muEne3x3", "std::vector<double>", &t_muEne3x3);
1075 
1076  tree_->Branch("t_maxNearP1x1", "std::vector<double>", &t_maxNearP1x1);
1077  tree_->Branch("t_cHadronEne1x1", "std::vector<double>", &t_cHadronEne1x1);
1078  tree_->Branch("t_cHadronEne1x1_1", "std::vector<double>", &t_cHadronEne1x1_1);
1079  tree_->Branch("t_cHadronEne1x1_2", "std::vector<double>", &t_cHadronEne1x1_2);
1080  tree_->Branch("t_cHadronEne1x1_3", "std::vector<double>", &t_cHadronEne1x1_3);
1081  tree_->Branch("t_nHadronEne1x1", "std::vector<double>", &t_nHadronEne1x1);
1082  tree_->Branch("t_photonEne1x1", "std::vector<double>", &t_photonEne1x1);
1083  tree_->Branch("t_eleEne1x1", "std::vector<double>", &t_eleEne1x1);
1084  tree_->Branch("t_muEne1x1", "std::vector<double>", &t_muEne1x1);
1085 
1086  tree_->Branch("t_maxNearPHC1x1", "std::vector<double>", &t_maxNearPHC1x1);
1087  tree_->Branch("t_cHadronEneHC1x1", "std::vector<double>", &t_cHadronEneHC1x1);
1088  tree_->Branch("t_cHadronEneHC1x1_1", "std::vector<double>", &t_cHadronEneHC1x1_1);
1089  tree_->Branch("t_cHadronEneHC1x1_2", "std::vector<double>", &t_cHadronEneHC1x1_2);
1090  tree_->Branch("t_cHadronEneHC1x1_3", "std::vector<double>", &t_cHadronEneHC1x1_3);
1091  tree_->Branch("t_nHadronEneHC1x1", "std::vector<double>", &t_nHadronEneHC1x1);
1092  tree_->Branch("t_photonEneHC1x1", "std::vector<double>", &t_photonEneHC1x1);
1093  tree_->Branch("t_eleEneHC1x1", "std::vector<double>", &t_eleEneHC1x1);
1094  tree_->Branch("t_muEneHC1x1", "std::vector<double>", &t_muEneHC1x1);
1095 
1096  tree_->Branch("t_maxNearPHC3x3", "std::vector<double>", &t_maxNearPHC3x3);
1097  tree_->Branch("t_cHadronEneHC3x3", "std::vector<double>", &t_cHadronEneHC3x3);
1098  tree_->Branch("t_cHadronEneHC3x3_1", "std::vector<double>", &t_cHadronEneHC3x3_1);
1099  tree_->Branch("t_cHadronEneHC3x3_2", "std::vector<double>", &t_cHadronEneHC3x3_2);
1100  tree_->Branch("t_cHadronEneHC3x3_3", "std::vector<double>", &t_cHadronEneHC3x3_3);
1101  tree_->Branch("t_nHadronEneHC3x3", "std::vector<double>", &t_nHadronEneHC3x3);
1102  tree_->Branch("t_photonEneHC3x3", "std::vector<double>", &t_photonEneHC3x3);
1103  tree_->Branch("t_eleEneHC3x3", "std::vector<double>", &t_eleEneHC3x3);
1104  tree_->Branch("t_muEneHC3x3", "std::vector<double>", &t_muEneHC3x3);
1105 
1106  tree_->Branch("t_maxNearPHC5x5", "std::vector<double>", &t_maxNearPHC5x5);
1107  tree_->Branch("t_cHadronEneHC5x5", "std::vector<double>", &t_cHadronEneHC5x5);
1108  tree_->Branch("t_cHadronEneHC5x5_1", "std::vector<double>", &t_cHadronEneHC5x5_1);
1109  tree_->Branch("t_cHadronEneHC5x5_2", "std::vector<double>", &t_cHadronEneHC5x5_2);
1110  tree_->Branch("t_cHadronEneHC5x5_3", "std::vector<double>", &t_cHadronEneHC5x5_3);
1111  tree_->Branch("t_nHadronEneHC5x5", "std::vector<double>", &t_nHadronEneHC5x5);
1112  tree_->Branch("t_photonEneHC5x5", "std::vector<double>", &t_photonEneHC5x5);
1113  tree_->Branch("t_eleEneHC5x5", "std::vector<double>", &t_eleEneHC5x5);
1114  tree_->Branch("t_muEneHC5x5", "std::vector<double>", &t_muEneHC5x5);
1115 
1116  tree_->Branch("t_maxNearPHC7x7", "std::vector<double>", &t_maxNearPHC7x7);
1117  tree_->Branch("t_cHadronEneHC7x7", "std::vector<double>", &t_cHadronEneHC7x7);
1118  tree_->Branch("t_cHadronEneHC7x7_1", "std::vector<double>", &t_cHadronEneHC7x7_1);
1119  tree_->Branch("t_cHadronEneHC7x7_2", "std::vector<double>", &t_cHadronEneHC7x7_2);
1120  tree_->Branch("t_cHadronEneHC7x7_3", "std::vector<double>", &t_cHadronEneHC7x7_3);
1121  tree_->Branch("t_nHadronEneHC7x7", "std::vector<double>", &t_nHadronEneHC7x7);
1122  tree_->Branch("t_photonEneHC7x7", "std::vector<double>", &t_photonEneHC7x7);
1123  tree_->Branch("t_eleEneHC7x7", "std::vector<double>", &t_eleEneHC7x7);
1124  tree_->Branch("t_muEneHC7x7", "std::vector<double>", &t_muEneHC7x7);
1125 
1126  tree_->Branch("t_maxNearPR", "std::vector<double>", &t_maxNearPR);
1127  tree_->Branch("t_cHadronEneR", "std::vector<double>", &t_cHadronEneR);
1128  tree_->Branch("t_cHadronEneR_1", "std::vector<double>", &t_cHadronEneR_1);
1129  tree_->Branch("t_cHadronEneR_2", "std::vector<double>", &t_cHadronEneR_2);
1130  tree_->Branch("t_cHadronEneR_3", "std::vector<double>", &t_cHadronEneR_3);
1131  tree_->Branch("t_nHadronEneR", "std::vector<double>", &t_nHadronEneR);
1132  tree_->Branch("t_photonEneR", "std::vector<double>", &t_photonEneR);
1133  tree_->Branch("t_eleEneR", "std::vector<double>", &t_eleEneR);
1134  tree_->Branch("t_muEneR", "std::vector<double>", &t_muEneR);
1135 
1136  tree_->Branch("t_maxNearPIsoR", "std::vector<double>", &t_maxNearPIsoR);
1137  tree_->Branch("t_cHadronEneIsoR", "std::vector<double>", &t_cHadronEneIsoR);
1138  tree_->Branch("t_cHadronEneIsoR_1", "std::vector<double>", &t_cHadronEneIsoR_1);
1139  tree_->Branch("t_cHadronEneIsoR_2", "std::vector<double>", &t_cHadronEneIsoR_2);
1140  tree_->Branch("t_cHadronEneIsoR_3", "std::vector<double>", &t_cHadronEneIsoR_3);
1141  tree_->Branch("t_nHadronEneIsoR", "std::vector<double>", &t_nHadronEneIsoR);
1142  tree_->Branch("t_photonEneIsoR", "std::vector<double>", &t_photonEneIsoR);
1143  tree_->Branch("t_eleEneIsoR", "std::vector<double>", &t_eleEneIsoR);
1144  tree_->Branch("t_muEneIsoR", "std::vector<double>", &t_muEneIsoR);
1145 
1146  tree_->Branch("t_maxNearPHCR", "std::vector<double>", &t_maxNearPHCR);
1147  tree_->Branch("t_cHadronEneHCR", "std::vector<double>", &t_cHadronEneHCR);
1148  tree_->Branch("t_cHadronEneHCR_1", "std::vector<double>", &t_cHadronEneHCR_1);
1149  tree_->Branch("t_cHadronEneHCR_2", "std::vector<double>", &t_cHadronEneHCR_2);
1150  tree_->Branch("t_cHadronEneHCR_3", "std::vector<double>", &t_cHadronEneHCR_3);
1151  tree_->Branch("t_nHadronEneHCR", "std::vector<double>", &t_nHadronEneHCR);
1152  tree_->Branch("t_photonEneHCR", "std::vector<double>", &t_photonEneHCR);
1153  tree_->Branch("t_eleEneHCR", "std::vector<double>", &t_eleEneHCR);
1154  tree_->Branch("t_muEneHCR", "std::vector<double>", &t_muEneHCR);
1155 
1156  tree_->Branch("t_maxNearPIsoHCR", "std::vector<double>", &t_maxNearPIsoHCR);
1157  tree_->Branch("t_cHadronEneIsoHCR", "std::vector<double>", &t_cHadronEneIsoHCR);
1158  tree_->Branch("t_cHadronEneIsoHCR_1", "std::vector<double>", &t_cHadronEneIsoHCR_1);
1159  tree_->Branch("t_cHadronEneIsoHCR_2", "std::vector<double>", &t_cHadronEneIsoHCR_2);
1160  tree_->Branch("t_cHadronEneIsoHCR_3", "std::vector<double>", &t_cHadronEneIsoHCR_3);
1161  tree_->Branch("t_nHadronEneIsoHCR", "std::vector<double>", &t_nHadronEneIsoHCR);
1162  tree_->Branch("t_photonEneIsoHCR", "std::vector<double>", &t_photonEneIsoHCR);
1163  tree_->Branch("t_eleEneIsoHCR", "std::vector<double>", &t_eleEneIsoHCR);
1164  tree_->Branch("t_muEneIsoHCR", "std::vector<double>", &t_muEneIsoHCR);
1165 }
1166 
1168  // t_maxNearP31x31 ->clear();
1169  // t_nEvtProc ->clear();
1170 
1171  t_isoTrkPAll->clear();
1172  t_isoTrkPtAll->clear();
1173  t_isoTrkPhiAll->clear();
1174  t_isoTrkEtaAll->clear();
1175  t_isoTrkDPhiAll->clear();
1176  t_isoTrkDEtaAll->clear();
1177  t_isoTrkPdgIdAll->clear();
1178 
1179  t_isoTrkP->clear();
1180  t_isoTrkPt->clear();
1181  t_isoTrkEne->clear();
1182  t_isoTrkEta->clear();
1183  t_isoTrkPhi->clear();
1184  t_isoTrkEtaEC->clear();
1185  t_isoTrkPhiEC->clear();
1186  t_isoTrkPdgId->clear();
1187 
1188  t_maxNearP31x31->clear();
1189  t_cHadronEne31x31->clear();
1190  t_cHadronEne31x31_1->clear();
1191  t_cHadronEne31x31_2->clear();
1192  t_cHadronEne31x31_3->clear();
1193  t_nHadronEne31x31->clear();
1194  t_photonEne31x31->clear();
1195  t_eleEne31x31->clear();
1196  t_muEne31x31->clear();
1197 
1198  t_maxNearP25x25->clear();
1199  t_cHadronEne25x25->clear();
1200  t_cHadronEne25x25_1->clear();
1201  t_cHadronEne25x25_2->clear();
1202  t_cHadronEne25x25_3->clear();
1203  t_nHadronEne25x25->clear();
1204  t_photonEne25x25->clear();
1205  t_eleEne25x25->clear();
1206  t_muEne25x25->clear();
1207 
1208  t_maxNearP21x21->clear();
1209  t_cHadronEne21x21->clear();
1210  t_cHadronEne21x21_1->clear();
1211  t_cHadronEne21x21_2->clear();
1212  t_cHadronEne21x21_3->clear();
1213  t_nHadronEne21x21->clear();
1214  t_photonEne21x21->clear();
1215  t_eleEne21x21->clear();
1216  t_muEne21x21->clear();
1217 
1218  t_maxNearP15x15->clear();
1219  t_cHadronEne15x15->clear();
1220  t_cHadronEne15x15_1->clear();
1221  t_cHadronEne15x15_2->clear();
1222  t_cHadronEne15x15_3->clear();
1223  t_nHadronEne15x15->clear();
1224  t_photonEne15x15->clear();
1225  t_eleEne15x15->clear();
1226  t_muEne15x15->clear();
1227 
1228  t_maxNearP11x11->clear();
1229  t_cHadronEne11x11->clear();
1230  t_cHadronEne11x11_1->clear();
1231  t_cHadronEne11x11_2->clear();
1232  t_cHadronEne11x11_3->clear();
1233  t_nHadronEne11x11->clear();
1234  t_photonEne11x11->clear();
1235  t_eleEne11x11->clear();
1236  t_muEne11x11->clear();
1237 
1238  t_maxNearP9x9->clear();
1239  t_cHadronEne9x9->clear();
1240  t_cHadronEne9x9_1->clear();
1241  t_cHadronEne9x9_2->clear();
1242  t_cHadronEne9x9_3->clear();
1243  t_nHadronEne9x9->clear();
1244  t_photonEne9x9->clear();
1245  t_eleEne9x9->clear();
1246  t_muEne9x9->clear();
1247 
1248  t_maxNearP7x7->clear();
1249  t_cHadronEne7x7->clear();
1250  t_cHadronEne7x7_1->clear();
1251  t_cHadronEne7x7_2->clear();
1252  t_cHadronEne7x7_3->clear();
1253  t_nHadronEne7x7->clear();
1254  t_photonEne7x7->clear();
1255  t_eleEne7x7->clear();
1256  t_muEne7x7->clear();
1257 
1258  t_maxNearP3x3->clear();
1259  t_cHadronEne3x3->clear();
1260  t_cHadronEne3x3_1->clear();
1261  t_cHadronEne3x3_2->clear();
1262  t_cHadronEne3x3_3->clear();
1263  t_nHadronEne3x3->clear();
1264  t_photonEne3x3->clear();
1265  t_eleEne3x3->clear();
1266  t_muEne3x3->clear();
1267 
1268  t_maxNearP1x1->clear();
1269  t_cHadronEne1x1->clear();
1270  t_cHadronEne1x1_1->clear();
1271  t_cHadronEne1x1_2->clear();
1272  t_cHadronEne1x1_3->clear();
1273  t_nHadronEne1x1->clear();
1274  t_photonEne1x1->clear();
1275  t_eleEne1x1->clear();
1276  t_muEne1x1->clear();
1277 
1278  t_maxNearPHC1x1->clear();
1279  t_cHadronEneHC1x1->clear();
1280  t_cHadronEneHC1x1_1->clear();
1281  t_cHadronEneHC1x1_2->clear();
1282  t_cHadronEneHC1x1_3->clear();
1283  t_nHadronEneHC1x1->clear();
1284  t_photonEneHC1x1->clear();
1285  t_eleEneHC1x1->clear();
1286  t_muEneHC1x1->clear();
1287 
1288  t_maxNearPHC3x3->clear();
1289  t_cHadronEneHC3x3->clear();
1290  t_cHadronEneHC3x3_1->clear();
1291  t_cHadronEneHC3x3_2->clear();
1292  t_cHadronEneHC3x3_3->clear();
1293  t_nHadronEneHC3x3->clear();
1294  t_photonEneHC3x3->clear();
1295  t_eleEneHC3x3->clear();
1296  t_muEneHC3x3->clear();
1297 
1298  t_maxNearPHC5x5->clear();
1299  t_cHadronEneHC5x5->clear();
1300  t_cHadronEneHC5x5_1->clear();
1301  t_cHadronEneHC5x5_2->clear();
1302  t_cHadronEneHC5x5_3->clear();
1303  t_nHadronEneHC5x5->clear();
1304  t_photonEneHC5x5->clear();
1305  t_eleEneHC5x5->clear();
1306  t_muEneHC5x5->clear();
1307 
1308  t_maxNearPHC7x7->clear();
1309  t_cHadronEneHC7x7->clear();
1310  t_cHadronEneHC7x7_1->clear();
1311  t_cHadronEneHC7x7_2->clear();
1312  t_cHadronEneHC7x7_3->clear();
1313  t_nHadronEneHC7x7->clear();
1314  t_photonEneHC7x7->clear();
1315  t_eleEneHC7x7->clear();
1316  t_muEneHC7x7->clear();
1317 
1318  t_maxNearPR->clear();
1319  t_cHadronEneR->clear();
1320  t_cHadronEneR_1->clear();
1321  t_cHadronEneR_2->clear();
1322  t_cHadronEneR_3->clear();
1323  t_nHadronEneR->clear();
1324  t_photonEneR->clear();
1325  t_eleEneR->clear();
1326  t_muEneR->clear();
1327 
1328  t_maxNearPIsoR->clear();
1329  t_cHadronEneIsoR->clear();
1330  t_cHadronEneIsoR_1->clear();
1331  t_cHadronEneIsoR_2->clear();
1332  t_cHadronEneIsoR_3->clear();
1333  t_nHadronEneIsoR->clear();
1334  t_photonEneIsoR->clear();
1335  t_eleEneIsoR->clear();
1336  t_muEneIsoR->clear();
1337 
1338  t_maxNearPHCR->clear();
1339  t_cHadronEneHCR->clear();
1340  t_cHadronEneHCR_1->clear();
1341  t_cHadronEneHCR_2->clear();
1342  t_cHadronEneHCR_3->clear();
1343  t_nHadronEneHCR->clear();
1344  t_photonEneHCR->clear();
1345  t_eleEneHCR->clear();
1346  t_muEneHCR->clear();
1347 
1348  t_maxNearPIsoHCR->clear();
1349  t_cHadronEneIsoHCR->clear();
1350  t_cHadronEneIsoHCR_1->clear();
1351  t_cHadronEneIsoHCR_2->clear();
1352  t_cHadronEneIsoHCR_3->clear();
1353  t_nHadronEneIsoHCR->clear();
1354  t_photonEneIsoHCR->clear();
1355  t_eleEneIsoHCR->clear();
1356  t_muEneIsoHCR->clear();
1357 }
1358 
1360  int partID[Particles] = {11, -11, 21, 211, -211, 321, -321, 2212, 2112, -2212, -2112, 130};
1361  int ix = -1;
1362  for (int ik = 0; ik < Particles; ++ik) {
1363  if (pdgId == partID[ik]) {
1364  ix = ik;
1365  break;
1366  }
1367  }
1368  return ix;
1369 }
1370 
1371 //define this as a plug-in
std::vector< double > * t_cHadronEne25x25
std::vector< double > * t_eleEneHC3x3
static const std::string kSharedResource
Definition: TFileService.h:76
std::vector< double > * t_cHadronEne3x3_1
std::vector< double > * t_muEne9x9
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
Log< level::Info, true > LogVerbatim
std::vector< double > * t_cHadronEneHCR
std::vector< double > * t_cHadronEne11x11_1
std::vector< double > * t_cHadronEneHC7x7_1
std::vector< double > * t_photonEneHC1x1
std::vector< double > * t_cHadronEne21x21_1
std::vector< double > * t_nHadronEne3x3
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< double > * t_eleEne3x3
std::vector< double > * t_cHadronEne7x7
double genPartPBins_[NPBins_+1]
Definition: StudyCaloGen.cc:77
std::vector< double > * t_cHadronEneHC3x3_1
std::vector< double > * t_photonEne7x7
std::vector< double > * t_maxNearPHC1x1
std::vector< double > * t_isoTrkPhiAll
std::vector< double > * t_eleEne1x1
std::vector< double > * t_cHadronEne25x25_1
spr::genSimInfo isoinfoR
std::vector< double > * t_nHadronEneHC3x3
static constexpr int Particles
Definition: StudyCaloGen.cc:75
double cHadronEne_[3]
Definition: GenSimInfo.h:48
std::vector< double > * t_photonEne25x25
std::vector< double > * t_cHadronEne31x31_3
double photonEne
Definition: GenSimInfo.h:46
HepPDT::ParticleDataTable ParticleDataTable
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< double > * t_cHadronEneIsoHCR_3
std::vector< double > * t_cHadronEneHC5x5_3
std::vector< double > * t_cHadronEneHC3x3
std::vector< double > * t_muEne11x11
spr::genSimInfo isoinfoHC3x3
TH2D * h_pEta[Particles]
Definition: StudyCaloGen.cc:96
std::vector< double > * t_eleEneR
std::vector< double > * t_photonEne9x9
std::vector< double > * t_muEneIsoR
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
std::vector< double > * t_nHadronEneHC7x7
std::vector< double > * t_maxNearP1x1
std::vector< double > * t_nHadronEne21x21
std::vector< double > * t_cHadronEne31x31_1
std::vector< double > * t_cHadronEne15x15_1
T eta() const
Definition: PV3DBase.h:73
std::vector< double > * t_cHadronEneHC3x3_3
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double etaMax_
Definition: StudyCaloGen.cc:78
std::vector< double > * t_cHadronEneIsoHCR_1
std::vector< double > * t_cHadronEne7x7_3
TTree * tree_
Definition: StudyCaloGen.cc:97
std::vector< double > * t_eleEne31x31
std::vector< double > * t_cHadronEne11x11
spr::genSimInfo isoinfoIsoR
std::vector< double > * t_cHadronEneHCR_1
std::vector< double > * t_photonEne11x11
std::vector< double > * t_cHadronEne3x3
std::vector< double > * t_cHadronEneHC5x5
static constexpr int NEtaBins_
Definition: StudyCaloGen.cc:74
std::vector< double > * t_cHadronEneHC7x7
std::vector< double > * t_muEneR
std::vector< double > * t_muEne21x21
double a_mipR_
Definition: StudyCaloGen.cc:92
std::vector< double > * t_cHadronEneHC1x1_3
std::vector< double > * t_nHadronEneIsoR
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
std::vector< double > * t_muEneIsoHCR
std::vector< double > * t_muEneHCR
std::vector< double > * t_maxNearPIsoHCR
std::vector< double > * t_isoTrkPdgIdAll
void beginJob() override
std::vector< double > * t_muEne31x31
std::vector< double > * t_isoTrkPAll
Definition: StudyCaloGen.cc:99
double a_neutIsoR_
Definition: StudyCaloGen.cc:92
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< double > * t_nHadronEneR
std::vector< double > * t_muEne1x1
void bookHistograms()
std::vector< double > * t_cHadronEneR_3
TH1I * h_NEventProc
Definition: StudyCaloGen.cc:95
double cHadronEne
Definition: GenSimInfo.h:46
std::vector< double > * t_isoTrkEta
edm::ESGetToken< HepPDT::ParticleDataTable, PDTRecord > tok_pdt_
Definition: StudyCaloGen.cc:89
double nHadronEne
Definition: GenSimInfo.h:46
std::vector< double > * t_cHadronEneHC1x1_1
std::vector< double > * t_cHadronEneHC5x5_2
std::vector< double > * t_photonEneHC5x5
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< double > * t_maxNearPHC7x7
std::vector< double > * t_eleEneHCR
std::vector< double > * t_nHadronEne31x31
std::vector< double > * t_isoTrkDEtaAll
std::vector< double > * t_isoTrkEtaEC
std::vector< double > * t_cHadronEneIsoR_3
std::vector< double > * t_nHadronEneHC5x5
std::vector< double > * t_muEneHC5x5
std::vector< double > * t_nHadronEne7x7
int iEvent
Definition: GenABIO.cc:224
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
Definition: StudyCaloGen.cc:86
std::vector< double > * t_maxNearP7x7
std::vector< double > * t_cHadronEne1x1
std::vector< double > * t_cHadronEne15x15_3
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: StudyCaloGen.cc:85
std::vector< double > * t_cHadronEne31x31_2
std::vector< double > * t_nHadronEneHCR
void clearTreeVectors()
void fillIsolatedTrack(math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId)
std::vector< double > * t_cHadronEne15x15
std::vector< double > * t_nHadronEneHC1x1
std::vector< double > * t_photonEneHC3x3
std::vector< double > * t_nHadronEne15x15
spr::genSimInfo isoinfo31x31
std::vector< double > * t_cHadronEne1x1_2
StudyCaloGen(const edm::ParameterSet &)
std::vector< double > * t_photonEne3x3
std::vector< double > * t_isoTrkPtAll
std::vector< double > * t_cHadronEneHC7x7_3
spr::genSimInfo isoinfo25x25
std::vector< double > * t_cHadronEne9x9
std::vector< double > * t_nHadronEne25x25
std::vector< double > * t_isoTrkP
std::vector< double > * t_cHadronEne21x21
std::vector< double > * t_eleEneHC5x5
std::vector< double > * t_photonEneIsoHCR
std::vector< double > * t_cHadronEneR_1
spr::genSimInfo isoinfo9x9
std::vector< double > * t_maxNearP21x21
std::vector< double > * t_muEne25x25
std::vector< double > * t_cHadronEne9x9_2
std::vector< double > * t_eleEne9x9
std::string genSrc_
Definition: StudyCaloGen.cc:80
std::vector< double > * t_cHadronEneIsoR_1
std::vector< double > * t_photonEneR
std::vector< double > * t_cHadronEneR
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > * t_cHadronEne11x11_2
void eGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, spr::genSimInfo &info, bool debug=false)
Definition: GenSimInfo.cc:10
std::vector< double > * t_maxNearP25x25
std::vector< double > * t_cHadronEne1x1_1
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
Definition: StudyCaloGen.cc:87
std::vector< double > * t_photonEneHC7x7
std::vector< double > * t_nHadronEne9x9
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static constexpr int EtaBins_
Definition: StudyCaloGen.cc:75
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< double > * t_cHadronEne25x25_3
std::vector< double > * t_eleEne25x25
std::vector< double > * t_maxNearPHC5x5
std::vector< double > * t_maxNearP15x15
spr::genSimInfo isoinfo1x1
std::vector< double > * t_cHadronEne15x15_2
std::vector< double > * t_photonEneIsoR
std::vector< double > * t_cHadronEneHC1x1
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
std::vector< double > * t_cHadronEneIsoR_2
std::vector< double > * t_muEne15x15
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
Definition: StudyCaloGen.cc:88
std::vector< double > * t_isoTrkDPhiAll
std::vector< double > * t_muEneHC3x3
std::vector< double > * t_isoTrkPt
std::vector< double > * t_cHadronEne21x21_2
spr::genSimInfo isoinfoHCR
double pCutIsolate_
Definition: StudyCaloGen.cc:78
std::vector< double > * t_maxNearPHC3x3
std::vector< double > * t_muEne7x7
std::vector< double > * t_cHadronEne11x11_3
std::vector< double > * t_cHadronEneR_2
spr::genSimInfo isoinfoHC1x1
std::vector< double > * t_cHadronEneIsoHCR
static constexpr int NPBins_
Definition: StudyCaloGen.cc:73
std::vector< double > * t_cHadronEneHC5x5_1
std::vector< double > * t_eleEne7x7
spr::genSimInfo isoinfo21x21
std::vector< double > * t_eleEneIsoHCR
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > * t_eleEne11x11
void endJob() override
Definition: StudyCaloGen.cc:64
std::vector< double > * t_maxNearP3x3
std::vector< double > * t_photonEne15x15
spr::genSimInfo isoinfoIsoHCR
std::vector< double > * t_eleEneHC1x1
std::vector< double > * t_cHadronEne7x7_1
std::vector< double > * t_muEne3x3
std::vector< double > * t_isoTrkPdgId
std::vector< double > * t_eleEne15x15
std::vector< double > * t_isoTrkEne
std::vector< double > * t_eleEneHC7x7
std::vector< double > * t_cHadronEne9x9_1
std::vector< double > * t_cHadronEne3x3_3
std::vector< double > * t_maxNearPR
std::vector< double > * t_cHadronEneHC7x7_2
std::vector< double > * t_cHadronEneHC3x3_2
spr::genSimInfo isoinfo3x3
std::vector< double > * t_cHadronEne7x7_2
void fillTrack(GlobalPoint &posVec, math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId, bool okECAL, bool accpet)
edm::EDGetTokenT< reco::GenParticleCollection > tok_genParticles_
Definition: StudyCaloGen.cc:83
std::vector< double > * t_maxNearP9x9
std::vector< double > * t_eleEne21x21
spr::genSimInfo isoinfo7x7
std::vector< double > * t_cHadronEne9x9_3
std::vector< double > * t_cHadronEneIsoHCR_2
std::vector< double > * t_maxNearP31x31
std::vector< double > * t_cHadronEne25x25_2
double genPartEtaBins_[NEtaBins_+1]
Definition: StudyCaloGen.cc:77
void hGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const HcalTopology *topology, int ieta, int iphi, spr::genSimInfo &info, bool includeHO=false, bool debug=false)
Definition: GenSimInfo.cc:90
double a_coneR_
Definition: StudyCaloGen.cc:92
std::vector< double > * t_cHadronEne3x3_2
std::vector< double > * t_isoTrkPhi
std::vector< double > * t_nHadronEne1x1
std::vector< double > * t_photonEne1x1
static constexpr int PBins_
Definition: StudyCaloGen.cc:75
std::vector< double > * t_nHadronEne11x11
spr::genSimInfo isoinfo15x15
std::vector< double > * t_photonEne31x31
spr::genSimInfo isoinfoHC7x7
std::vector< double > * t_maxNearPHCR
std::vector< double > * t_cHadronEneHCR_2
std::vector< double > * t_cHadronEneIsoR
edm::EDGetTokenT< edm::HepMCProduct > tok_hepmc_
Definition: StudyCaloGen.cc:82
int particleCode(int)
std::vector< double > * t_muEneHC1x1
std::vector< double > * t_cHadronEneHCR_3
spr::genSimInfo isoinfo11x11
std::vector< double > * t_nHadronEneIsoHCR
std::vector< double > * t_maxNearPIsoR
std::vector< double > * t_photonEneHCR
spr::genSimInfo isoinfoHC5x5
std::vector< double > * t_cHadronEne21x21_3
std::vector< double > * t_cHadronEne1x1_3
std::vector< double > * t_muEneHC7x7
double maxNearP
Definition: GenSimInfo.h:45
double a_charIsoR_
Definition: StudyCaloGen.cc:92
std::vector< double > * t_maxNearP11x11
std::vector< double > * t_isoTrkEtaAll
std::vector< double > * t_cHadronEne31x31
std::vector< double > * t_eleEneIsoR
std::vector< double > * t_photonEne21x21
std::vector< double > * t_cHadronEneHC1x1_2
std::vector< double > * t_isoTrkPhiEC