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