HackAnalysis  2
List of all members
HEP::P3 Class Reference

Public Member Functions

Constructors etc.
 P3 ()
 Default constructor of a null vector.
 
 P3 (double px, double py, double pz)
 Constructor from Cartesian/Minkowski coordinates.
 
 P3 (const P3 &v)
 Copy constructor.
 
P3operator= (const P3 &v)
 Copy assignment operator.
 
void clear ()
 Set the components to zero.
 
Coordinate setters
P3setPx (double px)
 Set the px coordinate.
 
P3setPy (double py)
 Set the py coordinate.
 
P3setPz (double pz)
 Set the pz coordinate.
 
P3setP (double px, double py, double pz)
 Set the p coordinates and mass simultaneously.
 
P3SetXYZ (double px, double py, double pz)
 Alias for setP.
 
P3setXY (double px, double py)
 set only transverse components
 
P3setEtaPhiP (double eta, double phi, double P)
 
P3setEtaPhiPt (double eta, double phi, double pt)
 
P3setThetaPhiP (double theta, double phi, double p)
 
P3setThetaPhiPt (double theta, double phi, double pt)
 
Coordinate getters
double px2 () const
 Get px^2.
 
double px () const
 Get px.
 
double py2 () const
 Get py^2.
 
double py () const
 Get py.
 
double pz2 () const
 Get pz^2.
 
double pz () const
 Get pz.
 
double X () const
 
double Y () const
 Get py^2.
 
double Z () const
 Get pz^2.
 
double p2 () const
 
double p () const
 Get the spatial 3-vector |p|.
 
double rho2 () const
 Get the spatial 3-vector |px^2 + py^2|.
 
double Perp2 () const
 
double rho () const
 Get the spatial 3-vector sqrt|px^2 + py^2|.
 
double Perp () const
 
double pT2 () const
 Get the transverse momentum squared (same as rho2)
 
double pT () const
 Get the transverse momentum (same as rho)
 
double phi () const
 Get the spatial phi.
 
double theta () const
 Get the spatial theta.
 
double eta () const
 Get the spatial vector pseudorapidity.
 
double abseta () const
 Get the spatial vector absolute pseudorapidity.
 
Calculations w.r.t. other P4 vectors
double dot3 (const P3 &v) const
 Spatial dot product.
 
double Dot (const P3 &v) const
 
double angleTo (const P3 &v) const
 Spatial angle to another P4 vector.
 
double Angle (const P3 &v) const
 
double deltaPhi (const P3 &v) const
 Difference in phi between two vectors.
 
double deltaEta (const P3 &v) const
 Difference in pseudorapidity between two vectors.
 
double deltaR2_eta (const P3 &v) const
 Difference in rapidity between two vectors.
 
double deltaR_eta (const P3 &v) const
 Difference in pseudorapidity-based R between two vectors.
 
P3 Cross (const P3 &v) const
 Difference in rapidity-based R^2 between two vectors.
 
double Mag () const
 
double Mag2 () const
 
double Theta () const
 
double Phi () const
 
double CosTheta () const
 
P3 Unit () const
 
P3Rotate (const double &angle, const P3 &axis)
 
Self-modifying operators
P3 operator- () const
 
P3operator+= (const P3 &v)
 
P3operator-= (const P3 &v)
 
P3operator*= (double a)
 
P3operator/= (double a)
 

Static Public Member Functions

Static methods for vector making
static P3 mkXYZ (double px, double py, double pz)
 Make a vector from (px,py,pz,E) coordinates.
 
static P3 mkXY (double px, double py)
 
static P3 mkEtaPhiP (double eta, double phi, double P)
 Make a vector from (eta,phi,p) coordinates.
 
static P3 mkEtaPhiPt (double eta, double phi, double pt)
 Make a vector from (eta,phi,pT) coordinates.
 
static P3 mkThetaPhiP (double theta, double phi, double P)
 Make a vector from (theta,phi,energy) coordinates and the mass.
 
static P3 mkThetaPhiPt (double theta, double phi, double pt)
 Make a vector from (theta,phi,pT) coordinates and the mass.
 

Member Function Documentation

◆ setEtaPhiP()

P3& HEP::P3::setEtaPhiP ( double  eta,
double  phi,
double  P 
)
inline

Set the vector state from (eta,phi,energy) coordinates and the mass

eta = -ln(tan(theta/2)) -> theta = 2 atan(exp(-eta))

◆ setEtaPhiPt()

P3& HEP::P3::setEtaPhiPt ( double  eta,
double  phi,
double  pt 
)
inline

Set the vector state from (eta,phi,pT) coordinates and the mass

eta = -ln(tan(theta/2)) -> theta = 2 atan(exp(-eta))

◆ setThetaPhiP()

P3& HEP::P3::setThetaPhiP ( double  theta,
double  phi,
double  p 
)
inline

Set the vector state from (theta,phi,energy) coordinates and the mass

p = sqrt(E^2 - mass^2) pz = p cos(theta) pt = p sin(theta)

◆ setThetaPhiPt()

P3& HEP::P3::setThetaPhiPt ( double  theta,
double  phi,
double  pt 
)
inline

Set the vector state from (theta,phi,pT) coordinates and the mass

p = pt / sin(theta) pz = p cos(theta) E = sqrt(p^2 + mass^2)


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