rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
Sphericity.hh
1// -*- C++ -*-
2#ifndef RIVET_Sphericity_HH
3#define RIVET_Sphericity_HH
4
5#include "Rivet/Projection.hh"
6#include "Rivet/Projections/AxesDefinition.hh"
7#include "Rivet/Projections/FinalState.hh"
8#include "Rivet/Event.hh"
9#include "Rivet/Jet.fhh"
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): _regparam(rparam){}
61
62 Sphericity(const FinalState& fsp, double rparam=2.0);
63
66
68
70 using Projection::operator =;
71
72
73 protected:
74
76 void project(const Event& e);
77
79 CmpState compare(const Projection& p) const;
80
81
82 public:
83
85 void clear();
86
90 double sphericity() const { return 3.0 / 2.0 * (lambda2() + lambda3()); }
92 double transSphericity() const { return 2.0 * lambda2() / ( lambda1() + lambda2() ); }
94 double planarity() const { return 2 * (sphericity() - 2 * aplanarity()) / 3.0; }
96 double aplanarity() const { return 3 / 2.0 * lambda3(); }
98
99
103 const Vector3& sphericityAxis() const { return _sphAxes[0]; }
105 const Vector3& sphericityMajorAxis() const { return _sphAxes[1]; }
107 const Vector3& sphericityMinorAxis() const { return _sphAxes[2]; }
109
110
113 const Vector3& axis1() const { return sphericityAxis(); }
114 const Vector3& axis2() const { return sphericityMajorAxis(); }
115 const Vector3& axis3() const { return sphericityMinorAxis(); }
117
118
121 double lambda1() const { return _lambdas[0]; }
122 double lambda2() const { return _lambdas[1]; }
123 double lambda3() const { return _lambdas[2]; }
125
126 Vector3 mkEigenVector(Matrix3 A, const double &lambda);
127
131
133 void calc(const FinalState& fs);
134
136 void calc(const Particles& particles);
137
139 void calc(const Jets& jets);
140
142 void calc(const vector<FourMomentum>& momenta);
143
147 void calc(const vector<Vector3>& momenta);
148
150
151
152 protected:
153
155 vector<double> _lambdas;
156
158 vector<Vector3> _sphAxes;
159
161 const double _regparam;
162
163 };
164
165
166}
167
168#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
Calculate the sphericity event shape.
Definition Sphericity.hh:51
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition Sphericity.hh:115
const Vector3 & axis1() const
Definition Sphericity.hh:113
void project(const Event &e)
Perform the projection on the Event.
double transSphericity() const
Transverse sphericity.
Definition Sphericity.hh:92
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:94
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:96
void calc(const Jets &jets)
Manually calculate the sphericity, without engaging the caching system.
const Vector3 & sphericityMinorAxis() const
Sphericity minor axis.
Definition Sphericity.hh:107
RIVET_DEFAULT_PROJ_CLONE(Sphericity)
Clone on the heap.
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition Sphericity.hh:114
const Vector3 & sphericityMajorAxis() const
Sphericity major axis.
Definition Sphericity.hh:105
void calc(const vector< Vector3 > &momenta)
Manually calculate the sphericity, without engaging the caching system.
Three-dimensional specialisation of Vector.
Definition Vector3.hh:40
Definition MC_CENT_PPB_Projections.hh:10