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/RivetCLHEP.hh"
00010 #include "Rivet/Event.hh"
00011 
00012 /// @todo: we should have a global math library to define 
00013 /// such things as Pi, deltaPhi, deltaR, etc.
00014 /// @todo Remove use of D0-specific code.
00015 #include "Rivet/Tools/D0RunIIcone/inline_maths.h"
00016 
00017 
00018 namespace Rivet {
00019 
00020   /// @todo Enum consts should be ALL-CAPS
00021   enum schemelist {energy, snowmass};
00022 
00023   /// Project out the differential and integral \f$ p_T \f$ shapes of jets 
00024   /// by means of visible final state particles around jet axes.
00025   class JetShape: public Projection {
00026     
00027   public:
00028 
00029 
00030     /// Constructor. The provided FinalState projection must live throughout the run.
00031     inline JetShape(VetoedFinalState& vfsp, double rmin=0.0, double rmax=0.7, 
00032                     double interval=0.1, double r1minPsi=0.3, schemelist distscheme=energy)
00033       : _vfsproj(&vfsp), _rmin(rmin), _rmax(rmax), _interval(interval), _r1minPsi(r1minPsi), 
00034         _distscheme(distscheme)
00035     { 
00036       _nbins = int(round((rmax-rmin)/interval));
00037       addProjection(*_vfsproj);
00038     }
00039     
00040   public:
00041     /// Return the name of the projection
00042     inline string getName() const {
00043       return "JetShape";
00044     }
00045     
00046     /// Return number of equidistant radius bins
00047     inline double getNbins() const {
00048       return _nbins;
00049     }
00050     
00051     /// Return rmin value
00052     inline double getRmin() const {
00053       return _rmin;
00054     }
00055     
00056     /// Return rmax value
00057     inline double getRmax() const {
00058       return _rmax;
00059     }
00060     
00061     /// Return Rad interval size
00062     inline double getInterval() const {
00063       return _interval;
00064     }
00065     
00066     /// Set the list of pre-selected jet axes
00067     inline void setJetAxes(vector<LorentzVector>& jetaxes) 
00068     {
00069       _jetaxes = &jetaxes;
00070     }
00071     
00072     /// @name The projected jet shapes
00073     /// @{
00074     //inline const list<vector> getDiffJetShapes() const { return _diffjetshapes; }
00075     //inline const list<vector> getIntJetShapes() const { return _intjetshapes; }
00076     inline void setDiffJetShapes(vector<vector<double> >& diffjetshapes) { 
00077       _diffjetshapes = &diffjetshapes; 
00078     }
00079 
00080     inline void setIntJetShapes(vector<vector<double> >& intjetshapes) { 
00081       _intjetshapes = &intjetshapes; 
00082     }
00083 
00084     inline void setOneMinPsiShape(vector<double>& oneminPsishape) { 
00085       _oneminPsishape = &oneminPsishape; 
00086     }
00087     /// @}
00088 
00089   protected:
00090     
00091     /// Apply the projection to the event.
00092     void project(const Event& e);
00093     
00094     /// Compare projections.
00095     int compare(const Projection& p) const;
00096  
00097        
00098   private:
00099         
00100     /// The VetoedFinalState projection used by this projection
00101     /// @todo Are the pointers really needed?
00102     VetoedFinalState* _vfsproj;
00103 
00104     ///Jet shape parameters
00105     double _rmin;
00106     double _rmax;
00107     double _interval;
00108     double _r1minPsi;
00109     schemelist _distscheme;
00110     int _nbins;
00111 
00112     ///The jet axes of the jet algorithm projection
00113     /// @todo Are the pointers really needed?
00114     vector<LorentzVector>* _jetaxes;
00115     ///Output lists containg jet shapes
00116     /// @todo Are the pointers really needed?
00117     vector<vector<double> >*  _diffjetshapes;
00118     /// @todo Are the pointers really needed?
00119     vector<vector<double> >*  _intjetshapes;
00120     /// @todo Are the pointers really needed?
00121     vector<double>* _oneminPsishape;
00122     
00123   };
00124   
00125 }
00126 
00127 #endif