Rivet  3.1.3
Spherocity.hh
1 // -*- C++ -*-
2 #ifndef RIVET_Spherocity_HH
3 #define RIVET_Spherocity_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 
10 namespace Rivet {
11 
12 
30  class Spherocity : public AxesDefinition {
31  public:
32 
33  // Default Constructor
34  Spherocity() {}
35 
37  Spherocity(const FinalState& fsp) {
38  setName("Spherocity");
39  declare(fsp, "FS");
40  }
41 
44 
45 
46  protected:
47 
49  void project(const Event& e) {
50  const vector<Particle> ps
51  = applyProjection<FinalState>(e, "FS").particles();
52  calc(ps);
53  }
54 
55 
57  CmpState compare(const Projection& p) const {
58  return mkNamedPCmp(p, "FS");
59  }
60 
61 
62  public:
63 
65 
66  double spherocity() const { return _spherocities[0]; }
69 
70 
72 
73  const Vector3& spherocityAxis() const { return _spherocityAxes[0]; }
76  const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; }
78  const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; }
80 
81 
83 
84  const Vector3& axis1() const { return spherocityAxis(); }
85  const Vector3& axis2() const { return spherocityMajorAxis(); }
86  const Vector3& axis3() const { return spherocityMinorAxis(); }
88 
89 
90  public:
91 
94 
95 
97  void calc(const FinalState& fs);
98 
100  void calc(const vector<Particle>& fsparticles);
101 
103  void calc(const vector<FourMomentum>& fsmomenta);
104 
106  void calc(const vector<Vector3>& threeMomenta);
107 
109 
110 
111  private:
112 
114  vector<double> _spherocities;
115 
117  vector<Vector3> _spherocityAxes;
118 
119 
120  private:
121 
123  void _calcSpherocity(const vector<Vector3>& fsmomenta);
124 
125  };
126 
127 }
128 
129 #endif
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition: Spherocity.hh:85
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
const Vector3 & spherocityMinorAxis() const
The spherocity minor axis (axis perpendicular to spherocity and spherocity major).
Definition: Spherocity.hh:78
CmpState compare(const Projection &p) const
Compare projections.
Definition: Spherocity.hh:57
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:19
Spherocity(const FinalState &fsp)
Constructor.
Definition: Spherocity.hh:37
void project(const Event &e)
Perform the projection on the Event.
Definition: Spherocity.hh:49
Get the transverse spherocity scalars for hadron-colliders.
Definition: Spherocity.hh:30
void calc(const FinalState &fs)
Manually calculate the spherocity, without engaging the caching system.
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition: Spherocity.hh:86
const Vector3 & spherocityMajorAxis() const
The spherocity major axis (axis of max spherocity perpendicular to spherocity axis).
Definition: Spherocity.hh:76
const Vector3 & axis1() const
Definition: Spherocity.hh:84
double spherocity() const
The spherocity scalar, , (minimum spherocity).
Definition: Spherocity.hh:67
DEFAULT_RIVET_PROJ_CLONE(Spherocity)
Clone on the heap.
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:12
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
const Vector3 & spherocityAxis() const
The spherocity axis.
Definition: Spherocity.hh:74
Base class for all Rivet projections.
Definition: Projection.hh:29
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26