PYTHIA  8.312
Public Member Functions | Friends | List of all members
Vec4 Class Reference

#include <Basics.h>

Public Member Functions

 Vec4 (double xIn=0., double yIn=0., double zIn=0., double tIn=0.)
 Constructors.
 
 Vec4 (const Vec4 &v)
 
Vec4operator= (const Vec4 &v)
 
Vec4operator= (double value)
 
void reset ()
 Member functions for input.
 
void p (double xIn, double yIn, double zIn, double tIn)
 
void p (Vec4 pIn)
 
void px (double xIn)
 
void py (double yIn)
 
void pz (double zIn)
 
void e (double tIn)
 
double px () const
 Member functions for output.
 
double py () const
 
double pz () const
 
double e () const
 
double & operator[] (int i)
 
double mCalc () const
 
double m2Calc () const
 
double pT () const
 
double pT2 () const
 
double pAbs () const
 
double pAbs2 () const
 
double eT () const
 
double eT2 () const
 
double theta () const
 
double phi () const
 
double thetaXZ () const
 
double pPos () const
 
double pNeg () const
 
double rap () const
 
double eta () const
 
void rescale3 (double fac)
 Member functions that perform operations.
 
void rescale4 (double fac)
 
void flip3 ()
 
void flip4 ()
 
void rot (double thetaIn, double phiIn)
 Rotation (simple).
 
void rotaxis (double phiIn, double nx, double ny, double nz)
 Azimuthal rotation phi around an arbitrary axis (nz, ny, nz).
 
void rotaxis (double phiIn, const Vec4 &n)
 Azimuthal rotation phi around an arbitrary (3-vector component of) axis.
 
void bst (double betaX, double betaY, double betaZ)
 Boost (simple).
 
void bst (double betaX, double betaY, double betaZ, double gamma)
 Boost (simple, given gamma).
 
void bst (const Vec4 &pIn)
 Boost given by a Vec4 p.
 
void bst (const Vec4 &pIn, double mIn)
 Boost given by a Vec4 p and double m.
 
void bstback (const Vec4 &pIn)
 Boost given by a Vec4 p; boost in opposite direction.
 
void bstback (const Vec4 &pIn, double mIn)
 Boost given by a Vec4 p and double m; boost in opposite direction.
 
void rotbst (const RotBstMatrix &M)
 Arbitrary combination of rotations and boosts defined by 4 * 4 matrix.
 
double eInFrame (const Vec4 &pIn) const
 
Vec4 operator- () const
 Operator overloading with member functions.
 
Vec4operator+= (const Vec4 &v)
 
Vec4operator-= (const Vec4 &v)
 
Vec4operator*= (double f)
 
Vec4operator/= (double f)
 
Vec4 operator+ (const Vec4 &v) const
 
Vec4 operator- (const Vec4 &v) const
 
Vec4 operator* (double f) const
 
Vec4 operator/ (double f) const
 
double operator* (const Vec4 &v) const
 

Friends

Vec4 operator* (double f, const Vec4 &v1)
 Operator overloading with friends. More...
 
ostream & operator<< (ostream &, const Vec4 &v)
 Print a four-vector. More...
 
bool isnan (const Vec4 &v)
 Check if NaN, INF, or finite.
 
bool isinf (const Vec4 &v)
 
bool isfinite (const Vec4 &v)
 
double m (const Vec4 &v1)
 Invariant mass and its square. More...
 
double m (const Vec4 &v1, const Vec4 &v2)
 
double m2 (const Vec4 &v1)
 The squared invariant mass of one or more four-vectors.
 
double m2 (const Vec4 &v1, const Vec4 &v2)
 
double m2 (const Vec4 &v1, const Vec4 &v2, const Vec4 &v3)
 
double m2 (const Vec4 &v1, const Vec4 &v2, const Vec4 &v3, const Vec4 &v4)
 
double dot3 (const Vec4 &v1, const Vec4 &v2)
 Scalar and cross product of 3-vector parts. More...
 
Vec4 cross3 (const Vec4 &v1, const Vec4 &v2)
 The cross product of two three-vectors.
 
Vec4 cross4 (const Vec4 &a, const Vec4 &b, const Vec4 &c)
 Cross-product of three 4-vectors ( p_i = epsilon_{iabc} p_a p_b p_c). More...
 
double theta (const Vec4 &v1, const Vec4 &v2)
 theta is polar angle between v1 and v2. More...
 
double costheta (const Vec4 &v1, const Vec4 &v2)
 Cosine of the opening angle between two three-vectors.
 
double phi (const Vec4 &v1, const Vec4 &v2)
 phi is azimuthal angle between v1 and v2 around z axis. More...
 
double cosphi (const Vec4 &v1, const Vec4 &v2)
 Cosine of the azimuthal angle between two three-vectors.
 
double phi (const Vec4 &v1, const Vec4 &v2, const Vec4 &n)
 phi is azimuthal angle between v1 and v2 around n axis. More...
 
double cosphi (const Vec4 &v1, const Vec4 &v2, const Vec4 &n)
 Cosine of the azimuthal angle between two three-vectors around a third.
 
double RRapPhi (const Vec4 &v1, const Vec4 &v2)
 R is distance in cylindrical (y/eta, phi) coordinates. More...
 
double REtaPhi (const Vec4 &v1, const Vec4 &v2)
 Distance in cylindrical (eta, phi) coordinates.
 
bool pShift (Vec4 &p1Move, Vec4 &p2Move, double m1New, double m2New)
 Shift four-momenta within pair from old to new masses. More...
 
pair< Vec4, Vec4getTwoPerpendicular (const Vec4 &v1, const Vec4 &v2)
 Create two vectors that are perpendicular to both input vectors. More...
 

Detailed Description

Vec4 class. This class implements four-vectors, in energy-momentum space. (But can equally well be used to hold space-time four-vectors.)

Member Function Documentation

double eInFrame ( const Vec4 pIn) const

Function to calculate energy in the rest frame of other particle given by input 4-momentum.

Friends And Related Function Documentation

Vec4 cross4 ( const Vec4 a,
const Vec4 b,
const Vec4 c 
)
friend

Cross-product of three 4-vectors ( p_i = epsilon_{iabc} p_a p_b p_c).

Cross-product of three 4-vectors ( p_i = epsilon_{iabc} p_a p_b p_c)

double dot3 ( const Vec4 v1,
const Vec4 v2 
)
friend

Scalar and cross product of 3-vector parts.

The scalar product of two three-vectors.

pair<Vec4,Vec4> getTwoPerpendicular ( const Vec4 v1,
const Vec4 v2 
)
friend

Create two vectors that are perpendicular to both input vectors.

One perpendicular vector from three-dimensional cross-product.

Second perpendicular vector from four-dimensional cross-product.

double m ( const Vec4 v1)
friend

Invariant mass and its square.

The invariant mass of one or more four-vectors.

Vec4 operator* ( double  f,
const Vec4 v1 
)
friend

Operator overloading with friends.

Implementation of operator overloading with friends.

ostream& operator<< ( ostream &  os,
const Vec4 v 
)
friend

Print a four-vector.

Print a four-vector: also operator overloading with friend.

double phi ( const Vec4 v1,
const Vec4 v2 
)
friend

phi is azimuthal angle between v1 and v2 around z axis.

Azimuthal angle between two three-vectors.

double phi ( const Vec4 v1,
const Vec4 v2,
const Vec4 n 
)
friend

phi is azimuthal angle between v1 and v2 around n axis.

Azimuthal angle between two three-vectors around a third.

bool pShift ( Vec4 p1Move,
Vec4 p2Move,
double  m1New,
double  m2New 
)
friend

Shift four-momenta within pair from old to new masses.

Shift four-momenta within pair from old to new masses. Note that p1Move and p2Move change values during operation.

Standard kinematics variables.

Check that shift operation possible.

Calculate needed shift and apply it.

double RRapPhi ( const Vec4 v1,
const Vec4 v2 
)
friend

R is distance in cylindrical (y/eta, phi) coordinates.

Distance in cylindrical (y, phi) coordinates.

double theta ( const Vec4 v1,
const Vec4 v2 
)
friend

theta is polar angle between v1 and v2.

Opening angle between two three-vectors.


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