rivet is hosted by Hepforge, IPPP Durham
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/Projections/FinalState.hh"
00006 #include "Rivet/Projections/AxesDefinition.hh"
00007 
00008 
00009 namespace Rivet {
00010 
00011   /// @brief Calculate the hemisphere masses and broadenings.
00012   ///
00013   /// Calculate the hemisphere masses and broadenings, with event hemispheres
00014   /// defined by the plane normal to the thrust vector, \f$ \vec{n}_\mathrm{T} \f$.
00015   ///
00016   /// The "high" hemisphere mass,
00017   /// \f$ M^2_\mathrm{high} / E^2_\mathrm{vis} \f$, is defined as
00018   /// \f[
00019   /// \frac{M^2_\mathrm{high}}{E^2_\mathrm{vis}} =
00020   /// \frac{1}{E^2_\mathrm{vis}} \max
00021   /// \left(
00022   /// \left| \sum_{\vec{p}_k \cdot \vec{n}_\mathrm{T} > 0} p_k \right|^2 ,
00023   /// \left| \sum_{\vec{p}_k \cdot \vec{n}_\mathrm{T} < 0} p_k \right|^2
00024   /// \right)
00025   /// \f]
00026   /// and the corresponding "low" hemisphere mass,
00027   /// \f$ M^2_\mathrm{low} / E^2_\mathrm{vis} \f$,
00028   /// is the sum of momentum vectors in the opposite hemisphere, i.e.
00029   /// \f$ \max \rightarrow \min \f$ in the formula above.
00030   ///
00031   /// Finally, we define a hemisphere mass difference:
00032   /// \f[
00033   /// \frac{M^2_\mathrm{diff} }{ E^2_\mathrm{vis}} =
00034   /// \frac{ M^2_\mathrm{high} - M^2_\mathrm{low} }{ E^2_\mathrm{vis}} .
00035   /// \f]
00036   ///
00037   /// Similarly to the masses, we also define hemisphere broadenings, using the
00038   /// momenta transverse to the thrust axis:
00039   /// \f[
00040   /// B_\pm =
00041   /// \frac{
00042   ///   \sum{\pm \vec{p}_i \cdot \vec{n}_\mathrm{T} > 0}
00043   ///   |\vec{p}_i \times \vec{n}_\mathrm{T} |
00044   /// }{
00045   ///   2 \sum_i | \vec{p}_i |
00046   /// }
00047   /// \f]
00048   /// and then a set of the broadening maximum, minimum, sum and difference as follows:
00049   /// \f[ B_\mathrm{max}  = \max(B_+, B_-) \f]
00050   /// \f[ B_\mathrm{min}  = \min(B_+, B_-) \f]
00051   /// \f[ B_\mathrm{sum}  = B_+ + B_- \f]
00052   /// \f[ B_\mathrm{diff} = |B_+ - B_-| \f]
00053   ///
00054   /// Internally, this projection uses a Thrust or Sphericity projection to
00055   /// determine the hemisphere orientation.
00056   class Hemispheres : public Projection {
00057   public:
00058 
00059     /// Constructor.
00060     Hemispheres(const AxesDefinition& ax) {
00061       setName("Hemispheres");
00062       addProjection(ax, "Axes");
00063       clear();
00064     }
00065 
00066     /// Clone on the heap.
00067     virtual const Projection* clone() const {
00068       return new Hemispheres(*this);
00069     }
00070 
00071     /// Reset the projection
00072     void clear() {
00073       _E2vis = -1;
00074       _M2high = -1;
00075       _M2low = -1;
00076       _Bmax = -1;
00077       _Bmin = -1;
00078       _highMassEqMaxBroad = true;
00079     }
00080 
00081     /// Use the projection manually (i.e. outside the projection mechanism) with raw 4-momentum inputs.
00082     void calc(const Vector3& n, const std::vector<FourMomentum>& p4s);
00083     /// Use the projection manually (i.e. outside the projection mechanism) with particle inputs.
00084     void calc(const Vector3& n, const Particles& particles);
00085     /// Use the projection manually (i.e. outside the projection mechanism) with jet inputs.
00086     void calc(const Vector3& n, const Jets& jets);
00087 
00088 
00089   protected:
00090 
00091     /// Perform the projection on the Event.
00092     void project(const Event& e);
00093 
00094     /// Compare with other projections.
00095     int compare(const Projection& p) const {
00096       return mkNamedPCmp(p, "Axes");
00097     }
00098 
00099 
00100   public:
00101 
00102     /// @name Hemisphere masses (scaled by \f$ 1 / E^2_\mathrm{vis} \f$).
00103     //@{
00104 
00105     double E2vis() const { return _E2vis; }
00106     double Evis() const { return sqrt(_E2vis); }
00107 
00108     double M2high() const { return _M2high; }
00109     double Mhigh() const { return sqrt(M2high()); }
00110 
00111     double M2low() const { return _M2low; }
00112     double Mlow() const { return sqrt(M2low()); }
00113 
00114     double M2diff() const { return _M2high -_M2low; }
00115     double Mdiff() const { return sqrt(M2diff()); }
00116 
00117     double M2sum() const { return _M2high +_M2low; }
00118     double Msum() const { return sqrt(M2sum()); }
00119 
00120     double scaledM2high() const {
00121       if (isZero(_M2high)) return 0.0;
00122       if (!isZero(_E2vis)) return _M2high/_E2vis;
00123       else return std::numeric_limits<double>::max();
00124     }
00125     double scaledMhigh() const { return sqrt(scaledM2high()); }
00126 
00127     double scaledM2low() const {
00128       if (isZero(_M2low)) return 0.0;
00129       if (!isZero(_E2vis)) return _M2low/_E2vis;
00130       else return std::numeric_limits<double>::max();
00131     }
00132     double scaledMlow() const { return sqrt(scaledM2low()); }
00133 
00134     double scaledM2diff() const {
00135       if (M2diff() == 0.0) return 0.0;
00136       if (_E2vis != 0.0) return M2diff()/_E2vis;
00137       else return std::numeric_limits<double>::max();
00138     }
00139     double scaledMdiff() const { return sqrt(scaledM2diff()); }
00140     //@}
00141 
00142 
00143     /// @name Hemisphere broadenings.
00144     //@{
00145     double Bmax() const { return _Bmax; }
00146     double Bmin() const { return _Bmin; }
00147     double Bsum() const { return _Bmax + _Bmin; }
00148     double Bdiff() const { return fabs(_Bmax - _Bmin); } // <- fabs(), just in case...
00149     //@}
00150 
00151 
00152     /// Is the hemisphere with the max mass the same as the one with the max broadening?
00153     bool massMatchesBroadening() {
00154       return _highMassEqMaxBroad;
00155     }
00156 
00157 
00158   private:
00159 
00160     /// Visible energy-squared, \f$ E^2_\mathrm{vis} \f$.
00161     double _E2vis;
00162 
00163     /// Hemisphere mass variables.
00164     double _M2high, _M2low;
00165 
00166     /// Hemisphere broadening variables.
00167     double _Bmax, _Bmin;
00168 
00169     /// Is the hemisphere with the max mass the same as the one with the max broadening?
00170     bool _highMassEqMaxBroad;
00171 
00172   };
00173 
00174 
00175 }
00176 
00177 #endif