30 #include <siscone/config.h>
38 #include <siscone/siscone_error.h>
61 rerun_allowed =
false;
67 rerun_allowed =
false;
71 std::ostream* CSphsiscone::_banner_ostr=&cout;
89 int _n_pass_max,
double _Emin,
90 Esplit_merge_scale _split_merge_scale){
94 siscone::ranlux_init();
100 if (_banner_ostr != 0){
101 (*_banner_ostr) <<
"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
102 (*_banner_ostr) <<
"# SISCone version " << setw(28) << left << siscone_version() <<
"o" << endl;
103 (*_banner_ostr) <<
"# http://projects.hepforge.org/siscone o" << endl;
104 (*_banner_ostr) <<
"# o" << endl;
105 (*_banner_ostr) <<
"# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
106 (*_banner_ostr) <<
"# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
107 (*_banner_ostr) <<
"# It is released under the terms of the GNU General Public License o" << endl;
108 (*_banner_ostr) <<
"# o" << endl;
109 (*_banner_ostr) <<
"# !!! WARNING !!! o" << endl;
110 (*_banner_ostr) <<
"# This is the version of SISCone using spherical coordinates o" << endl;
111 (*_banner_ostr) <<
"# o" << endl;
112 (*_banner_ostr) <<
"# A description of the algorithm is available in the publication o" << endl;
113 (*_banner_ostr) <<
"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
114 (*_banner_ostr) <<
"# Please cite it if you use SISCone. o" << endl;
115 (*_banner_ostr) <<
"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
116 (*_banner_ostr) << endl;
117 _banner_ostr->flush();
122 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
123 ostringstream message;
124 message <<
"Illegal value for cone radius, R = " << _radius
125 <<
" (legal values are 0<R<pi/2)";
131 ptcomparison.split_merge_scale = _split_merge_scale;
136 init_particles(_particles);
138 bool finished =
false;
140 rerun_allowed =
false;
141 protocones_list.clear();
143 #ifdef DEBUG_STABLE_CONES
144 nb_hash_cones_total = 0;
145 nb_hash_occupied_total = 0;
155 if (get_stable_cones(_radius)){
158 protocones_list.push_back(protocones);
159 add_protocones(&protocones, R2, _Emin);
160 #ifdef DEBUG_STABLE_CONES
161 nb_hash_cones_total += nb_hash_cones;
162 nb_hash_occupied_total += nb_hash_occupied;
170 }
while ((!finished) && (n_left>0) && (_n_pass_max!=0));
172 rerun_allowed =
true;
175 return perform(_f, _Emin);
190 Esplit_merge_scale _split_merge_scale){
194 ptcomparison.split_merge_scale = _split_merge_scale;
202 for (i=0;i<protocones_list.size();i++)
203 add_protocones(&(protocones_list[i]), R2, _Emin);
206 return perform(_f, _Emin);
221 string siscone_package_name(){
230 string siscone_version(){
class corresponding to errors that will be thrown by siscone
static bool init_done
check random generator initialisation
int compute_jets(std::vector< CSphmomentum > &_particles, double _radius, double _f, int _n_pass_max=0, double _Emin=0.0, Esplit_merge_scale _split_merge_scale=SM_Etilde)
compute the jets from a given particle set.
void init(std::vector< CSphmomentum > &_particle_list)
initialisation
int recompute_jets(double _f, double _Emin=0.0, Esplit_merge_scale _split_merge_scale=SM_Etilde)
recompute the jets with a different overlap parameter.
~CSphsiscone()
default dtor
CSphsiscone()
default ctor