Hemispheres.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
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      @brief Calculate the hemisphere masses and broadenings.
00015 
00016      Calculate the hemisphere masses and broadenings, with event hemispheres
00017      defined by the plane normal to the thrust vector, \f$ \vec{n}_\mathrm{T} \f$.
00018 
00019      The "high" hemisphere mass, 
00020      \f$ M^2_\mathrm{high} / E^2_\mathrm{vis} \f$, is defined as
00021      \f[
00022      \frac{M^2_\mathrm{high}}{E^2_\mathrm{vis}} = 
00023      \frac{1}{E^2_\mathrm{vis}} \max
00024      \left(
00025      \left| \sum_{\vec{p}_k \cdot \vec{n}_\mathrm{T} > 0} p_k \right|^2 ,
00026      \left| \sum_{\vec{p}_k \cdot \vec{n}_\mathrm{T} < 0} p_k \right|^2
00027      \right)
00028      \f]
00029      and the corresponding "low" hemisphere mass, 
00030      \f$ M^2_\mathrm{low} / E^2_\mathrm{vis} \f$,
00031      is the sum of momentum vectors in the opposite hemisphere, i.e. 
00032      \f$ \max \rightarrow \min \f$ in the formula above.
00033 
00034      Finally, we define a hemisphere mass difference:
00035      \f[
00036      \frac{M^2_\mathrm{diff} }{ E^2_\mathrm{vis}} = 
00037      \frac{ M^2_\mathrm{high} - M^2_\mathrm{low} }{ E^2_\mathrm{vis}} .
00038      \f]
00039 
00040      Similarly to the masses, we also define hemisphere broadenings, using the
00041      momenta transverse to the thrust axis:
00042      \f[
00043      B_\pm =
00044      \frac{
00045        \sum{\pm \vec{p}_i \cdot \vec{n}_\mathrm{T} > 0} 
00046        |\vec{p}_i \cross \vec{n}_\mathrm{T} | 
00047      }{
00048        2 \sum_i | \vec{p}_i | 
00049      }
00050      \f]
00051      and then a set of the broadening maximum, minimum, sum and difference as follows:
00052      \f[
00053      B_\mathrm{max}  = \max(B_+, B_-)\\
00054      B_\mathrm{min}  = \min(B_+, B_-)\\
00055      B_\mathrm{sum}  = B_+ + B_-\\
00056      B_\mathrm{diff} = |B_+ - B_-|
00057      \f]
00058 
00059      Internally, this projection uses the Thrust projection to determine the
00060      hemisphere orientation.
00061   */
00062   class Hemispheres : public Projection {
00063   public:
00064 
00065     /// Constructor. The provided FinalState projection must live throughout the run.
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     /// Return the name of the projection
00076     inline string getName() const {
00077       return "Hemispheres";
00078     }
00079 
00080 
00081   protected:
00082 
00083     /// Perform the projection on the Event.
00084     void project(const Event& e);
00085 
00086     /// Compare with other projections.
00087     inline int compare(const Projection& p) const {
00088       return 0;
00089     }
00090 
00091 
00092   public:
00093 
00094     /// @name Hemisphere masses (scaled by \f$ 1 / E^2_\mathrm{vis} \f$).
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     /// @name Hemisphere broadenings.
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); } // <- fabs(), just in case...
00124     ///@}
00125 
00126 
00127     /// Is the hemisphere with the max mass the same as the one with the max broadening?
00128     inline const bool massMatchesBroadening() {
00129       return _highMassEqMaxBroad;
00130     }
00131 
00132         
00133   private:
00134 
00135     /// Visible energy-squared, \f$ E^2_\mathrm{vis} \f$.
00136     double _E2vis;
00137 
00138     /// Hemisphere mass variables.
00139     double _M2high, _M2low;
00140 
00141     /// Hemisphere broadening variables.
00142     double _Bmax, _Bmin;
00143 
00144     /// Is the hemisphere with the max mass the same as the one with the max broadening?
00145     bool _highMassEqMaxBroad;
00146 
00147     /// The final state projection used to iterate over particles.
00148     FinalState _fsproj;
00149     
00150     /// The Thrust projection used to get the hemisphere alignment.
00151     Thrust _thrustproj;
00152 
00153   };
00154 
00155 }
00156 
00157 #endif