Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TMBLorentzVector Class Reference

TMBLorentzVector is based on ROOT's TLorentzVector, implementing all of its interfaces. More...

#include <TMBLorentzVector.hpp>

Inheritance diagram for TMBLorentzVector:

TMBVector3 TMBEMCluster TMBJet TMBMCpart TMBMuon TMBMuonType TMBParticleJet TMBTau TMBTrack TMBTrackCalJet TMBVertex List of all members.

Public Types

enum  ECoordinates {
  kX = 0,
  kY = 1,
  kZ = 2,
  kE = 3,
  kNUM_COORDINATES = 4,
  kSIZE = kNUM_COORDINATES
}
 Safe indexing of the coordinates when using with matrices, arrays, etc. More...

enum  EInitializer {
  kXYZE,
  kXYZM,
  kPEtaPhiE,
  kPEtaPhiM,
  kPtEtaPhiE,
  kPtEtaPhiM
}
 Initializer sets for the constructor. More...


Public Member Functions

 TMBLorentzVector (Double_t a=0.0, Double_t b=0.0, Double_t c=0.0, Double_t d=0.0, EInitializer init=kXYZE)
 TMBLorentzVector (const TVector3 &vect, Double_t v4, EInitializer init=kXYZE)
 TMBLorentzVector (const Double_t *a, EInitializer init=kXYZE)
 TMBLorentzVector (const Float_t *a, EInitializer init=kXYZE)
 TMBLorentzVector (const TMBLorentzVector &lv)
 TMBLorentzVector (const TLorentzVector &lv)
virtual ~TMBLorentzVector ()
TMBLorentzVectoroperator= (const TMBLorentzVector &lv)
TMBLorentzVector operator+ (const TMBLorentzVector &lv) const
TMBLorentzVectoroperator+= (const TMBLorentzVector &lv)
TMBLorentzVector operator- (const TMBLorentzVector &lv) const
TMBLorentzVectoroperator-= (const TMBLorentzVector &lv)
TMBLorentzVector operator- () const
TMBLorentzVector operator * (Double_t a) const
TMBLorentzVectoroperator *= (Double_t a)
Bool_t operator== (const TMBLorentzVector &lv) const
Bool_t operator!= (const TMBLorentzVector &lv) const
Bool_t is_equal (const TMBLorentzVector &lv) const
 Equivalence operator.

Double_t Mag2 () const
Double_t M2 () const
Double_t Mag () const
Double_t Mt2 () const
Double_t Mt () const
Double_t Beta () const
Double_t Gamma () const
Double_t Dot (const TMBLorentzVector &lv) const
Double_t operator * (const TMBLorentzVector &lv) const
void SetVectMag (const TVector3 &spatial, Double_t magnitude)
void SetVectM (const TVector3 &spatial, Double_t mass)
void SetVectE (const TVector3 &spatial, Double_t e)
Double_t Plus () const
Double_t Minus () const
TVector3 BoostVector () const
void Boost (Double_t x, Double_t y, Double_t z)
void Boost (const TVector3 &b)
Double_t Rapidity () const
TMBLorentzVectoroperator *= (const TRotation &m)
TMBLorentzVectorTransform (const TRotation &m)
TMBLorentzVectoroperator *= (const TLorentzRotation &)
TMBLorentzVectorTransform (const TLorentzRotation &)
 operator TLorentzVector () const
 Transformation with HepLorenzRotation.

Getters
Double_t M () const
virtual Double_t E () const
Double_t Energy () const
Double_t T () const
virtual const TMBVector3Vect () const
virtual TMBVector3Vect ()
void GetXYZT (Double_t *carray) const
void GetXYZT (Float_t *carray) const
Double_t operator() (int i) const
Double_t operator[] (int i) const
Setters
void Set (Double_t a=0.0, Double_t b=0.0, Double_t c=0.0, Double_t d=0.0, EInitializer init=kXYZE)
void SetM (Double_t a)
void SetT (Double_t a)
void SetE (Double_t a)
void SetVect (const TVector3 &vect3)
void SetPxPyPzE (Double_t px, Double_t py, Double_t pz, Double_t e)
void SetXYZT (Double_t x, Double_t y, Double_t z, Double_t t)
void SetXYZM (Double_t x, Double_t y, Double_t z, Double_t m)
void SetPtEtaPhiE (Double_t pt, Double_t eta, Double_t phi, Double_t e)
void SetPtEtaPhiM (Double_t pt, Double_t eta, Double_t phi, Double_t m)
void SetPEtaPhiE (Double_t p, Double_t eta, Double_t phi, Double_t e)
void SetPEtaPhiM (Double_t p, Double_t eta, Double_t phi, Double_t m)

Private Attributes

Double32_t fM
 mass


Detailed Description

TMBLorentzVector is based on ROOT's TLorentzVector, implementing all of its interfaces.

Changes compared to TLorentzVector: derives from TMBVector3 (instead of having a TVector3 member) mass is stored as member, not energy constructor allows several parameter sets, not just xyzE Rapidity() is rapidity, not pseudo-rapidity Some protections against divisions by zero some virtual methods

NOTE on mass: by setting an energy < |momentum|, Mag2() is negative. In that case, M() will return -sqrt(-Mag2()).

Definition at line 35 of file TMBLorentzVector.hpp.


Member Enumeration Documentation

enum TMBLorentzVector::ECoordinates
 

Safe indexing of the coordinates when using with matrices, arrays, etc.

Enumeration values:
kX 
kY 
kZ 
kE 
kNUM_COORDINATES 
kSIZE 

Definition at line 40 of file TMBLorentzVector.hpp.

enum TMBLorentzVector::EInitializer
 

Initializer sets for the constructor.

Enumeration values:
kXYZE  the four values are given in Cartesian coords (XYZ) and energy
kXYZM  the four values are given in Cartesian coords (XYZ) and mass
kPEtaPhiE  the four values are momentum, eta, phi, and energy
kPEtaPhiM  the four values are momentum, eta, phi, and mass
kPtEtaPhiE  the four values are transverse momentum (see Pt()), eta, phi, and energy
kPtEtaPhiM  the four values are transverse momentum (see Pt()), eta, phi, and mass

Definition at line 50 of file TMBLorentzVector.hpp.


Constructor & Destructor Documentation

TMBLorentzVector::TMBLorentzVector Double_t  a = 0.0,
Double_t  b = 0.0,
Double_t  c = 0.0,
Double_t  d = 0.0,
EInitializer  init = kXYZE
[inline]
 

Initialize a TMBLorentzVector. The meaning of a,b,c,d depends on the value of init, see EInitializer

Definition at line 59 of file TMBLorentzVector.hpp.

References Set().

Referenced by operator *(), operator+(), operator-(), and TMBTrack::propagate().

TMBLorentzVector::TMBLorentzVector const TVector3 &  vect,
Double_t  v4,
EInitializer  init = kXYZE
[inline]
 

Initialize a TMBLorentzVector with a 3 vector and energy or mass, depending on the value of init (e.g. it's the mass for init==kPtEtaPhiM)

Definition at line 70 of file TMBLorentzVector.hpp.

References fM, kPEtaPhiM, kPtEtaPhiM, kXYZM, and SetE().

TMBLorentzVector::TMBLorentzVector const Double_t *  a,
EInitializer  init = kXYZE
[inline]
 

Initialize a TMBLorentzVector with an array (array size not checked!) The meaning of the array values depends on the value of init, see EInitializer

Definition at line 79 of file TMBLorentzVector.hpp.

References Set().

TMBLorentzVector::TMBLorentzVector const Float_t *  a,
EInitializer  init = kXYZE
[inline]
 

Initialize a TMBLorentzVector with an array (array size not checked!) The meaning of the array values depends on the value of init, see EInitializer

Definition at line 87 of file TMBLorentzVector.hpp.

References Set().

TMBLorentzVector::TMBLorentzVector const TMBLorentzVector lv  )  [inline]
 

Copy constructor.

Definition at line 94 of file TMBLorentzVector.hpp.

References fM, and Vect().

TMBLorentzVector::TMBLorentzVector const TLorentzVector &  lv  )  [inline]
 

Conversion constructor from a TLorentzVector

Definition at line 99 of file TMBLorentzVector.hpp.

References SetE(), and Vect().

virtual TMBLorentzVector::~TMBLorentzVector  )  [inline, virtual]
 

Definition at line 103 of file TMBLorentzVector.hpp.


Member Function Documentation

Double_t TMBLorentzVector::Beta  )  const [inline]
 

get beta

Definition at line 257 of file TMBLorentzVector.hpp.

References E(), and TMBVector3::Mag3().

Referenced by Gamma().

void TMBLorentzVector::Boost const TVector3 &  b  ) 
 

Definition at line 18 of file TMBLorentzVector.cpp.

References E(), and Vect().

void TMBLorentzVector::Boost Double_t  x,
Double_t  y,
Double_t  z
[inline]
 

Lorentz boost by vector xyz

Definition at line 309 of file TMBLorentzVector.hpp.

TVector3 TMBLorentzVector::BoostVector  )  const [inline]
 

Returns the spatial components divided by the time component.

Definition at line 304 of file TMBLorentzVector.hpp.

References E(), and Vect().

Double_t TMBLorentzVector::Dot const TMBLorentzVector lv  )  const [inline]
 

scalar (dot) product

Definition at line 268 of file TMBLorentzVector.hpp.

References TMBVector3::Dot(), E(), and Vect().

Referenced by operator *().

virtual Double_t TMBLorentzVector::E  )  const [inline, virtual]
 

get energy

Definition at line 114 of file TMBLorentzVector.hpp.

References fM, and TMBVector3::Mag32().

Referenced by TMBJet::ActAsJESCorrected(), TMBJet::ActAsJESCorrectedShiftedMinus(), TMBJet::ActAsJESCorrectedShiftedPlus(), TMBJet::ActAsJESMUCorrected(), TMBJet::ActAsJESMUCorrectedShiftedMinus(), TMBJet::ActAsJESMUCorrectedShiftedPlus(), TMBJet::ActAsSmeared(), TMBJet::ActAsSmearedMU(), TMBJet::ActAsUnCorrected(), caf_util::ApplyJES::after(), Beta(), Boost(), BoostVector(), TMBMuon::CorrectPt(), Dot(), Energy(), GetXYZT(), is_equal(), Minus(), Mt2(), operator *(), operator *(), operator TLorentzVector(), operator()(), operator+(), operator+=(), operator-(), operator-=(), Plus(), Rapidity(), caf_util::JetSelector::selectObject(), T(), and TMBTrackCalJet::TMBTrackCalJet().

Double_t TMBLorentzVector::Energy  )  const [inline]
 

get energy

Definition at line 116 of file TMBLorentzVector.hpp.

References E().

Double_t TMBLorentzVector::Gamma  )  const [inline]
 

get gamma

Definition at line 261 of file TMBLorentzVector.hpp.

References Beta().

void TMBLorentzVector::GetXYZT Float_t *  carray  )  const [inline]
 

Getters into an arry (no checking of array bounds!)

Definition at line 129 of file TMBLorentzVector.hpp.

References E(), and TMBVector3::GetXYZ().

void TMBLorentzVector::GetXYZT Double_t *  carray  )  const [inline]
 

Getters into an arry (no checking of array bounds!)

Definition at line 126 of file TMBLorentzVector.hpp.

References E(), and TMBVector3::GetXYZ().

Bool_t TMBLorentzVector::is_equal const TMBLorentzVector lv  )  const
 

Equivalence operator.

True if all components are equivalent within machine precision.

Definition at line 40 of file TMBLorentzVector.cpp.

References E(), TMBVector3::is_equal(), and Vect().

Double_t TMBLorentzVector::M  )  const [inline]
 

get mass, see remark on mass in TMBLorentzVector class description

Definition at line 110 of file TMBLorentzVector.hpp.

References fM.

Referenced by TMBTrack::propagate().

Double_t TMBLorentzVector::M2  )  const [inline]
 

get invariant mass squared. See remark on mass in TMBLorentzVector class description

Definition at line 242 of file TMBLorentzVector.hpp.

References Mag2().

Double_t TMBLorentzVector::Mag  )  const [inline]
 

get invariant mass. See remark on mass in TMBLorentzVector class description

Definition at line 245 of file TMBLorentzVector.hpp.

References fM.

Double_t TMBLorentzVector::Mag2  )  const [inline]
 

get invariant mass squared. See remark on mass in TMBLorentzVector class description

Definition at line 240 of file TMBLorentzVector.hpp.

References fM.

Referenced by M2().

Double_t TMBLorentzVector::Minus  )  const [inline]
 

Returns t - z. Related to the positive/negative light-cone component, which some define this way and others define as (t +/- z)/sqrt(2) CAVEAT: The values returned are T{+,-}Z. It is known that some authors find it easier to define these components as (T{+,-}Z)/sqrt(2). Thus check what definition is used in the physics you're working in and adapt your code accordingly.

Definition at line 294 of file TMBLorentzVector.hpp.

References E(), Vect(), and TMBVector3::Z().

Double_t TMBLorentzVector::Mt  )  const [inline]
 

Transverse mass. If Mt2() is negative then -sqrt(-Mt2()) is returned.

Definition at line 253 of file TMBLorentzVector.hpp.

References Mt2().

Double_t TMBLorentzVector::Mt2  )  const [inline]
 

transverse mass squared

Definition at line 249 of file TMBLorentzVector.hpp.

References E(), and TMBVector3::Z().

Referenced by Mt().

Double_t TMBLorentzVector::operator * const TMBLorentzVector lv  )  const [inline]
 

scalar (dot) product

Definition at line 271 of file TMBLorentzVector.hpp.

References Dot().

TMBLorentzVector TMBLorentzVector::operator * Double_t  a  )  const [inline]
 

scaling with real numbers (const)

Definition at line 220 of file TMBLorentzVector.hpp.

References E(), TMBLorentzVector(), and Vect().

TMBLorentzVector & TMBLorentzVector::operator *= const TLorentzRotation &   ) 
 

Definition at line 28 of file TMBLorentzVector.cpp.

TMBLorentzVector& TMBLorentzVector::operator *= const TRotation &  m  )  [inline]
 

rotate using a TRotation

Reimplemented from TMBVector3.

Definition at line 320 of file TMBLorentzVector.hpp.

References Vect().

TMBLorentzVector& TMBLorentzVector::operator *= Double_t  a  )  [inline]
 

scaling with real numbers (non-const)

Reimplemented from TMBVector3.

Definition at line 223 of file TMBLorentzVector.hpp.

References fM, and Vect().

TMBLorentzVector::operator TLorentzVector  )  const [inline]
 

Transformation with HepLorenzRotation.

cast to a TLorentzVector

Definition at line 330 of file TMBLorentzVector.hpp.

References E(), TMBVector3::X(), TMBVector3::Y(), and TMBVector3::Z().

Bool_t TMBLorentzVector::operator!= const TMBLorentzVector lv  )  const [inline]
 

Comparison, in-equality operator. Two lorentz vectors are not equal if any of their componens are not equal.

Definition at line 231 of file TMBLorentzVector.hpp.

References operator==().

Double_t TMBLorentzVector::operator() int  i  )  const
 

Get components by index.

Reimplemented from TMBVector3.

Definition at line 4 of file TMBLorentzVector.cpp.

References E(), kE, kX, kY, kZ, and Vect().

Referenced by operator[]().

TMBLorentzVector TMBLorentzVector::operator+ const TMBLorentzVector lv  )  const [inline]
 

4vector addition

Definition at line 202 of file TMBLorentzVector.hpp.

References E(), TMBLorentzVector(), and Vect().

TMBLorentzVector& TMBLorentzVector::operator+= const TMBLorentzVector lv  )  [inline]
 

4vector addition

Definition at line 205 of file TMBLorentzVector.hpp.

References E(), SetE(), and Vect().

TMBLorentzVector TMBLorentzVector::operator-  )  const [inline]
 

unary minus

Reimplemented from TMBVector3.

Definition at line 216 of file TMBLorentzVector.hpp.

References E(), TMBLorentzVector(), and Vect().

TMBLorentzVector TMBLorentzVector::operator- const TMBLorentzVector lv  )  const [inline]
 

4vector substraction

Definition at line 209 of file TMBLorentzVector.hpp.

References E(), TMBLorentzVector(), and Vect().

TMBLorentzVector& TMBLorentzVector::operator-= const TMBLorentzVector lv  )  [inline]
 

4vector substraction

Definition at line 212 of file TMBLorentzVector.hpp.

References E(), SetE(), and Vect().

TMBLorentzVector& TMBLorentzVector::operator= const TMBLorentzVector lv  )  [inline]
 

assignment

Definition at line 197 of file TMBLorentzVector.hpp.

References fM, and Vect().

Bool_t TMBLorentzVector::operator== const TMBLorentzVector lv  )  const [inline]
 

Comparison, equality operator. Two lorentz vectors are equal if all their componens are equal.

Definition at line 227 of file TMBLorentzVector.hpp.

References fM, and Vect().

Referenced by operator!=().

Double_t TMBLorentzVector::operator[] int  i  )  const [inline]
 

Get components by index (as if it was an array). You can use ECoordinates to index a dimension.

Reimplemented from TMBVector3.

Definition at line 134 of file TMBLorentzVector.hpp.

References operator()().

Double_t TMBLorentzVector::Plus  )  const [inline]
 

Returns t + z. Related to the positive/negative light-cone component, which some define this way and others define as (t +/- z)/sqrt(2) CAVEAT: The values returned are T{+,-}Z. It is known that some authors find it easier to define these components as (T{+,-}Z)/sqrt(2). Thus check what definition is used in the physics you're working in and adapt your code accordingly.

Definition at line 285 of file TMBLorentzVector.hpp.

References E(), Vect(), and TMBVector3::Z().

Double_t TMBLorentzVector::Rapidity  )  const [inline]
 

get rapidity (i.e. NOT pseudo-rapidity!)

Definition at line 314 of file TMBLorentzVector.hpp.

References E(), and TMBVector3::Pz().

void TMBLorentzVector::Set Double_t  a = 0.0,
Double_t  b = 0.0,
Double_t  c = 0.0,
Double_t  d = 0.0,
EInitializer  init = kXYZE
[inline]
 

Initialize a TMBLorentzVector. The meaning of a,b,c,d depends on the value of init, see EInitializer

Definition at line 144 of file TMBLorentzVector.hpp.

References kPEtaPhiE, kPEtaPhiM, kPtEtaPhiE, kPtEtaPhiM, kXYZM, SetPEtaPhiE(), SetPEtaPhiM(), SetPtEtaPhiE(), SetPtEtaPhiM(), SetXYZM(), and SetXYZT().

Referenced by TMBLorentzVector().

void TMBLorentzVector::SetE Double_t  a  )  [inline]
 

set E component. See remark on mass in TMBLorentzVector class description

Definition at line 167 of file TMBLorentzVector.hpp.

References SetT().

Referenced by operator+=(), operator-=(), SetPEtaPhiE(), SetPtEtaPhiE(), SetVectE(), SetVectMag(), SetXYZT(), and TMBLorentzVector().

void TMBLorentzVector::SetM Double_t  a  )  [inline]
 

set mass

Definition at line 160 of file TMBLorentzVector.hpp.

References fM.

Referenced by SetXYZM().

void TMBLorentzVector::SetPEtaPhiE Double_t  p,
Double_t  eta,
Double_t  phi,
Double_t  e
[inline]
 

set all members using |momentum|, eta, phi and energy

Definition at line 188 of file TMBLorentzVector.hpp.

References SetE(), and TMBVector3::SetPtEtaPhi().

Referenced by Set().

void TMBLorentzVector::SetPEtaPhiM Double_t  p,
Double_t  eta,
Double_t  phi,
Double_t  m
[inline]
 

set all members using |momentum|, eta, phi and mass

Definition at line 191 of file TMBLorentzVector.hpp.

References fM, and TMBVector3::SetPtEtaPhi().

Referenced by Set().

void TMBLorentzVector::SetPtEtaPhiE Double_t  pt,
Double_t  eta,
Double_t  phi,
Double_t  e
[inline]
 

set all members using transverse momentum, eta, phi and energy

Definition at line 182 of file TMBLorentzVector.hpp.

References SetE(), and TMBVector3::SetPtEtaPhi().

Referenced by ClassImp(), Set(), TMBEMCluster::Set(), TMBParticleJet::Set0(), and TMBJet::Set0().

void TMBLorentzVector::SetPtEtaPhiM Double_t  pt,
Double_t  eta,
Double_t  phi,
Double_t  m
[inline]
 

set all members using transverse momentum, eta, phi and mass

Definition at line 185 of file TMBLorentzVector.hpp.

References fM, and TMBVector3::SetPtEtaPhi().

Referenced by Set().

void TMBLorentzVector::SetPxPyPzE Double_t  px,
Double_t  py,
Double_t  pz,
Double_t  e
[inline]
 

set all members using Cartesian coordinates and energy

Definition at line 173 of file TMBLorentzVector.hpp.

References SetXYZT().

Referenced by TMBMuon::CorrectPt(), TMBTau::Set(), and TMBTrackCalJet::TMBTrackCalJet().

void TMBLorentzVector::SetT Double_t  a  )  [inline]
 

set E component. See remark on mass in TMBLorentzVector class description

Definition at line 163 of file TMBLorentzVector.hpp.

References fM, and TMBVector3::Mag32().

Referenced by SetE().

void TMBLorentzVector::SetVect const TVector3 &  vect3  )  [inline]
 

Set spatial component.

Definition at line 170 of file TMBLorentzVector.hpp.

References Vect().

void TMBLorentzVector::SetVectE const TVector3 &  spatial,
Double_t  e
[inline]
 

set vector and energy

Definition at line 281 of file TMBLorentzVector.hpp.

References SetE(), and Vect().

void TMBLorentzVector::SetVectM const TVector3 &  spatial,
Double_t  mass
[inline]
 

set vector and mass

Definition at line 278 of file TMBLorentzVector.hpp.

References SetVectMag().

void TMBLorentzVector::SetVectMag const TVector3 &  spatial,
Double_t  magnitude
[inline]
 

set vector and mass

Definition at line 275 of file TMBLorentzVector.hpp.

References SetE(), and Vect().

Referenced by SetVectM().

void TMBLorentzVector::SetXYZM Double_t  x,
Double_t  y,
Double_t  z,
Double_t  m
[inline]
 

set all members using Cartesian coordinates and mass

Definition at line 179 of file TMBLorentzVector.hpp.

References SetM(), and TMBVector3::SetXYZ().

Referenced by Set().

void TMBLorentzVector::SetXYZT Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t
[inline]
 

set all members using Cartesian coordinates and energy

Definition at line 176 of file TMBLorentzVector.hpp.

References SetE(), and TMBVector3::SetXYZ().

Referenced by Set(), and SetPxPyPzE().

Double_t TMBLorentzVector::T  )  const [inline]
 

get energy / time component

Definition at line 118 of file TMBLorentzVector.hpp.

References E().

TMBLorentzVector & TMBLorentzVector::Transform const TLorentzRotation &   ) 
 

Definition at line 33 of file TMBLorentzVector.cpp.

TMBLorentzVector& TMBLorentzVector::Transform const TRotation &  m  )  [inline]
 

transform using a TRotation, see TVector3::Transform()

Reimplemented from TMBVector3.

Definition at line 323 of file TMBLorentzVector.hpp.

References TMBVector3::Transform(), and Vect().

virtual TMBVector3& TMBLorentzVector::Vect  )  [inline, virtual]
 

Get spatial component (non-const).

Definition at line 123 of file TMBLorentzVector.hpp.

virtual const TMBVector3& TMBLorentzVector::Vect  )  const [inline, virtual]
 

Get spatial component (const).

Definition at line 121 of file TMBLorentzVector.hpp.

Referenced by Boost(), BoostVector(), Dot(), is_equal(), Minus(), operator *(), operator *(), operator *=(), operator()(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), Plus(), SetVect(), SetVectE(), SetVectMag(), TMBLorentzVector(), and Transform().


Member Data Documentation

Double32_t TMBLorentzVector::fM [private]
 

mass

Definition at line 335 of file TMBLorentzVector.hpp.

Referenced by E(), M(), Mag(), Mag2(), operator *=(), operator=(), operator==(), SetM(), SetPEtaPhiM(), SetPtEtaPhiM(), SetT(), and TMBLorentzVector().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 10:13:07 2006 for CAF by doxygen 1.3.4