rivet is hosted by Hepforge, IPPP Durham

Specialized version of the FourVector with momentum/energy functionality. More...

#include <Vector4.hh>

Inheritance diagram for FourMomentum:
Collaboration diagram for FourMomentum:

List of all members.

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 $ E $ (time component of momentum).
Vector3 p () const
 Get 3-momentum part, $ p $.
double px () const
 Get x-component of momentum $ p_x $.
double py () const
 Get y-component of momentum $ p_y $.
double pz () const
 Get z-component of momentum $ p_z $.
FourMomentumsetE (double E)
 Set energy $ E $ (time component of momentum).
FourMomentumsetPx (double px)
 Set x-component of momentum $ p_x $.
FourMomentumsetPy (double py)
 Set y-component of momentum $ p_y $.
FourMomentumsetPz (double pz)
 Set z-component of momentum $ p_z $.
double mass () const
 Get the mass $ m = \sqrt{E^2 - p^2} $ (the Lorentz self-invariant).
double mass2 () const
 Get the squared mass $ m^2 = E^2 - p^2 $ (the Lorentz self-invariant).
double rapidity () const
 Calculate the rapidity.
double pT2 () const
 Calculate the squared transverse momentum $ p_T^2 $.
double pT () const
 Calculate the transverse momentum $ p_T $.
double Et2 () const
 Calculate the transverse energy $ E_T^2 = E^2 \sin^2{\theta} $.
double Et () const
 Calculate the transverse energy $ E_T = E \sin{\theta} $.
Vector3 boostVector () const
 Calculate the boost vector (in units of $ \beta $).
FourMomentumoperator*= (double a)
 Multiply by a scalar.
FourMomentumoperator/= (double a)
 Divide by a scalar.
FourMomentumoperator+= (const FourMomentum &v)
FourMomentumoperator-= (const FourMomentum &v)
FourMomentum operator- () const
 Invert the vector.
double t () const
double x () const
double y () const
double z () const
FourVectorsetT (const double t)
FourVectorsetX (const double x)
FourVectorsetY (const double y)
FourVectorsetZ (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 $ x-y $ 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.
double perp2 () const
 Synonym for polarRadius2.
double rho2 () const
 Synonym for polarRadius2.
double polarRadius () const
 Projection of 3-vector on to the $ x-y $ plane.
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 (+ - - -).
FourVectoroperator+= (const FourVector &v)
FourVectoroperator-= (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. $ \sum_{i=1}^N x_i^2 $.
double mod () const
 Calculate the modulus of a vector. $ \sqrt{\sum_{i=1}^N x_i^2} $.
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 &lt, const FourMomentum &v4)

Detailed Description

Specialized version of the FourVector with momentum/energy functionality.

Definition at line 321 of file Vector4.hh.


Constructor & Destructor Documentation

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().

                                  {
      this->setE(other.t());
      this->setPx(other.x());
      this->setPy(other.y());
      this->setPz(other.z());
    }
FourMomentum ( const Vector< 4 > &  other) [inline]

Definition at line 338 of file Vector4.hh.

      : 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().

                                                                                    {
      this->setE(E);
      this->setPx(px);
      this->setPy(py);
      this->setPz(pz);
    }
~FourMomentum ( ) [inline]

Definition at line 348 of file Vector4.hh.

{}

Member Function Documentation

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().

                                            {
      return vector3().angle( v.vector3() );
    }
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().

                                          {
      return vector3().angle(v3);
    }
Vector3 boostVector ( ) const [inline]

Calculate the boost vector (in units of $ \beta $).

Todo:
Be careful about c=1 convention...

Definition at line 422 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(), CDF_1996_S3349578::_threeJetAnalysis(), D0_1996_S3214044::_threeJetAnalysis(), CLEO_2004_S5809304::analyze(), BELLE_2006_S6265367::analyze(), BABAR_2005_S6181155::analyze(), BABAR_2007_S6895344::analyze(), BELLE_2001_S4598261::analyze(), ARGUS_1993_S2653028::analyze(), BABAR_2007_S7266081::analyze(), ARGUS_1993_S2789213::analyze(), ARGUS_1993_S2669951::analyze(), CDF_1996_S3108457::analyze(), CDF_1997_S3541940::analyze(), MC_VH2BB::boostAngles(), Rivet::boostVector(), and DISKinematics::project().

                                {
      // const Vector3 p3 = vector3();
      // const double m2 = mass2();
      // if (Rivet::isZero(m2)) return p3.unit();
      // else {
      //   // Could also do this via beta = tanh(rapidity), but that's
      //   // probably more messy from a numerical hygiene point of view.
      //   const double p2 = p3.mod2();
      //   const double beta = sqrt( p2 / (m2 + p2) );
      //   return beta * p3.unit();
      // }
      /// @todo Be careful about c=1 convention...
      return Vector3(px()/E(), py()/E(), pz()/E());
    }
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*().

                                               {
      const double result = t()*v.t() - x()*v.x() - y()*v.y() - z()*v.z();
      return result;
    }
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().

                                          {
      return contract(v);
    }
double E ( ) const [inline]

Get energy $ E $ (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(), CDF_1996_S3349578::_threeJetAnalysis(), D0_1996_S3214044::_threeJetAnalysis(), H1_2000_S4129130::analyze(), OPAL_1993_S2692198::analyze(), SLD_2004_S5693039::analyze(), OPAL_1998_S3780481::analyze(), SLD_1999_S3743934::analyze(), H1_1994_S2919893::analyze(), OPAL_2002_S5361494::analyze(), DELPHI_2000_S4328825::analyze(), SLD_1996_S3398250::analyze(), CMS_2011_S9215166::analyze(), D0_2006_S6438750::analyze(), ALEPH_1996_S3196992::analyze(), CDF_1997_S3541940::analyze(), MC_PHOTONJETS::analyze(), MC_PHOTONS::analyze(), LHCB_2010_S8758301::analyze(), ATLAS_2012_I1082009::analyze(), ALEPH_1999_S4193598::analyze(), LHCB_2011_I917009::analyze(), ATLAS_2012_I1190891::analyze(), MC_GENERIC::analyze(), D0_2008_S7719523::analyze(), ATLAS_2012_CONF_2012_109::analyze(), ATLAS_2011_S9041966::analyze(), ALEPH_1996_S3486095::analyze(), ALEPH_2004_S5765862::analyze(), DELPHI_1996_S3430090::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(), ParticleBase::byEAscending::operator()(), FourMomentum::byEAscending::operator()(), ALEPH_1996_S3196992::particleInJet(), Hemispheres::project(), FourMomentum::rapidity(), Rivet::sqrtS(), and Jet::totalEnergy().

{ return t(); }
double Et2 ( ) const [inline]

Calculate the transverse energy $ E_T^2 = E^2 \sin^2{\theta} $.

Definition at line 412 of file Vector4.hh.

References FourMomentum::Et().

Referenced by Rivet::Et2(), and ParticleBase::byETAscending::operator()().

                       {
      return Et() * Et();
    }
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(), ATLAS_2011_I894867::analyze(), CMS_2012_I1087342::analyze(), CMS_2011_S9088458::analyze(), TOTEM_2012_I1115294::analyze(), CMS_2010_S8656010::analyze(), CMS_2011_S8941262::analyze(), ATLAS_2010_S8591806::analyze(), STAR_2008_S7993412::analyze(), CMS_2011_S8957746::analyze(), MC_DIPHOTON::analyze(), ATLAS_2011_S9002537::analyze(), CDF_2005_S6080774::analyze(), CMS_2010_S8547297::analyze(), D0_1996_S3324664::analyze(), ATLAS_2011_S8994773::analyze(), CDF_2000_S4266730::analyze(), CDF_2001_S4563131::analyze(), ATLAS_2010_CONF_2010_049::analyze(), D0_2008_S6879055::analyze(), CDF_1993_S2742446::analyze(), CDF_2001_S4517016::analyze(), CDF_2009_S8436959::analyze(), CMS_2011_S8973270::analyze(), CMS_2011_S9215166::analyze(), MC_HJETS::analyze(), MC_ZJETS::analyze(), MC_IDENTIFIED::analyze(), CDF_1996_S3418421::analyze(), CDF_1997_S3541940::analyze(), CDF_1994_S2952106::analyze(), D0_2010_S8570965::analyze(), D0_2008_S7837160::analyze(), MC_PHOTONJETS::analyze(), CMS_2011_S8884919::analyze(), MC_WJETS::analyze(), D0_2010_S8821313::analyze(), ATLAS_2012_I946427::analyze(), STAR_2009_UE_HELEN::analyze(), UA1_1990_S2044935::analyze(), MC_PHOTONJETUE::analyze(), CDF_2008_S7541902::analyze(), ATLAS_2012_I1183818::analyze(), D0_1996_S3214044::analyze(), CDF_2010_S8591881_DY::analyze(), ATLAS_2012_CONF_2012_104::analyze(), D0_2008_S7719523::analyze(), MC_GENERIC::analyze(), ATLAS_2012_I1190891::analyze(), ATLAS_2012_I1126136::analyze(), ATLAS_2012_I1186556::analyze(), CDF_2008_NOTE_9351::analyze(), MC_TTBAR::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2012_CONF_2012_105::analyze(), ATLAS_2010_S8914702::analyze(), ATLAS_2011_CONF_2011_098::analyze(), ATLAS_2012_CONF_2012_103::analyze(), ATLAS_2012_I1112263::analyze(), ATLAS_2011_S9128077::analyze(), ATLAS_2012_I1125961::analyze(), ATLAS_2012_I1095236::analyze(), ATLAS_2012_I1117704::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), ATLAS_2012_CONF_2012_001::analyze(), ATLAS_2012_I1180197::analyze(), ATLAS_2012_CONF_2012_109::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2011_S9019561::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2012_CONF_2012_153::analyze(), MC_SUSY::analyze(), ATLAS_2011_S9212353::analyze(), ATLAS_2012_I943401::analyze(), MC_VH2BB::analyze(), ATLAS_2011_S9225137::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2012_I1093738::analyze(), CDF_2004_S5839831::analyze(), JetShape::calc(), Jet::eta(), Rivet::eta(), ATLAS_2012_I1084540::fillMap(), ATLAS_2010_S8918562::fillPtEtaNch(), ATLAS_2012_I1091481::getSeta(), JetAlg::jets(), and NeutralFinalState::project().

                       {
      return vector3().eta();
    }
const double& get ( const size_t  index) const [inline, inherited]

Definition at line 33 of file VectorN.hh.

References Vector< N >::_vec.

                                                {
      if (index >= N) {
        throw std::runtime_error("Tried to access an invalid vector index.");
      } else {
        return _vec(index);
      }
    }
double& get ( const size_t  index) [inline, protected, inherited]

Definition at line 126 of file VectorN.hh.

References Vector< N >::_vec.

                                    {
      if (index >= N) {
        throw std::runtime_error("Tried to access an invalid vector index.");
      } else {
        return _vec(index);
      }
    }
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 Rivet::invariant(), and FourMomentum::mass2().

                             {
      // Done this way for numerical precision
      return (t() + z())*(t() - z()) - x()*x() - y()*y();
    }
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().

                                             {
      for (size_t i=0; i < N; ++i) {
        if (! Rivet::isZero(_vec[i], tolerance) ) return false;
      }
      return true;
    }
double mod ( ) const [inline, inherited]

Calculate the modulus of a vector. $ \sqrt{\sum_{i=1}^N x_i^2} $.

Definition at line 87 of file VectorN.hh.

References Vector< N >::mod2().

                       {
      const double norm = mod2();
      assert(norm >= 0);
      return sqrt(norm);
    }
double mod2 ( ) const [inline, inherited]

Calculate the modulus-squared of a vector. $ \sum_{i=1}^N x_i^2 $.

Definition at line 76 of file VectorN.hh.

References Vector< N >::mod2(), and Vector< N >::size().

                        {
      double mod2 = 0.0;
      for (size_t i = 0; i < size(); ++i) {
        const double element = get(i);
        mod2 += element*element;
      }
      return mod2;
    }
bool operator!= ( const Vector< N > &  a) const [inline, inherited]

Definition at line 104 of file VectorN.hh.

References Vector< N >::_vec.

                                              {
      return _vec != a._vec;
    }
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().

                                                {
      return contract(v);
    }
FourMomentum& operator*= ( double  a) [inline]

Multiply by a scalar.

Reimplemented from FourVector.

Definition at line 463 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourMomentum::multiply.

                                       {
      _vec = multiply(a, *this)._vec;
      return *this;
    }
FourVector& operator+= ( const FourVector v) [inline, inherited]

Definition at line 174 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::add.

                                                {
      _vec = add(*this, v)._vec;
      return *this;
    }
FourMomentum& operator+= ( const FourMomentum v) [inline]

Definition at line 474 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourMomentum::add.

                                                    {
      _vec = add(*this, v)._vec;
      return *this;
    }
FourMomentum operator- ( ) const [inline]

Invert the vector.

Reimplemented from FourVector.

Definition at line 484 of file Vector4.hh.

References Vector< N >::_vec, and Vector< 4 >::_vec.

                                   {
      FourMomentum result;
      result._vec = -_vec;
      return result;
    }
FourVector& operator-= ( const FourVector v) [inline, inherited]

Definition at line 179 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::add.

                                                {
      _vec = add(*this, -v)._vec;
      return *this;
    }
FourMomentum& operator-= ( const FourMomentum v) [inline]

Definition at line 479 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourMomentum::add.

                                                    {
      _vec = add(*this, -v)._vec;
      return *this;
    }
FourMomentum& operator/= ( double  a) [inline]

Divide by a scalar.

Reimplemented from FourVector.

Definition at line 469 of file Vector4.hh.

References Vector< 4 >::_vec, Vector< N >::_vec, and FourMomentum::multiply.

                                       {
      _vec = multiply(1.0/a, *this)._vec;
      return *this;
    }
bool operator< ( const Vector< N > &  a) const [inline, inherited]

Definition at line 108 of file VectorN.hh.

References Vector< N >::_vec.

                                             {
      return _vec < a._vec;
    }
bool operator<= ( const Vector< N > &  a) const [inline, inherited]

Definition at line 112 of file VectorN.hh.

References Vector< N >::_vec.

                                              {
      return _vec <= a._vec;
    }
bool operator== ( const Vector< N > &  a) const [inline, inherited]

Definition at line 100 of file VectorN.hh.

References Vector< N >::_vec.

                                              {
      return _vec == a._vec;
    }
bool operator> ( const Vector< N > &  a) const [inline, inherited]

Definition at line 116 of file VectorN.hh.

References Vector< N >::_vec.

                                             {
      return _vec > a._vec;
    }
bool operator>= ( const Vector< N > &  a) const [inline, inherited]

Definition at line 120 of file VectorN.hh.

References Vector< N >::_vec.

                                              {
      return _vec >= a._vec;
    }
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.

                                                       {
      return get(index);
    }
double& operator[] ( const size_t  index) [inline, inherited]

Direct access to vector elements by index.

Definition at line 47 of file VectorN.hh.

                                           {
      return get(index);
    }
Vector3 p ( ) const [inline]

Get 3-momentum part, $ p $.

Definition at line 355 of file Vector4.hh.

References FourVector::vector3().

Referenced by ATLAS_2010_CONF_2010_049::analyze(), and ATLAS_2012_I1183818::analyze().

{ return vector3(); }
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().

                         {
      return vector3().perp2();
    }
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_2008_S7993412::analyze(), MC_DIPHOTON::analyze(), CDF_2005_S6080774::analyze(), ATLAS_2011_S9002537::analyze(), ATLAS_2011_S8994773::analyze(), D0_1996_S3324664::analyze(), D0_2008_S6879055::analyze(), CDF_1993_S2742446::analyze(), CDF_2009_S8436959::analyze(), CDF_2012_NOTE10874::analyze(), CMS_2011_S8973270::analyze(), MC_LEADJETUE::analyze(), CDF_1994_S2952106::analyze(), ATLAS_2011_I954993::analyze(), D0_2010_S8570965::analyze(), MC_PHOTONJETS::analyze(), CMS_2012_I1107658::analyze(), D0_2010_S8821313::analyze(), CMS_2011_S9120041::analyze(), D0_2009_S8349509::analyze(), ATLAS_2012_I946427::analyze(), STAR_2009_UE_HELEN::analyze(), MC_PHOTONJETUE::analyze(), CDF_2010_S8591881_QCD::analyze(), CDF_2008_LEADINGJETS::analyze(), D0_2008_S7719523::analyze(), MC_GENERIC::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2010_S8914702::analyze(), ATLAS_2011_CONF_2011_098::analyze(), CDF_2001_S4751469::analyze(), ATLAS_2012_I1125961::analyze(), MC_ZZJETS::analyze(), ATLAS_2012_I1095236::analyze(), MC_WWJETS::analyze(), ATLAS_2012_CONF_2012_109::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2012_I1083318::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2010_S8919674::analyze(), MC_SUSY::analyze(), ATLAS_2011_S9212353::analyze(), MC_VH2BB::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2012_I1093738::analyze(), ATLAS_2012_I1091481::getSeta(), Jet::phi(), and Rivet::phi().

                                                          {
      return vector3().phi(mapping);
    }
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(), Rivet::polarAngle(), and DISKinematics::project().

                              {
      return vector3().polarAngle();
    }
double polarRadius ( ) const [inline, inherited]

Projection of 3-vector on to the $ x-y $ plane.

Definition at line 94 of file Vector4.hh.

References Vector3::polarRadius(), and FourVector::vector3().

Referenced by Rivet::polarRadius().

                               {
      return vector3().polarRadius();
    }
double polarRadius2 ( ) const [inline, inherited]

Square of the projection of the 3-vector on to the $ x-y $ 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().

                                {
      return vector3().polarRadius2();
    }
double pT ( ) const [inline]

Calculate the transverse momentum $ p_T $.

Definition at line 407 of file Vector4.hh.

References FourMomentum::pT2().

Referenced by CDF_2004_S5839831::_calcTransCones(), FinalState::accept(), MC_JetAnalysis::analyze(), CMS_2012_I1087342::analyze(), CMS_2011_S9088458::analyze(), CMS_2010_S8656010::analyze(), CMS_2011_S8941262::analyze(), LHCF_2012_I1115479::analyze(), ATLAS_2010_S8591806::analyze(), CDF_2006_S6450792::analyze(), ALICE_2011_S8909580::analyze(), ALICE_2011_S8945144::analyze(), STAR_2008_S7993412::analyze(), CMS_2011_S9086218::analyze(), CDF_2000_S4155203::analyze(), STAR_2006_S6870392::analyze(), CDF_2007_S7057202::analyze(), ATLAS_2011_S9002537::analyze(), CMS_2010_S8547297::analyze(), CMS_2011_S8978280::analyze(), D0_2007_S7075677::analyze(), MC_DIPHOTON::analyze(), CDF_2005_S6080774::analyze(), ATLAS_2011_S8994773::analyze(), CDF_1988_S1865951::analyze(), ATLAS_2010_CONF_2010_049::analyze(), CDF_2008_S7828950::analyze(), ZEUS_2001_S4815815::analyze(), ALICE_2010_S8706239::analyze(), CDF_2012_NOTE10874::analyze(), CMS_2011_S8973270::analyze(), CDF_2008_S7540469::analyze(), MC_DIJET::analyze(), MC_HJETS::analyze(), MC_ZJETS::analyze(), D0_2006_S6438750::analyze(), MC_LEADJETUE::analyze(), STAR_2006_S6500200::analyze(), CDF_2008_S7782535::analyze(), ATLAS_2011_I925932::analyze(), CDF_1996_S3108457::analyze(), CDF_2009_S8233977::analyze(), ATLAS_2011_S9131140::analyze(), CDF_1994_S2952106::analyze(), ATLAS_2011_I954993::analyze(), D0_2008_S7863608::analyze(), D0_2010_S8570965::analyze(), CMS_2012_I1107658::analyze(), MC_PHOTONJETS::analyze(), MC_PHOTONS::analyze(), STAR_2006_S6860818::analyze(), CMS_2011_S8884919::analyze(), D0_2008_S7662670::analyze(), ATLAS_2010_S8817804::analyze(), MC_WJETS::analyze(), CMS_2011_S9120041::analyze(), CDF_2008_S8095620::analyze(), D0_2009_S8349509::analyze(), ATLAS_2012_I946427::analyze(), STAR_2009_UE_HELEN::analyze(), UA1_1990_S2044935::analyze(), ATLAS_2012_I1082936::analyze(), D0_2001_S4674421::analyze(), MC_PHOTONJETUE::analyze(), CDF_2008_S7541902::analyze(), CDF_2010_S8591881_DY::analyze(), CDF_2010_S8591881_QCD::analyze(), ATLAS_2012_CONF_2012_104::analyze(), CDF_2008_LEADINGJETS::analyze(), D0_2008_S7719523::analyze(), ATLAS_2012_I1190891::analyze(), MC_GENERIC::analyze(), ATLAS_2012_I1186556::analyze(), CDF_2008_NOTE_9351::analyze(), ATLAS_2011_S9120807::analyze(), ATLAS_2011_S9212183::analyze(), MC_TTBAR::analyze(), STAR_2008_S7869363::analyze(), ATLAS_2012_CONF_2012_105::analyze(), ATLAS_2011_CONF_2011_098::analyze(), ATLAS_2012_CONF_2012_103::analyze(), ATLAS_2012_I1112263::analyze(), CDF_2001_S4751469::analyze(), ATLAS_2012_I1125961::analyze(), ATLAS_2012_I1095236::analyze(), ATLAS_2012_I1117704::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), ATLAS_2012_CONF_2012_001::analyze(), ATLAS_2011_I926145::analyze(), ATLAS_2012_I1180197::analyze(), ATLAS_2012_CONF_2012_109::analyze(), ATLAS_2012_I1083318::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2011_S9019561::analyze(), ATLAS_2010_S8919674::analyze(), ATLAS_2010_S8894728::analyze(), ATLAS_2012_CONF_2012_153::analyze(), MC_SUSY::analyze(), ATLAS_2011_S9212353::analyze(), ATLAS_2012_I943401::analyze(), ATLAS_2011_S9225137::analyze(), MC_VH2BB::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2012_I1093738::analyze(), ATLAS_2012_I1094568::analyze(), ATLAS_2011_I944826::analyze(), CDF_2004_S5839831::analyze(), ATLAS_2011_I919017::analyze(), JetShape::calc(), Rivet::cmpMomByAscPt(), Rivet::cmpMomByPt(), Rivet::cmpParticleByAscPt(), Rivet::cmpParticleByPt(), ATLAS_2012_I1084540::fillMap(), ATLAS_2010_S8918562::fillPtEtaNch(), JetAlg::jets(), STARRandomFilter::operator()(), LeadingParticlesFinalState::project(), VetoedFinalState::project(), Rivet::pT(), and Jet::ptSum().

                      {
      return sqrt(pT2());
    }
double pT2 ( ) const [inline]

Calculate the squared transverse momentum $ p_T^2 $.

Definition at line 402 of file Vector4.hh.

References Vector3::polarRadius2(), and FourVector::vector3().

Referenced by ParticleBase::byPTAscending::operator()(), FourMomentum::pT(), and Rivet::pT2().

                       {
      return vector3().polarRadius2();
    }
double px ( ) const [inline]
double py ( ) const [inline]
double rapidity ( ) const [inline]

Calculate the rapidity.

Definition at line 397 of file Vector4.hh.

References FourMomentum::E(), and FourMomentum::pz().

Referenced by CDF_1996_S3349578::_fiveJetAnalysis(), CDF_1996_S3349578::_fourJetAnalysis(), CDF_1996_S3349578::_threeJetAnalysis(), CDF_2006_S6450792::analyze(), LHCF_2012_I1115479::analyze(), ALICE_2011_S8909580::analyze(), ALICE_2011_S8945144::analyze(), CMS_2011_S8968497::analyze(), CDF_2008_S8093652::analyze(), CMS_2011_S9086218::analyze(), CDF_2007_S7057202::analyze(), CMS_2011_S8978280::analyze(), CDF_2008_S7828950::analyze(), LHCB_2011_I919315::analyze(), D0_2010_S8566488::analyze(), STAR_2006_S6500200::analyze(), ATLAS_2011_S8971293::analyze(), CDF_1997_S3541940::analyze(), D0_2009_S8320160::analyze(), D0_2008_S7863608::analyze(), MC_PHOTONJETS::analyze(), STAR_2006_S6860818::analyze(), D0_2008_S7662670::analyze(), ATLAS_2010_S8817804::analyze(), D0_2010_S8821313::analyze(), CDF_2008_S8095620::analyze(), D0_2009_S8349509::analyze(), CDF_2006_S6653332::analyze(), ATLAS_2012_I1082936::analyze(), CDF_2008_S7541902::analyze(), D0_2008_S7719523::analyze(), MC_GENERIC::analyze(), STAR_2008_S7869363::analyze(), ATLAS_2012_I1112263::analyze(), ATLAS_2012_I1095236::analyze(), ATLAS_2012_CONF_2012_001::analyze(), ATLAS_2012_I1083318::analyze(), ATLAS_2012_I943401::analyze(), ATLAS_2012_I1093738::analyze(), ATLAS_2012_I1094568::analyze(), ATLAS_2011_I944826::analyze(), ATLAS_2011_S9126244::analyze(), ATLAS_2011_I919017::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(), Rivet::rapidity(), and ATLAS_2011_I945498::selectJets().

                            {
      return 0.5 * std::log( (E() + pz()) / (E() - pz()) );
    }
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().

                       {
      return vector3().rho();
    }
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().

                        {
      return vector3().rho2();
    }
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.

                                                           {
      if (index >= N) {
        throw std::runtime_error("Tried to access an invalid vector index.");
      } else {
        _vec[index] = value;
      }
      return *this;
    }
FourMomentum& setE ( double  E) [inline]

Set energy $ E $ (time component of momentum).

Definition at line 367 of file Vector4.hh.

References FourVector::setT().

Referenced by FourMomentum::FourMomentum().

{ setT(E); return *this; }
FourMomentum& setPx ( double  px) [inline]

Set x-component of momentum $ p_x $.

Definition at line 370 of file Vector4.hh.

References FourVector::setX().

Referenced by FourMomentum::FourMomentum().

{ setX(px); return *this; }
FourMomentum& setPy ( double  py) [inline]

Set y-component of momentum $ p_y $.

Definition at line 373 of file Vector4.hh.

References FourVector::setY().

Referenced by FourMomentum::FourMomentum().

{ setY(py); return *this; }
FourMomentum& setPz ( double  pz) [inline]

Set z-component of momentum $ p_z $.

Definition at line 376 of file Vector4.hh.

References FourVector::setZ().

Referenced by FourMomentum::FourMomentum().

{ setZ(pz); return *this; }
FourVector& setT ( const double  t) [inline, inherited]

Definition at line 56 of file Vector4.hh.

References FourVector::t().

Referenced by FourVector::FourVector(), and FourMomentum::setE().

{ set(0, t); return *this; }
FourVector& setX ( const double  x) [inline, inherited]

Definition at line 57 of file Vector4.hh.

References FourVector::x().

Referenced by FourVector::FourVector(), and FourMomentum::setPx().

{ set(1, x); return *this; }
FourVector& setY ( const double  y) [inline, inherited]

Definition at line 58 of file Vector4.hh.

References FourVector::y().

Referenced by FourVector::FourVector(), and FourMomentum::setPy().

{ set(2, y); return *this; }
FourVector& setZ ( const double  z) [inline, inherited]

Definition at line 59 of file Vector4.hh.

References FourVector::z().

Referenced by FourVector::FourVector(), and FourMomentum::setPz().

{ set(3, z); return *this; }
size_t size ( ) const [inline, inherited]

Vector dimensionality.

Definition at line 62 of file VectorN.hh.

                        {
      return N;
    }
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().

                         {
      return vector3().theta();
    }
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(), CDF_1996_S3349578::_threeJetAnalysis(), D0_1996_S3214044::_threeJetAnalysis(), CLEO_2004_S5809304::analyze(), BELLE_2001_S4598261::analyze(), ARGUS_1993_S2653028::analyze(), BABAR_2007_S7266081::analyze(), OPAL_1994_S2927284::analyze(), ARGUS_1993_S2789213::analyze(), ARGUS_1993_S2669951::analyze(), OPAL_1993_S2692198::analyze(), SLD_2004_S5693039::analyze(), OPAL_1998_S3780481::analyze(), SLD_1999_S3743934::analyze(), OPAL_1995_S3198391::analyze(), CMS_2011_S8957746::analyze(), ALEPH_2002_S4823664::analyze(), OPAL_1996_S3257789::analyze(), OPAL_1998_S3702294::analyze(), DELPHI_1999_S3960137::analyze(), DELPHI_1995_S3137023::analyze(), OPAL_1998_S3749908::analyze(), OPAL_1997_S3396100::analyze(), CDF_1997_S3541940::analyze(), ATLAS_2012_I1082009::analyze(), TASSO_1990_S2148048::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), ALEPH_1996_S3486095::analyze(), ALEPH_2004_S5765862::analyze(), DELPHI_1996_S3430090::analyze(), FourVector::angle(), Rivet::angle(), FourVector::azimuthalAngle(), FParameter::calc(), Spherocity::calc(), Thrust::calc(), Sphericity::calc(), Rivet::cmpJetsByAscP(), Rivet::cmpJetsByP(), Rivet::cmpMomByAscP(), Rivet::cmpMomByP(), Rivet::cmpParticleByAscP(), Rivet::cmpParticleByP(), Rivet::deltaEta(), Rivet::deltaPhi(), Rivet::deltaR(), FourVector::eta(), ATLAS_2012_I1091481::getPionEnergy(), FourMomentum::p(), FourVector::perp(), FourVector::perp2(), FourVector::phi(), FourVector::polarAngle(), FourVector::polarRadius(), FourVector::polarRadius2(), DISKinematics::project(), FoxWolframMoments::project(), MissingMomentum::project(), Hemispheres::project(), FourVector::pseudorapidity(), FourMomentum::pT2(), FourVector::rho(), FourVector::rho2(), and FourVector::theta().

                            {
      return Vector3(get(1), get(2), get(3));
    }

Friends And Related Function Documentation

FourMomentum add ( const FourMomentum a,
const FourMomentum b 
) [friend]

Definition at line 516 of file Vector4.hh.

Referenced by FourMomentum::operator+=(), and FourMomentum::operator-=().

                                                                        {
    FourMomentum result;
    result._vec = a._vec + b._vec;
    return result;
  }
FourMomentum multiply ( const double  a,
const FourMomentum v 
) [friend]

Definition at line 494 of file Vector4.hh.

Referenced by FourMomentum::operator*=(), and FourMomentum::operator/=().

                                                                      {
    FourMomentum result;
    result._vec = a * v._vec;
    return result;
  }
FourMomentum multiply ( const FourMomentum v,
const double  a 
) [friend]

Definition at line 500 of file Vector4.hh.

                                                                      {
    return multiply(a, v);
  }

Member Data Documentation


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