Fork me on GitHub

source: git/external/fastjet/plugins/D0RunIICone/fastjet/D0RunIIConePlugin.hh@ 3c59f98

Last change on this file since 3c59f98 was cb80e6f, checked in by Pavel Demin <pavel.demin@…>, 4 years ago

update FastJet library to 3.3.4 and FastJet Contrib library to 1.045

  • Property mode set to 100644
File size: 7.7 KB
RevLine 
[d7d2da3]1#ifndef __D0RUNIICONEPLUGIN_HH__
2#define __D0RUNIICONEPLUGIN_HH__
3
[35cdc46]4//FJSTARTHEADER
[cb80e6f]5// $Id: D0RunIIConePlugin.hh 4442 2020-05-05 07:50:11Z soyez $
[d7d2da3]6//
[cb80e6f]7// Copyright (c) 2005-2020, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
[d7d2da3]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
[35cdc46]18// development. They are described in the original FastJet paper,
19// hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
[d7d2da3]20// FastJet as part of work towards a scientific publication, please
[35cdc46]21// quote the version you use and include a citation to the manual and
22// optionally also to hep-ph/0512210.
[d7d2da3]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//----------------------------------------------------------------------
[35cdc46]32//FJENDHEADER
[d7d2da3]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 plugins
43/// \class D0RunIIConePlugin
44/// Implementation of the D0 Run II Cone (plugin for fastjet v2.1 upwards)
45///
46/// D0RunIIConePlugin is a plugin for fastjet (v2.1 upwards) that
47/// provides an interface to the D0 version of Run-II iterative cone
48/// algorithm with midpoint seeds (also known as the Iterative Legacy
49/// Cone Algorithm, ILCA).
50///
51/// The D0 code has been taken from Lars Sonnenschein's web-space
52/// http://www-d0.fnal.gov/~sonne/D0RunIIcone.tgz
53///
54/// The version of the D0 Run II code distributed
55/// here has been modified by the FastJet authors, so as to provide
56/// access to the contents of the jets (as is necessary for the
57/// plugin). This does not modify the results of the clustering.
58//
59//----------------------------------------------------------------------
60class D0RunIIConePlugin : public JetDefinition::Plugin {
61public:
62
63 //
64 /// A D0RunIIConePlugin constructor which sets the "free" parameters of the
65 /// algorithm:
66 ///
67 /// - the cone_radius has the usual meaning
68 ///
69 /// - the min_jet_Et causes cones to be discarded at if at any
70 /// iteration they have pt < Et_min_ratio * min_jet_Et. Two
71 /// values have been used by D0 for min_jet_Et: 8 GeV in earlier
72 /// Run II publicatinos, 6 GeV in later publications
73 ///
74 /// - split_ratio is equivalent to the overlap threshold during the split/merge step.
75 /// Default: 0.5.
76 ///
77 /// The remaining parameters of the algorithm are not to be modified if the algorithm
78 /// is to correspond to the one actually used by D0.
79 //
80 D0RunIIConePlugin (double cone_radius_in,
81 double min_jet_Et_in ,
82 double split_ratio_in = _DEFAULT_split_ratio) :
83 _cone_radius (cone_radius_in ),
84 _min_jet_Et (min_jet_Et_in ),
85 _split_ratio (split_ratio_in ),
86 _far_ratio (_DEFAULT_far_ratio ),
87 _Et_min_ratio (_DEFAULT_Et_min_ratio ),
88 _kill_duplicate (_DEFAULT_kill_duplicate ),
89 _duplicate_dR (_DEFAULT_duplicate_dR ),
90 _duplicate_dPT (_DEFAULT_duplicate_dPT ),
91 _search_factor (_DEFAULT_search_factor ),
92 _pT_min_leading_protojet(_DEFAULT_pT_min_leading_protojet),
93 _pT_min_second_protojet (_DEFAULT_pT_min_second_protojet ),
94 _merge_max (_DEFAULT_merge_max ),
95 _pT_min_nomerge (_DEFAULT_pT_min_nomerge )
96 {
97 // nothing to be done here!
98 }
99
100 // some functions to return info about parameters
101 inline double cone_radius () const { return _cone_radius ;} //= 0.5;
102 inline double min_jet_Et () const { return _min_jet_Et ;} //= 8.0;
103 inline double split_ratio () const { return _split_ratio ;} //= 0.5;
104 inline double far_ratio () const { return _far_ratio ;} // =0.5;
105 inline double Et_min_ratio () const { return _Et_min_ratio ;} // =0.5;
106 inline bool kill_duplicate () const { return _kill_duplicate ;} // =true;
107 inline double duplicate_dR () const { return _duplicate_dR ;} // =0.005;
108 inline double duplicate_dPT () const { return _duplicate_dPT ;} // =0.01;
109 inline double search_factor () const { return _search_factor ;} // =1.0;
110 inline double pT_min_leading_protojet() const { return _pT_min_leading_protojet;} // =0.;
111 inline double pT_min_second_protojet () const { return _pT_min_second_protojet ;} // =0.;
112 inline int merge_max () const { return _merge_max ;} // =10000;
113 inline double pT_min_nomerge () const { return _pT_min_nomerge ;} // =0.;
114
115
116 /// access the split_ratio() also by the name overlap_threshold()
117 inline double overlap_threshold() const {return split_ratio();}
118
119 // the things that are required by base class
120 virtual std::string description () const;
121 virtual void run_clustering(ClusterSequence &) const;
122 /// the plugin mechanism's standard way of accessing the jet radius
123 virtual double R() const {return cone_radius();}
124
125
126private:
127
128 double _cone_radius ;//= 0.5;
129 double _min_jet_Et ;//= 8.0;
130 double _split_ratio ;//= 0.5; // overlap threshold
131
132 //the parameters below have been found to be set to the values given below
133 //in the original implementation, shouldn't be altered
134 double _far_ratio ; // =0.5;
135 double _Et_min_ratio ; // =0.5;
136 bool _kill_duplicate ; // =true;
137 double _duplicate_dR ; // =0.005;
138 double _duplicate_dPT ; // =0.01;
139 double _search_factor ; // =1.0;
140 double _pT_min_leading_protojet; // =0.;
141 double _pT_min_second_protojet ; // =0.;
142 int _merge_max ; // =10000;
143 double _pT_min_nomerge ; // =0.;
144
145 // here are the variables for the default parameters of the D0 Run II Cone algorithm.
146 // They are set in the .cc file
147 const static double _DEFAULT_split_ratio ;// = 0.5 ; // overlap threshold
148 const static double _DEFAULT_far_ratio ;// = 0.5 ;
149 const static double _DEFAULT_Et_min_ratio ;// = 0.5 ;
150 const static bool _DEFAULT_kill_duplicate ;// = true ;
151 const static double _DEFAULT_duplicate_dR ;// = 0.005;
152 const static double _DEFAULT_duplicate_dPT ;// = 0.01 ;
153 const static double _DEFAULT_search_factor ;// = 1.0 ;
154 const static double _DEFAULT_pT_min_leading_protojet ;// = 0. ;
155 const static double _DEFAULT_pT_min_second_protojet ;// = 0. ;
156 const static int _DEFAULT_merge_max ;// = 10000;
157 const static double _DEFAULT_pT_min_nomerge ;// = 0. ;
158
159 static bool _first_time;
160
161 /// print a banner for reference to the 3rd-party code
162 void _print_banner(std::ostream *ostr) const;
163};
164
165FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
166
167#endif // __D0RUNIICONEPLUGIN_HH__
Note: See TracBrowser for help on using the repository browser.