#include <TruthParticleMomentum.h>
|
| const HepMC::FourVector * | m_hlv |
| | The CLHEP::LorentzVector we are proxying (from the HepMC::GenParticle which is also being proxied)
|
Definition at line 27 of file TruthParticleMomentum.h.
◆ TruthParticleMomentum() [1/3]
| TruthParticleMomentum::TruthParticleMomentum |
( |
| ) |
|
Default constructor:
Definition at line 28 of file TruthParticleMomentum.cxx.
28 :
30{}
const HepMC::FourVector * m_hlv
The CLHEP::LorentzVector we are proxying (from the HepMC::GenParticle which is also being proxied)
◆ TruthParticleMomentum() [2/3]
◆ TruthParticleMomentum() [3/3]
| TruthParticleMomentum::TruthParticleMomentum |
( |
const HepMC::FourVector & | hlv | ) |
|
◆ ~TruthParticleMomentum()
| TruthParticleMomentum::~TruthParticleMomentum |
( |
| ) |
|
|
virtual |
◆ cosPhi()
| double TruthParticleMomentum::cosPhi |
( |
| ) |
const |
|
inline |
Definition at line 239 of file TruthParticleMomentum.h.
240{
241 return this->
px()/this->
pt();
242}
double px() const
{@ a la I4Momentum -like interface
◆ cosTh()
| double TruthParticleMomentum::cosTh |
( |
| ) |
const |
|
inline |
◆ cotTh()
| double TruthParticleMomentum::cotTh |
( |
| ) |
const |
|
inline |
◆ dump()
| std::ostream & TruthParticleMomentum::dump |
( |
std::ostream & | out | ) |
const |
Print I4Momentum content.
Definition at line 57 of file TruthParticleMomentum.cxx.
58{
59 std::stringstream
buf;
60 buf <<
"[px,py,pz,e] ="
61 << std::right << std::scientific << std::setprecision(8)
62 << std::setw(16) << this->
px()
63 << std::setw(16) << this->
py()
64 << std::setw(16) << this->
pz()
65 << std::setw(16) << this->
e();
67}
◆ e()
| double TruthParticleMomentum::e |
( |
| ) |
const |
|
inline |
◆ errors()
◆ et()
| double TruthParticleMomentum::et |
( |
| ) |
const |
|
inline |
Definition at line 217 of file TruthParticleMomentum.h.
218{
219
220 const double theE = this->
e();
221 const double theSinTh = this->
sinTh();
222
223 return theE*theSinTh;
224}
◆ eta()
| double TruthParticleMomentum::eta |
( |
| ) |
const |
|
inline |
Definition at line 189 of file TruthParticleMomentum.h.
190{
191 const double px=this->
px();
192 const double py=this->
py();
193 const double pz=this->
pz();
194
195
196
198 if (
p==0.0)
return 0.0;
199 if (
p==+
pz)
return +std::numeric_limits<double>::infinity();
200 if (
p==-
pz)
return -std::numeric_limits<double>::infinity();
202}
◆ hlv()
| CLHEP::HepLorentzVector TruthParticleMomentum::hlv |
( |
| ) |
const |
|
inline |
◆ iPt()
| double TruthParticleMomentum::iPt |
( |
| ) |
const |
|
inline |
◆ kind()
◆ m()
| double TruthParticleMomentum::m |
( |
| ) |
const |
|
inline |
◆ m2()
| double TruthParticleMomentum::m2 |
( |
| ) |
const |
|
inline |
Definition at line 149 of file TruthParticleMomentum.h.
150{
151 const double thePx = this->
px();
152 const double thePy = this->
py();
153 const double thePz = this->
pz();
154 const double theE = this->
e();
155
156 const double theM2=
157 theE*theE - ( thePx*thePx +
158 thePy*thePy +
159 thePz*thePz );
160
161 return theM2;
162
163}
◆ operator=()
◆ p()
| double TruthParticleMomentum::p |
( |
| ) |
const |
|
inline |
◆ p2()
| double TruthParticleMomentum::p2 |
( |
| ) |
const |
|
inline |
◆ phi()
| double TruthParticleMomentum::phi |
( |
| ) |
const |
|
inline |
Definition at line 204 of file TruthParticleMomentum.h.
205{
206 const double thePx = this->
px();
207 const double thePy = this->
py();
208 return thePx == 0.0 && thePy == 0.0 ? 0.0 : std::atan2(thePy,thePx);
209}
◆ pt()
| double TruthParticleMomentum::pt |
( |
| ) |
const |
|
inline |
Definition at line 226 of file TruthParticleMomentum.h.
227{
228 const double thePx = this->
px();
229 const double thePy = this->
py();
230
231 return std::sqrt(thePx*thePx+thePy*thePy);
232}
◆ px()
| double TruthParticleMomentum::px |
( |
| ) |
const |
|
inline |
◆ py()
| double TruthParticleMomentum::py |
( |
| ) |
const |
|
inline |
◆ pz()
| double TruthParticleMomentum::pz |
( |
| ) |
const |
|
inline |
◆ rapidity()
| double TruthParticleMomentum::rapidity |
( |
| ) |
const |
|
inline |
Definition at line 179 of file TruthParticleMomentum.h.
180{
181 const double e =this->
e();
182 const double pz=this->
pz();
183 if (
e==0.0)
return 0.0;
184 if (
e==+
pz)
return +std::numeric_limits<double>::infinity();
185 if (
e==-
pz)
return -std::numeric_limits<double>::infinity();
186 return 0.5*std::log((
e+
pz)/(
e-
pz));
187}
◆ set4Mom() [1/4]
| void TruthParticleMomentum::set4Mom |
( |
const CLHEP::HepLorentzVector & | theHlv | ) |
|
|
inlinevirtual |
set 4Momentum (will throw exception if cannot be implemented)
Definition at line 291 of file TruthParticleMomentum.h.
292{
293 std::cout << " FATAL ERROR : TruthParticleMomentum::set4Mom called. Cannot change 4mom " << std::endl ;
294 std::abort();
295}
◆ set4Mom() [2/4]
| void TruthParticleMomentum::set4Mom |
( |
const HepMC::FourVector & | hlv | ) |
|
|
inline |
◆ set4Mom() [3/4]
| void TruthParticleMomentum::set4Mom |
( |
const I4Momentum & | theI4Mom | ) |
|
|
inlinevirtual |
set 4Momentum (will throw exception if cannot be implemented)
Definition at line 275 of file TruthParticleMomentum.h.
276{
277 std::cout << " FATAL ERROR : TruthParticleMomentum::set4Mom called. Cannot change 4mom " << std::endl ;
278 std::abort();
279
280
281}
◆ set4Mom() [4/4]
| void TruthParticleMomentum::set4Mom |
( |
const I4Momentum *const | theI4Mom | ) |
|
|
inlinevirtual |
set 4Momentum (will throw exception if cannot be implemented)
Definition at line 283 of file TruthParticleMomentum.h.
284{
285 std::cout << " FATAL ERROR : TruthParticleMomentum::set4Mom called. Cannot change 4mom " << std::endl ;
286 std::abort();
287
288
289}
◆ sinPhi()
| double TruthParticleMomentum::sinPhi |
( |
| ) |
const |
|
inline |
◆ sinTh()
| double TruthParticleMomentum::sinTh |
( |
| ) |
const |
|
inline |
◆ tanTh()
| double TruthParticleMomentum::tanTh |
( |
| ) |
const |
|
inline |
◆ m_hlv
| const HepMC::FourVector* TruthParticleMomentum::m_hlv |
|
private |
The CLHEP::LorentzVector we are proxying (from the HepMC::GenParticle which is also being proxied)
Definition at line 121 of file TruthParticleMomentum.h.
The documentation for this class was generated from the following files: