CMS 3D CMS Logo

ContainmentCorrectionAnalyzer.cc
Go to the documentation of this file.
1 /*\class to compute not containment parameter */
2 
5 
6 using namespace cms;
7 using namespace edm;
8 using namespace std;
9 using namespace reco;
10 
12  BarrelSuperClusterCollection_ =
13  consumes<reco::SuperClusterCollection>(ps.getParameter<InputTag>("BarrelSuperClusterCollection"));
14  EndcapSuperClusterCollection_ =
15  consumes<reco::SuperClusterCollection>(ps.getParameter<InputTag>("EndcapSuperClusterCollection"));
16  reducedBarrelRecHitCollection_ =
17  consumes<EcalRecHitCollection>(ps.getParameter<InputTag>("reducedBarrelRecHitCollection"));
18  reducedEndcapRecHitCollection_ =
19  consumes<EcalRecHitCollection>(ps.getParameter<InputTag>("reducedEndcapRecHitCollection"));
20  SimTrackCollection_ = consumes<SimTrackContainer>(ps.getParameter<InputTag>("simTrackCollection"));
21  SimVertexCollection_ = consumes<SimVertexContainer>(ps.getParameter<InputTag>("simVertexCollection"));
22 }
23 
25 
28 
29  // Define reference histograms
30  h_EB_eRecoEtrueReference = fs->make<TH1F>("EB_eRecoEtrueReference", "EB_eRecoEtrueReference", 440, 0., 1.1);
31  h_EB_e9EtrueReference = fs->make<TH1F>("EB_e9EtrueReference", "EB_e9EtrueReference", 440, 0., 1.1);
32  h_EB_e25EtrueReference = fs->make<TH1F>("EB_e25EtrueReference", "EB_e25EtrueReference", 440, 0., 1.1);
33  h_EE_eRecoEtrueReference = fs->make<TH1F>("EE_eRecoEtrueReference", "EE_eRecoEtrueReference", 440, 0., 1.1);
34  h_EE_e9EtrueReference = fs->make<TH1F>("EE_e9EtrueReference", "EE_e9EtrueReference", 440, 0., 1.1);
35  h_EE_e25EtrueReference = fs->make<TH1F>("EE_e25EtrueReference", "EE_e25EtrueReference", 440, 0., 1.1);
36  h_EB_eTrue = fs->make<TH1F>("EB_eTrue", "EB_eTrue", 41, 40., 60.);
37  h_EE_eTrue = fs->make<TH1F>("EE_eTrue", "EE_eTrue", 41, 40., 60.);
38  h_EB_converted = fs->make<TH1F>("EB_converted", "EB_converted", 2, 0., 2.);
39  h_EE_converted = fs->make<TH1F>("EE_converted", "EE_converted", 2, 0., 2.);
40 }
41 
43  LogInfo("ContainmentCorrectionAnalyzer") << "Analyzing event " << evt.id() << "\n";
44 
45  // taking the needed collections
46  std::vector<SimTrack> theSimTracks;
48  evt.getByToken(SimTrackCollection_, SimTk);
49  Labels l;
50  labelsForToken(SimTrackCollection_, l);
51 
52  if (SimTk.isValid())
53  theSimTracks.insert(theSimTracks.end(), SimTk->begin(), SimTk->end());
54  else {
55  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
56  }
57 
58  std::vector<SimVertex> theSimVertexes;
60  evt.getByToken(SimVertexCollection_, SimVtx);
61  labelsForToken(SimVertexCollection_, l);
62 
63  if (SimVtx.isValid())
64  theSimVertexes.insert(theSimVertexes.end(), SimVtx->begin(), SimVtx->end());
65  else {
66  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
67  }
68 
69  const reco::SuperClusterCollection *BarrelSuperClusters = nullptr;
70  Handle<reco::SuperClusterCollection> pHybridBarrelSuperClusters;
71  evt.getByToken(BarrelSuperClusterCollection_, pHybridBarrelSuperClusters);
72  labelsForToken(BarrelSuperClusterCollection_, l);
73 
74  if (pHybridBarrelSuperClusters.isValid()) {
75  BarrelSuperClusters = pHybridBarrelSuperClusters.product();
76  } else {
77  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
78  }
79 
80  const reco::SuperClusterCollection *EndcapSuperClusters = nullptr;
81  Handle<reco::SuperClusterCollection> pMulti5x5EndcapSuperClusters;
82  evt.getByToken(EndcapSuperClusterCollection_, pMulti5x5EndcapSuperClusters);
83  labelsForToken(EndcapSuperClusterCollection_, l);
84 
85  if (pMulti5x5EndcapSuperClusters.isValid())
86  EndcapSuperClusters = pMulti5x5EndcapSuperClusters.product();
87  else {
88  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
89  }
90 
91  const EcalRecHitCollection *ebRecHits = nullptr;
93  evt.getByToken(reducedBarrelRecHitCollection_, pEBRecHits);
94  labelsForToken(reducedBarrelRecHitCollection_, l);
95 
96  if (pEBRecHits.isValid())
97  ebRecHits = pEBRecHits.product();
98  else {
99  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
100  }
101 
102  const EcalRecHitCollection *eeRecHits = nullptr;
103  Handle<EcalRecHitCollection> pEERecHits;
104  evt.getByToken(reducedEndcapRecHitCollection_, pEERecHits);
105  labelsForToken(reducedEndcapRecHitCollection_, l);
106 
107  if (pEERecHits.isValid())
108  eeRecHits = pEERecHits.product();
109  else {
110  LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module;
111  }
112 
113  const CaloTopology *topology = nullptr;
114  ESHandle<CaloTopology> pTopology;
115  es.get<CaloTopologyRecord>().get(pTopology);
116  if (pTopology.isValid())
117  topology = pTopology.product();
118 
119  std::vector<EcalSimPhotonMCTruth> photons = findMcTruth(theSimTracks, theSimVertexes);
120 
121  nMCphotons = 0;
122  nRECOphotons = 0;
123 
124  int mc_size = photons.size();
125  mcEnergy.resize(mc_size);
126  mcEta.resize(mc_size);
127  mcPhi.resize(mc_size);
128  mcPt.resize(mc_size);
129  isConverted.resize(mc_size);
130  x_vtx.resize(mc_size);
131  y_vtx.resize(mc_size);
132  z_vtx.resize(mc_size);
133 
134  superClusterEnergy.resize(mc_size);
135  superClusterEta.resize(mc_size);
136  superClusterPhi.resize(mc_size);
137  superClusterEt.resize(mc_size);
138  e1.resize(mc_size);
139  e9.resize(mc_size);
140  e25.resize(mc_size);
141  seedXtal.resize(mc_size);
142  iMC.resize(mc_size);
143 
144  // loop over MC truth photons
145  for (unsigned int ipho = 0; ipho < photons.size(); ipho++) {
146  math::XYZTLorentzVectorD vtx = photons[ipho].primaryVertex();
147  double phiTrue = photons[ipho].fourMomentum().phi();
148  double vtxPerp = sqrt(vtx.x() * vtx.x() + vtx.y() * vtx.y());
149  double etaTrue = ecalEta(photons[ipho].fourMomentum().eta(), vtx.z(), vtxPerp);
150  double etTrue = photons[ipho].fourMomentum().e() / cosh(etaTrue);
151  nMCphotons++;
152  mcEnergy[nMCphotons - 1] = photons[ipho].fourMomentum().e();
153  mcEta[nMCphotons - 1] = etaTrue;
154  mcPhi[nMCphotons - 1] = phiTrue;
155  mcPt[nMCphotons - 1] = etTrue;
156  isConverted[nMCphotons - 1] = photons[ipho].isAConversion();
157  x_vtx[nMCphotons - 1] = vtx.x();
158  y_vtx[nMCphotons - 1] = vtx.y();
159  z_vtx[nMCphotons - 1] = vtx.z();
160 
161  // check histos for MC truth
162  if (std::fabs(etaTrue) < 1.479) {
163  h_EB_eTrue->Fill(photons[ipho].fourMomentum().e());
164  h_EB_converted->Fill(photons[ipho].isAConversion());
165  }
166  if (std::fabs(etaTrue) >= 1.6) {
167  h_EE_eTrue->Fill(photons[ipho].fourMomentum().e());
168  h_EE_converted->Fill(photons[ipho].isAConversion());
169  }
170 
171  // barrel
172  if (std::fabs(etaTrue) < 1.479) {
173  double etaCurrent; // , etaFound = 0; // UNUSED
174  double phiCurrent;
175  // double etCurrent, etFound = 0; // UNUSED
176  const reco::SuperCluster *nearSC = nullptr;
177 
178  double closestParticleDistance = 999;
179  for (reco::SuperClusterCollection::const_iterator aClus = BarrelSuperClusters->begin();
180  aClus != BarrelSuperClusters->end();
181  aClus++) {
182  etaCurrent = aClus->position().eta();
183  phiCurrent = aClus->position().phi();
184  // etCurrent = aClus->energy()/std::cosh(etaCurrent); // UNUSED
185  double deltaR = std::sqrt(std::pow(etaCurrent - etaTrue, 2) + std::pow(phiCurrent - phiTrue, 2));
186  if (deltaR < closestParticleDistance) {
187  // etFound = etCurrent; // UNUSED
188  // etaFound = etaCurrent; // UNUSED
189  closestParticleDistance = deltaR;
190  nearSC = &(*aClus);
191  }
192  }
193 
194  if (closestParticleDistance < 0.3) {
195  // Is a matched particle dumping informations
196  nRECOphotons++;
197  superClusterEnergy[nRECOphotons - 1] = nearSC->rawEnergy();
198  superClusterEta[nRECOphotons - 1] = nearSC->position().eta();
199  superClusterPhi[nRECOphotons - 1] = nearSC->position().phi();
200  superClusterEt[nRECOphotons - 1] = nearSC->rawEnergy() / std::cosh(nearSC->position().eta());
201  iMC[nRECOphotons - 1] = nMCphotons - 1;
202 
203  const reco::CaloClusterPtr &theSeed = nearSC->seed();
204  seedXtal[nRECOphotons - 1] = EcalClusterTools::getMaximum(*theSeed, ebRecHits).first;
205  e1[nRECOphotons - 1] = EcalClusterTools::eMax(*theSeed, ebRecHits);
206  e9[nRECOphotons - 1] = EcalClusterTools::e3x3(*theSeed, ebRecHits, topology);
207  e25[nRECOphotons - 1] = EcalClusterTools::e5x5(*theSeed, ebRecHits, topology);
208  }
209  }
210 
211  // endcap
212  if (std::fabs(etaTrue) >= 1.6) {
213  double etaCurrent; // , etaFound = 0; // UNUSED
214  double phiCurrent;
215  // double etCurrent, etFound = 0; // UNUSED
216  const reco::SuperCluster *nearSC = nullptr;
217 
218  double closestParticleDistance = 999;
219  for (reco::SuperClusterCollection::const_iterator aClus = EndcapSuperClusters->begin();
220  aClus != EndcapSuperClusters->end();
221  aClus++) {
222  etaCurrent = aClus->position().eta();
223  phiCurrent = aClus->position().phi();
224  // etCurrent = aClus->energy()/std::cosh(etaCurrent);
225  double deltaR = std::sqrt(std::pow(etaCurrent - etaTrue, 2) + std::pow(phiCurrent - phiTrue, 2));
226  if (deltaR < closestParticleDistance) {
227  // etFound = etCurrent; // UNUSED
228  // etaFound = etaCurrent; // UNUSED
229  closestParticleDistance = deltaR;
230  nearSC = &(*aClus);
231  }
232  }
233 
234  if (closestParticleDistance < 0.3) {
235  // Is a matched particle dumping informations
236  nRECOphotons++;
237  float psEnergy = nearSC->preshowerEnergy();
238  superClusterEnergy[nRECOphotons - 1] = nearSC->rawEnergy() + psEnergy;
239  superClusterEta[nRECOphotons - 1] = nearSC->position().eta();
240  superClusterPhi[nRECOphotons - 1] = nearSC->position().phi();
241  superClusterEt[nRECOphotons - 1] = (nearSC->rawEnergy() + psEnergy) / std::cosh(nearSC->position().eta());
242  iMC[nRECOphotons - 1] = nMCphotons - 1;
243 
244  const reco::CaloClusterPtr &theSeed = nearSC->seed();
245  seedXtal[nRECOphotons - 1] = EcalClusterTools::getMaximum(*theSeed, eeRecHits).first;
246  e1[nRECOphotons - 1] = EcalClusterTools::eMax(*theSeed, eeRecHits) + psEnergy;
247  e9[nRECOphotons - 1] = EcalClusterTools::e3x3(*theSeed, eeRecHits, topology) + psEnergy;
248  e25[nRECOphotons - 1] = EcalClusterTools::e5x5(*theSeed, eeRecHits, topology) + psEnergy;
249  }
250  }
251  }
252 
253  // containment analysis for unconverted photons in the reference region only
254  for (int i = 0; i < nRECOphotons; i++) {
255  // barrel
256  if (fabs(superClusterEta[i]) < 1.479) {
257  if (isConverted[iMC[i]] != 1) {
258  int ietaAbs = (seedXtal[i] >> 9) & 0x7F;
259  int iphi = seedXtal[i] & 0x1FF;
260  if (ietaAbs > 5 && ietaAbs < 21 && ((iphi % 20) > 5) && ((iphi % 20) < 16)) {
261  h_EB_eRecoEtrueReference->Fill(superClusterEnergy[i] / mcEnergy[iMC[i]]);
262  h_EB_e9EtrueReference->Fill(e9[i] / mcEnergy[iMC[i]]);
263  h_EB_e25EtrueReference->Fill(e25[i] / mcEnergy[iMC[i]]);
264  }
265  }
266  }
267 
268  // endcap
269  if (fabs(superClusterEta[i]) > 1.6) {
270  if (isConverted[iMC[i]] != 1) {
271  if (fabs(superClusterEta[i]) > 1.7 && fabs(superClusterEta[i] < 2.3) &&
272  ((superClusterPhi[i] > -CLHEP::pi / 2. + 0.1 && superClusterPhi[i] < CLHEP::pi / 2. - 0.1) ||
273  (superClusterPhi[i] > CLHEP::pi / 2. + 0.1) || (superClusterPhi[i] < -CLHEP::pi / 2. - 0.1))) {
274  h_EE_eRecoEtrueReference->Fill(superClusterEnergy[i] / mcEnergy[iMC[i]]);
275  h_EE_e9EtrueReference->Fill(e9[i] / mcEnergy[iMC[i]]);
276  h_EE_e25EtrueReference->Fill(e25[i] / mcEnergy[iMC[i]]);
277  }
278  }
279  }
280 
281  } // loop over reco photons
282 }
283 
285 
286 float ContainmentCorrectionAnalyzer::ecalEta(float EtaParticle, float Zvertex, float plane_Radius) {
287  const float R_ECAL = 136.5;
288  const float Z_Endcap = 328.0;
289  const float etaBarrelEndcap = 1.479;
290 
291  if (EtaParticle != 0.) {
292  float Theta = 0.0;
293  float ZEcal = (R_ECAL - plane_Radius) * sinh(EtaParticle) + Zvertex;
294 
295  if (ZEcal != 0.0)
296  Theta = atan(R_ECAL / ZEcal);
297  if (Theta < 0.0)
298  Theta = Theta + Geom::pi();
299 
300  float ETA = -log(tan(0.5 * Theta));
301 
302  if (fabs(ETA) > etaBarrelEndcap) {
303  float Zend = Z_Endcap;
304  if (EtaParticle < 0.0)
305  Zend = -Zend;
306  float Zlen = Zend - Zvertex;
307  float RR = Zlen / sinh(EtaParticle);
308  Theta = atan((RR + plane_Radius) / Zend);
309  if (Theta < 0.0)
310  Theta = Theta + Geom::pi();
311  ETA = -log(tan(0.5 * Theta));
312  }
313 
314  return ETA;
315  } else {
316  LogWarning("") << "[ContainmentCorrectionAnalyzer::ecalEta] Warning: Eta "
317  "equals to zero, not correcting";
318  return EtaParticle;
319  }
320 }
321 
322 // taken from an old version of RecoEgamma/EgammaMCTools/src/PhotonMCTruthFinder
323 std::vector<EcalSimPhotonMCTruth> ContainmentCorrectionAnalyzer::findMcTruth(std::vector<SimTrack> &theSimTracks,
324  std::vector<SimVertex> &theSimVertices) {
325  std::vector<EcalSimPhotonMCTruth> result;
326 
327  geantToIndex_.clear();
328  // int idTrk1_[10]; // UNUSED
329  // int idTrk2_[10]; // UNUSED
330 
331  // Local variables
332  // const int SINGLE=1; // UNUSED
333  // const int DOUBLE=2; // UNUSED
334  // const int PYTHIA=3; // UNUSED
335  const int ELECTRON_FLAV = 1;
336  const int PIZERO_FLAV = 2;
337  const int PHOTON_FLAV = 3;
338 
339  // int ievtype=0; // UNUSED
340  int ievflav = 0;
341  std::vector<SimTrack *> photonTracks;
342  std::vector<SimTrack *> pizeroTracks;
343  std::vector<const SimTrack *> trkFromConversion;
344  SimVertex primVtx;
345  std::vector<int> convInd;
346 
347  fillMcTruth(theSimTracks, theSimVertices);
348  int iPV = -1;
349  int partType1 = 0;
350  int partType2 = 0;
351  std::vector<SimTrack>::iterator iFirstSimTk = theSimTracks.begin();
352  if (!(*iFirstSimTk).noVertex()) {
353  iPV = (*iFirstSimTk).vertIndex();
354  int vtxId = (*iFirstSimTk).vertIndex();
355  primVtx = theSimVertices[vtxId];
356  partType1 = (*iFirstSimTk).type();
357  }
358 
359  // Look at a second track
360  iFirstSimTk++;
361  if (iFirstSimTk != theSimTracks.end()) {
362  if ((*iFirstSimTk).vertIndex() == iPV) {
363  partType2 = (*iFirstSimTk).type();
364  }
365  }
366  int npv = 0;
367  int iPho = 0;
368  for (std::vector<SimTrack>::iterator iSimTk = theSimTracks.begin(); iSimTk != theSimTracks.end(); ++iSimTk) {
369  if ((*iSimTk).noVertex())
370  continue;
371  // int vertexId = (*iSimTk).vertIndex(); // UNUSED
372  // SimVertex vertex = theSimVertices[vertexId]; // UNUSED
373  if ((*iSimTk).vertIndex() == iPV) {
374  npv++;
375  if ((*iSimTk).type() == 22) {
376  convInd.push_back(0);
377  photonTracks.push_back(&(*iSimTk));
378  // math::XYZTLorentzVectorD momentum = (*iSimTk).momentum(); // UNUSED
379  }
380  }
381  }
382 
383  if (npv > 4) { // ievtype = PYTHIA; // UNUSED
384  } else if (npv == 1) {
385  if (abs(partType1) == 11) { /* ievtype = SINGLE; ==UNUSED== */
386  ievflav = ELECTRON_FLAV;
387  } else if (partType1 == 111) { /* ievtype = SINGLE; ==UNUSED== */
388  ievflav = PIZERO_FLAV;
389  } else if (partType1 == 22) { /* ievtype = SINGLE; ==UNUSED== */
390  ievflav = PHOTON_FLAV;
391  }
392  } else if (npv == 2) {
393  if (abs(partType1) == 11 && abs(partType2) == 11) { /* ievtype = DOUBLE; ==UNUSED== */
394  ievflav = ELECTRON_FLAV;
395  } else if (partType1 == 111 && partType2 == 111) { /* ievtype = DOUBLE; ==UNUSED== */
396  ievflav = PIZERO_FLAV;
397  } else if (partType1 == 22 && partType2 == 22) { /* ievtype = DOUBLE; ==UNUSED== */
398  ievflav = PHOTON_FLAV;
399  }
400  }
401 
402  // Look into converted photons
403  int isAconversion = 0;
404  if (ievflav == PHOTON_FLAV) {
405  int nConv = 0;
406  int iConv = 0;
407  iPho = 0;
408  for (std::vector<SimTrack *>::iterator iPhoTk = photonTracks.begin(); iPhoTk != photonTracks.end(); ++iPhoTk) {
409  trkFromConversion.clear();
410  for (std::vector<SimTrack>::iterator iSimTk = theSimTracks.begin(); iSimTk != theSimTracks.end(); ++iSimTk) {
411  if ((*iSimTk).noVertex())
412  continue;
413  if ((*iSimTk).vertIndex() == iPV)
414  continue;
415  if (abs((*iSimTk).type()) != 11)
416  continue;
417  int vertexId = (*iSimTk).vertIndex();
418  SimVertex vertex = theSimVertices[vertexId];
419  int motherId = -1;
420  if (vertex.parentIndex()) {
421  unsigned motherGeantId = vertex.parentIndex();
422  std::map<unsigned, unsigned>::iterator association = geantToIndex_.find(motherGeantId);
423  if (association != geantToIndex_.end())
424  motherId = association->second;
425  // int motherType = motherId == -1 ? 0 :
426  // theSimTracks[motherId].type();
427 
428  if (theSimTracks[motherId].trackId() == (*iPhoTk)->trackId()) {
430  trkFromConversion.push_back(&(*iSimTk));
431  }
432  }
433  } // loop over the SimTracks
434 
435  if (!trkFromConversion.empty()) {
436  isAconversion = 1;
437  nConv++;
438  convInd[iPho] = nConv;
439  int convVtxId = trkFromConversion[0]->vertIndex();
440  SimVertex convVtx = theSimVertices[convVtxId];
441  const math::XYZTLorentzVectorD &vtxPosition = convVtx.position();
442  // math::XYZTLorentzVectorD momentum = (*iPhoTk)->momentum(); // UNUSED
443  if (nConv <= 10) {
444  if (trkFromConversion.size() > 1) {
445  // idTrk1_[iConv]= trkFromConversion[0]->trackId(); // UNUSED
446  // idTrk2_[iConv]= trkFromConversion[1]->trackId(); // UNUSED
447  } else {
448  // idTrk1_[iConv]=trkFromConversion[0]->trackId(); // UNUSED
449  // idTrk2_[iConv]=-1; // UNUSED
450  }
451  }
452  iConv++;
453 
454  result.push_back(EcalSimPhotonMCTruth(isAconversion,
455  (*iPhoTk)->momentum(),
456  vtxPosition.pt(),
457  vtxPosition.z(),
458  vtxPosition,
459  primVtx.position(),
460  trkFromConversion));
461  } else {
462  isAconversion = 0;
463  math::XYZTLorentzVectorD vtxPosition(0., 0., 0., 0.);
464  result.push_back(EcalSimPhotonMCTruth(isAconversion,
465  (*iPhoTk)->momentum(),
466  vtxPosition.pt(),
467  vtxPosition.z(),
468  vtxPosition,
469  primVtx.position(),
470  trkFromConversion));
471  }
472  iPho++;
473  } // loop over the primary photons
474  } // Event with one or two photons
475 
476  return result;
477 }
478 
479 void ContainmentCorrectionAnalyzer::fillMcTruth(std::vector<SimTrack> &simTracks, std::vector<SimVertex> &simVertices) {
480  unsigned nVtx = simVertices.size();
481  unsigned nTks = simTracks.size();
482  if (nVtx == 0)
483  return;
484  // create a map associating geant particle id and position in the event
485  // SimTrack vector
486  for (unsigned it = 0; it < nTks; ++it) {
487  geantToIndex_[simTracks[it].trackId()] = it;
488  }
489 }
T getParameter(std::string const &) const
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:131
std::vector< EcalSimPhotonMCTruth > findMcTruth(std::vector< SimTrack > &theSimTracks, std::vector< SimVertex > &theSimVertices)
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const Double_t pi
#define ETA
float ecalEta(float EtaParticle, float Zvertex, float plane_Radius)
int parentIndex() const
Definition: SimVertex.h:29
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static float etaBarrelEndcap
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const math::XYZTLorentzVectorD & position() const
Definition: CoreSimVertex.h:21
bool isValid() const
Definition: HandleBase.h:74
char const * module
Definition: ProductLabels.h:5
Namespace of DDCMS conversion namespace.
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
T const * product() const
Definition: Handle.h:74
double ecalEta(const math::XYZVector &momentum, const math::XYZPoint &vertex)
edm::EventID id() const
Definition: EventBase.h:59
fixed size matrix
HLT enums.
T get() const
Definition: EventSetup.h:71
void analyze(const edm::Event &, const edm::EventSetup &) override
static float Z_Endcap
ContainmentCorrectionAnalyzer(const edm::ParameterSet &)
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:50
constexpr double pi()
Definition: Pi.h:31
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
static float R_ECAL
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void fillMcTruth(std::vector< SimTrack > &theSimTracks, std::vector< SimVertex > &theSimVertices)