Spherocity.hh
// -*- C++ -*-
#ifndef RIVET_Spherocity_HH
#define RIVET_Spherocity_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/AxesDefinition.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Event.hh"
namespace Rivet {
class Spherocity : public AxesDefinition {
public:
// Default Constructor
Spherocity() {}
Spherocity(const FinalState& fsp)
: _calculatedSpherocity(false)
{
setName("Spherocity");
addProjection(fsp, "FS");
}
virtual const Projection* clone() const {
return new Spherocity(*this);
}
protected:
void project(const Event& e) {
const vector<Particle> ps
= applyProjection<FinalState>(e, "FS").particles();
calc(ps);
}
int compare(const Projection& p) const {
return mkNamedPCmp(p, "FS");
}
public:
double spherocity() const { return _spherocities[0]; }
const Vector3& spherocityAxis() const { return _spherocityAxes[0]; }
const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; }
const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; }
const Vector3& axis1() const { return spherocityAxis(); }
const Vector3& axis2() const { return spherocityMajorAxis(); }
const Vector3& axis3() const { return spherocityMinorAxis(); }
public:
void calc(const FinalState& fs);
void calc(const vector<Particle>& fsparticles);
void calc(const vector<FourMomentum>& fsmomenta);
void calc(const vector<Vector3>& threeMomenta);
private:
vector<double> _spherocities;
vector<Vector3> _spherocityAxes;
bool _calculatedSpherocity;
private:
void _calcSpherocity(const vector<Vector3>& fsmomenta);
};
}
#endif
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Rivet::Spherocity::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: Spherocity.hh:48
Rivet::Spherocity::spherocityAxis
const Vector3 & spherocityAxis() const
Definition: Spherocity.hh:79
Rivet::AxesDefinition
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:20
Rivet::Spherocity::Spherocity
Spherocity(const FinalState &fsp)
Constructor.
Definition: Spherocity.hh:40
Rivet::Spherocity::spherocity
double spherocity() const
Definition: Spherocity.hh:73
Rivet::Spherocity::project
void project(const Event &e)
Perform the projection on the Event.
Definition: Spherocity.hh:56
Rivet::Spherocity
Get the transverse spherocity scalars for hadron-colliders.
Definition: Spherocity.hh:33
Rivet::Spherocity::axis2
const Vector3 & axis2() const
The 2nd most significant (&quot;major&quot;) axis.
Definition: Spherocity.hh:89
Rivet::Spherocity::calc
void calc(const FinalState &fs)
Manually calculate the spherocity, without engaging the caching system.
Definition: Spherocity.cc:10
Rivet::Event
Definition: Event.hh:22
Rivet::Spherocity::axis1
const Vector3 & axis1() const
AxesDefinition axis accessors.
Definition: Spherocity.hh:88
Rivet::Spherocity::compare
int compare(const Projection &p) const
Compare projections.
Definition: Spherocity.hh:64
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::ProjectionApplier::addProjection
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
Rivet::Projection::mkNamedPCmp
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::Spherocity::spherocityMajorAxis
const Vector3 & spherocityMajorAxis() const
The spherocity major axis (axis of max spherocity perpendicular to spherocity axis).
Definition: Spherocity.hh:81
Rivet::Vector3
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
Rivet::Spherocity::spherocityMinorAxis
const Vector3 & spherocityMinorAxis() const
The spherocity minor axis (axis perpendicular to spherocity and spherocity major).
Definition: Spherocity.hh:83
Rivet::Spherocity::axis3
const Vector3 & axis3() const
The least significant (&quot;minor&quot;) axis.
Definition: Spherocity.hh:90