rivet is hosted by Hepforge, IPPP Durham
Spherocity.hh
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_Spherocity_HH
00003 #define RIVET_Spherocity_HH
00004 
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Projections/AxesDefinition.hh"
00007 #include "Rivet/Projections/FinalState.hh"
00008 #include "Rivet/Event.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// @brief Get the transverse spherocity scalars for hadron-colliders.
00014   ///
00015   /// @author Holger Schulz
00016   ///
00017   /// The scalar (minimum) transverse spherocity is defined as
00018   /// \f[
00019   /// S = \frac{\pi^2}{4} \mathrm{min}_{\vec{n}_\perp} \left( \frac{\sum_i \left|\vec{p}_{\perp,i} \times \vec{n}_\perp \right|}{\sum_i |\vec{p}_{\perp,i}|} \right)^2
00020   /// \f],
00021   /// with the direction of the unit vector \f$ \vec{n_\perp} \f$ which minimises \f$ T \f$
00022   /// being identified as the spherocity axis. The unit vector which maximises the spherocity
00023   /// scalar in the plane perpendicular to \f$ \vec{n} \f$ is the "spherocity major"
00024   /// direction, and the vector perpendicular to both the spherocity and spherocity major directions
00025   /// is the spherocity minor. Both the major and minor directions have associated spherocity
00026   /// scalars.
00027   ///
00028   /// Care must be taken in the case of Drell-Yan processes - there we should use the
00029   /// newly proposed observable \f$ a_T \f$.
00030   class Spherocity : public AxesDefinition {
00031   public:
00032 
00033     // Default Constructor
00034     Spherocity() {}
00035 
00036     /// Constructor.
00037     Spherocity(const FinalState& fsp)
00038       : _calculatedSpherocity(false)
00039     {
00040       setName("Spherocity");
00041       addProjection(fsp, "FS");
00042     }
00043 
00044     /// Clone on the heap.
00045     virtual const Projection* clone() const {
00046       return new Spherocity(*this);
00047     }
00048 
00049 
00050   protected:
00051 
00052     /// Perform the projection on the Event
00053     void project(const Event& e) {
00054       const vector<Particle> ps
00055         = applyProjection<FinalState>(e, "FS").particles();
00056       calc(ps);
00057     }
00058 
00059 
00060     /// Compare projections
00061     int compare(const Projection& p) const {
00062       return mkNamedPCmp(p, "FS");
00063     }
00064 
00065 
00066   public:
00067 
00068     /// @name Spherocity scalar accessors
00069     //@{
00070     /// The spherocity scalar, \f$ S \f$, (minimum spherocity).
00071     double spherocity() const { return _spherocities[0]; }
00072     //@}
00073 
00074 
00075     /// @name Spherocity axis accessors
00076     //@{
00077     /// The spherocity axis.
00078     const Vector3& spherocityAxis() const { return _spherocityAxes[0]; }
00079     /// The spherocity major axis (axis of max spherocity perpendicular to spherocity axis).
00080     const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; }
00081     /// The spherocity minor axis (axis perpendicular to spherocity and spherocity major).
00082     const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; }
00083     //@}
00084 
00085 
00086     /// @name AxesDefinition axis accessors.
00087     //@{
00088     const Vector3& axis1() const { return spherocityAxis(); }
00089     const Vector3& axis2() const { return spherocityMajorAxis(); }
00090     const Vector3& axis3() const { return spherocityMinorAxis(); }
00091     ///@}
00092 
00093 
00094   public:
00095 
00096     /// @name Direct methods
00097     /// Ways to do the calculation directly, without engaging the caching system
00098     //@{
00099 
00100     /// Manually calculate the spherocity, without engaging the caching system
00101     void calc(const FinalState& fs);
00102 
00103     /// Manually calculate the spherocity, without engaging the caching system
00104     void calc(const vector<Particle>& fsparticles);
00105 
00106     /// Manually calculate the spherocity, without engaging the caching system
00107     void calc(const vector<FourMomentum>& fsmomenta);
00108 
00109     /// Manually calculate the spherocity, without engaging the caching system
00110     void calc(const vector<Vector3>& threeMomenta);
00111 
00112     //@}
00113 
00114 
00115   private:
00116 
00117     /// The spherocity scalars.
00118     vector<double> _spherocities;
00119 
00120     /// The spherocity axes.
00121     vector<Vector3> _spherocityAxes;
00122 
00123     /// Caching flag to avoid costly recalculations.
00124     bool _calculatedSpherocity;
00125 
00126 
00127   private:
00128 
00129     /// Explicitly calculate the spherocity values.
00130     void _calcSpherocity(const vector<Vector3>& fsmomenta);
00131 
00132   };
00133 
00134 }
00135 
00136 #endif