28 #include "LorentzVector.hh" 
   33 #include <fastjet/internal/base.hh> 
   35 FASTJET_BEGIN_NAMESPACE
 
   39 class Jet : 
public LorentzVector {
 
   42   typedef std::list<Jet*> constit_vect_t;
 
   43   typedef std::vector<Jet*> jet_list_t;
 
   45   Jet(): LorentzVector(0,0,0,0) {}
 
   46   Jet(
double p1, 
double p2, 
double p3, 
double p0, 
int index_in=0): LorentzVector(p1,p2,p3,p0), m_index(index_in){}
 
   47   Jet(LorentzVector v): LorentzVector(v)  {m_index = 0;}
 
   58   int getConstituentNum(){
return m_constituents.size();}
 
   59   constit_vect_t::iterator firstConstituent(){ 
return m_constituents.begin();};
 
   60   constit_vect_t::iterator lastConstituent(){ 
return m_constituents.end();};
 
   65   void addConstituent(Jet* jet) {m_constituents.push_back(jet);this->add(*jet);};
 
   66   void addConstituent(constit_vect_t::iterator first, constit_vect_t::iterator last);
 
   67   void removeConstituent(Jet* jet) {m_constituents.remove(jet);this->subtract(*jet);};
 
   69   void addConstituent_notMoment(Jet* jet){m_constituents.push_back(jet);}
 
   74   int index()
 const {
return m_index;}  
 
   75   void set_index(
int i){m_index= i;}
 
   79   LorentzVector hlv() {
return *
this;}
 
   86   constit_vect_t m_constituents;
 
   92 void find_jet_in_list(Jet* j);
 
   97   bool operator()(Jet* j1, Jet* j2){
 
   99     if(fabs( j1->et() - j2->et())<0.001 ) 
return 0;
 
  100     else return j1->et() > j2->et();
 
  107   bool operator()(Jet* j1, Jet* j2){
 
  108     return (j1->pt() > j2->pt());
 
  112 class JetSorter_Eta {
 
  114   bool operator()(Jet* j1, Jet* j2){
 
  115     return (j1->eta() > j2->eta());
 
  121   bool operator()(Jet* j1, Jet* j2){
 
  122     return (j1->e() > j2->e());
 
  129 inline void sort_jet_list(Jet::jet_list_t &list){
 
  130   std::stable_sort(list.begin(),list.end(), T());
 
  132 inline void sort_list_et(Jet::jet_list_t &list){
 
  134   std::stable_sort(list.begin(),list.end(), JetSorter_Et());
 
  136 inline void sort_list_pt(Jet::jet_list_t &list){
 
  137   std::stable_sort(list.begin(),list.end(),JetSorter_Pt());
 
  140 Jet* jet_from_overlap(Jet* j1, Jet* j2);
 
  144 FASTJET_END_NAMESPACE