fastjet 2.4.5
SISConePlugin.hh
Go to the documentation of this file.
00001 #ifndef __SISCONEPLUGIN_HH__
00002 #define __SISCONEPLUGIN_HH__
00003 
00004 #include "SISConeBasePlugin.hh"
00005 
00006 // forward declaration of the siscone classes we'll need
00007 namespace siscone{
00008   class Csiscone;
00009 }
00010 
00011 
00012 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00013 
00014 //----------------------------------------------------------------------
00015 //
00066 //
00067 class SISConePlugin : public SISConeBasePlugin{
00068 public:
00069 
00072   enum SplitMergeScale {SM_pt,     
00073                         SM_Et,     
00074 
00075                         SM_mt,     
00076 
00077                         SM_pttilde 
00078 
00079   };
00080 
00081 
00091   SISConePlugin (double cone_radius,
00092                  double overlap_threshold,
00093                  int    n_pass_max = 0,
00094                  double protojet_ptmin = 0.0, 
00095                  bool   caching = false,
00096                  SplitMergeScale  split_merge_scale = SM_pttilde,
00097                  double split_merge_stopping_scale = 0.0){
00098     _cone_radius           = cone_radius;
00099     _overlap_threshold     = overlap_threshold;
00100     _n_pass_max            = n_pass_max;
00101     _protojet_ptmin        = protojet_ptmin;
00102     _caching               = caching;   
00103     _split_merge_scale     = split_merge_scale;
00104     _split_merge_stopping_scale = split_merge_stopping_scale;
00105     _ghost_sep_scale       = 0.0;
00106     _use_pt_weighted_splitting = false;}
00107 
00108 
00110   SISConePlugin (double cone_radius,
00111                  double overlap_threshold,
00112                  int    n_pass_max,
00113                  double protojet_ptmin, 
00114                  bool   caching ,
00115                  bool   split_merge_on_transverse_mass){
00116     _cone_radius           = cone_radius;
00117     _overlap_threshold     = overlap_threshold;
00118     _n_pass_max            = n_pass_max;
00119     _protojet_ptmin        = protojet_ptmin;
00120     _caching               = caching;   
00121     _split_merge_stopping_scale = 0.0;
00122     _split_merge_scale     = split_merge_on_transverse_mass ? SM_mt : SM_pttilde;
00123     _ghost_sep_scale       = 0.0;}
00124   
00127   SISConePlugin (double cone_radius,
00128                  double overlap_threshold,
00129                  int    n_pass_max,
00130                  bool   caching ) {
00131     _cone_radius           = cone_radius;
00132     _overlap_threshold     = overlap_threshold;
00133     _n_pass_max            = n_pass_max;
00134     _protojet_ptmin        = 0.0;
00135     _caching               = caching;   
00136     _split_merge_scale     = SM_mt;
00137     _split_merge_stopping_scale = 0.0;
00138     _ghost_sep_scale       = 0.0;
00139     _use_pt_weighted_splitting = false;}
00140 
00143   double protojet_ptmin  () const {return _protojet_ptmin  ;}
00144 
00149   double protojet_or_ghost_ptmin  () const {return std::max(_protojet_ptmin,
00150                                                             _ghost_sep_scale);}
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 
00165   bool split_merge_use_pt_weighted_splitting() const {return _use_pt_weighted_splitting;}
00166   void set_split_merge_use_pt_weighted_splitting(bool val) {
00167     _use_pt_weighted_splitting = val;}
00168 
00169   // the things that are required by base class
00170   virtual std::string description () const;
00171   virtual void run_clustering(ClusterSequence &) const ;
00172 
00173 protected:
00174   virtual void reset_stored_plugin() const;
00175 
00176 private:
00177   double _protojet_ptmin;
00178   SplitMergeScale _split_merge_scale;
00179 
00180   bool _use_pt_weighted_splitting;
00181 
00182   // part needed for the cache 
00183   // variables for caching the results and the input
00184   static std::auto_ptr<SISConePlugin          > stored_plugin;
00185   static std::auto_ptr<std::vector<PseudoJet> > stored_particles;
00186   static std::auto_ptr<siscone::Csiscone      > stored_siscone;
00187 };
00188 
00189 
00190 //======================================================================
00192 class SISConeExtras : public SISConeBaseExtras {
00193 public:
00195   //  it just initialises the pass information 
00196   SISConeExtras(int nparticles)
00197     : SISConeBaseExtras(nparticles){}
00198 
00202   const SISConePlugin* jet_def_plugin() const {
00203     return dynamic_cast<const SISConePlugin*>(_jet_def_plugin);
00204   }
00205 
00206 private:
00207   // let us be written to by SISConePlugin
00208   friend class SISConePlugin;
00209 };
00210 
00211 FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
00212 
00213 #endif // __SISCONEPLUGIN_HH__
00214 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines