MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
HepMC3::FourVector Class Reference

Generic 4-vector. More...

#include <FourVector.h>

Public Member Functions

 FourVector ()
 Default constructor.
 
 FourVector (const FourVector &)=default
 Copy constructor.
 
 FourVector (double xx, double yy, double zz, double ee)
 Sets all FourVector fields.
 
 FourVector (FourVector &&)=default
 Move constructor.
 
FourVectoroperator= (const FourVector &)=default
 =
 
FourVectoroperator= (FourVector &&)=default
 =
 
Component accessors
void set (double x1, double x2, double x3, double x4)
 Set all FourVector fields, in order x,y,z,t.
 
void set_component (const int i, const double x)
 set component of position/displacement
 
double get_component (const int i) const
 get component of position/displacement
 
double x () const
 x-component of position/displacement
 
void set_x (double xx)
 Set x-component of position/displacement.
 
void setX (double xx)
 
double y () const
 y-component of position/displacement
 
void set_y (double yy)
 Set y-component of position/displacement.
 
void setY (double yy)
 
double z () const
 z-component of position/displacement
 
void set_z (double zz)
 Set z-component of position/displacement.
 
void setZ (double zz)
 
double t () const
 Time component of position/displacement.
 
void set_t (double tt)
 Set time component of position/displacement.
 
void setT (double tt)
 
double px () const
 x-component of momentum
 
void set_px (double pxx)
 Set x-component of momentum.
 
void setPx (double pxx)
 
double py () const
 y-component of momentum
 
void set_py (double pyy)
 Set y-component of momentum.
 
void setPy (double pyy)
 
double pz () const
 z-component of momentum
 
void set_pz (double pzz)
 Set z-component of momentum.
 
void setPz (double pzz)
 
double e () const
 Energy component of momentum.
 
void set_e (double ee)
 Set energy component of momentum.
 
void setE (double ee)
 
Computed properties
double length2 () const
 Squared magnitude of (x, y, z) 3-vector.
 
double length () const
 Magnitude of spatial (x, y, z) 3-vector.
 
double rho () const
 Magnitude of spatial (x, y, z) 3-vector, for HepMC2 compatibility.
 
double perp2 () const
 Squared magnitude of (x, y) vector.
 
double perp () const
 Magnitude of (x, y) vector.
 
double interval () const
 Spacetime invariant interval s^2 = t^2 - x^2 - y^2 - z^2.
 
double p3mod2 () const
 Squared magnitude of p3 = (px, py, pz) vector.
 
double p3mod () const
 Magnitude of p3 = (px, py, pz) vector.
 
double pt2 () const
 Squared transverse momentum px^2 + py^2.
 
double pt () const
 Transverse momentum.
 
double m2 () const
 Squared invariant mass m^2 = E^2 - px^2 - py^2 - pz^2.
 
double m () const
 Invariant mass. Returns -sqrt(-m) if e^2 - P^2 is negative.
 
double phi () const
 Azimuthal angle.
 
double theta () const
 Polar angle w.r.t. z direction.
 
double eta () const
 Pseudorapidity.
 
double rap () const
 Rapidity.
 
double abs_eta () const
 Absolute pseudorapidity.
 
double abs_rap () const
 Absolute rapidity.
 
double pseudoRapidity () const
 
Comparisons to another FourVector
bool is_zero () const
 Check if the length of this vertex is zero.
 
double delta_phi (const FourVector &v) const
 Signed azimuthal angle separation in [-pi, pi].
 
double delta_eta (const FourVector &v) const
 Pseudorapidity separation.
 
double delta_rap (const FourVector &v) const
 Rapidity separation.
 
double delta_r2_eta (const FourVector &v) const
 R_eta^2-distance separation dR^2 = dphi^2 + deta^2.
 
double delta_r_eta (const FourVector &v) const
 R_eta-distance separation dR = sqrt(dphi^2 + deta^2)
 
double delta_r2_rap (const FourVector &v) const
 R_rap^2-distance separation dR^2 = dphi^2 + drap^2.
 
double delta_r_rap (const FourVector &v) const
 R-rap-distance separation dR = sqrt(dphi^2 + drap^2)
 
Operators
bool operator== (const FourVector &rhs) const
 Equality.
 
bool operator!= (const FourVector &rhs) const
 Inequality.
 
FourVector operator+ (const FourVector &rhs) const
 Arithmetic operator +.
 
FourVector operator- (const FourVector &rhs) const
 Arithmetic operator -.
 
FourVector operator* (const double rhs) const
 Arithmetic operator * by scalar.
 
FourVector operator/ (const double rhs) const
 Arithmetic operator / by scalar.
 
void operator+= (const FourVector &rhs)
 Arithmetic operator +=.
 
void operator-= (const FourVector &rhs)
 Arithmetic operator -=.
 
void operator*= (const double rhs)
 Arithmetic operator *= by scalar.
 
void operator/= (const double rhs)
 Arithmetic operator /= by scalar.
 

Static Public Member Functions

static const FourVectorZERO_VECTOR ()
 Static null FourVector = (0,0,0,0)
 

Detailed Description

Generic 4-vector.

Interpretation of its content depends on accessors used: it's much simpler to do this than to distinguish between space and momentum vectors via the type system (especially given the need for backward compatibility with HepMC2). Be sensible and don't call energy functions on spatial vectors! To avoid duplication, most definitions are only implemented on the spatial function names, with the energy-momentum functions as aliases.

This is not intended to be a fully featured 4-vector, but does contain the majority of common non-boosting functionality, as well as a few support operations on 4-vectors.

The implementations in this class are fully inlined.

Definition at line 36 of file FourVector.h.

Constructor & Destructor Documentation

◆ FourVector() [1/2]

HepMC3::FourVector::FourVector ( )
inline

◆ FourVector() [2/2]

HepMC3::FourVector::FourVector ( double xx,
double yy,
double zz,
double ee )
inline

Sets all FourVector fields.

Definition at line 43 of file FourVector.h.

44 : m_v1(xx), m_v2(yy), m_v3(zz), m_v4(ee) {}

Member Function Documentation

◆ abs_eta()

double HepMC3::FourVector::abs_eta ( ) const
inline

Absolute pseudorapidity.

Definition at line 190 of file FourVector.h.

190{ return std::abs( eta() ); }
double eta() const
Pseudorapidity.
Definition FourVector.h:178

References eta().

◆ abs_rap()

double HepMC3::FourVector::abs_rap ( ) const
inline

Absolute rapidity.

Definition at line 192 of file FourVector.h.

192{ return std::abs( rap() ); }
double rap() const
Rapidity.
Definition FourVector.h:184

References rap().

◆ delta_eta()

double HepMC3::FourVector::delta_eta ( const FourVector & v) const
inline

Pseudorapidity separation.

Definition at line 218 of file FourVector.h.

218{ return eta() - v.eta(); }

References FourVector(), and eta().

Referenced by delta_r2_eta().

◆ delta_phi()

double HepMC3::FourVector::delta_phi ( const FourVector & v) const
inline

Signed azimuthal angle separation in [-pi, pi].

Definition at line 209 of file FourVector.h.

209 {
210 double dphi = phi() - v.phi();
211 if (dphi != dphi) return dphi;
212 while (dphi >= M_PI) dphi -= 2.*M_PI;
213 while (dphi < -M_PI) dphi += 2.*M_PI;
214 return dphi;
215 }
double phi() const
Azimuthal angle.
Definition FourVector.h:174

References FourVector(), and phi().

Referenced by delta_r2_eta(), and delta_r2_rap().

◆ delta_r2_eta()

double HepMC3::FourVector::delta_r2_eta ( const FourVector & v) const
inline

R_eta^2-distance separation dR^2 = dphi^2 + deta^2.

Definition at line 224 of file FourVector.h.

224 {
225 return delta_phi(v)*delta_phi(v) + delta_eta(v)*delta_eta(v);
226 }
double delta_eta(const FourVector &v) const
Pseudorapidity separation.
Definition FourVector.h:218
double delta_phi(const FourVector &v) const
Signed azimuthal angle separation in [-pi, pi].
Definition FourVector.h:209

References FourVector(), delta_eta(), and delta_phi().

Referenced by delta_r_eta().

◆ delta_r2_rap()

double HepMC3::FourVector::delta_r2_rap ( const FourVector & v) const
inline

R_rap^2-distance separation dR^2 = dphi^2 + drap^2.

Definition at line 234 of file FourVector.h.

234 {
235 return delta_phi(v)*delta_phi(v) + delta_rap(v)*delta_rap(v);
236 }
double delta_rap(const FourVector &v) const
Rapidity separation.
Definition FourVector.h:221

References FourVector(), delta_phi(), and delta_rap().

Referenced by delta_r_rap().

◆ delta_r_eta()

double HepMC3::FourVector::delta_r_eta ( const FourVector & v) const
inline

R_eta-distance separation dR = sqrt(dphi^2 + deta^2)

Definition at line 229 of file FourVector.h.

229 {
230 return std::sqrt( delta_r2_eta(v) );
231 }
double delta_r2_eta(const FourVector &v) const
R_eta^2-distance separation dR^2 = dphi^2 + deta^2.
Definition FourVector.h:224

References FourVector(), and delta_r2_eta().

◆ delta_r_rap()

double HepMC3::FourVector::delta_r_rap ( const FourVector & v) const
inline

R-rap-distance separation dR = sqrt(dphi^2 + drap^2)

Definition at line 239 of file FourVector.h.

239 {
240 return std::sqrt( delta_r2_rap(v) );
241 }
double delta_r2_rap(const FourVector &v) const
R_rap^2-distance separation dR^2 = dphi^2 + drap^2.
Definition FourVector.h:234

References FourVector(), and delta_r2_rap().

◆ delta_rap()

double HepMC3::FourVector::delta_rap ( const FourVector & v) const
inline

Rapidity separation.

Definition at line 221 of file FourVector.h.

221{ return rap() - v.rap(); }

References FourVector(), and rap().

Referenced by delta_r2_rap().

◆ e()

double HepMC3::FourVector::e ( ) const
inline

Energy component of momentum.

Definition at line 135 of file FourVector.h.

135{ return t(); }
double t() const
Time component of position/displacement.
Definition FourVector.h:106

References t().

Referenced by HepMC3::GenEvent::boost(), marley::ContinuumNuclearReaction::create_event(), HepMC3::Print::line(), rap(), and HepMC3::GenEvent::rotate().

◆ eta()

double HepMC3::FourVector::eta ( ) const
inline

Pseudorapidity.

Definition at line 178 of file FourVector.h.

178 {
179 if ( p3mod() == 0.0 ) return 0.0;
180 if ( p3mod() == fabs(pz()) ) return std::copysign(HUGE_VAL, pz());
181 return 0.5*std::log( (p3mod() + pz()) / (p3mod() - pz()) );
182 }
double p3mod() const
Magnitude of p3 = (px, py, pz) vector.
Definition FourVector.h:163
double pz() const
z-component of momentum
Definition FourVector.h:128

References p3mod(), and pz().

Referenced by abs_eta(), delta_eta(), and pseudoRapidity().

◆ get_component()

double HepMC3::FourVector::get_component ( const int i) const
inline

get component of position/displacement

Definition at line 74 of file FourVector.h.

75 {
76 if (i==0) return m_v1;
77 if (i==1) return m_v2;
78 if (i==2) return m_v3;
79 if (i==3) return m_v4;
80 return 0.0;
81 }

◆ interval()

double HepMC3::FourVector::interval ( ) const
inline

Spacetime invariant interval s^2 = t^2 - x^2 - y^2 - z^2.

Definition at line 158 of file FourVector.h.

158{ return t()*t() - length2(); }
double length2() const
Squared magnitude of (x, y, z) 3-vector.
Definition FourVector.h:148

References length2(), and t().

Referenced by m2().

◆ is_zero()

bool HepMC3::FourVector::is_zero ( ) const
inline

Check if the length of this vertex is zero.

Definition at line 206 of file FourVector.h.

206{ return x() == 0 && y() == 0 && z() == 0 && t() == 0; }
double z() const
z-component of position/displacement
Definition FourVector.h:99
double x() const
x-component of position/displacement
Definition FourVector.h:85
double y() const
y-component of position/displacement
Definition FourVector.h:92

References t(), x(), y(), and z().

Referenced by HepMC3::GenEvent::rotate(), HepMC3::GenEvent::set_units(), and HepMC3::WriterAscii::write_event().

◆ length()

double HepMC3::FourVector::length ( ) const
inline

Magnitude of spatial (x, y, z) 3-vector.

Definition at line 150 of file FourVector.h.

150{ return std::sqrt(length2()); }

References length2().

Referenced by p3mod(), and rho().

◆ length2()

double HepMC3::FourVector::length2 ( ) const
inline

Squared magnitude of (x, y, z) 3-vector.

Definition at line 148 of file FourVector.h.

148{ return x()*x() + y()*y() + z()*z(); }

References x(), y(), and z().

Referenced by HepMC3::GenEvent::boost(), interval(), length(), and p3mod2().

◆ m()

double HepMC3::FourVector::m ( ) const
inline

Invariant mass. Returns -sqrt(-m) if e^2 - P^2 is negative.

Definition at line 171 of file FourVector.h.

171{ return (m2() > 0.0) ? std::sqrt(m2()) : -std::sqrt(-m2()); }
double m2() const
Squared invariant mass m^2 = E^2 - px^2 - py^2 - pz^2.
Definition FourVector.h:169

References m2().

◆ m2()

double HepMC3::FourVector::m2 ( ) const
inline

Squared invariant mass m^2 = E^2 - px^2 - py^2 - pz^2.

Definition at line 169 of file FourVector.h.

169{ return interval(); }
double interval() const
Spacetime invariant interval s^2 = t^2 - x^2 - y^2 - z^2.
Definition FourVector.h:158

References interval().

Referenced by m().

◆ operator!=()

bool HepMC3::FourVector::operator!= ( const FourVector & rhs) const
inline

Inequality.

Definition at line 254 of file FourVector.h.

254{ return !(*this == rhs); }

References FourVector().

◆ operator*()

FourVector HepMC3::FourVector::operator* ( const double rhs) const
inline

Arithmetic operator * by scalar.

Definition at line 265 of file FourVector.h.

265 {
266 return FourVector( x()*rhs, y()*rhs, z()*rhs, t()*rhs );
267 }
FourVector()
Default constructor.
Definition FourVector.h:40

References FourVector(), t(), x(), y(), and z().

◆ operator*=()

void HepMC3::FourVector::operator*= ( const double rhs)
inline

Arithmetic operator *= by scalar.

Definition at line 288 of file FourVector.h.

288 {
289 setX(x()*rhs);
290 setY(y()*rhs);
291 setZ(z()*rhs);
292 setT(t()*rhs);
293 }
void setT(double tt)
Definition FourVector.h:110
void setZ(double zz)
Definition FourVector.h:103
void setX(double xx)
Definition FourVector.h:89
void setY(double yy)
Definition FourVector.h:96

References setT(), setX(), setY(), setZ(), t(), x(), y(), and z().

◆ operator+()

FourVector HepMC3::FourVector::operator+ ( const FourVector & rhs) const
inline

Arithmetic operator +.

Definition at line 257 of file FourVector.h.

257 {
258 return FourVector( x() + rhs.x(), y() + rhs.y(), z() + rhs.z(), t() + rhs.t() );
259 }

References FourVector(), t(), x(), y(), and z().

◆ operator+=()

void HepMC3::FourVector::operator+= ( const FourVector & rhs)
inline

Arithmetic operator +=.

Definition at line 274 of file FourVector.h.

274 {
275 setX(x() + rhs.x());
276 setY(y() + rhs.y());
277 setZ(z() + rhs.z());
278 setT(t() + rhs.t());
279 }

References FourVector(), setT(), setX(), setY(), setZ(), t(), x(), y(), and z().

◆ operator-()

FourVector HepMC3::FourVector::operator- ( const FourVector & rhs) const
inline

Arithmetic operator -.

Definition at line 261 of file FourVector.h.

261 {
262 return FourVector( x() - rhs.x(), y() - rhs.y(), z() - rhs.z(), t() - rhs.t() );
263 }

References FourVector(), t(), x(), y(), and z().

◆ operator-=()

void HepMC3::FourVector::operator-= ( const FourVector & rhs)
inline

Arithmetic operator -=.

Definition at line 281 of file FourVector.h.

281 {
282 setX(x() - rhs.x());
283 setY(y() - rhs.y());
284 setZ(z() - rhs.z());
285 setT(t() - rhs.t());
286 }

References FourVector(), setT(), setX(), setY(), setZ(), t(), x(), y(), and z().

◆ operator/()

FourVector HepMC3::FourVector::operator/ ( const double rhs) const
inline

Arithmetic operator / by scalar.

Definition at line 269 of file FourVector.h.

269 {
270 return FourVector( x()/rhs, y()/rhs, z()/rhs, t()/rhs );
271 }

References FourVector(), t(), x(), y(), and z().

◆ operator/=()

void HepMC3::FourVector::operator/= ( const double rhs)
inline

Arithmetic operator /= by scalar.

Definition at line 295 of file FourVector.h.

295 {
296 setX(x()/rhs);
297 setY(y()/rhs);
298 setZ(z()/rhs);
299 setT(t()/rhs);
300 }

References setT(), setX(), setY(), setZ(), t(), x(), y(), and z().

◆ operator==()

bool HepMC3::FourVector::operator== ( const FourVector & rhs) const
inline

Equality.

Definition at line 250 of file FourVector.h.

250 {
251 return x() == rhs.x() && y() == rhs.y() && z() == rhs.z() && t() == rhs.t();
252 }

References FourVector(), t(), x(), y(), and z().

◆ p3mod()

double HepMC3::FourVector::p3mod ( ) const
inline

Magnitude of p3 = (px, py, pz) vector.

Definition at line 163 of file FourVector.h.

163{ return length(); }
double length() const
Magnitude of spatial (x, y, z) 3-vector.
Definition FourVector.h:150

References length().

Referenced by eta(), and marley::ProjectileDirectionRotator::process_event().

◆ p3mod2()

double HepMC3::FourVector::p3mod2 ( ) const
inline

Squared magnitude of p3 = (px, py, pz) vector.

Definition at line 161 of file FourVector.h.

161{ return length2(); }

References length2().

◆ perp()

double HepMC3::FourVector::perp ( ) const
inline

Magnitude of (x, y) vector.

Definition at line 156 of file FourVector.h.

156{ return std::sqrt(perp2()); }
double perp2() const
Squared magnitude of (x, y) vector.
Definition FourVector.h:154

References perp2().

Referenced by pt(), and theta().

◆ perp2()

double HepMC3::FourVector::perp2 ( ) const
inline

Squared magnitude of (x, y) vector.

Definition at line 154 of file FourVector.h.

154{ return x()*x() + y()*y(); }

References x(), and y().

Referenced by perp(), and pt2().

◆ phi()

double HepMC3::FourVector::phi ( ) const
inline

Azimuthal angle.

Definition at line 174 of file FourVector.h.

174{ return std::atan2( y(), x() ); }

References x(), and y().

Referenced by delta_phi().

◆ pseudoRapidity()

double HepMC3::FourVector::pseudoRapidity ( ) const
inline

Same as eta()

Deprecated
Prefer 'only one way to do it', and we don't have equivalent long names for e.g. pid, phi or eta

Definition at line 197 of file FourVector.h.

197{ return eta(); }

References eta().

◆ pt()

double HepMC3::FourVector::pt ( ) const
inline

Transverse momentum.

Definition at line 167 of file FourVector.h.

167{ return perp(); }
double perp() const
Magnitude of (x, y) vector.
Definition FourVector.h:156

References perp().

◆ pt2()

double HepMC3::FourVector::pt2 ( ) const
inline

Squared transverse momentum px^2 + py^2.

Definition at line 165 of file FourVector.h.

165{ return perp2(); }

References perp2().

◆ px()

double HepMC3::FourVector::px ( ) const
inline

◆ py()

double HepMC3::FourVector::py ( ) const
inline

◆ pz()

double HepMC3::FourVector::pz ( ) const
inline

◆ rap()

double HepMC3::FourVector::rap ( ) const
inline

Rapidity.

Definition at line 184 of file FourVector.h.

184 {
185 if ( e() == 0.0 ) return 0.0;
186 if ( e() == fabs(pz()) ) return std::copysign(HUGE_VAL, pz());
187 return 0.5*std::log( (e() + pz()) / (e() - pz()) );
188 }
double e() const
Energy component of momentum.
Definition FourVector.h:135

References e(), and pz().

Referenced by abs_rap(), and delta_rap().

◆ rho()

double HepMC3::FourVector::rho ( ) const
inline

Magnitude of spatial (x, y, z) 3-vector, for HepMC2 compatibility.

Definition at line 152 of file FourVector.h.

152{ return length(); }

References length().

◆ set()

void HepMC3::FourVector::set ( double x1,
double x2,
double x3,
double x4 )
inline

Set all FourVector fields, in order x,y,z,t.

Definition at line 58 of file FourVector.h.

58 {
59 m_v1 = x1;
60 m_v2 = x2;
61 m_v3 = x3;
62 m_v4 = x4;
63 }

◆ set_component()

void HepMC3::FourVector::set_component ( const int i,
const double x )
inline

set component of position/displacement

Definition at line 66 of file FourVector.h.

67 {
68 if (i==0) {m_v1=x; return; }
69 if (i==1) {m_v2=x; return; }
70 if (i==2) {m_v3=x; return; }
71 if (i==3) {m_v4=x; return; }
72 }

References x().

◆ set_e()

void HepMC3::FourVector::set_e ( double ee)
inline

Set energy component of momentum.

Definition at line 137 of file FourVector.h.

137{ this->set_t(ee); }
void set_t(double tt)
Set time component of position/displacement.
Definition FourVector.h:108

References set_t().

Referenced by setE().

◆ set_px()

void HepMC3::FourVector::set_px ( double pxx)
inline

Set x-component of momentum.

Definition at line 116 of file FourVector.h.

116{ set_x(pxx); }
void set_x(double xx)
Set x-component of position/displacement.
Definition FourVector.h:87

References set_x().

Referenced by marley::RotationMatrix::rotate_particle_inplace(), and setPx().

◆ set_py()

void HepMC3::FourVector::set_py ( double pyy)
inline

Set y-component of momentum.

Definition at line 123 of file FourVector.h.

123{ set_y(pyy); }
void set_y(double yy)
Set y-component of position/displacement.
Definition FourVector.h:94

References set_y().

Referenced by marley::RotationMatrix::rotate_particle_inplace(), and setPy().

◆ set_pz()

void HepMC3::FourVector::set_pz ( double pzz)
inline

Set z-component of momentum.

Definition at line 130 of file FourVector.h.

130{ set_z(pzz); }
void set_z(double zz)
Set z-component of position/displacement.
Definition FourVector.h:101

References set_z().

Referenced by marley::RotationMatrix::rotate_particle_inplace(), and setPz().

◆ set_t()

void HepMC3::FourVector::set_t ( double tt)
inline

Set time component of position/displacement.

Definition at line 108 of file FourVector.h.

108{ m_v4 = tt; }

Referenced by set_e(), and setT().

◆ set_x()

void HepMC3::FourVector::set_x ( double xx)
inline

Set x-component of position/displacement.

Definition at line 87 of file FourVector.h.

87{ m_v1 = xx; }

Referenced by set_px(), and setX().

◆ set_y()

void HepMC3::FourVector::set_y ( double yy)
inline

Set y-component of position/displacement.

Definition at line 94 of file FourVector.h.

94{ m_v2 = yy; }

Referenced by set_py(), and setY().

◆ set_z()

void HepMC3::FourVector::set_z ( double zz)
inline

Set z-component of position/displacement.

Definition at line 101 of file FourVector.h.

101{ m_v3 = zz; }

Referenced by set_pz(), and setZ().

◆ setE()

void HepMC3::FourVector::setE ( double ee)
inline
Deprecated
Prefer the HepMC-style set_y() function

Definition at line 139 of file FourVector.h.

139{ set_e(ee); }
void set_e(double ee)
Set energy component of momentum.
Definition FourVector.h:137

References set_e().

◆ setPx()

void HepMC3::FourVector::setPx ( double pxx)
inline
Deprecated
Prefer the HepMC-style set_px() function

Definition at line 118 of file FourVector.h.

118{ set_px(pxx); }
void set_px(double pxx)
Set x-component of momentum.
Definition FourVector.h:116

References set_px().

◆ setPy()

void HepMC3::FourVector::setPy ( double pyy)
inline
Deprecated
Prefer the HepMC-style set_py() function

Definition at line 125 of file FourVector.h.

125{ set_py(pyy); }
void set_py(double pyy)
Set y-component of momentum.
Definition FourVector.h:123

References set_py().

◆ setPz()

void HepMC3::FourVector::setPz ( double pzz)
inline
Deprecated
Prefer the HepMC-style set_pz() function

Definition at line 132 of file FourVector.h.

132{ set_pz(pzz); }
void set_pz(double pzz)
Set z-component of momentum.
Definition FourVector.h:130

References set_pz().

◆ setT()

void HepMC3::FourVector::setT ( double tt)
inline
Deprecated
Prefer the HepMC-style set_t() function

Definition at line 110 of file FourVector.h.

110{ set_t(tt); }

References set_t().

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and HepMC3::GenEvent::reflect().

◆ setX()

void HepMC3::FourVector::setX ( double xx)
inline
Deprecated
Prefer the HepMC-style set_x() function

Definition at line 89 of file FourVector.h.

89{ set_x(xx); }

References set_x().

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and HepMC3::GenEvent::reflect().

◆ setY()

void HepMC3::FourVector::setY ( double yy)
inline
Deprecated
Prefer the HepMC-style set_y() function

Definition at line 96 of file FourVector.h.

96{ set_y(yy); }

References set_y().

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and HepMC3::GenEvent::reflect().

◆ setZ()

void HepMC3::FourVector::setZ ( double zz)
inline
Deprecated
Prefer the HepMC-style set_z() function

Definition at line 103 of file FourVector.h.

103{ set_z(zz); }

References set_z().

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and HepMC3::GenEvent::reflect().

◆ t()

double HepMC3::FourVector::t ( ) const
inline

◆ theta()

double HepMC3::FourVector::theta ( ) const
inline

Polar angle w.r.t. z direction.

Definition at line 176 of file FourVector.h.

176{ return std::atan2( perp(), z() ); }

References perp(), and z().

◆ x()

◆ y()

double HepMC3::FourVector::y ( ) const
inline

◆ z()

double HepMC3::FourVector::z ( ) const
inline

◆ ZERO_VECTOR()

static const FourVector & HepMC3::FourVector::ZERO_VECTOR ( )
inlinestatic

Static null FourVector = (0,0,0,0)

Definition at line 306 of file FourVector.h.

306 {
307 static const FourVector v;
308 return v;
309 }

References FourVector().

Referenced by HepMC3::GenVertex::position().


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