Rivet API documentation

Rivet 4.1.3
Thrust.hh
1// -*- C++ -*-
2#ifndef RIVET_Thrust_HH
3#define RIVET_Thrust_HH
4
5#include "Rivet/Event.hh"
6#include "Rivet/Projection.hh"
7#include "Rivet/Projections/AxesDefinition.hh"
8#include "Rivet/Projections/FinalState.hh"
9
10namespace Rivet {
11
12
42 class Thrust : public AxesDefinition {
43 public:
44
45 using AxesDefinition::operator=;
46
48 Thrust() { }
49
50 Thrust(const FinalState& fsp) {
51 setName("Thrust");
52 declare(fsp, "FS");
53 }
54
57
59 using Projection::operator=;
60
61
62 protected:
63
65 void project(const Event& e) {
66 const vector<Particle> ps = apply<FinalState>(e, "FS").particles();
67 calc(ps);
68 }
69
71 CmpState compare(const Projection& p) const {
72 return mkNamedPCmp(p, "FS");
73 }
74
75
76 public:
77
80 double thrust() const {
81 return _thrusts[0];
82 }
83
84 double thrustMajor() const {
85 return _thrusts[1];
86 }
87
88 double thrustMinor() const {
89 return _thrusts[2];
90 }
91
92 double oblateness() const {
93 return _thrusts[1] - _thrusts[2];
94 }
95
96
99 const Vector3& thrustAxis() const {
100 return _thrustAxes[0];
101 }
102
103 const Vector3& thrustMajorAxis() const {
104 return _thrustAxes[1];
105 }
106
107 const Vector3& thrustMinorAxis() const {
108 return _thrustAxes[2];
109 }
110
111
113 const Vector3& axis1() const {
114 return thrustAxis();
115 }
116 const Vector3& axis2() const {
117 return thrustMajorAxis();
118 }
119 const Vector3& axis3() const {
120 return thrustMinorAxis();
121 }
122
123
124
125 public:
126
130
132 void calc(const FinalState& fs);
133
135 void calc(const vector<Particle>& fsparticles);
136
138 void calc(const vector<FourMomentum>& fsmomenta);
139
141 void calc(const vector<Vector3>& threeMomenta);
142
144
145
146 protected:
147
149 vector<double> _thrusts;
150
152 vector<Vector3> _thrustAxes;
153
154
155 protected:
156
158 void _calcThrust(const vector<Vector3>& fsmomenta);
159 };
160
161}
162
163#endif
Base class for projections which define a spatial basis.
Definition AxesDefinition.hh:19
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply(const Event &evt, const Projection &proj) const
Apply the supplied projection on event evt.
Definition ProjectionApplier.hh:124
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:205
Base class for all Rivet projections.
Definition Projection.hh:29
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:146
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
const Vector3 & thrustAxis() const
Definition Thrust.hh:99
double oblateness() const
The oblateness, .
Definition Thrust.hh:92
const Vector3 & thrustMinorAxis() const
The thrust minor axis (axis perpendicular to thrust and thrust major).
Definition Thrust.hh:107
RIVET_DEFAULT_PROJ_CLONE(Thrust)
Clone on the heap.
const Vector3 & axis1() const
AxesDefinition axis accessors.
Definition Thrust.hh:113
void calc(const vector< Vector3 > &threeMomenta)
Manually calculate the thrust, without engaging the caching system.
void calc(const vector< FourMomentum > &fsmomenta)
Manually calculate the thrust, without engaging the caching system.
double thrustMajor() const
The thrust major scalar, , (thrust along thrust major axis).
Definition Thrust.hh:84
double thrust() const
Definition Thrust.hh:80
void project(const Event &e)
Perform the projection on the Event.
Definition Thrust.hh:65
CmpState compare(const Projection &p) const
Compare projections.
Definition Thrust.hh:71
double thrustMinor() const
The thrust minor scalar, , (thrust along thrust minor axis).
Definition Thrust.hh:88
void calc(const vector< Particle > &fsparticles)
Manually calculate the thrust, without engaging the caching system.
Thrust()
Constructor.
Definition Thrust.hh:48
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition Thrust.hh:116
void calc(const FinalState &fs)
Manually calculate the thrust, without engaging the caching system.
const Vector3 & thrustMajorAxis() const
The thrust major axis (axis of max thrust perpendicular to thrust axis).
Definition Thrust.hh:103
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition Thrust.hh:119
Three-dimensional specialisation of Vector.
Definition Vector3.hh:39
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
Definition LHCbCommon.hh:9