JetShape.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_JetShape_HH
00003 #define RIVET_JetShape_HH
00004 
00005 #include "Rivet/Rivet.hh"
00006 #include "Rivet/Projection.hh"
00007 #include "Rivet/Projections/VetoedFinalState.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      Internally, this projection uses the VetoedFinalState projection to determine the
00046      jet shapes around the jet axes.
00047 
00048      The jet axes are passed for each event.
00049   */
00050   class JetShape : public Projection {
00051 
00052     /// @todo Review: remove external jet axes, binning, etc.
00053 
00054   public:
00055 
00056     /// @name Constructors etc.
00057     //@{
00058 
00059     /// Constructor.
00060     JetShape(const VetoedFinalState& vfsp, const vector<FourMomentum>& jetaxes,
00061              double rmin=0.0, double rmax=0.7, double interval=0.1,
00062              double r1minPsi=0.3, DeltaRScheme distscheme=RAPIDITY);
00063 
00064     /// Clone on the heap.
00065     virtual const Projection* clone() const {
00066       return new JetShape(*this);
00067     }
00068 
00069     //@}
00070 
00071 
00072     /// Reset projection between events
00073     void clear();
00074 
00075  
00076   public:
00077 
00078  
00079     /// Number of equidistant radius bins.
00080     double numBins() const {
00081       return _nbins;
00082     }
00083  
00084     /// \f$ r_\text{min} \f$ value.
00085     double rMin() const {
00086       return _rmin;
00087     }
00088  
00089     /// \f$ r_\text{max} \f$ value.
00090     double rMax() const {
00091       return _rmax;
00092     }
00093  
00094     /// Radius interval size.
00095     double interval() const {
00096       return _interval;
00097     }
00098 
00099     /// Return value of differential jet shape profile histo bin.
00100     /// @todo Remove this external indexing thing
00101     double diffJetShape(size_t pTbin, size_t rbin) const {
00102       return _diffjetshapes[pTbin][rbin];
00103     }
00104  
00105     /// Return value of integrated jet shape profile histo bin.
00106     /// @todo Remove this external indexing thing
00107     double intJetShape(size_t pTbin, size_t rbin) const {
00108       return _intjetshapes[pTbin][rbin];
00109     }
00110  
00111     /// Return value of \f$ \Psi \f$ (integrated jet shape) at given radius for a \f$ p_T \f$ bin.
00112     /// @todo Remove this external indexing thing
00113     double psi(size_t pTbin) const {
00114       return _PsiSlot[pTbin];
00115     }
00116  
00117 
00118   protected:
00119  
00120     /// Apply the projection to the event.
00121     void project(const Event& e);
00122  
00123     /// Compare projections.
00124     int compare(const Projection& p) const;
00125 
00126     
00127   private:
00128 
00129     /// The jet axes of the jet algorithm projection
00130     const vector<FourMomentum>& _jetaxes;
00131 
00132 
00133     /// @name The projected jet shapes
00134     //@{
00135 
00136     /// Jet shape histo
00137     vector<vector<double> > _diffjetshapes;
00138     vector<vector<double> > _intjetshapes;
00139     vector<double> _PsiSlot;
00140 
00141     //@}
00142 
00143 
00144     /// @name Jet shape parameters
00145     //@{
00146 
00147     /// Min radius (typically r=0)
00148     double _rmin;
00149 
00150     /// Max radius
00151     double _rmax;
00152 
00153     /// Length of radius interval
00154     double _interval;
00155 
00156     /// One minus Psi radius
00157     double _r1minPsi;
00158 
00159     /// Rapidity scheme
00160     DeltaRScheme _distscheme;
00161 
00162     /// Number of bins
00163     size_t _nbins;
00164 
00165     //@}
00166   };
00167 
00168 
00169 }
00170 
00171 #endif