P4ImplIPtCotThPhiM is a base class for classes with 4-momentum behavior, for which 1/Pt, cottan(tehta), phi and M are natural parameters, which is typically the case of some (not all!) tracking classes.
More...
#include <P4ImplIPtCotThPhiM.h>
P4ImplIPtCotThPhiM is a base class for classes with 4-momentum behavior, for which 1/Pt, cottan(tehta), phi and M are natural parameters, which is typically the case of some (not all!) tracking classes.
Any class deriving from it should implement iPt(), cotTh(), phi(), m()
- Author
- David Rousseau rouss.nosp@m.eau@.nosp@m.lal.i.nosp@m.n2p3.nosp@m..fr
-
Sebastien Binet binet.nosp@m.@cer.nosp@m.n.ch
Definition at line 40 of file P4ImplIPtCotThPhiM.h.
◆ ErrorType
◆ P4ImplIPtCotThPhiM() [1/6]
| P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM |
( |
| ) |
|
|
inline |
Default constructor:
Definition at line 144 of file P4ImplIPtCotThPhiM.h.
144 :
145 P4BaseIPtCotThPhiM( ),
146 m_iPt ( 0./CLHEP::GeV ),
149 m_m ( 0.*CLHEP::GeV ),
151{}
std::unique_ptr< ErrorType > m_error
error matrix pointer
◆ P4ImplIPtCotThPhiM() [2/6]
◆ P4ImplIPtCotThPhiM() [3/6]
| P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM |
( |
const double | iPt, |
|
|
const double | cotTh, |
|
|
const double | phi, |
|
|
const double | m ) |
|
inline |
constructor with all data members
Definition at line 162 of file P4ImplIPtCotThPhiM.h.
165 :
166 P4BaseIPtCotThPhiM( ),
172{
173
174
175
176
177}
double m() const
{@ a la I4Momentum -like interface
◆ P4ImplIPtCotThPhiM() [4/6]
| P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM |
( |
const CLHEP::HepLorentzVector & | hlv | ) |
|
|
inlineexplicit |
constructor from hlv to allow conversion from hlv
Definition at line 179 of file P4ImplIPtCotThPhiM.h.
179 :
180 P4BaseIPtCotThPhiM( ),
186{}
CLHEP::HepLorentzVector hlv() const
◆ P4ImplIPtCotThPhiM() [5/6]
| P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM |
( |
const I4Momentum & | theI4M | ) |
|
|
inlineexplicit |
◆ P4ImplIPtCotThPhiM() [6/6]
| P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM |
( |
const I4Momentum *const | theI4M | ) |
|
|
inlineexplicit |
◆ ~P4ImplIPtCotThPhiM()
| P4ImplIPtCotThPhiM::~P4ImplIPtCotThPhiM |
( |
| ) |
|
|
inlinevirtual |
◆ cosPhi()
| double P4BaseIPtCotThPhiM::cosPhi |
( |
| ) |
const |
|
inlineinherited |
◆ cosTh()
| double P4BaseIPtCotThPhiM::cosTh |
( |
| ) |
const |
|
inlineinherited |
Definition at line 190 of file P4BaseIPtCotThPhiM.h.
191{
192 const double theCotTh = this->
cotTh();
193 const double theCotTh2 = theCotTh*theCotTh;
194 const double theCosTh = std::sqrt(theCotTh2/(1.+theCotTh2));
195 if ( theCotTh >= 0. ) {
196 return theCosTh;
197 } else{
198 return -theCosTh;
199 }
200}
virtual double cotTh() const =0
◆ cotTh()
| double P4ImplIPtCotThPhiM::cotTh |
( |
| ) |
const |
|
inlinevirtual |
◆ dump()
| std::ostream & P4BaseIPtCotThPhiM::dump |
( |
std::ostream & | out | ) |
const |
|
inlineinherited |
Print I4Momentum content.
Definition at line 243 of file P4BaseIPtCotThPhiM.h.
244{
246 s <<
"[ipt,cotTh,phi,m] ="
247 << std::right << std::scientific << std::setprecision(8)
248 << std::setw(16) << this->
iPt()
249 << std::setw(16) << this->
cotTh()
250 << std::setw(16) << this->
phi()
251 << std::setw(16) << this->
m();
252
254
256}
virtual double m() const =0
virtual double iPt() const =0
◆ e()
| double P4BaseIPtCotThPhiM::e |
( |
| ) |
const |
|
inlineinherited |
Definition at line 154 of file P4BaseIPtCotThPhiM.h.
155{
156 const double theM = this->
m();
157 const double theP = this->
p();
158 if ( theM == 0. ) {
159 return theP;
160 } else {
161 return std::sqrt( theP*theP + theM*theM );
162 }
163}
◆ errors()
◆ et()
| double P4BaseIPtCotThPhiM::et |
( |
| ) |
const |
|
inlineinherited |
Definition at line 167 of file P4BaseIPtCotThPhiM.h.
168{
169 const double theE = this->
e();
170 const double theCotTh = this->
cotTh();
171 return theE / std::sqrt( 1 + theCotTh*theCotTh );
172}
◆ eta()
| double P4BaseIPtCotThPhiM::eta |
( |
void | | ) |
const |
|
inlineinherited |
Definition at line 135 of file P4BaseIPtCotThPhiM.h.
136{
137 const double theCotTh = this->
cotTh();
138 const double aux = std::sqrt(1+theCotTh*theCotTh);
139 return -0.5 * std::log( (aux-theCotTh) / (aux+theCotTh) );
140}
◆ hlv()
| CLHEP::HepLorentzVector P4BaseIPtCotThPhiM::hlv |
( |
| ) |
const |
|
inlineinherited |
Definition at line 226 of file P4BaseIPtCotThPhiM.h.
227{
228
229 const double thePt = this->
pt();
230 const double theM = this->
m();
231 const double thePx = thePt*this->
cosPhi();
232 const double thePy = thePt*this->
sinPhi();
233 const double thePz = thePt * this->
cotTh();
234 const double theE = std::sqrt( thePt * thePt
235 + thePz * thePz
236 + theM * theM );
237
238 return CLHEP::HepLorentzVector( thePx, thePy, thePz, theE );
239}
◆ iPt()
| double P4ImplIPtCotThPhiM::iPt |
( |
| ) |
const |
|
inlinevirtual |
◆ kind()
◆ m()
| double P4ImplIPtCotThPhiM::m |
( |
void | | ) |
const |
|
inlinevirtual |
◆ m2()
| double P4BaseIPtCotThPhiM::m2 |
( |
| ) |
const |
|
inlineinherited |
◆ operator=()
Assignment operator.
Definition at line 15 of file P4ImplIPtCotThPhiM.cxx.
16{
17 if ( this != &rhs ) {
22 }
23 return *this;
24}
◆ p()
| double P4BaseIPtCotThPhiM::p |
( |
| ) |
const |
|
inlineinherited |
Definition at line 118 of file P4BaseIPtCotThPhiM.h.
119{
120 const double theCotTh = this->
cotTh();
121 return std::sqrt( 1 + theCotTh*theCotTh ) / this->
iPt() ;
122}
◆ p2()
| double P4BaseIPtCotThPhiM::p2 |
( |
| ) |
const |
|
inlineinherited |
◆ phi()
| double P4ImplIPtCotThPhiM::phi |
( |
void | | ) |
const |
|
inlinevirtual |
◆ pt()
| double P4BaseIPtCotThPhiM::pt |
( |
void | | ) |
const |
|
inlineinherited |
◆ px()
| double P4BaseIPtCotThPhiM::px |
( |
| ) |
const |
|
inlineinherited |
◆ py()
| double P4BaseIPtCotThPhiM::py |
( |
| ) |
const |
|
inlineinherited |
◆ pz()
| double P4BaseIPtCotThPhiM::pz |
( |
| ) |
const |
|
inlineinherited |
◆ rapidity()
| double P4BaseIPtCotThPhiM::rapidity |
( |
| ) |
const |
|
inlineinherited |
Definition at line 144 of file P4BaseIPtCotThPhiM.h.
145{
146 const double theE=this->
e();
147 const double thePz=this->
pz();
148 return 0.5*std::log((theE+thePz)/(theE-thePz));
149}
◆ set4Mom() [1/3]
| void P4ImplIPtCotThPhiM::set4Mom |
( |
const CLHEP::HepLorentzVector & | theHlv | ) |
|
|
inlinevirtual |
◆ set4Mom() [2/3]
| void P4ImplIPtCotThPhiM::set4Mom |
( |
const I4Momentum & | theI4Mom | ) |
|
|
inlinevirtual |
set all 4-mom from another I4Momentum reference
Definition at line 256 of file P4ImplIPtCotThPhiM.h.
257{
262}
virtual double cotTh() const =0
cottan theta
virtual double m() const =0
mass
virtual double phi() const =0
phi in [-pi,pi[
virtual double iPt() const =0
inverse of transverse momentum
◆ set4Mom() [3/3]
| void P4ImplIPtCotThPhiM::set4Mom |
( |
const I4Momentum *const | theI4Mom | ) |
|
|
inlinevirtual |
◆ setCotTh()
| void P4ImplIPtCotThPhiM::setCotTh |
( |
const double | theCotTh | ) |
|
|
inlinevirtual |
◆ setErrors()
◆ setIPt()
| void P4ImplIPtCotThPhiM::setIPt |
( |
const double | theIPt | ) |
|
|
inlinevirtual |
◆ setM()
| void P4ImplIPtCotThPhiM::setM |
( |
const double | theM | ) |
|
|
inlinevirtual |
◆ setPhi()
| void P4ImplIPtCotThPhiM::setPhi |
( |
const double | thePhi | ) |
|
|
inlinevirtual |
◆ sinPhi()
| double P4BaseIPtCotThPhiM::sinPhi |
( |
| ) |
const |
|
inlineinherited |
◆ sinTh()
| double P4BaseIPtCotThPhiM::sinTh |
( |
| ) |
const |
|
inlineinherited |
Definition at line 204 of file P4BaseIPtCotThPhiM.h.
205{
206 const double theCotTh = this->
cotTh();
207 return 1. / std::sqrt( 1 + theCotTh*theCotTh );
208}
◆ tanTh()
| double P4BaseIPtCotThPhiM::tanTh |
( |
| ) |
const |
|
inlineinherited |
◆ P4ImplIPtCotThPhiMCnv_p1
◆ m_cotTh
| double P4ImplIPtCotThPhiM::m_cotTh |
|
private |
◆ m_error
| std::unique_ptr< ErrorType> P4ImplIPtCotThPhiM::m_error |
|
private |
◆ m_iPt
| double P4ImplIPtCotThPhiM::m_iPt |
|
private |
◆ m_m
| double P4ImplIPtCotThPhiM::m_m |
|
private |
◆ m_phi
| double P4ImplIPtCotThPhiM::m_phi |
|
private |
The documentation for this class was generated from the following files: