Rivet API documentation

Rivet 4.1.3
Sphericity.hh
1// -*- C++ -*-
2#ifndef RIVET_Sphericity_HH
3#define RIVET_Sphericity_HH
4
5#include "Rivet/Event.hh"
6#include "Rivet/Jet.fhh"
7#include "Rivet/Projection.hh"
8#include "Rivet/Projections/AxesDefinition.hh"
9#include "Rivet/Projections/FinalState.hh"
10
11namespace Rivet {
12
13
51 class Sphericity : public AxesDefinition {
52 public:
53
54 using AxesDefinition::operator=;
55
58
60 Sphericity(double rparam = 2.0)
61 : _regparam(rparam) { }
62
63 Sphericity(const FinalState& fsp, double rparam = 2.0);
64
67
69
71 using Projection::operator=;
72
73
74 protected:
75
77 void project(const Event& e);
78
80 CmpState compare(const Projection& p) const;
81
82
83 public:
84
86 void clear();
87
91 double sphericity() const {
92 return 3.0 / 2.0 * (lambda2() + lambda3());
93 }
95 double transSphericity() const {
96 return 2.0 * lambda2() / (lambda1() + lambda2());
97 }
98
99 double planarity() const {
100 return 2 * (sphericity() - 2 * aplanarity()) / 3.0;
101 }
102
103 double aplanarity() const {
104 return 3 / 2.0 * lambda3();
105 }
106
107
108
112 const Vector3& sphericityAxis() const {
113 return _sphAxes[0];
114 }
117 return _sphAxes[1];
118 }
119
121 return _sphAxes[2];
122 }
123
124
125
128 const Vector3& axis1() const {
129 return sphericityAxis();
130 }
131 const Vector3& axis2() const {
132 return sphericityMajorAxis();
133 }
134 const Vector3& axis3() const {
135 return sphericityMinorAxis();
136 }
137
138
139
142 double lambda1() const {
143 return _lambdas[0];
144 }
145 double lambda2() const {
146 return _lambdas[1];
147 }
148 double lambda3() const {
149 return _lambdas[2];
150 }
152
153 Vector3 mkEigenVector(Matrix3 A, const double& lambda);
154
158
160 void calc(const FinalState& fs);
161
163 void calc(const Particles& particles);
164
166 void calc(const Jets& jets);
167
169 void calc(const vector<FourMomentum>& momenta);
170
174 void calc(const vector<Vector3>& momenta);
175
177
178
179 protected:
180
182 vector<double> _lambdas;
183
185 vector<Vector3> _sphAxes;
186
188 const double _regparam;
189 };
190
191
192}
193
194#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
Specialised vector of Jet objects.
Definition Jet.hh:21
Specialised vector of Particle objects.
Definition Particle.hh:21
Base class for all Rivet projections.
Definition Projection.hh:29
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition Sphericity.hh:134
const Vector3 & axis1() const
Definition Sphericity.hh:128
void project(const Event &e)
Perform the projection on the Event.
double transSphericity() const
Transverse sphericity.
Definition Sphericity.hh:95
void calc(const Particles &particles)
Manually calculate the sphericity, without engaging the caching system.
CmpState compare(const Projection &p) const
Compare with other projections.
Sphericity(double rparam=2.0)
Constructor.
Definition Sphericity.hh:60
double planarity() const
Planarity.
Definition Sphericity.hh:99
void calc(const FinalState &fs)
Manually calculate the sphericity, without engaging the caching system.
void clear()
Reset the projection.
void calc(const vector< FourMomentum > &momenta)
Manually calculate the sphericity, without engaging the caching system.
double aplanarity() const
Aplanarity.
Definition Sphericity.hh:103
void calc(const Jets &jets)
Manually calculate the sphericity, without engaging the caching system.
const Vector3 & sphericityMinorAxis() const
Sphericity minor axis.
Definition Sphericity.hh:120
RIVET_DEFAULT_PROJ_CLONE(Sphericity)
Clone on the heap.
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition Sphericity.hh:131
const Vector3 & sphericityMajorAxis() const
Sphericity major axis.
Definition Sphericity.hh:116
void calc(const vector< Vector3 > &momenta)
Manually calculate the sphericity, without engaging the caching system.
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