Fork me on GitHub

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

ImprovedOutputFile Timing dual_readout llp
Last change on this file since b20af7f was d7d2da3, checked in by pavel <pavel@…>, 12 years ago

move branches/ModularDelphes to trunk

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