FourVector Class Reference Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...
Inheritance diagram for FourVector:
![]()
Collaboration diagram for FourVector:
![]()
Detailed DescriptionSpecialisation of VectorN to a general (non-momentum) Lorentz 4-vector. Definition at line 20 of file Vector4.hh. Constructor & Destructor Documentation
Definition at line 28 of file Vector4.hh. : Vector<4>() { }
Definition at line 31 of file Vector4.hh. References FourVector::setT(), FourVector::setX(), FourVector::setY(), and FourVector::setZ().
Definition at line 38 of file Vector4.hh. : Vector<4>(other) { }
Definition at line 41 of file Vector4.hh. References FourVector::setT(), FourVector::setX(), FourVector::setY(), and FourVector::setZ().
Definition at line 48 of file Vector4.hh. { } Member Function Documentation
Get the Definition at line 142 of file Vector4.hh. References FourVector::eta(). Referenced by ParticleBase::abseta(), CMS_2013_I1265659::analyze(), CDF_2001_S4517016::analyze(), and CMS_2014_I1303894::analyze(). { return fabs(eta()); }
Get the Definition at line 139 of file Vector4.hh. References FourVector::eta(). Referenced by ParticleBase::abspseudorapidity(). { return fabs(eta()); }
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(), ParticleBase::angle(), Rivet::angle(), and MC_VH2BB::boostAngles(). Angle between this vector and another (3-vector) Definition at line 72 of file Vector4.hh. References Vector3::angle(), and FourVector::vector3().
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 CDF_2010_S8591881_DY::analyze(), ParticleBase::azimuthalAngle(), Rivet::deltaR(), and DISKinematics::project(). { return vector3().azimuthalAngle(mapping); }
Contract two 4-vectors, with metric signature (+ - - -). Definition at line 153 of file Vector4.hh. References FourVector::t(), FourVector::x(), FourVector::y(), and FourVector::z(). Referenced by Rivet::contract(), FourVector::dot(), and FourVector::operator*().
Contract two 4-vectors, with metric signature (+ - - -). Definition at line 159 of file Vector4.hh. References FourVector::contract(). { return contract(v); }
Synonym for pseudorapidity. Definition at line 134 of file Vector4.hh. References Vector3::eta(), and FourVector::vector3(). Referenced by CDF_2004_S5839831::_calcTransCones(), FourVector::abseta(), FourVector::abspseudorapidity(), H1_2000_S4129130::analyze(), CMS_2015_I1356998::analyze(), CMS_2013_I1265659::analyze(), CMS_2011_S8941262::analyze(), H1_1994_S2919893::analyze(), ATLAS_2011_S9002537::analyze(), CDF_2000_S4266730::analyze(), D0_1996_S3324664::analyze(), D0_2015_I1324946::analyze(), D0_2008_S6879055::analyze(), CDF_1993_S2742446::analyze(), CDF_2009_S8436959::analyze(), MC_ZJETS::analyze(), CDF_2008_S7540469::analyze(), D0_2010_S8821313::analyze(), D0_2006_S6438750::analyze(), CDF_1996_S3418421::analyze(), D0_2008_S7837160::analyze(), CDF_1994_S2952106::analyze(), ATLAS_2014_I1298811::analyze(), MC_WINC::analyze(), MC_PHOTONJETS::analyze(), MC_ZZJETS::analyze(), MC_WWJETS::analyze(), ATLAS_2013_I1243871::analyze(), LHCB_2014_I1281685::analyze(), CDF_2008_S7541902::analyze(), ATLAS_2012_I1199269::analyze(), MC_WWINC::analyze(), MC_ZZINC::analyze(), CDF_2010_S8591881_DY::analyze(), LHCB_2012_I1119400::analyze(), MC_TTBAR::analyze(), ATLAS_2010_S8914702::analyze(), D0_2008_S7719523::analyze(), MC_SUSY::analyze(), ATLAS_2014_I1306615::analyze(), ATLAS_2012_I1093738::analyze(), MC_VH2BB::analyze(), CDF_2004_S5839831::analyze(), JetShape::calc(), Rivet::cmpMomByAbsEta(), Rivet::cmpMomByDescAbsEta(), Rivet::cmpMomByEta(), ParticleBase::eta(), ATLAS_2012_I1204784::fillPlots(), and ParticleBase::pseudorapidity().
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); } }
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); } }
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().
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; }
Calculate the modulus of a vector. Definition at line 87 of file VectorN.hh. References Vector< N >::mod2(). { const double norm = mod2(); assert(norm >= 0); return sqrt(norm); }
Calculate the modulus-squared of a vector. Definition at line 76 of file VectorN.hh. References Vector< N >::mod2(), and Vector< N >::size().
Contract two 4-vectors, with metric signature (+ - - -). Definition at line 164 of file Vector4.hh. References FourVector::contract(). { return contract(v); }
Multiply by a scalar. Reimplemented in FourMomentum. Definition at line 169 of file Vector4.hh. References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::multiply.
Add to this 4-vector. Definition at line 181 of file Vector4.hh. References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::add.
Multiply all components (space and time) by -1. Reimplemented from Vector< 4 >. Reimplemented in FourMomentum. Definition at line 193 of file Vector4.hh. References Vector< N >::_vec, and Vector< 4 >::_vec. { FourVector result; result._vec = -_vec; return result; }
Subtract from this 4-vector. NB time as well as space components are subtracted. Definition at line 187 of file Vector4.hh. References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::add.
Divide by a scalar. Reimplemented in FourMomentum. Definition at line 175 of file Vector4.hh. References Vector< 4 >::_vec, Vector< N >::_vec, and FourVector::multiply.
Direct access to vector elements by index. Definition at line 42 of file VectorN.hh. { return get(index); }
Direct access to vector elements by index. Definition at line 47 of file VectorN.hh. { return get(index); }
Synonym for polarRadius. Definition at line 99 of file Vector4.hh. References Vector3::perp(), and FourVector::vector3().
Synonym for polarRadius2. Definition at line 84 of file Vector4.hh. References Vector3::perp2(), and FourVector::vector3().
Synonym for azimuthalAngle. Definition at line 114 of file Vector4.hh. References Vector3::phi(), and FourVector::vector3(). Referenced by CDF_2004_S5839831::_calcTransCones(), CMS_2013_I1265659::analyze(), ATLAS_2011_S9002537::analyze(), D0_2015_I1324946::analyze(), D0_1996_S3324664::analyze(), D0_2008_S6879055::analyze(), CDF_1993_S2742446::analyze(), CDF_2009_S8436959::analyze(), ATLAS_2011_I930220::analyze(), CDF_2008_S7540469::analyze(), D0_2010_S8821313::analyze(), D0_2006_S6438750::analyze(), ATLAS_2014_I1298811::analyze(), CDF_1994_S2952106::analyze(), MC_PHOTONJETS::analyze(), CMS_2015_I1385107::analyze(), CMS_2011_S9120041::analyze(), ATLAS_2012_I1199269::analyze(), ATLAS_2011_S9212183::analyze(), ATLAS_2011_CONF_2011_098::analyze(), MC_WWINC::analyze(), MC_ZZINC::analyze(), ATLAS_2014_I1315949::analyze(), ATLAS_2011_S8983313::analyze(), ATLAS_2012_I1095236::analyze(), ATLAS_2012_I1125961::analyze(), ATLAS_2013_I1217867::analyze(), ATLAS_2011_CONF_2011_090::analyze(), ATLAS_2012_CONF_2012_109::analyze(), ATLAS_2010_S8914702::analyze(), D0_2008_S7719523::analyze(), ATLAS_2012_I1083318::analyze(), ATLAS_2014_I1327229::analyze(), ATLAS_2014_I1304688::analyze(), ATLAS_2011_S9212353::analyze(), MC_SUSY::analyze(), ATLAS_2011_S9041966::analyze(), ATLAS_2012_I1093738::analyze(), MC_VH2BB::analyze(), CDF_2004_S5839831::analyze(), and ParticleBase::phi().
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(), ParticleBase::polarAngle(), and DISKinematics::project(). { return vector3().polarAngle(); }
Projection of 3-vector on to the Definition at line 94 of file Vector4.hh. References Vector3::polarRadius(), and FourVector::vector3(). { return vector3().polarRadius(); }
Square of the projection of the 3-vector on to the Definition at line 79 of file Vector4.hh. References Vector3::polarRadius2(), and FourVector::vector3(). { return vector3().polarRadius2(); }
Pseudorapidity (defined purely by the 3-vector components) Definition at line 129 of file Vector4.hh. References Vector3::pseudorapidity(), and FourVector::vector3(). Referenced by Rivet::cmpMomByDescEta(). { return vector3().pseudorapidity(); }
Multiply space components only by -1. Reimplemented in FourMomentum. Definition at line 200 of file Vector4.hh. References FourVector::setT(), and FourVector::t(). { FourVector result = -*this; result.setT(-result.t()); return result; }
Synonym for polarRadius. Definition at line 104 of file Vector4.hh. References Vector3::rho(), and FourVector::vector3().
Synonym for polarRadius2. Definition at line 89 of file Vector4.hh. References Vector3::rho2(), and FourVector::vector3(). 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; }
Definition at line 56 of file Vector4.hh. References FourVector::t(). Referenced by FourVector::FourVector(), FourVector::reverse(), and FourMomentum::setE(). { set(0, t); return *this; }
Definition at line 57 of file Vector4.hh. References FourVector::x(). Referenced by FourVector::FourVector(), and FourMomentum::setPx(). { set(1, x); return *this; }
Definition at line 58 of file Vector4.hh. References FourVector::y(). Referenced by FourVector::FourVector(), and FourMomentum::setPy(). { set(2, y); return *this; }
Definition at line 59 of file Vector4.hh. References FourVector::z(). Referenced by FourVector::FourVector(), and FourMomentum::setPz(). { set(3, z); return *this; }
Definition at line 52 of file Vector4.hh. Referenced by FourVector::contract(), FourMomentum::E(), FourVector::invariant(), FourVector::reverse(), FourVector::setT(), and Rivet::toString(). { return get(0); }
Synonym for polarAngle. Definition at line 124 of file Vector4.hh. References Vector3::theta(), and FourVector::vector3(). Referenced by D0_1996_S3214044::_fourJetAnalysis(), and ParticleBase::theta(). Get the spatial part of the 4-vector as a 3-vector. Definition at line 145 of file Vector4.hh. Referenced by BABAR_2003_I593379::analyze(), BELLE_2001_S4598261::analyze(), ARGUS_1993_S2653028::analyze(), FourVector::angle(), Rivet::angle(), FourVector::azimuthalAngle(), FParameter::calc(), Hemispheres::calc(), Spherocity::calc(), Thrust::calc(), Sphericity::calc(), Rivet::cmpMomByAscP(), Rivet::cmpMomByP(), Rivet::deltaEta(), Rivet::deltaPhi(), Rivet::deltaR(), FourVector::eta(), ParticleBase::p3(), FourMomentum::p3(), FourVector::perp(), FourVector::perp2(), FourVector::phi(), FourVector::polarAngle(), FourVector::polarRadius(), FourVector::polarRadius2(), DISKinematics::project(), FoxWolframMoments::project(), MissingMomentum::project(), FourVector::pseudorapidity(), FourMomentum::pT2(), FourMomentum::pt2(), FourVector::rho(), FourVector::rho2(), and FourVector::theta(). { return Vector3(get(1), get(2), get(3)); }
Definition at line 53 of file Vector4.hh. Referenced by FourVector::contract(), FourVector::invariant(), Rivet::mT2::mT2(), ParticleBase::px(), FourMomentum::px(), FourVector::setX(), and Rivet::toString(). { return get(1); }
Definition at line 54 of file Vector4.hh. Referenced by FourVector::contract(), FourVector::invariant(), Rivet::mT2::mT2(), ParticleBase::py(), FourMomentum::py(), FourVector::setY(), and Rivet::toString(). { return get(2); }
Definition at line 55 of file Vector4.hh. Referenced by BeamThrust::_calcBeamThrust(), H1_1994_S2919893::analyze(), FourVector::contract(), FourVector::invariant(), ParticleBase::pz(), FourMomentum::pz(), FourVector::setZ(), and Rivet::toString(). { return get(3); } Friends And Related Function Documentation
Definition at line 241 of file Vector4.hh. Referenced by FourVector::operator+=(), and FourVector::operator-=(). { FourVector result; result._vec = a._vec + b._vec; return result; }
Definition at line 219 of file Vector4.hh. Referenced by FourVector::operator*=(), and FourVector::operator/=(). { FourVector result; result._vec = a * v._vec; return result; }
Definition at line 225 of file Vector4.hh. { return multiply(a, v); }
Definition at line 157 of file LorentzTrans.hh. {
return lt.transform(v4);
}
Member Data Documentation
Vector. Definition at line 135 of file VectorN.hh. Referenced by FourVector::operator*=(), FourMomentum::operator*=(), FourVector::operator+=(), FourMomentum::operator+=(), FourVector::operator-(), FourMomentum::operator-(), FourVector::operator-=(), FourMomentum::operator-=(), FourVector::operator/=(), and FourMomentum::operator/=(). The documentation for this class was generated from the following file: Generated on Wed Oct 7 2015 12:09:27 for The Rivet MC analysis system by ![]() |