2 #ifndef RIVET_Hemispheres_HH 3 #define RIVET_Hemispheres_HH 5 #include "Rivet/Projection.hh" 6 #include "Rivet/Projections/FinalState.hh" 7 #include "Rivet/Projections/AxesDefinition.hh" 8 #include "Rivet/Event.hh" 80 _highMassEqMaxBroad =
true;
100 double E2vis()
const {
return _E2vis; }
101 double Evis()
const {
return sqrt(_E2vis); }
103 double M2high()
const {
return _M2high; }
104 double Mhigh()
const {
return sqrt(M2high()); }
106 double M2low()
const {
return _M2low; }
107 double Mlow()
const {
return sqrt(M2low()); }
109 double M2diff()
const {
return _M2high -_M2low; }
110 double Mdiff()
const {
return sqrt(M2diff()); }
112 double scaledM2high()
const {
113 if (
isZero(_M2high))
return 0.0;
114 if (!
isZero(_E2vis))
return _M2high/_E2vis;
115 else return std::numeric_limits<double>::max();
117 double scaledMhigh()
const {
return sqrt(scaledM2high()); }
119 double scaledM2low()
const {
120 if (
isZero(_M2low))
return 0.0;
121 if (!
isZero(_E2vis))
return _M2low/_E2vis;
122 else return std::numeric_limits<double>::max();
124 double scaledMlow()
const {
return sqrt(scaledM2low()); }
126 double scaledM2diff()
const {
127 if (M2diff() == 0.0)
return 0.0;
128 if (_E2vis != 0.0)
return M2diff()/_E2vis;
129 else return std::numeric_limits<double>::max();
131 double scaledMdiff()
const {
return sqrt(scaledM2diff()); }
137 double Bmax()
const {
return _Bmax; }
138 double Bmin()
const {
return _Bmin; }
139 double Bsum()
const {
return _Bmax + _Bmin; }
140 double Bdiff()
const {
return fabs(_Bmax - _Bmin); }
146 return _highMassEqMaxBroad;
156 double _M2high, _M2low;
162 bool _highMassEqMaxBroad;
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:20
Hemispheres(const AxesDefinition &ax)
Constructor.
Definition: Hemispheres.hh:62
Calculate the hemisphere masses and broadenings.
Definition: Hemispheres.hh:58
int compare(const Projection &p) const
Compare with other projections.
Definition: Hemispheres.hh:90
bool isZero(double val, double tolerance=1E-8)
Definition: MathUtils.hh:17
void project(const Event &e)
Perform the projection on the Event.
Definition: Hemispheres.cc:7
bool massMatchesBroadening()
Is the hemisphere with the max mass the same as the one with the max broadening?
Definition: Hemispheres.hh:145
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Base class for all Rivet projections.
Definition: Projection.hh:28
virtual const Projection * clone() const
Clone on the heap.
Definition: Hemispheres.hh:69