Specialized version of the FourVector with momentum/energy functionality. More...
#include <Vector4.hh>
Classes | |
struct | byEAscending |
Struct for sorting by increasing energy. More... | |
struct | byEDescending |
Struct for sorting by decreasing energy. More... | |
Public Member Functions | |
FourMomentum () | |
template<typename V4 > | |
FourMomentum (const V4 &other) | |
FourMomentum (const Vector< 4 > &other) | |
FourMomentum (const double E, const double px, const double py, const double pz) | |
~FourMomentum () | |
double | E () const |
Get energy ![]() | |
Vector3 | p () const |
Get 3-momentum part, ![]() | |
double | px () const |
Get x-component of momentum ![]() | |
double | py () const |
Get y-component of momentum ![]() | |
double | pz () const |
Get z-component of momentum ![]() | |
FourMomentum & | setE (double E) |
Set energy ![]() | |
FourMomentum & | setPx (double px) |
Set x-component of momentum ![]() | |
FourMomentum & | setPy (double py) |
Set y-component of momentum ![]() | |
FourMomentum & | setPz (double pz) |
Set z-component of momentum ![]() | |
double | mass () const |
Get the mass ![]() | |
double | massT () const |
Calculate the transverse mass ![]() | |
double | mass2 () const |
Get the squared mass ![]() | |
double | massT2 () const |
Calculate the squared transverse mass ![]() | |
double | rapidity () const |
Calculate the rapidity. | |
double | pT2 () const |
Calculate the squared transverse momentum ![]() | |
double | pT () const |
Calculate the transverse momentum ![]() | |
double | Et2 () const |
Calculate the transverse energy ![]() | |
double | Et () const |
Calculate the transverse energy ![]() | |
Vector3 | boostVector () const |
Calculate the boost vector (in units of ![]() | |
FourMomentum & | operator*= (double a) |
Multiply by a scalar. | |
FourMomentum & | operator/= (double a) |
Divide by a scalar. | |
FourMomentum & | operator+= (const FourMomentum &v) |
FourMomentum & | operator-= (const FourMomentum &v) |
FourMomentum | operator- () const |
Invert the vector. | |
double | t () const |
double | x () const |
double | y () const |
double | z () const |
FourVector & | setT (const double t) |
FourVector & | setX (const double x) |
FourVector & | setY (const double y) |
FourVector & | setZ (const double z) |
double | invariant () const |
double | angle (const FourVector &v) const |
Angle between this vector and another. | |
double | angle (const Vector3 &v3) const |
Angle between this vector and another (3-vector). | |
double | polarRadius2 () const |
Square of the projection of the 3-vector on to the ![]() polarRadius , as it avoids the square root. Use it if you only need the squared value, or e.g. an ordering by magnitude. | |
double | perp2 () const |
Synonym for polarRadius2. | |
double | rho2 () const |
Synonym for polarRadius2. | |
double | polarRadius () const |
Projection of 3-vector on to the ![]() | |
double | perp () const |
Synonym for polarRadius. | |
double | rho () const |
Synonym for polarRadius. | |
double | azimuthalAngle (const PhiMapping mapping=ZERO_2PI) const |
Angle subtended by the 3-vector's projection in x-y and the x-axis. | |
double | phi (const PhiMapping mapping=ZERO_2PI) const |
Synonym for azimuthalAngle. | |
double | polarAngle () const |
Angle subtended by the 3-vector and the z-axis. | |
double | theta () const |
Synonym for polarAngle. | |
double | pseudorapidity () const |
Pseudorapidity (defined purely by the 3-vector components). | |
double | eta () const |
Synonym for pseudorapidity. | |
Vector3 | vector3 () const |
Get the spatial part of the 4-vector as a 3-vector. | |
double | contract (const FourVector &v) const |
Contract two 4-vectors, with metric signature (+ - - -). | |
double | dot (const FourVector &v) const |
Contract two 4-vectors, with metric signature (+ - - -). | |
double | operator* (const FourVector &v) const |
Contract two 4-vectors, with metric signature (+ - - -). | |
FourVector & | operator+= (const FourVector &v) |
FourVector & | operator-= (const FourVector &v) |
const double & | get (const size_t index) const |
const double & | operator[] (const size_t index) const |
Direct access to vector elements by index. | |
double & | operator[] (const size_t index) |
Direct access to vector elements by index. | |
Vector< N > & | set (const size_t index, const double value) |
Set indexed value. | |
size_t | size () const |
Vector dimensionality. | |
bool | isZero (double tolerance=1E-5) const |
Check for nullness, allowing for numerical precision. | |
double | mod2 () const |
Calculate the modulus-squared of a vector. ![]() | |
double | mod () const |
Calculate the modulus of a vector. ![]() | |
bool | operator== (const Vector< N > &a) const |
bool | operator!= (const Vector< N > &a) const |
bool | operator< (const Vector< N > &a) const |
bool | operator<= (const Vector< N > &a) const |
bool | operator> (const Vector< N > &a) const |
bool | operator>= (const Vector< N > &a) const |
Protected Member Functions | |
double & | get (const size_t index) |
Protected Attributes | |
Eigen::Vector< double, N > | _vec |
Vector. | |
Friends | |
FourMomentum | multiply (const double a, const FourMomentum &v) |
FourMomentum | multiply (const FourMomentum &v, const double a) |
FourMomentum | add (const FourMomentum &a, const FourMomentum &b) |
FourMomentum | transform (const LorentzTransform <, const FourMomentum &v4) |
Specialized version of the FourVector with momentum/energy functionality.
Definition at line 321 of file Vector4.hh.
FourMomentum | ( | ) | [inline] |
Definition at line 328 of file Vector4.hh.
FourMomentum | ( | const V4 & | other | ) | [inline] |
Definition at line 331 of file Vector4.hh.
References FourMomentum::setE(), FourMomentum::setPx(), FourMomentum::setPy(), and FourMomentum::setPz().
FourMomentum | ( | const Vector< 4 > & | other | ) | [inline] |
Definition at line 338 of file Vector4.hh.
00339 : FourVector(other) { }
FourMomentum | ( | const double | E, | |
const double | px, | |||
const double | py, | |||
const double | pz | |||
) | [inline] |
Definition at line 341 of file Vector4.hh.
References FourMomentum::setE(), FourMomentum::setPx(), FourMomentum::setPy(), and FourMomentum::setPz().
~FourMomentum | ( | ) | [inline] |
Definition at line 348 of file Vector4.hh.
double angle | ( | const Vector3 & | v3 | ) | const [inline, inherited] |
Angle between this vector and another (3-vector).
Definition at line 72 of file Vector4.hh.
References Vector3::angle(), and FourVector::vector3().
00072 { 00073 return vector3().angle(v3); 00074 }
double angle | ( | const FourVector & | v | ) | const [inline, inherited] |
Angle between this vector and another.
Definition at line 67 of file Vector4.hh.
References Vector3::angle(), and FourVector::vector3().
Referenced by D0_1996_S3214044::_fourJetAnalysis(), H1_2000_S4129130::analyze(), H1_1994_S2919893::analyze(), Rivet::angle(), and MC_VH2BB::boostAngles().
00067 { 00068 return vector3().angle( v.vector3() ); 00069 }
double azimuthalAngle | ( | const PhiMapping | mapping = ZERO_2PI |
) | const [inline, inherited] |
Angle subtended by the 3-vector's projection in x-y and the x-axis.
Definition at line 109 of file Vector4.hh.
References Vector3::azimuthalAngle(), and FourVector::vector3().
Referenced by Jet::_calcPtAvgs(), CDF_2004_S5839831::_calcTransCones(), MC_LEADINGJETS::analyze(), MC_DIJET::analyze(), H1_1994_S2919893::analyze(), D0_2008_S7719523::analyze(), D0_2006_S6438750::analyze(), CDF_2008_S8095620::analyze(), CDF_2008_S7540469::analyze(), CDF_2006_S6653332::analyze(), CDF_2004_S5839831::analyze(), Rivet::azimuthalAngle(), Rivet::deltaR(), DISKinematics::project(), and ClusteredPhotons::project().
00109 { 00110 return vector3().azimuthalAngle(mapping); 00111 }
Vector3 boostVector | ( | ) | const [inline] |
Calculate the boost vector (in units of ).
Definition at line 429 of file Vector4.hh.
References FourMomentum::E(), FourMomentum::px(), FourMomentum::py(), and FourMomentum::pz().
Referenced by CDF_1997_S3541940::_avg_beam_in_lab(), CDF_1996_S3349578::_avg_beam_in_lab(), CDF_1996_S3349578::_fiveJetAnalysis(), D0_1996_S3214044::_fourJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), D0_1996_S3214044::_threeJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), CDF_1997_S3541940::analyze(), CDF_1996_S3108457::analyze(), BELLE_2006_S6265367::analyze(), MC_VH2BB::boostAngles(), Rivet::boostVector(), and DISKinematics::project().
00429 { 00430 // const Vector3 p3 = vector3(); 00431 // const double m2 = mass2(); 00432 // if (Rivet::isZero(m2)) return p3.unit(); 00433 // else { 00434 // // Could also do this via beta = tanh(rapidity), but that's 00435 // // probably more messy from a numerical hygiene point of view. 00436 // const double p2 = p3.mod2(); 00437 // const double beta = sqrt( p2 / (m2 + p2) ); 00438 // return beta * p3.unit(); 00439 // } 00440 /// @todo Be careful about c=1 convention... 00441 return Vector3(px()/E(), py()/E(), pz()/E()); 00442 }
double contract | ( | const FourVector & | v | ) | const [inline, inherited] |
Contract two 4-vectors, with metric signature (+ - - -).
Definition at line 147 of file Vector4.hh.
References FourVector::t(), FourVector::x(), FourVector::y(), and FourVector::z().
Referenced by Rivet::contract(), FourVector::dot(), and FourVector::operator*().
double dot | ( | const FourVector & | v | ) | const [inline, inherited] |
Contract two 4-vectors, with metric signature (+ - - -).
Definition at line 153 of file Vector4.hh.
References FourVector::contract().
00153 { 00154 return contract(v); 00155 }
double E | ( | ) | const [inline] |
Get energy (time component of momentum).
Definition at line 352 of file Vector4.hh.
References FourVector::t().
Referenced by CDF_1997_S3541940::_avg_beam_in_lab(), CDF_1996_S3349578::_avg_beam_in_lab(), BeamThrust::_calcBeamThrust(), CDF_1996_S3349578::_fiveJetAnalysis(), D0_1996_S3214044::_fourJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), D0_1996_S3214044::_threeJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), OPAL_1998_S3780481::analyze(), OPAL_1993_S2692198::analyze(), MC_PHOTONJETS::analyze(), MC_GENERIC::analyze(), LHCB_2010_S8758301::analyze(), H1_2000_S4129130::analyze(), H1_1994_S2919893::analyze(), DELPHI_1996_S3430090::analyze(), D0_2008_S7719523::analyze(), D0_2006_S6438750::analyze(), CDF_1997_S3541940::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2011_S9019561::analyze(), ALEPH_2004_S5765862::analyze(), ALEPH_1996_S3486095::analyze(), ALEPH_1996_S3196992::analyze(), FourMomentum::boostVector(), FastJets::calc(), Rivet::cmpJetsByAscE(), Rivet::cmpJetsByE(), Rivet::cmpMomByAscE(), Rivet::cmpMomByE(), Rivet::cmpParticleByAscE(), Rivet::cmpParticleByE(), Particle::energy(), FourMomentum::Et(), Jet::hadronicEnergy(), Jet::neutralEnergy(), byEAscending::operator()(), ALEPH_1996_S3196992::particleInJet(), Hemispheres::project(), FourMomentum::rapidity(), Rivet::sqrtS(), and Jet::totalEnergy().
00352 { return t(); }
double Et | ( | ) | const [inline] |
Calculate the transverse energy .
Definition at line 424 of file Vector4.hh.
References FourMomentum::E(), and FourVector::polarAngle().
Referenced by CDF_1996_S3349578::_fiveJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), MC_WJETS::analyze(), MC_GENERIC::analyze(), MC_DIPHOTON::analyze(), D0_2010_S8570965::analyze(), D0_2008_S7837160::analyze(), D0_1996_S3324664::analyze(), CDF_2009_S8436959::analyze(), CDF_2009_S8233977::analyze(), CDF_2008_S7541902::analyze(), CDF_2008_LEADINGJETS::analyze(), CDF_2005_S6080774::analyze(), CDF_2001_S4563131::analyze(), CDF_2001_S4517016::analyze(), CDF_1998_S3618439::analyze(), CDF_1997_S3541940::analyze(), CDF_1996_S3349578::analyze(), CDF_1996_S3108457::analyze(), CDF_1993_S2742446::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2011_S9019561::analyze(), ATLAS_2010_S8919674::analyze(), ATLAS_2010_S8914702::analyze(), Rivet::cmpMomByAscEt(), Rivet::cmpMomByEt(), Rivet::cmpParticleByAscEt(), Rivet::cmpParticleByEt(), Rivet::Et(), FourMomentum::Et2(), Jet::EtSum(), TotalVisibleMomentum::project(), NeutralFinalState::project(), MissingMomentum::project(), and CentralEtHCM::project().
00424 { 00425 return E() * sin(polarAngle()); 00426 }
double Et2 | ( | ) | const [inline] |
Calculate the transverse energy .
Definition at line 419 of file Vector4.hh.
References FourMomentum::Et().
Referenced by Rivet::Et2(), and byETAscending::operator()().
double eta | ( | ) | const [inline, inherited] |
Synonym for pseudorapidity.
Definition at line 134 of file Vector4.hh.
References Vector3::eta(), and FourVector::vector3().
Referenced by FinalState::accept(), UA1_1990_S2044935::analyze(), STAR_2009_UE_HELEN::analyze(), STAR_2008_S7993412::analyze(), MC_ZZJETS::analyze(), MC_ZJETS::analyze(), MC_WWJETS::analyze(), MC_WJETS::analyze(), MC_VH2BB::analyze(), MC_SUSY::analyze(), MC_PHOTONJETUE::analyze(), MC_PHOTONJETS::analyze(), MC_HJETS::analyze(), MC_GENERIC::analyze(), MC_DIPHOTON::analyze(), D0_2010_S8821313::analyze(), D0_2010_S8570965::analyze(), D0_2008_S7837160::analyze(), D0_2008_S7719523::analyze(), D0_2008_S6879055::analyze(), D0_1996_S3324664::analyze(), D0_1996_S3214044::analyze(), CMS_2011_S9120041::analyze(), CMS_2011_S9088458::analyze(), CMS_2011_S8957746::analyze(), CMS_2011_S8884919::analyze(), CMS_2010_S8656010::analyze(), CMS_2010_S8547297::analyze(), CDF_2010_S8591881_DY::analyze(), CDF_2009_S8436959::analyze(), CDF_2008_S7541902::analyze(), CDF_2008_NOTE_9351::analyze(), CDF_2005_S6080774::analyze(), CDF_2004_S5839831::analyze(), CDF_2001_S4563131::analyze(), CDF_2001_S4517016::analyze(), CDF_2000_S4266730::analyze(), CDF_1997_S3541940::analyze(), CDF_1996_S3418421::analyze(), CDF_1994_S2952106::analyze(), CDF_1993_S2742446::analyze(), ATLAS_2011_S9225137::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_S9128077::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2011_S9019561::analyze(), ATLAS_2011_S9002537::analyze(), ATLAS_2011_S8994773::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2011_CONF_2011_098::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2010_S8914702::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2010_S8591806::analyze(), ATLAS_2010_CONF_2010_049::analyze(), JetShape::calc(), Rivet::eta(), Jet::eta(), ATLAS_2010_S8918562::fillPtEtaNch(), JetAlg::jets(), and NeutralFinalState::project().
00134 { 00135 return vector3().eta(); 00136 }
double& get | ( | const size_t | index | ) | [inline, protected, inherited] |
Definition at line 126 of file VectorN.hh.
References Vector< N >::_vec.
00126 { 00127 if (index >= N) { 00128 throw std::runtime_error("Tried to access an invalid vector index."); 00129 } else { 00130 return _vec(index); 00131 } 00132 }
const double& get | ( | const size_t | index | ) | const [inline, inherited] |
Definition at line 33 of file VectorN.hh.
References Vector< N >::_vec.
00033 { 00034 if (index >= N) { 00035 throw std::runtime_error("Tried to access an invalid vector index."); 00036 } else { 00037 return _vec(index); 00038 } 00039 }
double invariant | ( | ) | const [inline, inherited] |
Definition at line 61 of file Vector4.hh.
References FourVector::t(), FourVector::x(), FourVector::y(), and FourVector::z().
Referenced by D0_2001_S4674421::analyze(), Rivet::invariant(), and FourMomentum::mass2().
bool isZero | ( | double | tolerance = 1E-5 |
) | const [inline, inherited] |
Check for nullness, allowing for numerical precision.
Definition at line 67 of file VectorN.hh.
References Vector< N >::_vec, and Rivet::isZero().
00067 { 00068 for (size_t i=0; i < N; ++i) { 00069 if (! Rivet::isZero(_vec[i], tolerance) ) return false; 00070 } 00071 return true; 00072 }
double mass | ( | ) | const [inline] |
Get the mass (the Lorentz self-invariant).
Definition at line 379 of file Vector4.hh.
References Rivet::isZero(), and FourMomentum::mass2().
Referenced by OPAL_1993_S2692198::analyze(), MC_VH2BB::analyze(), MC_TTBAR::analyze(), MC_DIPHOTON::analyze(), D0_2010_S8570965::analyze(), CDF_2010_S8591881_DY::analyze(), CDF_2008_NOTE_9351::analyze(), CDF_2005_S6080774::analyze(), CDF_2000_S4155203::analyze(), CDF_1996_S3108457::analyze(), ATLAS_2011_S9120807::analyze(), InvMassFinalState::calc(), Rivet::mass(), Particle::mass(), and FourMomentum::massT().
00379 { 00380 assert(Rivet::isZero(mass2()) || mass2() > 0); 00381 if (Rivet::isZero(mass2())) { 00382 return 0.0; 00383 } else { 00384 return sqrt(mass2()); 00385 } 00386 }
double mass2 | ( | ) | const [inline] |
Get the squared mass (the Lorentz self-invariant).
Definition at line 394 of file Vector4.hh.
References FourVector::invariant().
Referenced by D0_1996_S3214044::_safeMass(), CDF_1997_S3541940::_safeMass(), CDF_1996_S3349578::_safeMass(), CDF_2000_S4155203::analyze(), InvMassFinalState::calc(), FourMomentum::mass(), Rivet::mass2(), Hemispheres::project(), and DISKinematics::project().
00394 { 00395 return invariant(); 00396 }
double massT | ( | ) | const [inline] |
Calculate the transverse mass .
Definition at line 389 of file Vector4.hh.
References FourMomentum::mass(), and FourVector::polarAngle().
Referenced by InvMassFinalState::calc(), Rivet::massT(), and FourMomentum::massT2().
00389 { 00390 return mass() * sin(polarAngle()); 00391 }
double massT2 | ( | ) | const [inline] |
Calculate the squared transverse mass .
Definition at line 399 of file Vector4.hh.
References FourMomentum::massT().
Referenced by Rivet::massT2().
double mod | ( | ) | const [inline, inherited] |
Calculate the modulus of a vector. .
Definition at line 87 of file VectorN.hh.
References Vector< N >::mod2().
00087 { 00088 const double norm = mod2(); 00089 assert(norm >= 0); 00090 return sqrt(norm); 00091 }
double mod2 | ( | ) | const [inline, inherited] |
Calculate the modulus-squared of a vector. .
Definition at line 76 of file VectorN.hh.
References Vector< N >::mod2(), and Vector< N >::size().
bool operator!= | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 104 of file VectorN.hh.
References Vector< N >::_vec.
00104 { 00105 return _vec != a._vec; 00106 }
double operator* | ( | const FourVector & | v | ) | const [inline, inherited] |
Contract two 4-vectors, with metric signature (+ - - -).
Definition at line 158 of file Vector4.hh.
References FourVector::contract().
00158 { 00159 return contract(v); 00160 }
FourMomentum& operator*= | ( | double | a | ) | [inline] |
Multiply by a scalar.
Reimplemented from FourVector.
Definition at line 470 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourMomentum::multiply.
FourVector& operator+= | ( | const FourVector & | v | ) | [inline, inherited] |
Definition at line 174 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourVector::add.
FourMomentum& operator+= | ( | const FourMomentum & | v | ) | [inline] |
Definition at line 481 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourMomentum::add.
FourMomentum operator- | ( | ) | const [inline] |
Invert the vector.
Reimplemented from FourVector.
Definition at line 491 of file Vector4.hh.
References Vector< 4 >::_vec, and Vector< N >::_vec.
00491 { 00492 FourMomentum result; 00493 result._vec = -_vec; 00494 return result; 00495 }
FourVector& operator-= | ( | const FourVector & | v | ) | [inline, inherited] |
Definition at line 179 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourVector::add.
FourMomentum& operator-= | ( | const FourMomentum & | v | ) | [inline] |
Definition at line 486 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourMomentum::add.
FourMomentum& operator/= | ( | double | a | ) | [inline] |
Divide by a scalar.
Reimplemented from FourVector.
Definition at line 476 of file Vector4.hh.
References Vector< N >::_vec, Vector< 4 >::_vec, and FourMomentum::multiply.
bool operator< | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 108 of file VectorN.hh.
References Vector< N >::_vec.
00108 { 00109 return _vec < a._vec; 00110 }
bool operator<= | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 112 of file VectorN.hh.
References Vector< N >::_vec.
00112 { 00113 return _vec <= a._vec; 00114 }
bool operator== | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 100 of file VectorN.hh.
References Vector< N >::_vec.
00100 { 00101 return _vec == a._vec; 00102 }
bool operator> | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 116 of file VectorN.hh.
References Vector< N >::_vec.
00116 { 00117 return _vec > a._vec; 00118 }
bool operator>= | ( | const Vector< N > & | a | ) | const [inline, inherited] |
Definition at line 120 of file VectorN.hh.
References Vector< N >::_vec.
00120 { 00121 return _vec >= a._vec; 00122 }
double& operator[] | ( | const size_t | index | ) | [inline, inherited] |
Direct access to vector elements by index.
Definition at line 47 of file VectorN.hh.
const double& operator[] | ( | const size_t | index | ) | const [inline, inherited] |
Direct access to vector elements by index.
Definition at line 42 of file VectorN.hh.
Vector3 p | ( | ) | const [inline] |
Get 3-momentum part, .
Definition at line 355 of file Vector4.hh.
References FourVector::vector3().
Referenced by ATLAS_2010_CONF_2010_049::analyze().
00355 { return vector3(); }
double perp | ( | ) | const [inline, inherited] |
Synonym for polarRadius.
Definition at line 99 of file Vector4.hh.
References Vector3::perp(), and FourVector::vector3().
Referenced by CMS_2011_S9120041::analyze(), ATLAS_2011_S9108483::analyze(), ATLAS_2011_S8994773::analyze(), ATLAS_2010_S8894728::analyze(), and Rivet::perp().
00099 { 00100 return vector3().perp(); 00101 }
double perp2 | ( | ) | const [inline, inherited] |
Synonym for polarRadius2.
Definition at line 84 of file Vector4.hh.
References Vector3::perp2(), and FourVector::vector3().
Referenced by ATLAS_2011_S9108483::analyze(), and Rivet::perp2().
00084 { 00085 return vector3().perp2(); 00086 }
double phi | ( | const PhiMapping | mapping = ZERO_2PI |
) | const [inline, inherited] |
Synonym for azimuthalAngle.
Definition at line 114 of file Vector4.hh.
References Vector3::phi(), and FourVector::vector3().
Referenced by STAR_2009_UE_HELEN::analyze(), STAR_2008_S7993412::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), MC_VH2BB::analyze(), MC_SUSY::analyze(), MC_PHOTONJETUE::analyze(), MC_PHOTONJETS::analyze(), MC_LEADINGJETS::analyze(), MC_GENERIC::analyze(), MC_DIPHOTON::analyze(), D0_2010_S8821313::analyze(), D0_2010_S8570965::analyze(), D0_2009_S8349509::analyze(), D0_2008_S7719523::analyze(), D0_2008_S6879055::analyze(), D0_1996_S3324664::analyze(), CMS_2011_S9120041::analyze(), CDF_2010_S8591881_QCD::analyze(), CDF_2009_S8436959::analyze(), CDF_2008_LEADINGJETS::analyze(), CDF_2005_S6080774::analyze(), CDF_2001_S4751469::analyze(), CDF_1994_S2952106::analyze(), CDF_1993_S2742446::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2011_S9002537::analyze(), ATLAS_2011_S8994773::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2011_CONF_2011_098::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2010_S8919674::analyze(), ATLAS_2010_S8914702::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2011_I925932::calcMT(), Rivet::phi(), and Jet::phi().
00114 { 00115 return vector3().phi(mapping); 00116 }
double polarAngle | ( | ) | const [inline, inherited] |
Angle subtended by the 3-vector and the z-axis.
Definition at line 119 of file Vector4.hh.
References Vector3::polarAngle(), and FourVector::vector3().
Referenced by H1_1994_S2919893::beamAngle(), FourMomentum::Et(), FourMomentum::massT(), Rivet::polarAngle(), and DISKinematics::project().
00119 { 00120 return vector3().polarAngle(); 00121 }
double polarRadius | ( | ) | const [inline, inherited] |
Projection of 3-vector on to the plane.
Definition at line 94 of file Vector4.hh.
References Vector3::polarRadius(), and FourVector::vector3().
Referenced by Rivet::polarRadius().
00094 { 00095 return vector3().polarRadius(); 00096 }
double polarRadius2 | ( | ) | const [inline, inherited] |
Square of the projection of the 3-vector on to the plane This is a more efficient function than
polarRadius
, as it avoids the square root. Use it if you only need the squared value, or e.g. an ordering by magnitude.
Definition at line 79 of file Vector4.hh.
References Vector3::polarRadius2(), and FourVector::vector3().
Referenced by Rivet::polarRadius2().
00079 { 00080 return vector3().polarRadius2(); 00081 }
double pseudorapidity | ( | ) | const [inline, inherited] |
Pseudorapidity (defined purely by the 3-vector components).
Definition at line 129 of file Vector4.hh.
References Vector3::pseudorapidity(), and FourVector::vector3().
Referenced by Jet::_calcPtAvgs(), CDF_2004_S5839831::_calcTransCones(), UA5_1986_S1583476::analyze(), UA5_1982_S875503::analyze(), SFM_1984_S1178091::analyze(), MC_DIJET::analyze(), H1_2000_S4129130::analyze(), H1_1994_S2919893::analyze(), D0_2009_S8349509::analyze(), D0_2009_S8202443::analyze(), D0_2008_S7863608::analyze(), D0_2008_S7719523::analyze(), D0_2006_S6438750::analyze(), CDF_2008_S7540469::analyze(), CDF_2004_S5839831::analyze(), CDF_1990_S2089246::analyze(), ALICE_2010_S8625980::analyze(), Rivet::cmpJetsByAscAbsPseudorapidity(), Rivet::cmpJetsByAscPseudorapidity(), Rivet::cmpJetsByDescAbsPseudorapidity(), Rivet::cmpJetsByDescPseudorapidity(), Rivet::cmpMomByAscAbsPseudorapidity(), Rivet::cmpMomByAscPseudorapidity(), Rivet::cmpMomByDescAbsPseudorapidity(), Rivet::cmpMomByDescPseudorapidity(), Rivet::cmpParticleByAscAbsPseudorapidity(), Rivet::cmpParticleByAscPseudorapidity(), Rivet::cmpParticleByDescAbsPseudorapidity(), Rivet::cmpParticleByDescPseudorapidity(), TriggerUA5::project(), TriggerCDFRun2::project(), TriggerCDFRun0Run1::project(), SVertex::project(), ClusteredPhotons::project(), and Rivet::pseudorapidity().
00129 { 00130 return vector3().pseudorapidity(); 00131 }
double pT | ( | ) | const [inline] |
Calculate the transverse momentum .
Definition at line 414 of file Vector4.hh.
References FourMomentum::pT2().
Referenced by SVertex::_applyVtxTrackCuts(), Jet::_calcPtAvgs(), CDF_2004_S5839831::_calcTransCones(), FinalState::accept(), ZEUS_2001_S4815815::analyze(), UA1_1990_S2044935::analyze(), STAR_2009_UE_HELEN::analyze(), STAR_2008_S7993412::analyze(), STAR_2008_S7869363::analyze(), STAR_2006_S6870392::analyze(), STAR_2006_S6860818::analyze(), STAR_2006_S6500200::analyze(), MC_ZZJETS::analyze(), MC_ZJETS::analyze(), MC_WWJETS::analyze(), MC_WJETS::analyze(), MC_VH2BB::analyze(), MC_TTBAR::analyze(), MC_SUSY::analyze(), MC_PHOTONJETUE::analyze(), MC_PHOTONJETS::analyze(), MC_LEADINGJETS::analyze(), MC_JetAnalysis::analyze(), MC_HJETS::analyze(), MC_GENERIC::analyze(), MC_DIPHOTON::analyze(), MC_DIJET::analyze(), D0_2010_S8570965::analyze(), D0_2009_S8349509::analyze(), D0_2008_S7863608::analyze(), D0_2008_S7719523::analyze(), D0_2008_S7662670::analyze(), D0_2007_S7075677::analyze(), D0_2006_S6438750::analyze(), D0_2001_S4674421::analyze(), CMS_2011_S9088458::analyze(), CMS_2011_S9086218::analyze(), CMS_2011_S8978280::analyze(), CMS_2011_S8884919::analyze(), CMS_2010_S8656010::analyze(), CMS_2010_S8547297::analyze(), CDF_2010_S8591881_QCD::analyze(), CDF_2010_S8591881_DY::analyze(), CDF_2009_S8233977::analyze(), CDF_2008_S8095620::analyze(), CDF_2008_S7828950::analyze(), CDF_2008_S7782535::analyze(), CDF_2008_S7541902::analyze(), CDF_2008_S7540469::analyze(), CDF_2008_NOTE_9351::analyze(), CDF_2008_LEADINGJETS::analyze(), CDF_2007_S7057202::analyze(), CDF_2006_S6450792::analyze(), CDF_2005_S6080774::analyze(), CDF_2004_S5839831::analyze(), CDF_2001_S4751469::analyze(), CDF_2000_S4155203::analyze(), CDF_1996_S3108457::analyze(), CDF_1994_S2952106::analyze(), CDF_1988_S1865951::analyze(), ATLAS_2011_S9225137::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_S9131140::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2011_S9019561::analyze(), ATLAS_2011_S9002537::analyze(), ATLAS_2011_S8994773::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2011_I925932::analyze(), ATLAS_2011_I919017::analyze(), ATLAS_2011_CONF_2011_098::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2010_S8919674::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2010_S8817804::analyze(), ATLAS_2010_S8591806::analyze(), ATLAS_2010_CONF_2010_049::analyze(), ALICE_2011_S8945144::analyze(), ALICE_2011_S8909580::analyze(), ALICE_2010_S8706239::analyze(), JetShape::calc(), ATLAS_2011_I925932::calcMT(), Rivet::cmpMomByAscPt(), Rivet::cmpMomByPt(), Rivet::cmpParticleByAscPt(), Rivet::cmpParticleByPt(), ATLAS_2010_S8918562::fillPtEtaNch(), JetAlg::jets(), STARRandomFilter::operator()(), VetoedFinalState::project(), Rivet::pT(), and Jet::ptSum().
00414 { 00415 return sqrt(pT2()); 00416 }
double pT2 | ( | ) | const [inline] |
Calculate the squared transverse momentum .
Definition at line 409 of file Vector4.hh.
References Vector3::polarRadius2(), and FourVector::vector3().
Referenced by byPTAscending::operator()(), FourMomentum::pT(), and Rivet::pT2().
00409 { 00410 return vector3().polarRadius2(); 00411 }
double px | ( | ) | const [inline] |
Get x-component of momentum .
Definition at line 358 of file Vector4.hh.
References FourVector::x().
Referenced by OPAL_1993_S2692198::analyze(), LHCB_2010_S8758301::analyze(), CDF_2008_S7541902::analyze(), FourMomentum::boostVector(), FastJets::calc(), Rivet::get2dDecayLength(), Rivet::get3dDecayLength(), and DISKinematics::project().
00358 { return x(); }
double py | ( | ) | const [inline] |
Get y-component of momentum .
Definition at line 361 of file Vector4.hh.
References FourVector::y().
Referenced by OPAL_1993_S2692198::analyze(), LHCB_2010_S8758301::analyze(), CDF_2008_S7541902::analyze(), FourMomentum::boostVector(), FastJets::calc(), Rivet::get2dDecayLength(), and Rivet::get3dDecayLength().
00361 { return y(); }
double pz | ( | ) | const [inline] |
Get z-component of momentum .
Definition at line 364 of file Vector4.hh.
References FourVector::z().
Referenced by SFM_1984_S1178091::analyze(), OPAL_1993_S2692198::analyze(), LHCB_2010_S8758301::analyze(), FourMomentum::boostVector(), FastJets::calc(), Rivet::get3dDecayLength(), DISLepton::project(), FourMomentum::rapidity(), and Rivet::sqrtS().
00364 { return z(); }
double rapidity | ( | ) | const [inline] |
Calculate the rapidity.
Definition at line 404 of file Vector4.hh.
References FourMomentum::E(), and FourMomentum::pz().
Referenced by CDF_1996_S3349578::_fiveJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), STAR_2008_S7869363::analyze(), STAR_2006_S6860818::analyze(), STAR_2006_S6500200::analyze(), MC_PHOTONJETS::analyze(), MC_GENERIC::analyze(), D0_2010_S8821313::analyze(), D0_2010_S8566488::analyze(), D0_2009_S8349509::analyze(), D0_2009_S8320160::analyze(), D0_2008_S7863608::analyze(), D0_2008_S7719523::analyze(), D0_2008_S7662670::analyze(), CMS_2011_S9086218::analyze(), CMS_2011_S8978280::analyze(), CMS_2011_S8968497::analyze(), CDF_2008_S8095620::analyze(), CDF_2008_S8093652::analyze(), CDF_2008_S7828950::analyze(), CDF_2008_S7541902::analyze(), CDF_2007_S7057202::analyze(), CDF_2006_S6653332::analyze(), CDF_2006_S6450792::analyze(), CDF_1997_S3541940::analyze(), ATLAS_2011_S9126244::analyze(), ATLAS_2011_S8971293::analyze(), ATLAS_2011_I919017::analyze(), ATLAS_2010_S8817804::analyze(), ALICE_2011_S8945144::analyze(), ALICE_2011_S8909580::analyze(), JetShape::calc(), Rivet::cmpJetsByAscAbsRapidity(), Rivet::cmpJetsByAscRapidity(), Rivet::cmpJetsByDescAbsRapidity(), Rivet::cmpJetsByDescRapidity(), Rivet::cmpMomByAscAbsRapidity(), Rivet::cmpMomByAscRapidity(), Rivet::cmpMomByDescAbsRapidity(), Rivet::cmpMomByDescRapidity(), Rivet::cmpParticleByAscAbsRapidity(), Rivet::cmpParticleByAscRapidity(), Rivet::cmpParticleByDescAbsRapidity(), Rivet::cmpParticleByDescRapidity(), Rivet::deltaR(), JetAlg::jets(), CentralEtHCM::project(), and Rivet::rapidity().
double rho | ( | ) | const [inline, inherited] |
Synonym for polarRadius.
Definition at line 104 of file Vector4.hh.
References Vector3::rho(), and FourVector::vector3().
Referenced by Rivet::rho().
00104 { 00105 return vector3().rho(); 00106 }
double rho2 | ( | ) | const [inline, inherited] |
Synonym for polarRadius2.
Definition at line 89 of file Vector4.hh.
References Vector3::rho2(), and FourVector::vector3().
Referenced by Rivet::rho2().
00089 { 00090 return vector3().rho2(); 00091 }
Vector<N>& set | ( | const size_t | index, | |
const double | value | |||
) | [inline, inherited] |
Set indexed value.
Definition at line 52 of file VectorN.hh.
References Vector< N >::_vec.
00052 { 00053 if (index >= N) { 00054 throw std::runtime_error("Tried to access an invalid vector index."); 00055 } else { 00056 _vec[index] = value; 00057 } 00058 return *this; 00059 }
FourMomentum& setE | ( | double | E | ) | [inline] |
Set energy (time component of momentum).
Definition at line 367 of file Vector4.hh.
References FourVector::setT().
Referenced by FourMomentum::FourMomentum().
FourMomentum& setPx | ( | double | px | ) | [inline] |
Set x-component of momentum .
Definition at line 370 of file Vector4.hh.
References FourVector::setX().
Referenced by FourMomentum::FourMomentum().
FourMomentum& setPy | ( | double | py | ) | [inline] |
Set y-component of momentum .
Definition at line 373 of file Vector4.hh.
References FourVector::setY().
Referenced by FourMomentum::FourMomentum().
FourMomentum& setPz | ( | double | pz | ) | [inline] |
Set z-component of momentum .
Definition at line 376 of file Vector4.hh.
References FourVector::setZ().
Referenced by FourMomentum::FourMomentum().
FourVector& setT | ( | const double | t | ) | [inline, inherited] |
Definition at line 56 of file Vector4.hh.
Referenced by FourVector::FourVector(), and FourMomentum::setE().
00056 { set(0, t); return *this; }
FourVector& setX | ( | const double | x | ) | [inline, inherited] |
Definition at line 57 of file Vector4.hh.
Referenced by FourVector::FourVector(), and FourMomentum::setPx().
00057 { set(1, x); return *this; }
FourVector& setY | ( | const double | y | ) | [inline, inherited] |
Definition at line 58 of file Vector4.hh.
Referenced by FourVector::FourVector(), and FourMomentum::setPy().
00058 { set(2, y); return *this; }
FourVector& setZ | ( | const double | z | ) | [inline, inherited] |
Definition at line 59 of file Vector4.hh.
Referenced by FourVector::FourVector(), and FourMomentum::setPz().
00059 { set(3, z); return *this; }
size_t size | ( | ) | const [inline, inherited] |
double t | ( | ) | const [inline, inherited] |
Definition at line 52 of file Vector4.hh.
Referenced by ATLAS_2011_S9108483::analyze(), FourVector::contract(), FourMomentum::E(), FourVector::invariant(), and Rivet::toString().
double theta | ( | ) | const [inline, inherited] |
Synonym for polarAngle.
Definition at line 124 of file Vector4.hh.
References Vector3::theta(), and FourVector::vector3().
Referenced by D0_1996_S3214044::_fourJetAnalysis(), ALEPH_1996_S3196992::analyze(), and Rivet::theta().
00124 { 00125 return vector3().theta(); 00126 }
Vector3 vector3 | ( | ) | const [inline, inherited] |
Get the spatial part of the 4-vector as a 3-vector.
Definition at line 139 of file Vector4.hh.
Referenced by CDF_1996_S3349578::_fiveJetAnalysis(), D0_1996_S3214044::_fourJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), CDF_1997_S3541940::_psi(), CDF_1996_S3349578::_psi(), D0_1996_S3214044::_threeJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), TASSO_1990_S2148048::analyze(), OPAL_1998_S3780481::analyze(), OPAL_1993_S2692198::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), DELPHI_1996_S3430090::analyze(), DELPHI_1995_S3137023::analyze(), CMS_2011_S8957746::analyze(), CDF_1997_S3541940::analyze(), ALEPH_2004_S5765862::analyze(), ALEPH_1996_S3486095::analyze(), Rivet::angle(), FourVector::angle(), FourVector::azimuthalAngle(), Thrust::calc(), Spherocity::calc(), Sphericity::calc(), FParameter::calc(), Rivet::cmpJetsByAscP(), Rivet::cmpJetsByP(), Rivet::cmpMomByAscP(), Rivet::cmpMomByP(), Rivet::cmpParticleByAscP(), Rivet::cmpParticleByP(), Rivet::deltaEta(), Rivet::deltaPhi(), Rivet::deltaR(), FourVector::eta(), FourMomentum::p(), FourVector::perp(), FourVector::perp2(), FourVector::phi(), FourVector::polarAngle(), FourVector::polarRadius(), FourVector::polarRadius2(), MissingMomentum::project(), Hemispheres::project(), FoxWolframMoments::project(), DISKinematics::project(), FourVector::pseudorapidity(), FourMomentum::pT2(), FourVector::rho(), FourVector::rho2(), and FourVector::theta().
double x | ( | ) | const [inline, inherited] |
Definition at line 53 of file Vector4.hh.
Referenced by FourVector::contract(), FourVector::invariant(), Rivet::mT2::mT2(), ALEPH_1996_S3196992::particleInJet(), FourMomentum::px(), and Rivet::toString().
double y | ( | ) | const [inline, inherited] |
Definition at line 54 of file Vector4.hh.
Referenced by FourVector::contract(), FourVector::invariant(), Rivet::mT2::mT2(), ALEPH_1996_S3196992::particleInJet(), FourMomentum::py(), and Rivet::toString().
double z | ( | ) | const [inline, inherited] |
Definition at line 55 of file Vector4.hh.
Referenced by BeamThrust::_calcBeamThrust(), H1_1994_S2919893::analyze(), ATLAS_2011_S9108483::analyze(), FourVector::contract(), FourVector::invariant(), ALEPH_1996_S3196992::particleInJet(), FourMomentum::pz(), and Rivet::toString().
FourMomentum add | ( | const FourMomentum & | a, | |
const FourMomentum & | b | |||
) | [friend] |
Definition at line 523 of file Vector4.hh.
Referenced by FourMomentum::operator+=(), and FourMomentum::operator-=().
00523 { 00524 FourMomentum result; 00525 result._vec = a._vec + b._vec; 00526 return result; 00527 }
FourMomentum multiply | ( | const FourMomentum & | v, | |
const double | a | |||
) | [friend] |
Definition at line 507 of file Vector4.hh.
00507 { 00508 return multiply(a, v); 00509 }
FourMomentum multiply | ( | const double | a, | |
const FourMomentum & | v | |||
) | [friend] |
Definition at line 501 of file Vector4.hh.
Referenced by FourMomentum::operator*=(), and FourMomentum::operator/=().
00501 { 00502 FourMomentum result; 00503 result._vec = a * v._vec; 00504 return result; 00505 }
FourMomentum transform | ( | const LorentzTransform & | lt, | |
const FourMomentum & | v4 | |||
) | [friend] |
Eigen::Vector<double,N> _vec [protected, inherited] |
Vector.
Definition at line 135 of file VectorN.hh.
Referenced by FourMomentum::operator*=(), FourVector::operator*=(), FourMomentum::operator+=(), FourVector::operator+=(), FourMomentum::operator-(), FourVector::operator-(), FourMomentum::operator-=(), FourVector::operator-=(), FourMomentum::operator/=(), and FourVector::operator/=().