ATLAS Offline Software
CaloVertexedCell.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #ifndef CALOUTILS_CALOVERTEXEDCELL_H
17 #define CALOUTILS_CALOVERTEXEDCELL_H
18 
19 
20 #include "CaloEvent/CaloCell.h"
21 #include "FourMom/P4EEtaPhiMBase.h"
22 #include "CxxUtils/fpcompare.h"
23 
24 
25 class CaloCell;
26 
27 
36  : public P4EEtaPhiMBase
37 {
38 public:
46 
47 
57  const Amg::Vector3D& vx);
58 
62  const CaloCell& cell() const { return *m_cell; }
63 
65  virtual double eta() const final { return m_eta; }
66 
68  virtual double phi() const final { return m_phi; }
69 
71  virtual double e() const final { return m_cell->e(); }
72 
74  virtual double m() const final { return m_cell->m(); }
75 
77  virtual double sinTh() const final { return m_sinth; }
78 
80  virtual double cosTh() const final { return m_costh; }
81 
83  virtual double sinPhi() const final { return m_sinph; }
84 
86  virtual double cosPhi() const final { return m_cosph; }
87 
89  double energy() const { return m_cell->energy(); }
90 
91 
95  struct compE
96  {
98  const CaloVertexedCell& b) const
99  {
100  return CxxUtils::fpcompare::greater (a.e(), b.e());
101  }
102  };
103 
104 
105 private:
110  void computeVertexCorr (const Amg::Vector3D& vx);
111 
113  const CaloCell* m_cell;
114 
116  double m_eta;
117 
119  double m_phi;
120 
122  double m_sinth;
123 
125  double m_costh;
126 
128  double m_sinph;
129 
131  double m_cosph;
132 };
133 
134 
135 
136 #endif // not CALOUTILS_CALOVERTEXEDCELL_H
CaloVertexedCell::m_eta
double m_eta
The recalculated cell eta.
Definition: CaloVertexedCell.h:116
P4EEtaPhiMBase.h
CaloVertexedCell::eta
virtual double eta() const final
The pseudorapidity of the particle.
Definition: CaloVertexedCell.h:65
CaloVertexedCell::sinTh
virtual double sinTh() const final
The sine of the polar angle of the particle.
Definition: CaloVertexedCell.h:77
CaloVertexedCell::energy
double energy() const
The energy of the particle.
Definition: CaloVertexedCell.h:89
CaloCell.h
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:317
CaloVertexedCell::phi
virtual double phi() const final
The aximuthal angle of the particle.
Definition: CaloVertexedCell.h:68
CaloVertexedCell::m
virtual double m() const final
The mass of the particle.
Definition: CaloVertexedCell.h:74
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
CxxUtils::fpcompare::greater
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:140
CaloVertexedCell::m_sinph
double m_sinph
The recalculated cell sin(phi).
Definition: CaloVertexedCell.h:128
CaloVertexedCell::m_phi
double m_phi
The recalculated cell phi.
Definition: CaloVertexedCell.h:119
CaloVertexedCell::computeVertexCorr
void computeVertexCorr(const Amg::Vector3D &vx)
Calculate cell kinematics for a given vertex.
Definition: CaloVertexedCell.cxx:63
CaloVertexedCell::e
virtual double e() const final
The energy of the particle.
Definition: CaloVertexedCell.h:71
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:311
CaloVertexedCell::cell
const CaloCell & cell() const
Return the cell being proxied,.
Definition: CaloVertexedCell.h:62
CaloVertexedCell::m_cell
const CaloCell * m_cell
The cell being proxied.
Definition: CaloVertexedCell.h:113
fpcompare.h
Workaround x86 precision issues for FP inequality comparisons.
CaloVertexedCell::m_cosph
double m_cosph
The recalculated cell cos(phi).
Definition: CaloVertexedCell.h:131
CaloVertexedCell::compE
Helper to compare two of these objects by energy.
Definition: CaloVertexedCell.h:96
CaloVertexedCell::sinPhi
virtual double sinPhi() const final
The sine of the azimuthal angle of the particle.
Definition: CaloVertexedCell.h:83
CaloVertexedCell::m_costh
double m_costh
The recalculated cell cos(theta).
Definition: CaloVertexedCell.h:125
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CaloVertexedCell::cosPhi
virtual double cosPhi() const final
The cosine of the azimuthal angle of the particle.
Definition: CaloVertexedCell.h:86
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloVertexedCell
Evaluate cell kinematics with a different vertex.
Definition: CaloVertexedCell.h:37
CaloVertexedCell::cosTh
virtual double cosTh() const final
The cosine of the polar angle of the particle.
Definition: CaloVertexedCell.h:80
P4EEtaPhiMBase
Definition: P4EEtaPhiMBase.h:26
CaloVertexedCell::compE::operator()
bool operator()(const CaloVertexedCell &a, const CaloVertexedCell &b) const
Definition: CaloVertexedCell.h:97
CaloVertexedCell::m_sinth
double m_sinth
The recalculated cell sin(theta).
Definition: CaloVertexedCell.h:122
CaloCell::m
virtual double m() const override final
get mass (hardcoded to be null)
Definition: CaloCell.h:324
CaloVertexedCell::CaloVertexedCell
CaloVertexedCell(const CaloCell &cell)
Constructor.
Definition: CaloVertexedCell.cxx:24