00001
00002 #ifndef RIVET_FastJets_HH
00003 #define RIVET_FastJets_HH
00004
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Particle.hh"
00008 #include "fastjet/ClusterSequence.hh"
00009
00010 namespace Rivet {
00011
00012
00013 class FastJets : public Projection {
00014
00015 public:
00016
00017
00018
00019
00020
00021 inline FastJets(FinalState& fsp)
00022 : _cseq(0), _type(fastjet::kt_algorithm), _recom(fastjet::E_scheme),
00023 _rparameter(1.0), _fsproj(&fsp)
00024 {
00025 addProjection(fsp);
00026 _jdef = fastjet::JetDefinition(_type,_rparameter,_recom);
00027 }
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 inline virtual ~FastJets() {
00041 if (_cseq) delete _cseq;
00042 }
00043
00044
00045 public:
00046
00047 inline string getName() const {
00048 return "FastJets";
00049 }
00050
00051 protected:
00052
00053
00054 void project(const Event& e);
00055
00056
00057 int compare(const Projection& p) const;
00058
00059 public:
00060
00061
00062 inline int getNJets() const {
00063 return _cseq->inclusive_jets().size();
00064 }
00065 inline vector<fastjet::PseudoJet> getJetsPt() const {
00066 return sorted_by_pt(_cseq->inclusive_jets());
00067 }
00068
00069
00070 inline fastjet::ClusterSequence getCSeq() const {
00071 return *_cseq;
00072 }
00073
00074
00075 inline fastjet::JetDefinition getJetDef() const {
00076 return _jdef;
00077 }
00078
00079
00080 vector<double> getYSubJet(const fastjet::PseudoJet& jet) const;
00081
00082 private:
00083
00084
00085
00086 fastjet::ClusterSequence* _cseq;
00087
00088 fastjet::JetFinder _type;
00089 fastjet::RecombinationScheme _recom;
00090 double _rparameter;
00091
00092
00093 FinalState* _fsproj;
00094
00095
00096 fastjet::JetDefinition _jdef;
00097
00098 fastjet::Strategy _strat;
00099
00100
00101 mutable map<int, vector<double> > _yscales;
00102
00103 };
00104
00105 }
00106
00107 #endif