00001 // -*- C++ -*- 00002 #ifndef RIVET_ClosestJetShape_HH 00003 #define RIVET_ClosestJetShape_HH 00004 00005 #include "Rivet/Rivet.hh" 00006 #include "Rivet/Projection.hh" 00007 #include "Rivet/Projections/FinalState.hh" 00008 #include "Rivet/Particle.hh" 00009 #include "Rivet/Event.hh" 00010 #include "Rivet/Tools/Utils.hh" 00011 00012 namespace Rivet { 00013 00014 00015 /** 00016 @brief Calculate the jet shape. 00017 00018 Calculate the differential and integral jet shapes in \f$P_{\perp}\f$ for a given 00019 set of jet axes each event. 00020 00021 The rapidity scheme (\f$ \eta \f$ or \f$ y \f$) has to be specified when 00022 invoking the constructor. 00023 00024 The differential jet shape around a given jet axis at distance interval 00025 \f$ r \pm \delta{r}/2 \f$ is defined as 00026 \f[ 00027 \rho(r) = 00028 \frac{1}{\delta r} \frac{1}{N_\mathrm{jets}} 00029 \sum_\mathrm{jets} \frac{P_\perp(r - \delta r/2, r+\delta r/2)}{p_\perp(0, R)} 00030 \f] 00031 with \f$ 0 \le r \le R \f$ and \f$ P_\perp(r_1, r_2) = \sum_{\in [r_1, r_2)} p_\perp \f$. 00032 00033 The integral jet shape around a given jet axes until distance \f$ r \f$ is defined as 00034 \f[ 00035 \Psi(r) = 00036 \frac{1}{N_\mathrm{jets}} 00037 \sum_\mathrm{jets} \frac{P_\perp(0, r)}{p_\perp(0, R)} 00038 \f] 00039 with \f$ 0 \le r \le R \f$ and \f$ P_\perp(r_1, r_2) = \sum_{\in [r_1, r_2)} p_\perp \f$. 00040 00041 The constructor expects also the equidistant binning in radius \f$ r \f$ to produce the 00042 jet shape of all bins in a vector and this separately for each jet to allow 00043 post-selection. 00044 00045 In this implementation, the jet axes are passed for each event. 00046 00047 @deprecated The closest-axis jet shape algorithm is incorrect and should not be used. 00048 */ 00049 class ClosestJetShape : public Projection { 00050 00051 /// @todo Review: remove external jet axes, binning, etc. 00052 00053 public: 00054 00055 /// @name Constructors etc. 00056 //@{ 00057 00058 /// Constructor. 00059 ClosestJetShape(const FinalState& fs, const vector<FourMomentum>& jetaxes, 00060 double rmin=0.0, double rmax=0.7, double interval=0.1, 00061 double r1minPsi=0.3, RapScheme distscheme=RAPIDITY); 00062 00063 /// Clone on the heap. 00064 virtual const Projection* clone() const { 00065 return new ClosestJetShape(*this); 00066 } 00067 00068 //@} 00069 00070 00071 /// Reset projection between events 00072 void clear(); 00073 00074 00075 public: 00076 00077 00078 /// Number of equidistant radius bins. 00079 double numBins() const { 00080 return _nbins; 00081 } 00082 00083 /// \f$ r_\text{min} \f$ value. 00084 double rMin() const { 00085 return _rmin; 00086 } 00087 00088 /// \f$ r_\text{max} \f$ value. 00089 double rMax() const { 00090 return _rmax; 00091 } 00092 00093 /// Radius interval size. 00094 double interval() const { 00095 return _interval; 00096 } 00097 00098 /// Return value of differential jet shape profile histo bin. 00099 /// @todo Remove this external indexing thing 00100 double diffJetShape(size_t pTbin, size_t rbin) const { 00101 return _diffjetshapes[pTbin][rbin]; 00102 } 00103 00104 /// Return value of integrated jet shape profile histo bin. 00105 /// @todo Remove this external indexing thing 00106 double intJetShape(size_t pTbin, size_t rbin) const { 00107 return _intjetshapes[pTbin][rbin]; 00108 } 00109 00110 /// Return value of \f$ \Psi \f$ (integrated jet shape) at given radius for a \f$ p_T \f$ bin. 00111 /// @todo Remove this external indexing thing 00112 double psi(size_t pTbin) const { 00113 return _PsiSlot[pTbin]; 00114 } 00115 00116 00117 protected: 00118 00119 /// Apply the projection to the event. 00120 void project(const Event& e); 00121 00122 /// Compare projections. 00123 int compare(const Projection& p) const; 00124 00125 00126 private: 00127 00128 /// The jet axes of the jet algorithm projection 00129 const vector<FourMomentum>& _jetaxes; 00130 00131 00132 /// @name The projected jet shapes 00133 //@{ 00134 00135 /// Jet shape histo 00136 vector<vector<double> > _diffjetshapes; 00137 vector<vector<double> > _intjetshapes; 00138 vector<double> _PsiSlot; 00139 00140 //@} 00141 00142 00143 /// @name Jet shape parameters 00144 //@{ 00145 00146 /// Min radius (typically r=0) 00147 double _rmin; 00148 00149 /// Max radius 00150 double _rmax; 00151 00152 /// Length of radius interval 00153 double _interval; 00154 00155 /// One minus Psi radius 00156 double _r1minPsi; 00157 00158 /// Rapidity scheme 00159 RapScheme _distscheme; 00160 00161 /// Number of bins 00162 size_t _nbins; 00163 00164 //@} 00165 }; 00166 00167 00168 } 00169 00170 #endif