Rivet API documentation
![]() |
Rivet 4.1.3
|
Vector4.hh
1083 return deltaR2(a.rapidity(), a.azimuthalAngle(), FourMomentum(b).rapidity(), b.azimuthalAngle());
Specialized version of the FourVector with momentum/energy functionality.
Definition Vector4.hh:327
double p2() const
Get the modulus-squared of the 3-momentum.
Definition Vector4.hh:620
double mass() const
Get the mass (the Lorentz self-invariant).
Definition Vector4.hh:595
double rapidity() const
Calculate the rapidity.
Definition Vector4.hh:626
FourMomentum reverse() const
Multiply space components only by -1.
Definition Vector4.hh:752
FourMomentum & setPtPhiME(double pt, double phi, double mass, double E)
Definition Vector4.hh:551
FourMomentum & setRapPhiMPt(double y, double phi, double mass, double pt)
Definition Vector4.hh:492
FourMomentum & setPz(double pz)
Set z-component of momentum .
Definition Vector4.hh:389
FourMomentum & setXYZE(double px, double py, double pz, double E)
Alias for setPE.
Definition Vector4.hh:403
static FourMomentum mkThetaPhiME(double theta, double phi, double mass, double E)
Make a vector from (theta,phi,energy) coordinates and the mass.
Definition Vector4.hh:798
double pt() const
Calculate the transverse momentum .
Definition Vector4.hh:668
FourMomentum & setPE(double px, double py, double pz, double E)
Set the p coordinates and energy simultaneously.
Definition Vector4.hh:396
static FourMomentum mkRapPhiME(double y, double phi, double mass, double E)
Make a vector from (y,phi,energy) coordinates and the mass.
Definition Vector4.hh:788
double Et2() const
Calculate the transverse energy .
Definition Vector4.hh:673
static FourMomentum mkXYZE(double px, double py, double pz, double E)
Make a vector from (px,py,pz,E) coordinates.
Definition Vector4.hh:768
FourMomentum & setPy(double py)
Set y-component of momentum .
Definition Vector4.hh:383
FourMomentum & setPx(double px)
Set x-component of momentum .
Definition Vector4.hh:377
double pt2() const
Calculate the squared transverse momentum .
Definition Vector4.hh:659
static FourMomentum mkPtPhiME(double pt, double phi, double mass, double E)
Make a vector from (pT,phi,energy) coordinates and the mass.
Definition Vector4.hh:808
Vector3 pTvec() const
Calculate the transverse momentum vector .
Definition Vector4.hh:646
FourMomentum & setRapPhiME(double y, double phi, double mass, double E)
Definition Vector4.hh:472
double mass2() const
Get the squared mass (the Lorentz self-invariant).
Definition Vector4.hh:606
FourMomentum & setEtaPhiMPt(double eta, double phi, double mass, double pt)
Definition Vector4.hh:450
double pT2() const
Calculate the squared transverse momentum .
Definition Vector4.hh:655
static FourMomentum mkEtaPhiME(double eta, double phi, double mass, double E)
Make a vector from (eta,phi,energy) coordinates and the mass.
Definition Vector4.hh:778
FourMomentum & operator-=(const FourMomentum &v)
Subtract from this 4-vector. NB time as well as space components are subtracted.
Definition Vector4.hh:739
static FourMomentum mkXYZM(double px, double py, double pz, double mass)
Make a vector from (px,py,pz) coordinates and the mass.
Definition Vector4.hh:773
FourMomentum & setThetaPhiME(double theta, double phi, double mass, double E)
Definition Vector4.hh:509
double E() const
Get energy (time component of momentum).
Definition Vector4.hh:572
FourMomentum & setXYZM(double px, double py, double pz, double mass)
Alias for setPM.
Definition Vector4.hh:425
FourMomentum & operator+=(const FourMomentum &v)
Add to this 4-vector. NB time as well as space components are added.
Definition Vector4.hh:733
static FourMomentum mkEtaPhiMPt(double eta, double phi, double mass, double pt)
Make a vector from (eta,phi,pT) coordinates and the mass.
Definition Vector4.hh:783
static FourMomentum mkRapPhiMPt(double y, double phi, double mass, double pt)
Make a vector from (y,phi,pT) coordinates and the mass.
Definition Vector4.hh:793
double pT() const
Calculate the transverse momentum .
Definition Vector4.hh:664
static FourMomentum mkThetaPhiMPt(double theta, double phi, double mass, double pt)
Make a vector from (theta,phi,pT) coordinates and the mass.
Definition Vector4.hh:803
FourMomentum & setThetaPhiMPt(double theta, double phi, double mass, double pt)
Definition Vector4.hh:532
FourMomentum operator-() const
Multiply all components (time and space) by -1.
Definition Vector4.hh:745
double absrapidity() const
Absolute rapidity.
Definition Vector4.hh:637
FourMomentum & setEtaPhiME(double eta, double phi, double mass, double E)
Definition Vector4.hh:434
FourMomentum & operator/=(double a)
Divide by a scalar.
Definition Vector4.hh:727
FourMomentum & setE(double E)
Set energy (time component of momentum).
Definition Vector4.hh:371
FourMomentum & operator*=(double a)
Multiply by a scalar.
Definition Vector4.hh:721
FourMomentum & setPM(double px, double py, double pz, double mass)
Set the p coordinates and mass simultaneously.
Definition Vector4.hh:417
Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector.
Definition Vector4.hh:30
FourVector operator-() const
Multiply all components (space and time) by -1.
Definition Vector4.hh:239
FourVector & operator/=(double a)
Divide by a scalar.
Definition Vector4.hh:221
Vector3 vector3() const
Get the spatial part of the 4-vector as a 3-vector.
Definition Vector4.hh:184
double angle(const FourVector &v) const
Angle between this vector and another.
Definition Vector4.hh:102
double phi(const PhiMapping mapping=ZERO_2PI) const
Synonym for azimuthalAngle.
Definition Vector4.hh:156
double contract(const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).
Definition Vector4.hh:199
double azimuthalAngle(const PhiMapping mapping=ZERO_2PI) const
Angle subtended by the 3-vector's projection in x-y and the x-axis.
Definition Vector4.hh:152
double dot(const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).
Definition Vector4.hh:205
FourVector & operator*=(double a)
Multiply by a scalar.
Definition Vector4.hh:215
double operator*(const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).
Definition Vector4.hh:210
double pseudorapidity() const
Pseudorapidity (defined purely by the 3-vector components).
Definition Vector4.hh:170
double polarRadius() const
Magnitude of projection of 3-vector on to the plane.
Definition Vector4.hh:126
double angle(const Vector3 &v3) const
Angle between this vector and another (3-vector).
Definition Vector4.hh:106
Vector3 polarVec() const
Projection of 3-vector on to the plane.
Definition Vector4.hh:139
double polarRadius2() const
Mod-square of the projection of the 3-vector on to the plane This is a more efficient function than ...
Definition Vector4.hh:113
FourVector reverse() const
Multiply space components only by -1.
Definition Vector4.hh:246
double polarAngle() const
Angle subtended by the 3-vector and the z-axis.
Definition Vector4.hh:161
FourVector & operator-=(const FourVector &v)
Subtract from this 4-vector. NB time as well as space components are subtracted.
Definition Vector4.hh:233
double abspseudorapidity() const
Get the directly.
Definition Vector4.hh:179
FourVector & operator+=(const FourVector &v)
Add to this 4-vector.
Definition Vector4.hh:227
Object implementing Lorentz transform calculations and boosts.
Definition LorentzTrans.hh:21
double pseudorapidity() const
Purely geometric approximation to rapidity.
Definition Vector3.hh:221
double phi(const PhiMapping mapping=ZERO_2PI) const
Synonym for azimuthalAngle.
Definition Vector3.hh:182
double polarRadius2() const
Square of the polar radius (.
Definition Vector3.hh:144
double azimuthalAngle(const PhiMapping mapping=ZERO_2PI) const
Angle subtended by the vector's projection in x-y and the x-axis.
Definition Vector3.hh:173
double angle(const Vector3 &v) const
Angle in radians to another vector.
Definition Vector3.hh:108
double polarAngle() const
Angle subtended by the vector and the z-axis.
Definition Vector3.hh:202
Vector3 polarVec() const
Polar projection of this vector into the x-y plane.
Definition Vector3.hh:129
double mod2() const
Calculate the modulus-squared of a vector. .
Definition VectorN.hh:84
Vector< N > & set(const size_t index, const double value)
Definition VectorN.hh:60
MOMS & isortBy(MOMS &pbs, const CMP &cmp)
Sort a container of momenta by cmp and return by reference for non-const inputs.
Definition Vector4.hh:1430
MOMS & isortByE(MOMS &pbs)
Sort a container of momenta by E (decreasing) and return by reference for non-const inputs.
Definition Vector4.hh:1455
MOMS & isortByEt(MOMS &pbs)
Sort a container of momenta by Et (decreasing) and return by reference for non-const inputs.
Definition Vector4.hh:1466
bool cmpMomByDescEta(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing eta (pseudorapidity).
Definition Vector4.hh:1391
bool cmpMomByMass(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing mass.
Definition Vector4.hh:1377
bool cmpMomByP(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing 3-momentum magnitude |p|.
Definition Vector4.hh:1350
bool cmpMomByAscEt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing transverse energy.
Definition Vector4.hh:1363
bool cmpMomByRap(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing rapidity.
Definition Vector4.hh:1406
bool cmpMomByE(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing energy.
Definition Vector4.hh:1368
MOMS sortBy(const MOMS &pbs, const CMP &cmp)
Sort a container of momenta by cmp and return by value for const inputs.
Definition Vector4.hh:1436
bool cmpMomByAbsRap(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing absolute rapidity.
Definition Vector4.hh:1416
MOMS sortByPt(const MOMS &pbs)
Sort a container of momenta by pT (decreasing) and return by value for const inputs.
Definition Vector4.hh:1449
MOMS sortByEt(const MOMS &pbs)
Sort a container of momenta by Et (decreasing) and return by value for const inputs.
Definition Vector4.hh:1471
bool cmpMomByEt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing transverse energy.
Definition Vector4.hh:1359
bool cmpMomByAscPt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing pT.
Definition Vector4.hh:1345
bool cmpMomByAscP(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing 3-momentum magnitude |p|.
Definition Vector4.hh:1354
bool cmpMomByAscMass(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing mass.
Definition Vector4.hh:1381
MOMS sortByE(const MOMS &pbs)
Sort a container of momenta by E (decreasing) and return by value for const inputs.
Definition Vector4.hh:1460
bool cmpMomByPt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing pT.
Definition Vector4.hh:1341
bool cmpMomByAbsEta(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing absolute eta (pseudorapidity).
Definition Vector4.hh:1396
bool cmpMomByDescAbsEta(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing absolute eta (pseudorapidity).
Definition Vector4.hh:1401
bool cmpMomByEta(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing eta (pseudorapidity).
Definition Vector4.hh:1386
bool cmpMomByAscE(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by increasing energy.
Definition Vector4.hh:1372
bool cmpMomByDescAbsRap(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing absolute rapidity.
Definition Vector4.hh:1421
MOMS & isortByPt(MOMS &pbs)
Sort a container of momenta by pT (decreasing) and return by reference for non-const inputs.
Definition Vector4.hh:1444
bool cmpMomByDescRap(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing rapidity.
Definition Vector4.hh:1411
double mass(const FourMomentum &a, const FourMomentum &b)
Calculate mass of two 4-vectors.
Definition Vector4.hh:1482
double mass2(const FourMomentum &a, const FourMomentum &b)
Calculate mass^2 of two 4-vectors.
Definition Vector4.hh:1487
double pT(const Vector3 &a, const Vector3 &b)
Calculate transverse momentum of pair of 3-vectors.
Definition Vector3.hh:649
double E(const ParticleBase &p)
Unbound function access to E.
Definition ParticleBaseUtils.hh:659
Definition MC_CENT_PPB_Projections.hh:10
constexpr std::enable_if_t< std::is_arithmetic_v< NUM >, int > sign(NUM val)
Find the sign of a number.
Definition MathUtils.hh:275
double deltaR(double rap1, double phi1, double rap2, double phi2)
Definition MathUtils.hh:708
double deltaPhi(double phi1, double phi2, bool sign=false)
Calculate the difference between two angles in radians.
Definition MathUtils.hh:678
double deltaEta(double eta1, double eta2, bool sign=false)
Definition MathUtils.hh:686
double deltaR2(double rap1, double phi1, double rap2, double phi2)
Definition MathUtils.hh:701
std::ostream & operator<<(std::ostream &os, const AnalysisInfo &ai)
Stream an AnalysisInfo as a text description.
Definition AnalysisInfo.hh:362
std::enable_if_t< std::is_floating_point_v< NUM >, bool > isZero(NUM val, double tolerance=1e-8)
Compare a number to zero.
Definition MathUtils.hh:24
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > sqr(NUM a)
Named number-type squaring operation.
Definition MathUtils.hh:218
double contract(const FourVector &a, const FourVector &b)
Contract two 4-vectors, with metric signature (+ - - -).
Definition Vector4.hh:256
double add(double a, double b, double tolerance=1e-5)
Add two numbers with FP fuzziness.
Definition MathUtils.hh:229
RapScheme
Enum for rapidity variable to be used in calculating , applying rapidity cuts, etc.
Definition MathConstants.hh:46
Cmp< T > cmp(const T &t1, const T &t2)
Global helper function for easy creation of Cmp objects.
Definition Cmp.hh:255
double angle(const Vector2 &a, const Vector2 &b)
Angle (in radians) between two 2-vectors.
Definition Vector2.hh:177
double rapidity(double E, double pz)
Calculate a rapidity value from the supplied energy E and longitudinal momentum pz.
Definition MathUtils.hh:713
Generated on for Rivet by
