P4ImplPtEtaPhiM 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 <P4ImplPtEtaPhiM.h>
P4ImplPtEtaPhiM 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 40 of file P4ImplPtEtaPhiM.h.
◆ ErrorType
◆ P4ImplPtEtaPhiM() [1/6]
| P4ImplPtEtaPhiM::P4ImplPtEtaPhiM |
( |
| ) |
|
|
inline |
Default constructor:
Definition at line 134 of file P4ImplPtEtaPhiM.h.
134 :
135 P4BasePtEtaPhiM( ),
136 m_pt ( 0.*CLHEP::GeV ),
139 m_m ( 0.*CLHEP::GeV ),
141{}
std::unique_ptr< ErrorType > m_error
◆ P4ImplPtEtaPhiM() [2/6]
Copy constructor.
Definition at line 143 of file P4ImplPtEtaPhiM.h.
143 :
144 P4BasePtEtaPhiM( ),
150{}
◆ P4ImplPtEtaPhiM() [3/6]
| P4ImplPtEtaPhiM::P4ImplPtEtaPhiM |
( |
const double | pt, |
|
|
const double | eta, |
|
|
const double | phi, |
|
|
const double | m ) |
|
inline |
constructor with all data members
Definition at line 152 of file P4ImplPtEtaPhiM.h.
153 :
154 P4BasePtEtaPhiM( ),
160{}
double m() const
{@ a la I4Momentum -like interface
◆ P4ImplPtEtaPhiM() [4/6]
| P4ImplPtEtaPhiM::P4ImplPtEtaPhiM |
( |
const CLHEP::HepLorentzVector & | hlv | ) |
|
|
inline |
constructor from hlv to allow conversion from hlv
Definition at line 162 of file P4ImplPtEtaPhiM.h.
162 :
163 P4BasePtEtaPhiM( ),
169{}
CLHEP::HepLorentzVector hlv() const
◆ P4ImplPtEtaPhiM() [5/6]
| P4ImplPtEtaPhiM::P4ImplPtEtaPhiM |
( |
const I4Momentum & | theI4M | ) |
|
|
inlineexplicit |
◆ P4ImplPtEtaPhiM() [6/6]
| P4ImplPtEtaPhiM::P4ImplPtEtaPhiM |
( |
const I4Momentum *const | theI4M | ) |
|
|
inlineexplicit |
◆ ~P4ImplPtEtaPhiM()
| P4ImplPtEtaPhiM::~P4ImplPtEtaPhiM |
( |
| ) |
|
|
inlinevirtual |
◆ cosPhi()
| double P4BasePtEtaPhiM::cosPhi |
( |
| ) |
const |
|
inlineinherited |
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 |
|
inlineinherited |
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 |
|
inlineinherited |
◆ dump()
| std::ostream & P4BasePtEtaPhiM::dump |
( |
std::ostream & | out | ) |
const |
|
inlineinherited |
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 |
|
inlineinherited |
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}
◆ errors()
◆ et()
| double P4BasePtEtaPhiM::et |
( |
| ) |
const |
|
inlineinherited |
◆ eta()
| double P4ImplPtEtaPhiM::eta |
( |
void | | ) |
const |
|
inlinevirtual |
◆ hlv()
| CLHEP::HepLorentzVector P4BasePtEtaPhiM::hlv |
( |
| ) |
const |
|
inlineinherited |
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 |
|
inlineinherited |
◆ kind()
◆ m()
| double P4ImplPtEtaPhiM::m |
( |
void | | ) |
const |
|
inlinevirtual |
◆ m2()
| double P4BasePtEtaPhiM::m2 |
( |
| ) |
const |
|
inlineinherited |
◆ operator=()
Assignment operator.
Definition at line 14 of file P4ImplPtEtaPhiM.cxx.
15{
16 if ( this != &rhs ) {
21 }
22 return *this;
23}
◆ p()
| double P4BasePtEtaPhiM::p |
( |
| ) |
const |
|
inlineinherited |
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 |
|
inlineinherited |
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()
| double P4ImplPtEtaPhiM::phi |
( |
void | | ) |
const |
|
inlinevirtual |
◆ pt()
| double P4ImplPtEtaPhiM::pt |
( |
void | | ) |
const |
|
inlinevirtual |
◆ px()
| double P4BasePtEtaPhiM::px |
( |
| ) |
const |
|
inlineinherited |
◆ py()
| double P4BasePtEtaPhiM::py |
( |
| ) |
const |
|
inlineinherited |
◆ pz()
| double P4BasePtEtaPhiM::pz |
( |
| ) |
const |
|
inlineinherited |
◆ rapidity()
| double P4BasePtEtaPhiM::rapidity |
( |
| ) |
const |
|
inlineinherited |
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 }
◆ set4Mom() [1/3]
| void P4ImplPtEtaPhiM::set4Mom |
( |
const CLHEP::HepLorentzVector & | theHlv | ) |
|
|
inline |
set all 4-mom from CLHEP HepLorentzVector
Definition at line 253 of file P4ImplPtEtaPhiM.h.
254{
257
258
259
260
261
262
265}
◆ set4Mom() [2/3]
| void P4ImplPtEtaPhiM::set4Mom |
( |
const I4Momentum & | theI4Mom | ) |
|
|
inline |
◆ set4Mom() [3/3]
| void P4ImplPtEtaPhiM::set4Mom |
( |
const I4Momentum *const | theI4Mom | ) |
|
|
inline |
set all 4-mom from another I4Momentum pointer
Definition at line 248 of file P4ImplPtEtaPhiM.h.
249{
251}
void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
◆ setErrors()
◆ setEta()
| void P4ImplPtEtaPhiM::setEta |
( |
const double | theEta | ) |
|
|
inline |
◆ setM()
| void P4ImplPtEtaPhiM::setM |
( |
const double | theM | ) |
|
|
inline |
◆ setPhi()
| void P4ImplPtEtaPhiM::setPhi |
( |
const double | thePhi | ) |
|
|
inline |
◆ setPt()
| void P4ImplPtEtaPhiM::setPt |
( |
const double | thePt | ) |
|
|
inline |
◆ sinPhi()
| double P4BasePtEtaPhiM::sinPhi |
( |
| ) |
const |
|
inlineinherited |
◆ sinTh()
| double P4BasePtEtaPhiM::sinTh |
( |
| ) |
const |
|
inlineinherited |
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 |
|
inlineinherited |
◆ P4ImplPtEtaPhiMCnv_p1
◆ m_error
| std::unique_ptr< ErrorType> P4ImplPtEtaPhiM::m_error |
|
private |
◆ m_eta
| double P4ImplPtEtaPhiM::m_eta |
|
private |
◆ m_m
| double P4ImplPtEtaPhiM::m_m |
|
private |
◆ m_phi
| double P4ImplPtEtaPhiM::m_phi |
|
private |
◆ m_pt
| double P4ImplPtEtaPhiM::m_pt |
|
private |
The documentation for this class was generated from the following files: