Rivet: /Users/chrisg/software/rivet/include/Rivet/Projections/Spherocity.hh Source File

| Rivet 3.1.9

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
10namespace 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
43 DEFAULT_RIVET_PROJ_CLONE(Spherocity);
44
46 using Projection::operator =;
47
48
49 protected:
50
52 void project(const Event& e) {
53 const vector<Particle> ps
54 = applyProjection<FinalState>(e, "FS").particles();
55 calc(ps);
56 }
57
58
60 CmpState compare(const Projection& p) const {
61 return mkNamedPCmp(p, "FS");
62 }
63
64
65 public:
66
68
69
70 double spherocity() const { return _spherocities[0]; }
72
73
75
76
77 const Vector3& spherocityAxis() const { return _spherocityAxes[0]; }
79 const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; }
81 const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; }
83
84
86
87 const Vector3& axis1() const { return spherocityAxis(); }
88 const Vector3& axis2() const { return spherocityMajorAxis(); }
89 const Vector3& axis3() const { return spherocityMinorAxis(); }
91
92
93 public:
94
97
98
100 void calc(const FinalState& fs);
101
103 void calc(const vector<Particle>& fsparticles);
104
106 void calc(const vector<FourMomentum>& fsmomenta);
107
109 void calc(const vector<Vector3>& threeMomenta);
110
112
113
114 protected:
115
117 vector<double> _spherocities;
118
120 vector<Vector3> _spherocityAxes;
121
122
123 protected:
124
126 void _calcSpherocity(const vector<Vector3>& fsmomenta);
127
128 };
129
130}
131
132#endif
Rivet::AxesDefinition
Base class for projections which define a spatial basis.
Definition AxesDefinition.hh:19
Rivet::Event
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Rivet::ProjectionApplier::declare
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
Rivet::Projection
Base class for all Rivet projections.
Definition Projection.hh:29
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:142
Rivet::Projection::mkNamedPCmp
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Rivet::Spherocity
Get the transverse spherocity scalars for hadron-colliders.
Definition Spherocity.hh:30
Rivet::Spherocity::axis1
const Vector3 & axis1() const
Definition Spherocity.hh:87
Rivet::Spherocity::axis2
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition Spherocity.hh:88
Rivet::Spherocity::project
void project(const Event &e)
Perform the projection on the Event.
Definition Spherocity.hh:52
Rivet::Spherocity::axis3
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition Spherocity.hh:89
Rivet::Spherocity::Spherocity
Spherocity(const FinalState &fsp)
Constructor.
Definition Spherocity.hh:37
Rivet::Spherocity::spherocityAxis
const Vector3 & spherocityAxis() const
The spherocity axis.
Definition Spherocity.hh:77
Rivet::Spherocity::spherocityMajorAxis
const Vector3 & spherocityMajorAxis() const
The spherocity major axis (axis of max spherocity perpendicular to spherocity axis).
Definition Spherocity.hh:79
Rivet::Spherocity::calc
void calc(const FinalState &fs)
Manually calculate the spherocity, without engaging the caching system.
Rivet::Spherocity::spherocityMinorAxis
const Vector3 & spherocityMinorAxis() const
The spherocity minor axis (axis perpendicular to spherocity and spherocity major).
Definition Spherocity.hh:81
Rivet::Spherocity::calc
void calc(const vector< FourMomentum > &fsmomenta)
Manually calculate the spherocity, without engaging the caching system.
Rivet::Spherocity::calc
void calc(const vector< Vector3 > &threeMomenta)
Manually calculate the spherocity, without engaging the caching system.
Rivet::Spherocity::calc
void calc(const vector< Particle > &fsparticles)
Manually calculate the spherocity, without engaging the caching system.
Rivet::Spherocity::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(Spherocity)
Clone on the heap.
Rivet::Spherocity::compare
CmpState compare(const Projection &p) const
Compare projections.
Definition Spherocity.hh:60
Rivet::Spherocity::spherocity
double spherocity() const
The spherocity scalar, , (minimum spherocity).
Definition Spherocity.hh:70
Rivet::Vector3
Three-dimensional specialisation of Vector.
Definition Vector3.hh:40
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet
Definition MC_Cent_pPb.hh:10