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 /** 00014 @brief Get the transverse spherocity scalars for hadron-colliders. 00015 00016 @author Holger Schulz 00017 00018 The scalar (maximum) transverse spherocity is defined as 00019 \f[ 00020 T = \mathrm{max}_{\vec{n_\perp}} \frac{\sum_i \left|\vec{p}_{\perp,i} \cdot \vec{n} \right|}{\sum_i |\vec{p}_{\perp,i}|} 00021 \f], 00022 with the direction of the unit vector \f$ \vec{n_\perp} \f$ which maximises \f$ T \f$ 00023 being identified as the spherocity axis. The unit vector which maximises the spherocity 00024 scalar in the plane perpendicular to \f$ \vec{n} \f$ is the "spherocity major" 00025 direction, and the vector perpendicular to both the spherocity and spherocity major directions 00026 is the spherocity minor. Both the major and minor directions have associated spherocity 00027 scalars. 00028 00029 Care must be taken in the case of Drell-Yan processes - there we should use the 00030 newly proposed observable \f$ a_T \f$. 00031 00032 */ 00033 class Spherocity : public AxesDefinition { 00034 public: 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 ///@{ Spherocity scalar accessors 00069 /// The spherocity scalar, \f$ S \f$, (minimum spherocity). 00070 double spherocity() const { return _spherocities[0]; } 00071 ///@} 00072 00073 00074 ///@{ Spherocity axis accessors 00075 /// The spherocity axis. 00076 const Vector3& spherocityAxis() const { return _spherocityAxes[0]; } 00077 /// The spherocity major axis (axis of max spherocity perpendicular to spherocity axis). 00078 const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; } 00079 /// The spherocity minor axis (axis perpendicular to spherocity and spherocity major). 00080 const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; } 00081 ///@} 00082 00083 00084 ///@{ AxesDefinition axis accessors. 00085 const Vector3& axis1() const { return spherocityAxis(); } 00086 const Vector3& axis2() const { return spherocityMajorAxis(); } 00087 const Vector3& axis3() const { return spherocityMinorAxis(); } 00088 ///@} 00089 00090 00091 public: 00092 00093 /// @name Direct methods 00094 /// Ways to do the calculation directly, without engaging the caching system 00095 //@{ 00096 00097 /// Manually calculate the spherocity, without engaging the caching system 00098 void calc(const FinalState& fs); 00099 00100 /// Manually calculate the spherocity, without engaging the caching system 00101 void calc(const vector<Particle>& fsparticles); 00102 00103 /// Manually calculate the spherocity, without engaging the caching system 00104 void calc(const vector<FourMomentum>& fsmomenta); 00105 00106 /// Manually calculate the spherocity, without engaging the caching system 00107 void calc(const vector<Vector3>& threeMomenta); 00108 00109 //@} 00110 00111 00112 private: 00113 00114 /// The spherocity scalars. 00115 vector<double> _spherocities; 00116 00117 /// The spherocity axes. 00118 vector<Vector3> _spherocityAxes; 00119 00120 /// Caching flag to avoid costly recalculations. 00121 bool _calculatedSpherocity; 00122 00123 00124 private: 00125 00126 /// Explicitly calculate the spherocity values. 00127 void _calcSpherocity(const vector<Vector3>& fsmomenta); 00128 00129 }; 00130 00131 } 00132 00133 #endif