File indexing completed on 2026-12-03 11:04:26
0001
0002 #ifndef RIVET_Hemispheres_HH
0003 #define RIVET_Hemispheres_HH
0004
0005 #include "Rivet/Projections/AxesDefinition.hh"
0006 #include "Rivet/Projections/FinalState.hh"
0007
0008 namespace Rivet {
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 class Hemispheres : public Projection {
0057 public:
0058
0059
0060 Hemispheres(const AxesDefinition& ax) {
0061 setName("Hemispheres");
0062 declare(ax, "Axes");
0063 clear();
0064 }
0065
0066
0067 RIVET_DEFAULT_PROJ_CLONE(Hemispheres);
0068
0069
0070 using Projection::operator=;
0071
0072
0073
0074 void clear() {
0075 _E2vis = -1;
0076 _M2high = -1;
0077 _M2low = -1;
0078 _Bmax = -1;
0079 _Bmin = -1;
0080 _highMassEqMaxBroad = true;
0081 }
0082
0083
0084 void calc(const Vector3& n, const std::vector<FourMomentum>& p4s);
0085
0086 void calc(const Vector3& n, const Particles& particles);
0087
0088 void calc(const Vector3& n, const Jets& jets);
0089
0090
0091 protected:
0092
0093
0094 void project(const Event& e);
0095
0096
0097 CmpState compare(const Projection& p) const {
0098 return mkNamedPCmp(p, "Axes");
0099 }
0100
0101
0102 public:
0103
0104
0105
0106
0107 double E2vis() const {
0108 return _E2vis;
0109 }
0110 double Evis() const {
0111 return sqrt(_E2vis);
0112 }
0113
0114 double M2high() const {
0115 return _M2high;
0116 }
0117 double Mhigh() const {
0118 return sqrt(M2high());
0119 }
0120
0121 double M2low() const {
0122 return _M2low;
0123 }
0124 double Mlow() const {
0125 return sqrt(M2low());
0126 }
0127
0128 double M2diff() const {
0129 return _M2high - _M2low;
0130 }
0131 double Mdiff() const {
0132 return sqrt(M2diff());
0133 }
0134
0135 double M2sum() const {
0136 return _M2high + _M2low;
0137 }
0138 double Msum() const {
0139 return sqrt(M2sum());
0140 }
0141
0142 double scaledM2high() const {
0143 if (isZero(_M2high)) return 0.0;
0144 if (!isZero(_E2vis))
0145 return _M2high / _E2vis;
0146 else
0147 return std::numeric_limits<double>::max();
0148 }
0149 double scaledMhigh() const {
0150 return sqrt(scaledM2high());
0151 }
0152
0153 double scaledM2low() const {
0154 if (isZero(_M2low)) return 0.0;
0155 if (!isZero(_E2vis))
0156 return _M2low / _E2vis;
0157 else
0158 return std::numeric_limits<double>::max();
0159 }
0160 double scaledMlow() const {
0161 return sqrt(scaledM2low());
0162 }
0163
0164 double scaledM2diff() const {
0165 if (M2diff() == 0.0) return 0.0;
0166 if (_E2vis != 0.0)
0167 return M2diff() / _E2vis;
0168 else
0169 return std::numeric_limits<double>::max();
0170 }
0171 double scaledMdiff() const {
0172 return sqrt(scaledM2diff());
0173 }
0174
0175
0176
0177
0178
0179 double Bmax() const {
0180 return _Bmax;
0181 }
0182 double Bmin() const {
0183 return _Bmin;
0184 }
0185 double Bsum() const {
0186 return _Bmax + _Bmin;
0187 }
0188 double Bdiff() const {
0189 return fabs(_Bmax - _Bmin);
0190 }
0191
0192
0193
0194
0195 bool massMatchesBroadening() const {
0196 return _highMassEqMaxBroad;
0197 }
0198
0199
0200 bool highMassDirection() const {
0201 return _highMassDirection;
0202 }
0203
0204
0205 protected:
0206
0207
0208 double _E2vis;
0209
0210
0211 double _M2high, _M2low;
0212
0213
0214 double _Bmax, _Bmin;
0215
0216
0217 bool _highMassEqMaxBroad;
0218
0219
0220 bool _highMassDirection;
0221 };
0222
0223
0224 }
0225
0226 #endif