HackAnalysis
2
|
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. | |
P3 & | operator= (const P3 &v) |
Copy assignment operator. | |
void | clear () |
Set the components to zero. | |
Coordinate setters | |
P3 & | setPx (double px) |
Set the px coordinate. | |
P3 & | setPy (double py) |
Set the py coordinate. | |
P3 & | setPz (double pz) |
Set the pz coordinate. | |
P3 & | setP (double px, double py, double pz) |
Set the p coordinates and mass simultaneously. | |
P3 & | SetXYZ (double px, double py, double pz) |
Alias for setP. | |
P3 & | setXY (double px, double py) |
set only transverse components | |
P3 & | setEtaPhiP (double eta, double phi, double P) |
P3 & | setEtaPhiPt (double eta, double phi, double pt) |
P3 & | setThetaPhiP (double theta, double phi, double p) |
P3 & | setThetaPhiPt (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 |
P3 & | Rotate (const double &angle, const P3 &axis) |
Self-modifying operators | |
P3 | operator- () const |
P3 & | operator+= (const P3 &v) |
P3 & | operator-= (const P3 &v) |
P3 & | operator*= (double a) |
P3 & | operator/= (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. | |
|
inline |
Set the vector state from (eta,phi,energy) coordinates and the mass
eta = -ln(tan(theta/2)) -> theta = 2 atan(exp(-eta))
|
inline |
Set the vector state from (eta,phi,pT) coordinates and the mass
eta = -ln(tan(theta/2)) -> theta = 2 atan(exp(-eta))
|
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)
|
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)