ATLAS Offline Software
Loading...
Searching...
No Matches
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$
14
15
16#ifndef CALOUTILS_CALOVERTEXEDCELL_H
17#define CALOUTILS_CALOVERTEXEDCELL_H
18
19
20#include "CaloEvent/CaloCell.h"
22#include "CxxUtils/fpcompare.h"
23
24
25class CaloCell;
26
27
36 : public P4EEtaPhiMBase
37{
38public:
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
105private:
110 void computeVertexCorr (const Amg::Vector3D& vx);
111
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
static Double_t a
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
virtual double sinTh() const final
The sine of the polar angle of the particle.
double m_eta
The recalculated cell eta.
virtual double eta() const final
The pseudorapidity of the particle.
double m_cosph
The recalculated cell cos(phi).
virtual double phi() const final
The aximuthal angle of the particle.
const CaloCell & cell() const
Return the cell being proxied,.
double m_sinth
The recalculated cell sin(theta).
double m_sinph
The recalculated cell sin(phi).
CaloVertexedCell(const CaloCell &cell)
Constructor.
virtual double e() const final
The energy of the particle.
void computeVertexCorr(const Amg::Vector3D &vx)
Calculate cell kinematics for a given vertex.
double m_phi
The recalculated cell phi.
virtual double sinPhi() const final
The sine of the azimuthal angle of the particle.
virtual double cosPhi() const final
The cosine of the azimuthal angle of the particle.
double m_costh
The recalculated cell cos(theta).
virtual double m() const final
The mass of the particle.
const CaloCell * m_cell
The cell being proxied.
double energy() const
The energy of the particle.
virtual double cosTh() const final
The cosine of the polar angle of the particle.
P4EEtaPhiMBase is a base class for classes with 4-momentum behavior, for which E, eta,...
Workaround x86 precision issues for FP inequality comparisons.
Eigen::Matrix< double, 3, 1 > Vector3D
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition fpcompare.h:140
Helper to compare two of these objects by energy.
bool operator()(const CaloVertexedCell &a, const CaloVertexedCell &b) const