P4BasePtEtaPhiM is a base class for classes with 4-momentum behavior, for which pt, eta, phi and M are natural parameters, which is typically the case for a ger object.
More...
#include <P4BasePtEtaPhiM.h>
|
| virtual | ~P4BasePtEtaPhiM () |
| | virtual destructor needed for inheritance
|
| double | px () const |
| | {@ a la I4Momentum -like interface
|
| double | py () const |
| double | pz () const |
| virtual double | m () const =0 |
| double | m2 () const |
| double | p () const |
| double | p2 () const |
| virtual double | eta () const =0 |
| virtual double | phi () const =0 |
| double | e () const |
| double | et () const |
| virtual double | pt () const =0 |
| double | iPt () const |
| double | rapidity () const |
| double | cosPhi () const |
| double | sinPhi () const |
| double | tanTh () const |
| double | cosTh () const |
| double | sinTh () const |
| double | cotTh () const |
| CLHEP::HepLorentzVector | hlv () const |
| std::ostream & | dump (std::ostream &out) const |
| | Print I4Momentum content.
|
P4BasePtEtaPhiM is a base class for classes with 4-momentum behavior, for which pt, eta, phi and M are natural parameters, which is typically the case for a ger object.
Any class deriving from it should implement pt(), eta(), phi(), m().
- Author
- Olga Igonkina olya@.nosp@m.cern.nosp@m..ch
Definition at line 32 of file P4BasePtEtaPhiM.h.
◆ ~P4BasePtEtaPhiM()
| P4BasePtEtaPhiM::~P4BasePtEtaPhiM |
( |
| ) |
|
|
inlinevirtual |
◆ cosPhi()
| double P4BasePtEtaPhiM::cosPhi |
( |
| ) |
const |
|
inline |
Definition at line 172 of file P4BasePtEtaPhiM.h.
173{
174 return std::cos(this->
phi());
175}
virtual double phi() const =0
◆ cosTh()
| double P4BasePtEtaPhiM::cosTh |
( |
| ) |
const |
|
inline |
Definition at line 184 of file P4BasePtEtaPhiM.h.
185{
186 return std::tanh(this->
eta());
187}
virtual double eta() const =0
◆ cotTh()
| double P4BasePtEtaPhiM::cotTh |
( |
| ) |
const |
|
inline |
◆ dump()
| std::ostream & P4BasePtEtaPhiM::dump |
( |
std::ostream & | out | ) |
const |
|
inline |
Print I4Momentum content.
Definition at line 236 of file P4BasePtEtaPhiM.h.
237{
239 s <<
"[pt,eta,phi,m] ="
240 << std::right << std::scientific << std::setprecision(8)
241 << std::setw(16) << this->
pt()
242 << std::setw(16) << this->
eta()
243 << std::setw(16) << this->
phi()
244 << std::setw(16) << this->
m();
245
248}
virtual double m() const =0
virtual double pt() const =0
◆ e()
| double P4BasePtEtaPhiM::e |
( |
| ) |
const |
|
inline |
Definition at line 141 of file P4BasePtEtaPhiM.h.
142{
143 const double theMass = this->
m();
144 const double thePt = this->
pt();
145 const double thePz = this->
pz();
146
147
148
149
150
151 const double eSign = (thePt >= 0.) ? +1. : -1.;
152 return eSign * std::sqrt( thePt*thePt + thePz*thePz + theMass*theMass);
153}
◆ et()
| double P4BasePtEtaPhiM::et |
( |
| ) |
const |
|
inline |
◆ eta()
| virtual double P4BasePtEtaPhiM::eta |
( |
| ) |
const |
|
pure virtual |
◆ hlv()
| CLHEP::HepLorentzVector P4BasePtEtaPhiM::hlv |
( |
| ) |
const |
|
inline |
Definition at line 217 of file P4BasePtEtaPhiM.h.
218{
219
220 const double theM = this->
m();
221
222 const double thePt = this->
pt();
223
224
225 const double thePx = thePt*this->
cosPhi();
226 const double thePy = thePt*this->
sinPhi();
227
228 const double thePz = thePt*this->
cotTh();
229
230 const double theE=std::sqrt(thePt*thePt+thePz*thePz+theM*theM);
231
232
233 return CLHEP::HepLorentzVector( thePx, thePy, thePz, theE );
234}
◆ iPt()
| double P4BasePtEtaPhiM::iPt |
( |
| ) |
const |
|
inline |
◆ m()
| virtual double P4BasePtEtaPhiM::m |
( |
| ) |
const |
|
pure virtual |
◆ m2()
| double P4BasePtEtaPhiM::m2 |
( |
| ) |
const |
|
inline |
◆ p()
| double P4BasePtEtaPhiM::p |
( |
| ) |
const |
|
inline |
Definition at line 116 of file P4BasePtEtaPhiM.h.
117{
118 const double thePt = this->
pt();
119 const double thePz = this->
pz();
120
121
122
123
124
125 const double eSign = (thePt >= 0.) ? +1. : -1.;
126 return eSign * std::sqrt( thePt*thePt + thePz*thePz );
127}
◆ p2()
| double P4BasePtEtaPhiM::p2 |
( |
| ) |
const |
|
inline |
Definition at line 129 of file P4BasePtEtaPhiM.h.
130{
131
132
133
134
135 const double pt = this->
pt();
136 const double pz = this->
pz();
137
139}
◆ phi()
| virtual double P4BasePtEtaPhiM::phi |
( |
| ) |
const |
|
pure virtual |
◆ pt()
| virtual double P4BasePtEtaPhiM::pt |
( |
| ) |
const |
|
pure virtual |
◆ px()
| double P4BasePtEtaPhiM::px |
( |
| ) |
const |
|
inline |
◆ py()
| double P4BasePtEtaPhiM::py |
( |
| ) |
const |
|
inline |
◆ pz()
| double P4BasePtEtaPhiM::pz |
( |
| ) |
const |
|
inline |
◆ rapidity()
| double P4BasePtEtaPhiM::rapidity |
( |
| ) |
const |
|
inline |
Definition at line 165 of file P4BasePtEtaPhiM.h.
166 {
167 const double theE=this->
e();
168 const double thePz=this->
pz();
169 return 0.5*std::log((theE+thePz)/(theE-thePz));
170 }
◆ sinPhi()
| double P4BasePtEtaPhiM::sinPhi |
( |
| ) |
const |
|
inline |
◆ sinTh()
| double P4BasePtEtaPhiM::sinTh |
( |
| ) |
const |
|
inline |
Definition at line 189 of file P4BasePtEtaPhiM.h.
190{
191
192
193 double aEta=std::abs(this->
eta());
194 if ( aEta>710) {
195 aEta=710;
196 }
197
198 return 1./std::cosh(aEta);
199}
◆ tanTh()
| double P4BasePtEtaPhiM::tanTh |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: