2 #ifndef RIVET_Hemispheres_HH 3 #define RIVET_Hemispheres_HH 5 #include "Rivet/Projections/FinalState.hh" 6 #include "Rivet/Projections/AxesDefinition.hh" 76 _highMassEqMaxBroad =
true;
80 void calc(
const Vector3& n,
const std::vector<FourMomentum>& p4s);
103 double E2vis()
const {
return _E2vis; }
104 double Evis()
const {
return sqrt(_E2vis); }
106 double M2high()
const {
return _M2high; }
107 double Mhigh()
const {
return sqrt(M2high()); }
109 double M2low()
const {
return _M2low; }
110 double Mlow()
const {
return sqrt(M2low()); }
112 double M2diff()
const {
return _M2high -_M2low; }
113 double Mdiff()
const {
return sqrt(M2diff()); }
115 double M2sum()
const {
return _M2high +_M2low; }
116 double Msum()
const {
return sqrt(M2sum()); }
118 double scaledM2high()
const {
119 if (
isZero(_M2high))
return 0.0;
120 if (!
isZero(_E2vis))
return _M2high/_E2vis;
121 else return std::numeric_limits<double>::max();
123 double scaledMhigh()
const {
return sqrt(scaledM2high()); }
125 double scaledM2low()
const {
126 if (
isZero(_M2low))
return 0.0;
127 if (!
isZero(_E2vis))
return _M2low/_E2vis;
128 else return std::numeric_limits<double>::max();
130 double scaledMlow()
const {
return sqrt(scaledM2low()); }
132 double scaledM2diff()
const {
133 if (M2diff() == 0.0)
return 0.0;
134 if (_E2vis != 0.0)
return M2diff()/_E2vis;
135 else return std::numeric_limits<double>::max();
137 double scaledMdiff()
const {
return sqrt(scaledM2diff()); }
143 double Bmax()
const {
return _Bmax; }
144 double Bmin()
const {
return _Bmin; }
145 double Bsum()
const {
return _Bmax + _Bmin; }
146 double Bdiff()
const {
return fabs(_Bmax - _Bmin); }
152 return _highMassEqMaxBroad;
162 double _M2high, _M2low;
168 bool _highMassEqMaxBroad;
int compare(const Projection &p) const
Compare with other projections.
Definition: Hemispheres.hh:93
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:133
Definition: ALICE_2010_I880049.cc:13
void calc(const Vector3 &n, const std::vector< FourMomentum > &p4s)
Use the projection manually (i.e. outside the projection mechanism) with raw 4-momentum inputs...
Definition: Hemispheres.cc:34
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:19
std::vector< GenParticle const * > particles(const GenEvent *ge)
Definition: RivetHepMC.hh:36
DEFAULT_RIVET_PROJ_CLONE(Hemispheres)
Clone on the heap.
Hemispheres(const AxesDefinition &ax)
Constructor.
Definition: Hemispheres.hh:60
Calculate the hemisphere masses and broadenings.
Definition: Hemispheres.hh:56
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
void project(const Event &e)
Perform the projection on the Event.
Definition: Hemispheres.cc:8
bool massMatchesBroadening()
Is the hemisphere with the max mass the same as the one with the max broadening?
Definition: Hemispheres.hh:151
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
void clear()
Reset the projection.
Definition: Hemispheres.hh:70
std::enable_if< std::is_floating_point< NUM >::value, bool >::type isZero(NUM val, double tolerance=1e-8)
Compare a number to zero.
Definition: MathUtils.hh:21
Base class for all Rivet projections.
Definition: Projection.hh:29
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26