Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SISConePlugin.hh

Go to the documentation of this file.
00001 #ifndef __SISCONEPLUGIN_HH__
00002 #define __SISCONEPLUGIN_HH__
00003 
00004 #include "fastjet/JetDefinition.hh"
00005 #include "fastjet/ClusterSequence.hh" // needed for the extras we define
00006 #include <vector>
00007 #include <memory>
00008 
00009 // put a forward declaration to the Csiscone class to avoid having to
00010 // include the siscone headers here
00011 namespace siscone {
00012   class Csiscone;
00013 }
00014 
00015 // questionable whether this should be in fastjet namespace or not...
00016 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00017 
00018 // another forward declaration to reduce includes
00019 class PseudoJet;
00020 
00021 //----------------------------------------------------------------------
00022 //
00074 //
00075 class SISConePlugin : public JetDefinition::Plugin {
00076 public:
00077 
00080   enum SplitMergeScale {SM_pt,     
00081                         SM_Et,     
00082 
00083                         SM_mt,     
00084 
00085                         SM_pttilde 
00086 
00087   };
00088 
00089 
00091   SISConePlugin (double cone_radius,
00092                  double overlap_threshold = 0.5,
00093                  int    n_pass_max = 0,
00094                  double protojet_ptmin = 0.0, 
00095                  bool   caching = false,
00096                  SplitMergeScale  split_merge_scale = SM_pttilde) :
00097     _cone_radius           (cone_radius       ),
00098     _overlap_threshold     (overlap_threshold ),
00099     _n_pass_max            (n_pass_max ), 
00100     _protojet_ptmin        (protojet_ptmin),
00101     _caching               (caching),             
00102     _split_merge_scale     (split_merge_scale) {}
00103 
00105   SISConePlugin (double cone_radius,
00106                  double overlap_threshold,
00107                  int    n_pass_max,
00108                  double protojet_ptmin, 
00109                  bool   caching ,
00110                  bool   split_merge_on_transverse_mass) :
00111     _cone_radius           (cone_radius       ),
00112     _overlap_threshold     (overlap_threshold ),
00113     _n_pass_max            (n_pass_max ), 
00114     _protojet_ptmin        (protojet_ptmin),
00115     _caching               (caching),             
00116     _split_merge_scale     (split_merge_on_transverse_mass ? SM_mt : SM_pttilde) {}
00117   
00120   SISConePlugin (double cone_radius,
00121                  double overlap_threshold,
00122                  int    n_pass_max,
00123                  bool   caching ) :
00124     _cone_radius           (cone_radius       ),
00125     _overlap_threshold     (overlap_threshold ),
00126     _n_pass_max            (n_pass_max ), 
00127     _protojet_ptmin        (0.0),
00128     _caching               (caching),
00129     _split_merge_scale     (SM_mt)     {}
00130 
00132   SISConePlugin (const SISConePlugin & plugin) {
00133     *this = plugin;
00134   }
00135 
00137   double cone_radius        () const {return _cone_radius        ;}
00138 
00141   double overlap_threshold  () const {return _overlap_threshold  ;}
00142 
00145   int n_pass_max  () const {return _n_pass_max  ;}
00146 
00149   double protojet_ptmin  () const {return _protojet_ptmin  ;}
00150 
00151 
00153   SplitMergeScale split_merge_scale() const {return _split_merge_scale;}
00155   void set_split_merge_scale(SplitMergeScale sms) {_split_merge_scale = sms;}
00156 
00159   bool split_merge_on_transverse_mass() const {return _split_merge_scale == SM_mt ;}
00160   void set_split_merge_on_transverse_mass(bool val) {
00161     _split_merge_scale = val  ? SM_mt : SM_pt;}
00162 
00163 
00165   bool caching() const {return _caching ;}
00166 
00167   // the things that are required by base class
00168   virtual std::string description () const;
00169   virtual void run_clustering(ClusterSequence &) const;
00170 
00171 private:
00172   double _cone_radius, _overlap_threshold;
00173   int    _n_pass_max;
00174   double _protojet_ptmin;
00175   bool   _caching;//, _split_merge_on_transverse_mass;
00176   SplitMergeScale _split_merge_scale;
00177 
00178   // variables for caching the results and the input
00179   static std::auto_ptr<SISConePlugin          > stored_plugin;
00180   static std::auto_ptr<std::vector<PseudoJet> > stored_particles;
00181   static std::auto_ptr<siscone::Csiscone      > stored_siscone;
00182 
00183 };
00184 
00185 
00186 //======================================================================
00188 class SISConeExtras : public ClusterSequence::Extras {
00189 public:
00191   const std::vector<PseudoJet> & stable_cones() const {return _protocones;}
00192 
00194   const std::vector<PseudoJet> & protocones() const {return _protocones;}
00195 
00196 
00200   const SISConePlugin * jet_def_plugin() const {return _jet_def_plugin;}
00201 
00204   std::string description() const;
00205 
00209   inline double most_ambiguous_split() const {return _most_ambiguous_split;}
00210 
00211 private:
00212   std::vector<PseudoJet> _protocones;
00213   const SISConePlugin * _jet_def_plugin;
00214   double                _most_ambiguous_split;
00215   // let us be written to by SISConePlugin
00216   friend class SISConePlugin;
00217 };
00218 
00219 
00220 FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
00221 
00222 #endif // __SISCONEPLUGIN_HH__
00223 

Generated on Mon Apr 2 20:57:48 2007 for fastjet by  doxygen 1.4.2