FastJet 3.0beta1
|
00001 #ifndef __D0RUNIBASECONEPLUGIN_HH__ 00002 #define __D0RUNIBASECONEPLUGIN_HH__ 00003 00004 //STARTHEADER 00005 // $Id: D0RunIBaseConePlugin.hh 1778 2010-10-25 10:02:58Z soyez $ 00006 // 00007 // Copyright (c) 2009-2010, Matteo Cacciari, Gavin Salam and Gregory Soyez 00008 // 00009 //---------------------------------------------------------------------- 00010 // This file is part of FastJet. 00011 // 00012 // FastJet is free software; you can redistribute it and/or modify 00013 // it under the terms of the GNU General Public License as published by 00014 // the Free Software Foundation; either version 2 of the License, or 00015 // (at your option) any later version. 00016 // 00017 // The algorithms that underlie FastJet have required considerable 00018 // development and are described in hep-ph/0512210. If you use 00019 // FastJet as part of work towards a scientific publication, please 00020 // include a citation to the FastJet paper. 00021 // 00022 // FastJet is distributed in the hope that it will be useful, 00023 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 // GNU General Public License for more details. 00026 // 00027 // You should have received a copy of the GNU General Public License 00028 // along with FastJet; if not, write to the Free Software 00029 // Foundation, Inc.: 00030 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00031 //---------------------------------------------------------------------- 00032 //ENDHEADER 00033 00034 #include "fastjet/JetDefinition.hh" 00035 00036 // questionable whether this should be in fastjet namespace or not... 00037 00038 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 00039 00040 //---------------------------------------------------------------------- 00041 // 00042 /// @ingroup internal 00043 /// \class D0RunIBaseConePlugin 00044 /// 00045 /// D0RunIConePlugin is a plugin for fastjet (v2.4 upwards) that 00046 /// provides an interface to the D0 version of Run-I cone algorithm 00047 /// 00048 /// Note that this base class is purely virtual and thus needs to be 00049 /// overloaded. In practice this means that you should use one of 00050 /// D0RunIConePlugin or D0RunIpre96ConePlugin. 00051 /// 00052 /// The D0 code has been taken from Lars Sonnenschein's web-space 00053 /// http://www-d0.fnal.gov/~sonne/D0RunIcone.tgz 00054 /// 00055 /// The version of the D0 Run I code distributed here has been 00056 /// modified by the FastJet authors, so as to provide access to the 00057 /// contents of the jets (as is necessary for the plugin). This does 00058 /// not modify the results of the clustering. 00059 // 00060 //---------------------------------------------------------------------- 00061 class D0RunIBaseConePlugin : public JetDefinition::Plugin { 00062 public: 00063 /// A D0RunIConePlugin constructor which sets the "free" parameters of the 00064 /// algorithm: 00065 /// 00066 /// \param CONErad is the cone radius 00067 /// 00068 /// \param JETmne is a minimum ET requirement on every iteration 00069 /// (jet dropped if Et < JETmne * Et_min_ratio ). 00070 /// The value that has been used by D0 for JETmne: 8 GeV 00071 /// (and Et_min_ratio is 0.5) 00072 /// 00073 /// \param SPlifr is the shared Et fraction splitting threshold, and 00074 /// a value of 0.5 was usually used by D0 00075 /// 00076 /// The remaining parameters of the algorithm are not to be modified if the algorithm 00077 /// is to correspond to the one actually used by D0. 00078 D0RunIBaseConePlugin (double CONrad, 00079 double JETmne , 00080 double SPLifr = _DEFAULT_SPLifr) : 00081 _CONErad (CONrad ), 00082 _JETmne (JETmne ), 00083 _SPLifr (SPLifr ), 00084 _TWOrad (_DEFAULT_TWOrad ), 00085 _D0_Angle (_DEFAULT_D0_Angle ), 00086 _Increase_Delta_R (_DEFAULT_Increase_Delta_R ), 00087 _Kill_Far_Clusters (_DEFAULT_Kill_Far_Clusters ), 00088 _Jet_Et_Min_On_Iter(_DEFAULT_Jet_Et_Min_On_Iter), 00089 _Far_Ratio (_DEFAULT_Far_Ratio ), 00090 _Eitem_Negdrop (_DEFAULT_Eitem_Negdrop ), 00091 _Et_Min_Ratio (_DEFAULT_Et_Min_Ratio ), 00092 _Thresh_Diff_Et (_DEFAULT_Thresh_Diff_Et ){} 00093 00094 // some functions to return info about parameters 00095 inline double CONErad () const { return _CONErad ;} //= 0.7; 00096 inline double JETmne () const { return _JETmne ;} //= 8.0; 00097 inline double SPLifr () const { return _SPLifr ;} // =0.5; 00098 inline double TWOrad () const { return _TWOrad ;} //= 0.; 00099 inline bool D0_Angle () const { return _D0_Angle ;} // =false; 00100 inline bool Increase_Delta_R () const { return _Increase_Delta_R ;} // =true; 00101 inline bool Kill_Far_Clusters () const { return _Kill_Far_Clusters ;} // =true; 00102 inline bool Jet_Et_Min_On_Iter() const { return _Jet_Et_Min_On_Iter;} // =true; 00103 inline double Far_Ratio () const { return _Far_Ratio ;} // =0.5; 00104 inline double Eitem_Negdrop () const { return _Eitem_Negdrop ;} // =-1.0; 00105 inline double Et_Min_Ratio () const { return _Et_Min_Ratio ;} // =0.5; 00106 inline double Thresh_Diff_Et () const { return _Thresh_Diff_Et ;} // =0.01; 00107 00108 00109 /// access the split_ratio() also by the name overlap_threshold() 00110 inline double overlap_threshold() const {return SPLifr();} 00111 00112 // the things that are required by base class 00113 virtual std::string description () const = 0; 00114 00115 // the part that really does the clustering 00116 virtual void run_clustering(ClusterSequence &) const = 0; 00117 00118 /// the plugin mechanism's standard way of accessing the jet radius 00119 virtual double R() const {return CONErad();} 00120 00121 protected: 00122 template<typename HepEntityType> 00123 void run_clustering_worker(ClusterSequence &) const; 00124 00125 //private: 00126 00127 double _CONErad ;//= 0.7 00128 double _JETmne ;//= 8. 00129 //the parameters below have been found to be set to the values given below 00130 //in the original implementation, shouldn't be altered 00131 double _SPLifr ; //=0.5 00132 double _TWOrad ; //=0. 00133 bool _D0_Angle ; //=false 00134 bool _Increase_Delta_R ; //=true 00135 bool _Kill_Far_Clusters ; //=true 00136 bool _Jet_Et_Min_On_Iter; //=true 00137 double _Far_Ratio ; //=0.5 00138 double _Eitem_Negdrop ; //=-1.0 00139 double _Et_Min_Ratio ; //=0.5 00140 double _Thresh_Diff_Et ; //=0.01 00141 00142 // here are the variables for the default parameters of the D0 Run I Cone algorithm. 00143 // They are set in the .cc file 00144 const static double _DEFAULT_SPLifr ; // = 0.5; //shared Et fraction threshold 00145 const static double _DEFAULT_TWOrad ; // = 0.; //minimum Delta_R separation between cones 00146 const static bool _DEFAULT_D0_Angle ; // = false; 00147 const static bool _DEFAULT_Increase_Delta_R ; // = true; 00148 const static bool _DEFAULT_Kill_Far_Clusters ; // = true; 00149 const static bool _DEFAULT_Jet_Et_Min_On_Iter ; // = true; 00150 const static double _DEFAULT_Far_Ratio ; // = 0.5; 00151 const static double _DEFAULT_Eitem_Negdrop ; // = -1.0; 00152 const static double _DEFAULT_Et_Min_Ratio ; // = 0.5; 00153 const static double _DEFAULT_Thresh_Diff_Et ; // = 0.01; 00154 }; 00155 00156 00157 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh 00158 00159 #endif // __D0RUNIBASECONEPLUGIN_HH__