1#ifndef RIVET_ParticleBase_HH
2#define RIVET_ParticleBase_HH
4#include "Rivet/Config/RivetCommon.hh"
5#include "Rivet/Jet.fhh"
6#include "Rivet/Tools/Cuts.fhh"
7#include "Rivet/Math/Vectors.hh"
63 double pT()
const {
return pt(); }
158 inline double deltaR(
const ParticleBase& p1,
const ParticleBase& p2,
160 return deltaR(p1.momentum(), p2.momentum(), scheme);
163 inline double deltaR(
const ParticleBase&
p,
const FourMomentum& v,
165 return deltaR(
p.momentum(), v, scheme);
168 inline double deltaR(
const ParticleBase&
p,
const FourVector& v,
170 return deltaR(
p.momentum(), v, scheme);
173 inline double deltaR(
const ParticleBase&
p,
const Vector3& v) {
174 return deltaR(
p.momentum(), v);
177 inline double deltaR(
const ParticleBase&
p,
double eta,
double phi) {
181 inline double deltaR(
const FourMomentum& v,
const ParticleBase&
p,
183 return deltaR(v,
p.momentum(), scheme);
186 inline double deltaR(
const FourVector& v,
const ParticleBase&
p,
188 return deltaR(v,
p.momentum(), scheme);
191 inline double deltaR(
const Vector3& v,
const ParticleBase&
p) {
192 return deltaR(v,
p.momentum());
195 inline double deltaR(
double eta,
double phi,
const ParticleBase&
p) {
200 inline double deltaPhi(
const ParticleBase& p1,
const ParticleBase& p2,
bool sign=
false) {
204 inline double deltaPhi(
const ParticleBase&
p,
const FourMomentum& v,
bool sign=
false) {
208 inline double deltaPhi(
const ParticleBase&
p,
const FourVector& v,
bool sign=
false) {
212 inline double deltaPhi(
const ParticleBase&
p,
const Vector3& v,
bool sign=
false) {
216 inline double deltaPhi(
const ParticleBase&
p,
double phi,
bool sign=
false) {
220 inline double deltaPhi(
const FourMomentum& v,
const ParticleBase&
p,
bool sign=
false) {
224 inline double deltaPhi(
const FourVector& v,
const ParticleBase&
p,
bool sign=
false) {
228 inline double deltaPhi(
const Vector3& v,
const ParticleBase&
p,
bool sign=
false) {
232 inline double deltaPhi(
double phi,
const ParticleBase&
p,
bool sign=
false) {
237 inline double deltaEta(
const ParticleBase& p1,
const ParticleBase& p2) {
238 return deltaEta(p1.momentum(), p2.momentum());
241 inline double deltaEta(
const ParticleBase&
p,
const FourMomentum& v) {
245 inline double deltaEta(
const ParticleBase&
p,
const FourVector& v) {
249 inline double deltaEta(
const ParticleBase&
p,
const Vector3& v) {
253 inline double deltaEta(
const ParticleBase&
p,
double eta) {
257 inline double deltaEta(
const FourMomentum& v,
const ParticleBase&
p) {
261 inline double deltaEta(
const FourVector& v,
const ParticleBase&
p) {
265 inline double deltaEta(
const Vector3& v,
const ParticleBase&
p) {
269 inline double deltaEta(
double eta,
const ParticleBase&
p) {
274 inline double deltaRap(
const ParticleBase& p1,
const ParticleBase& p2) {
275 return deltaRap(p1.momentum(), p2.momentum());
278 inline double deltaRap(
const ParticleBase&
p,
const FourMomentum& v) {
282 inline double deltaRap(
const ParticleBase&
p,
double y) {
286 inline double deltaRap(
const FourMomentum& v,
const ParticleBase&
p) {
290 inline double deltaRap(
double y,
const ParticleBase&
p) {
Specialized version of the FourVector with momentum/energy functionality.
Definition Vector4.hh:316
Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector.
Definition Vector4.hh:30
Base class for particle-like things like Particle and Jet.
Definition ParticleBase.hh:13
double py() const
y component of momentum.
Definition ParticleBase.hh:122
double polarAngle() const
Angle subtended by the 3-vector and the z-axis.
Definition ParticleBase.hh:134
const FourMomentum & mom() const
Get equivalent single momentum four-vector (const) (alias).
Definition ParticleBase.hh:39
double dot(const ParticleBase &v) const
Lorentz dot product between this 4-vector and another.
Definition ParticleBase.hh:146
double pT() const
Get the directly (alias).
Definition ParticleBase.hh:63
double absrap() const
Get the directly (alias).
Definition ParticleBase.hh:100
double abspseudorapidity() const
Get the directly.
Definition ParticleBase.hh:89
double angle(const ParticleBase &v) const
Angle between this vector and another.
Definition ParticleBase.hh:139
double dot(const FourVector &v) const
Angle between this 4-vector and another.
Definition ParticleBase.hh:148
double pT2() const
Get the directly (alias).
Definition ParticleBase.hh:70
Vector3 ptvec() const
Get the transverse 3-momentum directly.
Definition ParticleBase.hh:115
double mass2() const
Get the mass**2 directly.
Definition ParticleBase.hh:82
double perp() const
Get the directly (alias).
Definition ParticleBase.hh:65
virtual const FourMomentum & momentum() const =0
Get equivalent single momentum four-vector (const).
double phi(const PhiMapping mapping=ZERO_2PI) const
Get the directly.
Definition ParticleBase.hh:105
double p() const
Get the 3-momentum magnitude directly.
Definition ParticleBase.hh:110
double energy2() const
Get the energy-squared (alias).
Definition ParticleBase.hh:58
ParticleBase()
Default constructor.
Definition ParticleBase.hh:17
double abseta() const
Get the directly (alias).
Definition ParticleBase.hh:91
double pt2() const
Get the directly.
Definition ParticleBase.hh:68
ThreeMomentum p3() const
Get the 3-momentum directly.
Definition ParticleBase.hh:108
double theta() const
Synonym for polarAngle.
Definition ParticleBase.hh:136
double perp2() const
Get the directly (alias).
Definition ParticleBase.hh:72
double mass() const
Get the mass directly.
Definition ParticleBase.hh:80
double pz() const
z component of momentum.
Definition ParticleBase.hh:124
double pt() const
Get the directly.
Definition ParticleBase.hh:61
double Et2() const
Get the directly.
Definition ParticleBase.hh:77
double rap() const
Get the directly (alias).
Definition ParticleBase.hh:96
double pz2() const
z component of momentum, squared.
Definition ParticleBase.hh:131
double px() const
x component of momentum.
Definition ParticleBase.hh:120
double eta() const
Get the directly (alias).
Definition ParticleBase.hh:87
double Et() const
Get the directly.
Definition ParticleBase.hh:75
double rapidity() const
Get the directly.
Definition ParticleBase.hh:94
Vector3 pTvec() const
Get the transverse 3-momentum directly.
Definition ParticleBase.hh:117
virtual ~ParticleBase()
Virtual destructor.
Definition ParticleBase.hh:20
double pseudorapidity() const
Get the directly.
Definition ParticleBase.hh:85
double angle(const FourVector &v) const
Angle between this vector and another.
Definition ParticleBase.hh:141
double E() const
Get the energy directly.
Definition ParticleBase.hh:51
double absrapidity() const
Get the directly.
Definition ParticleBase.hh:98
double py2() const
y component of momentum, squared.
Definition ParticleBase.hh:129
double energy() const
Get the energy directly (alias).
Definition ParticleBase.hh:53
double azimuthalAngle(const PhiMapping mapping=ZERO_2PI) const
Azimuthal angle .
Definition ParticleBase.hh:103
double px2() const
x component of momentum, squared.
Definition ParticleBase.hh:127
double angle(const Vector3 &v3) const
Angle between this vector and another (3-vector)
Definition ParticleBase.hh:143
double p2() const
Get the 3-momentum magnitude-squared directly.
Definition ParticleBase.hh:112
double E2() const
Get the energy-squared.
Definition ParticleBase.hh:56
Specialized version of the ThreeVector with momentum functionality.
Definition Vector3.hh:339
Three-dimensional specialisation of Vector.
Definition Vector3.hh:40
double p2() const
Get the modulus-squared of the 3-momentum.
Definition Vector4.hh:601
double E2() const
Get energy-squared .
Definition Vector4.hh:555
double mass() const
Get the mass (the Lorentz self-invariant).
Definition Vector4.hh:576
double rapidity() const
Calculate the rapidity.
Definition Vector4.hh:607
double p() const
Get the modulus of the 3-momentum.
Definition Vector4.hh:596
Vector3 vector3() const
Get the spatial part of the 4-vector as a 3-vector.
Definition Vector4.hh:177
double angle(const FourVector &v) const
Angle between this vector and another.
Definition Vector4.hh:95
double pt() const
Calculate the transverse momentum .
Definition Vector4.hh:647
double phi(const PhiMapping mapping=ZERO_2PI) const
Synonym for azimuthalAngle.
Definition Vector4.hh:149
double abseta() const
Get the directly (alias).
Definition Vector4.hh:174
double Et() const
Calculate the transverse energy .
Definition Vector4.hh:656
double Et2() const
Calculate the transverse energy .
Definition Vector4.hh:652
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:145
double pt2() const
Calculate the squared transverse momentum .
Definition Vector4.hh:638
double dot(const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).
Definition Vector4.hh:194
Vector3 pTvec() const
Calculate the transverse momentum vector .
Definition Vector4.hh:625
double eta() const
Synonym for pseudorapidity.
Definition Vector4.hh:167
double theta() const
Synonym for polarAngle.
Definition Vector4.hh:158
Vector3 ptvec() const
Synonym for pTvec.
Definition Vector4.hh:629
double mass2() const
Get the squared mass (the Lorentz self-invariant).
Definition Vector4.hh:587
double absrap() const
Absolute rapidity.
Definition Vector4.hh:620
double E() const
Get energy (time component of momentum).
Definition Vector4.hh:553
double polarAngle() const
Angle subtended by the 3-vector and the z-axis.
Definition Vector4.hh:154
double abspseudorapidity() const
Get the directly.
Definition Vector4.hh:172
double absrapidity() const
Absolute rapidity.
Definition Vector4.hh:616
double eta(const ParticleBase &p)
Unbound function access to eta.
Definition ParticleBaseUtils.hh:693
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Definition MC_Cent_pPb.hh:10
double deltaR(double rap1, double phi1, double rap2, double phi2)
Definition MathUtils.hh:699
double deltaPhi(double phi1, double phi2, bool sign=false)
Calculate the difference between two angles in radians.
Definition MathUtils.hh:669
double deltaEta(double eta1, double eta2, bool sign=false)
Definition MathUtils.hh:677
PhiMapping
Enum for range of to be mapped into.
Definition MathConstants.hh:49
constexpr std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val)
Find the sign of a number.
Definition MathUtils.hh:266
RapScheme
Enum for rapidity variable to be used in calculating , applying rapidity cuts, etc.
Definition MathConstants.hh:46
double deltaRap(double y1, double y2, bool sign=false)
Definition MathUtils.hh:685