00001
00002 #ifndef RIVET_Hemispheres_HH
00003 #define RIVET_Hemispheres_HH
00004
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Projections/Thrust.hh"
00008 #include "Rivet/Event.hh"
00009
00010
00011 namespace Rivet {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 class Hemispheres : public Projection {
00063 public:
00064
00065
00066 inline Hemispheres(FinalState& fsp)
00067 : _E2vis(-1), _M2high(-1), _M2low(-1),
00068 _Bmax(-1), _Bmin(-1),
00069 _highMassEqMaxBroad(true),
00070 _fsproj(fsp), _thrustproj(fsp)
00071 {
00072 addProjection(_thrustproj);
00073 }
00074
00075
00076 inline string getName() const {
00077 return "Hemispheres";
00078 }
00079
00080
00081 protected:
00082
00083
00084 void project(const Event& e);
00085
00086
00087 inline int compare(const Projection& p) const {
00088 return 0;
00089 }
00090
00091
00092 public:
00093
00094
00095
00096 inline const double getE2vis() const { return _E2vis; }
00097 inline const double getM2high() const { return _M2high; }
00098 inline const double getM2low() const { return _M2low; }
00099 inline const double getM2diff() const { return _M2high -_M2low; }
00100 inline const double getScaledM2high() const {
00101 if (_M2high == 0.0) return 0.0;
00102 if (_E2vis != 0.0) return _M2high/_E2vis;
00103 else return std::numeric_limits<double>::max();
00104 }
00105 inline const double getScaledM2low() const {
00106 if (_M2low == 0.0) return 0.0;
00107 if (_E2vis != 0.0) return _M2low/_E2vis;
00108 else return std::numeric_limits<double>::max();
00109 }
00110 inline const double getScaledM2diff() const {
00111 if (getM2diff() == 0.0) return 0.0;
00112 if (_E2vis != 0.0) return getM2diff()/_E2vis;
00113 else return std::numeric_limits<double>::max();
00114 }
00115
00116
00117
00118
00119
00120 inline const double getBmax() const { return _Bmax; }
00121 inline const double getBmin() const { return _Bmin; }
00122 inline const double getBsum() const { return _Bmax + _Bmin; }
00123 inline const double getBdiff() const { return fabs(_Bmax - _Bmin); }
00124
00125
00126
00127
00128 inline const bool massMatchesBroadening() {
00129 return _highMassEqMaxBroad;
00130 }
00131
00132
00133 private:
00134
00135
00136 double _E2vis;
00137
00138
00139 double _M2high, _M2low;
00140
00141
00142 double _Bmax, _Bmin;
00143
00144
00145 bool _highMassEqMaxBroad;
00146
00147
00148 FinalState _fsproj;
00149
00150
00151 Thrust _thrustproj;
00152
00153 };
00154
00155 }
00156
00157 #endif