2#ifndef RIVET_Hemispheres_HH
3#define RIVET_Hemispheres_HH
5#include "Rivet/Projections/AxesDefinition.hh"
6#include "Rivet/Projections/FinalState.hh"
70 using Projection::operator=;
80 _highMassEqMaxBroad =
true;
84 void calc(
const Vector3& n,
const std::vector<FourMomentum>& p4s);
107 double E2vis()
const {
110 double Evis()
const {
114 double M2high()
const {
117 double Mhigh()
const {
118 return sqrt(M2high());
121 double M2low()
const {
124 double Mlow()
const {
125 return sqrt(M2low());
128 double M2diff()
const {
129 return _M2high - _M2low;
131 double Mdiff()
const {
132 return sqrt(M2diff());
135 double M2sum()
const {
136 return _M2high + _M2low;
138 double Msum()
const {
139 return sqrt(M2sum());
142 double scaledM2high()
const {
143 if (
isZero(_M2high))
return 0.0;
145 return _M2high / _E2vis;
147 return std::numeric_limits<double>::max();
149 double scaledMhigh()
const {
150 return sqrt(scaledM2high());
153 double scaledM2low()
const {
154 if (
isZero(_M2low))
return 0.0;
156 return _M2low / _E2vis;
158 return std::numeric_limits<double>::max();
160 double scaledMlow()
const {
161 return sqrt(scaledM2low());
164 double scaledM2diff()
const {
165 if (M2diff() == 0.0)
return 0.0;
167 return M2diff() / _E2vis;
169 return std::numeric_limits<double>::max();
171 double scaledMdiff()
const {
172 return sqrt(scaledM2diff());
179 double Bmax()
const {
182 double Bmin()
const {
185 double Bsum()
const {
186 return _Bmax + _Bmin;
188 double Bdiff()
const {
189 return fabs(_Bmax - _Bmin);
196 return _highMassEqMaxBroad;
201 return _highMassDirection;
211 double _M2high, _M2low;
217 bool _highMassEqMaxBroad;
220 bool _highMassDirection;
Base class for projections which define a spatial basis.
Definition AxesDefinition.hh:19
RIVET_DEFAULT_PROJ_CLONE(Hemispheres)
Clone on the heap.
void project(const Event &e)
Perform the projection on the Event.
void calc(const Vector3 &n, const Jets &jets)
Use the projection manually (i.e. outside the projection mechanism) with jet inputs.
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.
Hemispheres(const AxesDefinition &ax)
Constructor.
Definition Hemispheres.hh:60
void clear()
Reset the projection.
Definition Hemispheres.hh:74
bool massMatchesBroadening() const
Is the hemisphere with the max mass the same as the one with the max broadening?
Definition Hemispheres.hh:195
CmpState compare(const Projection &p) const
Compare with other projections.
Definition Hemispheres.hh:97
void calc(const Vector3 &n, const Particles &particles)
Use the projection manually (i.e. outside the projection mechanism) with particle inputs.
bool highMassDirection() const
Is the hemisphere with the max mass the one in the direction of the axis.
Definition Hemispheres.hh:200
Specialised vector of Jet objects.
Definition Jet.hh:21
Specialised vector of Particle objects.
Definition Particle.hh:21
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:205
Projection()
The default constructor.
friend class Event
Event is a friend.
Definition Projection.hh:33
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:146
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Three-dimensional specialisation of Vector.
Definition Vector3.hh:39
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
Definition LHCbCommon.hh:9
std::enable_if_t< std::is_floating_point_v< NUM >, bool > isZero(NUM val, double tolerance=1e-8)
Compare a number to zero.
Definition MathUtils.hh:23