Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

FourVector Class Reference

Yet another four vector class, with metric +---. More...

#include <FourVector.h>

Collaboration diagram for FourVector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FourVector ()
 Default constructor.

 FourVector (double E_, double px_, double py_, double pz_)
 Constructor from the components.

 FourVector (double E_, const ThreeVector &p_)
 Constructor from energy and three momentum.

 FourVector (const ThreeVector &p_, double m_)
 Constructor from three momentum and mass.

double getE () const
 Returns the energy / 0 component.

double getPx () const
 Returns the x momentum / 1 component.

double getPy () const
 Returns the y momentum / 2 component.

double getPz () const
 Returns the z momentum / 3 component.

double getM2 () const
 Returns the mass squared / magnitude squared.

double getM () const
 Returns the mass / magnitude.

double getMass () const
 Returns the mass / magnitude.

double getP2 () const
 Returns the momentum squared / magnitude of the three vector squared.

double getP () const
 Returns the momentum / magnitude of the three vector.

double getPt2 () const
 Returns the transverse momentum squared / magnitude of the 1 and 2 component vector squared.

double getPt () const
 Returns the transverse momentum / magnitude of the 1 and 2 component vector.

double getPhi () const
 Returns the azimuthal angle of the momentum / three vector squared.

double getTheta () const
 Returns the polar angle of the momentum / three vector squared.

double getEta () const
 Returns the pseudo rapidity of the momentum / three vector squared.

double getComponent (int i) const
 Returns the i'th component (starting from 0=energy).

ThreeVector getBeta () const
double getGamma () const
ThreeVector getBetaGamma () const
const ThreeVectorgetThreeVector () const
 Returns the momentum three vector.

FourVectorboost (const FourVector &P)
void decayto (FourVector &d1, FourVector &d2) const
void setValues (double E_, double px_, double py_, double pz_)
FourVectoroperator+= (const FourVector &rhs)
FourVectoroperator-= (const FourVector &rhs)
FourVectoroperator *= (double rhs)

Private Attributes

double E
 The energy / 0 component.

ThreeVector p
 The momentum three vector.


Related Functions

(Note that these are not member functions.)

FourVector operator+ (const FourVector &lhs, const FourVector &rhs)
 Sum of two four vectors.

FourVector operator- (const FourVector &lhs, const FourVector &rhs)
 Difference of two four vectors.

FourVector operator- (const FourVector &rhs)
 Negative of a four vector.

FourVector operator * (double lhs, const FourVector &rhs)
 Scalar product of a four vector.

double operator * (const FourVector &lhs, const FourVector &rhs)
 Scalar product of a four vector.

std::ostream & operator<< (std::ostream &os, const FourVector &rhs)
 Prints a four vector.


Detailed Description

Yet another four vector class, with metric +---.

Author: Benno List Last update:

Date
2007/09/14 10:58:42
by:
Author
blist

Definition at line 34 of file FourVector.h.


Constructor & Destructor Documentation

FourVector::FourVector  )  [inline]
 

Default constructor.

Definition at line 102 of file FourVector.h.

Referenced by decayto().

FourVector::FourVector double  E_,
double  px_,
double  py_,
double  pz_
[inline]
 

Constructor from the components.

Definition at line 106 of file FourVector.h.

FourVector::FourVector double  E_,
const ThreeVector p_
[inline]
 

Constructor from energy and three momentum.

Definition at line 110 of file FourVector.h.

FourVector::FourVector const ThreeVector p_,
double  m_
[inline]
 

Constructor from three momentum and mass.

Definition at line 114 of file FourVector.h.


Member Function Documentation

FourVector & FourVector::boost const FourVector P  ) 
 

Definition at line 20 of file FourVector.C.

References E, getE(), getM(), and p.

Referenced by decayto().

void FourVector::decayto FourVector d1,
FourVector d2
const
 

Definition at line 33 of file FourVector.C.

References boost(), FInteger, FourVector(), FReal, getM(), getM2(), and ranmar().

Referenced by TopEvent::genEvent(), and K0Event::genEvent().

ThreeVector FourVector::getBeta  )  const [inline]
 

Definition at line 80 of file FourVector.h.

References E, and p.

ThreeVector FourVector::getBetaGamma  )  const [inline]
 

Definition at line 82 of file FourVector.h.

References getM(), and p.

Referenced by K0Event::genEvent(), and main().

double FourVector::getComponent int  i  )  const [inline]
 

Returns the i'th component (starting from 0=energy).

Definition at line 138 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

Referenced by main().

double FourVector::getE  )  const [inline]
 

Returns the energy / 0 component.

Definition at line 118 of file FourVector.h.

Referenced by boost(), TopEvent::genEvent(), getComponent(), getGamma(), VertexFitObject::initForFit(), operator *(), operator+(), operator-(), and operator<<().

double FourVector::getEta  )  const [inline]
 

Returns the pseudo rapidity of the momentum / three vector squared.

Definition at line 136 of file FourVector.h.

References ThreeVector::getEta(), and p.

double FourVector::getGamma  )  const [inline]
 

Definition at line 81 of file FourVector.h.

References getE(), and getM().

double FourVector::getM  )  const [inline]
 

Returns the mass / magnitude.

Definition at line 130 of file FourVector.h.

Referenced by boost(), decayto(), getBetaGamma(), and getGamma().

double FourVector::getM2  )  const [inline]
 

Returns the mass squared / magnitude squared.

Definition at line 129 of file FourVector.h.

Referenced by decayto(), and getMass().

double FourVector::getMass  )  const [inline]
 

Returns the mass / magnitude.

Definition at line 131 of file FourVector.h.

References getM2().

Referenced by ChargedParticleTrack::setParameters().

double FourVector::getP  )  const [inline]
 

Returns the momentum / magnitude of the three vector.

Definition at line 127 of file FourVector.h.

double FourVector::getP2  )  const [inline]
 

Returns the momentum squared / magnitude of the three vector squared.

Definition at line 126 of file FourVector.h.

References ThreeVector::getP2(), and p.

double FourVector::getPhi  )  const [inline]
 

Returns the azimuthal angle of the momentum / three vector squared.

Definition at line 133 of file FourVector.h.

Referenced by ChargedParticleTrack::ChargedParticleTrack(), NeutralParticleTrack::setParameters(), and ChargedParticleTrack::setParameters().

double FourVector::getPt  )  const [inline]
 

Returns the transverse momentum / magnitude of the 1 and 2 component vector.

Definition at line 124 of file FourVector.h.

Referenced by ChargedParticleTrack::ChargedParticleTrack(), NeutralParticleTrack::setParameters(), and ChargedParticleTrack::setParameters().

double FourVector::getPt2  )  const [inline]
 

Returns the transverse momentum squared / magnitude of the 1 and 2 component vector squared.

Definition at line 123 of file FourVector.h.

References ThreeVector::getPt2(), and p.

double FourVector::getPx  )  const [inline]
 

Returns the x momentum / 1 component.

Definition at line 119 of file FourVector.h.

References ThreeVector::getPx(), and p.

Referenced by getComponent(), operator *(), operator+(), operator-(), and operator<<().

double FourVector::getPy  )  const [inline]
 

Returns the y momentum / 2 component.

Definition at line 120 of file FourVector.h.

References ThreeVector::getPy(), and p.

Referenced by getComponent(), operator *(), operator+(), operator-(), and operator<<().

double FourVector::getPz  )  const [inline]
 

Returns the z momentum / 3 component.

Definition at line 121 of file FourVector.h.

References ThreeVector::getPz(), and p.

Referenced by getComponent(), operator *(), operator+(), operator-(), and operator<<().

double FourVector::getTheta  )  const [inline]
 

Returns the polar angle of the momentum / three vector squared.

Definition at line 134 of file FourVector.h.

References ThreeVector::getTheta(), and p.

Referenced by ChargedParticleTrack::ChargedParticleTrack(), NeutralParticleTrack::setParameters(), and ChargedParticleTrack::setParameters().

const ThreeVector& FourVector::getThreeVector  )  const [inline]
 

Returns the momentum three vector.

Definition at line 85 of file FourVector.h.

References p.

Referenced by K0Event::genEvent().

FourVector & FourVector::operator *= double  rhs  )  [inline]
 

Definition at line 164 of file FourVector.h.

References E, and p.

FourVector & FourVector::operator+= const FourVector rhs  )  [inline]
 

Definition at line 152 of file FourVector.h.

References E, and p.

FourVector & FourVector::operator-= const FourVector rhs  )  [inline]
 

Definition at line 158 of file FourVector.h.

References E, and p.

void FourVector::setValues double  E_,
double  px_,
double  py_,
double  pz_
[inline]
 

Definition at line 147 of file FourVector.h.

References E, p, and ThreeVector::setValues().

Referenced by NeutralParticleTrack::getMomentumAtTrajectoryEx(), ChargedParticleTrack::getMomentumAtTrajectoryEx(), NeutralParticleTrack::getMomentumDerivativeAtTrajectoryEx(), ChargedParticleTrack::getMomentumDerivativeAtTrajectoryEx(), NeutralParticleTrack::getMomentumDerivativeEx(), ChargedParticleTrack::getMomentumDerivativeEx(), and TrackMomentumConstraint::TrackMomentumConstraint().


Friends And Related Function Documentation

double operator * const FourVector lhs,
const FourVector rhs
[related]
 

Scalar product of a four vector.

Definition at line 206 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

FourVector operator * double  lhs,
const FourVector rhs
[related]
 

Scalar product of a four vector.

Definition at line 198 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

FourVector operator+ const FourVector lhs,
const FourVector rhs
[related]
 

Sum of two four vectors.

Definition at line 174 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

FourVector operator- const FourVector rhs  )  [related]
 

Negative of a four vector.

Definition at line 190 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

FourVector operator- const FourVector lhs,
const FourVector rhs
[related]
 

Difference of two four vectors.

Definition at line 182 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().

std::ostream & operator<< std::ostream &  os,
const FourVector rhs
[related]
 

Prints a four vector.

Definition at line 215 of file FourVector.h.

References getE(), getPx(), getPy(), and getPz().


Member Data Documentation

double FourVector::E [private]
 

The energy / 0 component.

Definition at line 98 of file FourVector.h.

Referenced by boost(), getBeta(), operator *=(), operator+=(), operator-=(), and setValues().

ThreeVector FourVector::p [private]
 

The momentum three vector.

Definition at line 99 of file FourVector.h.

Referenced by boost(), getBeta(), getBetaGamma(), getEta(), getP2(), getPt2(), getPx(), getPy(), getPz(), getTheta(), getThreeVector(), operator *=(), operator+=(), operator-=(), and setValues().


The documentation for this class was generated from the following files:
Generated on Fri Sep 14 17:38:36 2007 for Kinfit by doxygen 1.3.2