FastJet  3.0.6
D0RunIBaseConePlugin.hh
1 #ifndef __D0RUNIBASECONEPLUGIN_HH__
2 #define __D0RUNIBASECONEPLUGIN_HH__
3 
4 //STARTHEADER
5 // $Id: D0RunIBaseConePlugin.hh 1778 2010-10-25 10:02:58Z soyez $
6 //
7 // Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
8 //
9 //----------------------------------------------------------------------
10 // This file is part of FastJet.
11 //
12 // FastJet is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
16 //
17 // The algorithms that underlie FastJet have required considerable
18 // development and are described in hep-ph/0512210. If you use
19 // FastJet as part of work towards a scientific publication, please
20 // include a citation to the FastJet paper.
21 //
22 // FastJet is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 // GNU General Public License for more details.
26 //
27 // You should have received a copy of the GNU General Public License
28 // along with FastJet. If not, see <http://www.gnu.org/licenses/>.
29 //----------------------------------------------------------------------
30 //ENDHEADER
31 
32 #include "fastjet/JetDefinition.hh"
33 
34 // questionable whether this should be in fastjet namespace or not...
35 
36 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
37 
38 //----------------------------------------------------------------------
39 //
40 /// @ingroup internal
41 /// \class D0RunIBaseConePlugin
42 ///
43 /// D0RunIBaseConePlugin is base class for a plugin for FastJet (v3.0 or later)
44 /// that provides an interface to the D0 version of Run-I cone algorithm
45 ///
46 /// Note that this base class is purely virtual and thus needs to be
47 /// overloaded. In practice this means that you should use one of
48 /// D0RunIConePlugin or D0RunIpre96ConePlugin.
49 ///
50 /// The D0 code has been obtained from Lars Sonnenschein's web-space
51 /// http://www-d0.fnal.gov/~sonne/D0RunIcone.tgz
52 ///
53 /// The version of the D0 Run I code distributed here has been
54 /// modified by the FastJet authors, so as to provide access to the
55 /// contents of the jets (as is necessary for the plugin). This does
56 /// not modify the results of the clustering.
57 //
58 //----------------------------------------------------------------------
60 public:
61  /// A D0RunIConePlugin constructor which sets the "free" parameters of the
62  /// algorithm:
63  ///
64  /// \param CONErad is the cone radius
65  ///
66  /// \param JETmne is a minimum ET requirement on every iteration
67  /// (jet dropped if Et < JETmne * Et_min_ratio ).
68  /// The value that has been used by D0 for JETmne: 8 GeV
69  /// (and Et_min_ratio is 0.5)
70  ///
71  /// \param SPlifr is the shared Et fraction splitting threshold, and
72  /// a value of 0.5 was usually used by D0
73  ///
74  /// The remaining parameters of the algorithm are not to be modified if the algorithm
75  /// is to correspond to the one actually used by D0.
76  D0RunIBaseConePlugin (double CONErad_in,
77  double JETmne_in,
78  double SPLifr_in = _DEFAULT_SPLifr) :
79  _CONErad (CONErad_in ),
80  _JETmne (JETmne_in ),
81  _SPLifr (SPLifr_in ),
82  _TWOrad (_DEFAULT_TWOrad ),
83  _D0_Angle (_DEFAULT_D0_Angle ),
84  _Increase_Delta_R (_DEFAULT_Increase_Delta_R ),
85  _Kill_Far_Clusters (_DEFAULT_Kill_Far_Clusters ),
86  _Jet_Et_Min_On_Iter(_DEFAULT_Jet_Et_Min_On_Iter),
87  _Far_Ratio (_DEFAULT_Far_Ratio ),
88  _Eitem_Negdrop (_DEFAULT_Eitem_Negdrop ),
89  _Et_Min_Ratio (_DEFAULT_Et_Min_Ratio ),
90  _Thresh_Diff_Et (_DEFAULT_Thresh_Diff_Et ){}
91 
92  // some functions to return info about parameters
93  inline double CONErad () const { return _CONErad ;} //= 0.7;
94  inline double JETmne () const { return _JETmne ;} //= 8.0;
95  inline double SPLifr () const { return _SPLifr ;} // =0.5;
96  inline double TWOrad () const { return _TWOrad ;} //= 0.;
97  inline bool D0_Angle () const { return _D0_Angle ;} // =false;
98  inline bool Increase_Delta_R () const { return _Increase_Delta_R ;} // =true;
99  inline bool Kill_Far_Clusters () const { return _Kill_Far_Clusters ;} // =true;
100  inline bool Jet_Et_Min_On_Iter() const { return _Jet_Et_Min_On_Iter;} // =true;
101  inline double Far_Ratio () const { return _Far_Ratio ;} // =0.5;
102  inline double Eitem_Negdrop () const { return _Eitem_Negdrop ;} // =-1.0;
103  inline double Et_Min_Ratio () const { return _Et_Min_Ratio ;} // =0.5;
104  inline double Thresh_Diff_Et () const { return _Thresh_Diff_Et ;} // =0.01;
105 
106 
107  /// access the split_ratio() also by the name overlap_threshold()
108  inline double overlap_threshold() const {return SPLifr();}
109 
110  // the things that are required by base class
111  virtual std::string description () const = 0;
112 
113  // the part that really does the clustering
114  virtual void run_clustering(ClusterSequence &) const = 0;
115 
116  /// the plugin mechanism's standard way of accessing the jet radius
117  virtual double R() const {return CONErad();}
118 
119 protected:
120  template<typename HepEntityType>
121  void run_clustering_worker(ClusterSequence &) const;
122 
123  //private:
124 
125  double _CONErad ;//= 0.7
126  double _JETmne ;//= 8.
127  //the parameters below have been found to be set to the values given below
128  //in the original implementation, shouldn't be altered
129  double _SPLifr ; //=0.5
130  double _TWOrad ; //=0.
131  bool _D0_Angle ; //=false
132  bool _Increase_Delta_R ; //=true
133  bool _Kill_Far_Clusters ; //=true
134  bool _Jet_Et_Min_On_Iter; //=true
135  double _Far_Ratio ; //=0.5
136  double _Eitem_Negdrop ; //=-1.0
137  double _Et_Min_Ratio ; //=0.5
138  double _Thresh_Diff_Et ; //=0.01
139 
140  // here are the variables for the default parameters of the D0 Run I Cone algorithm.
141  // They are set in the .cc file
142  const static double _DEFAULT_SPLifr ; // = 0.5; //shared Et fraction threshold
143  const static double _DEFAULT_TWOrad ; // = 0.; //minimum Delta_R separation between cones
144  const static bool _DEFAULT_D0_Angle ; // = false;
145  const static bool _DEFAULT_Increase_Delta_R ; // = true;
146  const static bool _DEFAULT_Kill_Far_Clusters ; // = true;
147  const static bool _DEFAULT_Jet_Et_Min_On_Iter ; // = true;
148  const static double _DEFAULT_Far_Ratio ; // = 0.5;
149  const static double _DEFAULT_Eitem_Negdrop ; // = -1.0;
150  const static double _DEFAULT_Et_Min_Ratio ; // = 0.5;
151  const static double _DEFAULT_Thresh_Diff_Et ; // = 0.01;
152 };
153 
154 
155 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
156 
157 #endif // __D0RUNIBASECONEPLUGIN_HH__
fastjet::JetDefinition::Plugin
Definition: JetDefinition.hh:431
fastjet::D0RunIBaseConePlugin
Definition: D0RunIBaseConePlugin.hh:59
fastjet::D0RunIBaseConePlugin::D0RunIBaseConePlugin
D0RunIBaseConePlugin(double CONErad_in, double JETmne_in, double SPLifr_in=_DEFAULT_SPLifr)
A D0RunIConePlugin constructor which sets the "free" parameters of the algorithm:
Definition: D0RunIBaseConePlugin.hh:76
fastjet::ClusterSequence
Definition: ClusterSequence.hh:59
fastjet::D0RunIBaseConePlugin::overlap_threshold
double overlap_threshold() const
access the split_ratio() also by the name overlap_threshold()
Definition: D0RunIBaseConePlugin.hh:108
fastjet::D0RunIBaseConePlugin::R
virtual double R() const
the plugin mechanism's standard way of accessing the jet radius
Definition: D0RunIBaseConePlugin.hh:117