All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
caf::SRLorentzVector Class Reference

4-vector with more efficient storage than TLorentzVector More...

#include <SRLorentzVector.h>

Public Member Functions

 SRLorentzVector ()
 
virtual ~SRLorentzVector ()
 
 SRLorentzVector (const TLorentzVector &v)
 
 operator TLorentzVector () const
 Recommend users convert back to TLorentzVector for boosts etc. More...
 
float T () const
 
float X () const
 
float Y () const
 
float Z () const
 
float Mag () const
 
float Beta () const
 
float Gamma () const
 
TVector3 Vect () const
 

Public Attributes

float E
 
float px
 
float py
 
float pz
 

Detailed Description

4-vector with more efficient storage than TLorentzVector

Definition at line 17 of file SRLorentzVector.h.

Constructor & Destructor Documentation

caf::SRLorentzVector::SRLorentzVector ( )

Definition at line 10 of file SRLorentzVector.cxx.

10  :
11  E (std::numeric_limits<float>::signaling_NaN()),
12  px(std::numeric_limits<float>::signaling_NaN()),
13  py(std::numeric_limits<float>::signaling_NaN()),
14  pz(std::numeric_limits<float>::signaling_NaN())
15  {
16  }
caf::SRLorentzVector::~SRLorentzVector ( )
virtual

Definition at line 23 of file SRLorentzVector.cxx.

24  {
25  }
caf::SRLorentzVector::SRLorentzVector ( const TLorentzVector &  v)

Definition at line 18 of file SRLorentzVector.cxx.

19  : E(v.E()), px(v.X()), py(v.Y()), pz(v.Z())
20  {
21  }

Member Function Documentation

float caf::SRLorentzVector::Beta ( ) const
inline

Definition at line 36 of file SRLorentzVector.h.

36 {return Mag()/E;}
float Mag() const
float caf::SRLorentzVector::Gamma ( ) const
inline

Definition at line 37 of file SRLorentzVector.h.

37 {return 1.0/TMath::Sqrt(1-Beta()*Beta());}
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:172
float Beta() const
float caf::SRLorentzVector::Mag ( ) const
inline

Definition at line 35 of file SRLorentzVector.h.

35 {return TMath::Sqrt(px*px + py*py + pz*pz);}
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:172
caf::SRLorentzVector::operator TLorentzVector ( ) const

Recommend users convert back to TLorentzVector for boosts etc.

Definition at line 27 of file SRLorentzVector.cxx.

28  {
29  return TLorentzVector(px, py, pz, E);
30  }
float caf::SRLorentzVector::T ( ) const
inline

Definition at line 31 of file SRLorentzVector.h.

31 {return E;}
TVector3 caf::SRLorentzVector::Vect ( ) const
inline

Definition at line 39 of file SRLorentzVector.h.

39 {return TVector3(px, py, pz);}
float caf::SRLorentzVector::X ( ) const
inline

Definition at line 32 of file SRLorentzVector.h.

32 {return px;}
float caf::SRLorentzVector::Y ( ) const
inline

Definition at line 33 of file SRLorentzVector.h.

33 {return py;}
float caf::SRLorentzVector::Z ( ) const
inline

Definition at line 34 of file SRLorentzVector.h.

34 {return pz;}

Member Data Documentation

float caf::SRLorentzVector::E

Definition at line 42 of file SRLorentzVector.h.

float caf::SRLorentzVector::px

Definition at line 43 of file SRLorentzVector.h.

float caf::SRLorentzVector::py

Definition at line 44 of file SRLorentzVector.h.

float caf::SRLorentzVector::pz

Definition at line 45 of file SRLorentzVector.h.


The documentation for this class was generated from the following files: