Sphericity.hh
// -*- C++ -*-
#ifndef RIVET_Sphericity_HH
#define RIVET_Sphericity_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/AxesDefinition.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Event.hh"
namespace Rivet {
class Sphericity : public AxesDefinition {
public:
Sphericity(double rparam=2.0): _regparam(rparam){}
Sphericity(const FinalState& fsp, double rparam=2.0);
virtual const Projection* clone() const {
return new Sphericity(*this);
}
protected:
void project(const Event& e);
int compare(const Projection& p) const;
public:
void clear();
double sphericity() const { return 3.0 / 2.0 * (lambda2() + lambda3()); }
double transSphericity() const { return 2.0 * lambda2() / ( lambda1() + lambda2() ); }
double planarity() const { return 2 * (sphericity() - 2 * aplanarity()) / 3.0; }
double aplanarity() const { return 3 / 2.0 * lambda3(); }
const Vector3& sphericityAxis() const { return _sphAxes[0]; }
const Vector3& sphericityMajorAxis() const { return _sphAxes[1]; }
const Vector3& sphericityMinorAxis() const { return _sphAxes[2]; }
const Vector3& axis1() const { return sphericityAxis(); }
const Vector3& axis2() const { return sphericityMajorAxis(); }
const Vector3& axis3() const { return sphericityMinorAxis(); }
double lambda1() const { return _lambdas[0]; }
double lambda2() const { return _lambdas[1]; }
double lambda3() const { return _lambdas[2]; }
void calc(const FinalState& fs);
void calc(const vector<Particle>& fsparticles);
void calc(const vector<FourMomentum>& fsmomenta);
void calc(const vector<Vector3>& fsmomenta);
private:
vector<double> _lambdas;
vector<Vector3> _sphAxes;
const double _regparam;
private:
void _calcSphericity(const vector<Vector3>& fsmomenta);
};
}
#endif
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::Sphericity::transSphericity
double transSphericity() const
Transverse Sphericity.
Definition: Sphericity.hh:89
Rivet::Sphericity::calc
void calc(const FinalState &fs)
Manually calculate the sphericity, without engaging the caching system.
Definition: Sphericity.cc:40
Rivet::Sphericity::project
void project(const Event &e)
Perform the projection on the Event.
Definition: Sphericity.cc:34
Rivet::Sphericity::axis3
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition: Sphericity.hh:109
Rivet::AxesDefinition
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:20
Rivet::Sphericity::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: Sphericity.hh:64
Rivet::Sphericity
Calculate the sphericity event shape.
Definition: Sphericity.hh:51
Rivet::Event
Definition: Event.hh:22
Rivet::Sphericity::aplanarity
double aplanarity() const
Aplanarity.
Definition: Sphericity.hh:93
Rivet::Sphericity::compare
int compare(const Projection &p) const
Compare with other projections.
Definition: Sphericity.cc:25
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::Sphericity::axis2
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition: Sphericity.hh:108
Rivet::Sphericity::axis1
const Vector3 & axis1() const
AxesDefinition axis accessors.
Definition: Sphericity.hh:107
Rivet::Sphericity::sphericityMajorAxis
const Vector3 & sphericityMajorAxis() const
Sphericity major axis.
Definition: Sphericity.hh:101
Rivet::Sphericity::planarity
double planarity() const
Planarity.
Definition: Sphericity.hh:91
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::Vector3
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
Rivet::Sphericity::Sphericity
Sphericity(double rparam=2.0)
Constructor.
Definition: Sphericity.hh:59
Rivet::Sphericity::clear
void clear()
Reset the projection.
Definition: Sphericity.cc:19
Rivet::Sphericity::sphericityMinorAxis
const Vector3 & sphericityMinorAxis() const
Sphericity minor axis.
Definition: Sphericity.hh:103