32#include "siscone_error.h"
52 rerun_allowed =
false;
58 rerun_allowed =
false;
62std::ostream* Csiscone::_banner_ostr = &cout;
80 int _n_pass_max,
double _ptmin,
81 Esplit_merge_scale _split_merge_scale){
82 _initialise_if_needed();
85 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
86 ostringstream message;
87 message <<
"Illegal value for cone radius, R = " << _radius
88 <<
" (legal values are 0<R<pi/2)";
101 bool finished =
false;
103 rerun_allowed =
false;
106#ifdef DEBUG_STABLE_CONES
107 nb_hash_cones_total = 0;
108 nb_hash_occupied_total = 0;
125#ifdef DEBUG_STABLE_CONES
126 nb_hash_cones_total += nb_hash_cones;
127 nb_hash_occupied_total += nb_hash_occupied;
135 }
while ((!finished) && (
n_left>0) && (_n_pass_max!=0));
137 rerun_allowed =
true;
157 int _n_pass_max,
double _ptmin,
158 Esplit_merge_scale _ordering_scale){
159 _initialise_if_needed();
162 if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
163 ostringstream message;
164 message <<
"Illegal value for cone radius, R = " << _radius
165 <<
" (legal values are 0<R<pi/2)";
179 bool unclustered_left;
180 rerun_allowed =
false;
198 }
while ((unclustered_left) && (
n_left>0) && (_n_pass_max!=0));
217 Esplit_merge_scale _split_merge_scale){
237void Csiscone::_initialise_if_needed(){
248 if (_banner_ostr != 0){
249 ios::fmtflags flags_to_restore(_banner_ostr->flags());
251 (*_banner_ostr) <<
"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
252 (*_banner_ostr) <<
"# SISCone version " << setw(28) << left << siscone_version() <<
"o" << endl;
253 (*_banner_ostr) <<
"# http://projects.hepforge.org/siscone o" << endl;
254 (*_banner_ostr) <<
"# o" << endl;
255 (*_banner_ostr) <<
"# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
256 (*_banner_ostr) <<
"# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
257 (*_banner_ostr) <<
"# It is released under the terms of the GNU General Public License o" << endl;
258 (*_banner_ostr) <<
"# o" << endl;
259 (*_banner_ostr) <<
"# A description of the algorithm is available in the publication o" << endl;
260 (*_banner_ostr) <<
"# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
261 (*_banner_ostr) <<
"# Please cite it if you use SISCone. o" << endl;
262 (*_banner_ostr) <<
"#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
263 (*_banner_ostr) << endl;
265 _banner_ostr->flush();
266 _banner_ostr->flags(flags_to_restore);
281string siscone_package_name(){
282 return SISCONE_PACKAGE_NAME;
290string siscone_version(){
291 return SISCONE_VERSION;
class corresponding to errors that will be thrown by siscone
std::vector< std::vector< Cmomentum > > protocones_list
list of protocones found pass-by-pass (not filled by compute_jets_progressive_removal)
int compute_jets(std::vector< Cmomentum > &_particles, double _radius, double _f, int _n_pass_max=0, double _ptmin=0.0, Esplit_merge_scale _split_merge_scale=SM_pttilde)
compute the jets from a given particle set.
int recompute_jets(double _f, double _ptmin=0.0, Esplit_merge_scale _split_merge_scale=SM_pttilde)
recompute the jets with a different overlap parameter.
int compute_jets_progressive_removal(std::vector< Cmomentum > &_particles, double _radius, int _n_pass_max=0, double _ptmin=0.0, Esplit_merge_scale _ordering_scale=SM_pttilde)
compute the jets from a given particle set.
static bool init_done
check random generator initialisation
Esplit_merge_scale split_merge_scale
the following parameter controls the variable we're using for the split-merge process i....
int n_left
numer of particles that does not belong to any jet
int add_hardest_protocone_to_jets(std::vector< Cmomentum > *protocones, double R2, double ptmin=0.0)
remove the hardest protocone and declare it a jet
int partial_clear()
partial clearance
int init_pleft()
build initial list of left particles
Csplit_merge_ptcomparison ptcomparison
member used for detailed comparisons of pt's
int perform(double overlap_tshold, double ptmin=0.0)
really do the splitting and merging At the end, the vector jets is filled with the jets found.
int add_protocones(std::vector< Cmomentum > *protocones, double R2, double ptmin=0.0)
add a list of protocones
std::vector< Cmomentum > p_uncol_hard
list of particles remaining with collinear clustering
std::vector< Cjet > jets
list of jets
int init_particles(std::vector< Cmomentum > &_particles)
initialisation function for particle list
void init(std::vector< Cmomentum > &_particle_list)
initialisation
std::vector< Cmomentum > protocones
list of stable cones
double R2
cone radius SQUARED
int get_stable_cones(double _radius)
compute stable cones.