File indexing completed on 2025-05-12 09:05:02
0001
0002 #ifndef RIVET_Hemispheres_HH
0003 #define RIVET_Hemispheres_HH
0004
0005 #include "Rivet/Projections/FinalState.hh"
0006 #include "Rivet/Projections/AxesDefinition.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 { return _E2vis; }
0108 double Evis() const { return sqrt(_E2vis); }
0109
0110 double M2high() const { return _M2high; }
0111 double Mhigh() const { return sqrt(M2high()); }
0112
0113 double M2low() const { return _M2low; }
0114 double Mlow() const { return sqrt(M2low()); }
0115
0116 double M2diff() const { return _M2high -_M2low; }
0117 double Mdiff() const { return sqrt(M2diff()); }
0118
0119 double M2sum() const { return _M2high +_M2low; }
0120 double Msum() const { return sqrt(M2sum()); }
0121
0122 double scaledM2high() const {
0123 if (isZero(_M2high)) return 0.0;
0124 if (!isZero(_E2vis)) return _M2high/_E2vis;
0125 else return std::numeric_limits<double>::max();
0126 }
0127 double scaledMhigh() const { return sqrt(scaledM2high()); }
0128
0129 double scaledM2low() const {
0130 if (isZero(_M2low)) return 0.0;
0131 if (!isZero(_E2vis)) return _M2low/_E2vis;
0132 else return std::numeric_limits<double>::max();
0133 }
0134 double scaledMlow() const { return sqrt(scaledM2low()); }
0135
0136 double scaledM2diff() const {
0137 if (M2diff() == 0.0) return 0.0;
0138 if (_E2vis != 0.0) return M2diff()/_E2vis;
0139 else return std::numeric_limits<double>::max();
0140 }
0141 double scaledMdiff() const { return sqrt(scaledM2diff()); }
0142
0143
0144
0145
0146
0147 double Bmax() const { return _Bmax; }
0148 double Bmin() const { return _Bmin; }
0149 double Bsum() const { return _Bmax + _Bmin; }
0150 double Bdiff() const { return fabs(_Bmax - _Bmin); }
0151
0152
0153
0154
0155 bool massMatchesBroadening() const {
0156 return _highMassEqMaxBroad;
0157 }
0158
0159
0160 bool highMassDirection() const {
0161 return _highMassDirection;
0162 }
0163
0164
0165 protected:
0166
0167
0168 double _E2vis;
0169
0170
0171 double _M2high, _M2low;
0172
0173
0174 double _Bmax, _Bmin;
0175
0176
0177 bool _highMassEqMaxBroad;
0178
0179
0180 bool _highMassDirection;
0181 };
0182
0183
0184 }
0185
0186 #endif