28#ifndef __SPLIT_MERGE_H__
29#define __SPLIT_MERGE_H__
31#include <siscone/config.h>
43const int CJET_INEXISTENT_PASS = -2;
96enum Esplit_merge_scale {
107std::string split_merge_scale_name(Esplit_merge_scale sms);
127 std::vector<double> *
pt;
169typedef std::multiset<siscone::Cjet,Csplit_merge_ptcomparison>::iterator cjet_iterator;
172typedef std::vector<siscone::Cjet>::iterator jet_iterator;
201 int init(std::vector<Cmomentum> &
_particles, std::vector<Cmomentum> *protocones,
double R2,
double ptmin=0.0);
272 return (
a.sm_var2 >
b.sm_var2);
308 int add_protocones(std::vector<Cmomentum> *protocones,
double R2,
double ptmin=0.0);
348 std::vector<double>
pt;
404 bool get_overlap(
const Cjet &
j1,
const Cjet &
j2,
double *v);
418 bool split(cjet_iterator &
it_j1, cjet_iterator &
it_j2);
428 bool merge(cjet_iterator &
it_j1, cjet_iterator &
it_j2);
444 double get_sm_var2(
Cmomentum &v,
double &pt_tilde);
448#ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR
449 std::unique_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates;
451 std::auto_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates;
462 bool use_pt_weighted_splitting;
468#ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES
class for holding a covering range in eta-phi
double pt_tilde
p-scheme pt
double sm_var2
ordering variable used for ordering and overlap in the split–merge.
int n
number of particles inside
int pass
pass at which the jet has been found It starts at 0 (first pass), -1 means infinite rapidity (it will...
Ceta_phi_range range
covered range in eta-phi
std::vector< int > contents
particle contents (list of indices)
base class for dynamic coordinates management
base class for user-defined ordering of stable cones
virtual ~Cuser_scale_base()
empty virtual dtor
virtual double operator()(const Cjet &jet) const =0
the scale associated with a given jet
virtual bool is_larger(const Cjet &a, const Cjet &b) const
returns true when the scale associated with jet a is larger than the scale associated with jet b
comparison of jets for split–merge ordering
std::vector< double > * pt
pointer to the pt of the particles
bool operator()(const Cjet &jet1, const Cjet &jet2) const
comparison between 2 jets
void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const
get the difference between 2 jets, calculated such that rounding errors will not affect the result ev...
std::vector< Cmomentum > * particles
pointer to the list of particles
Csplit_merge_ptcomparison()
default ctor
std::string SM_scale_name() const
return the name corresponding to the SM scale variable
Esplit_merge_scale split_merge_scale
the following parameter controls the variable we're using for the split-merge process i....
Class used to split and merge jets.
int init(std::vector< Cmomentum > &_particles, std::vector< Cmomentum > *protocones, double R2, double ptmin=0.0)
initialisation function
int set_pt_weighted_splitting(bool _use_pt_weighted_splitting)
use a pt-dependent boundary for splitting When called with true, the criterium for splitting two prot...
int n_pass
index of the run
int idx_size
number of elements in indices1
double SM_var2_hardest_cut_off
stop split–merge or progressive-removal when the squared SM_var of the hardest protojet is below this...
int n_left
numer of particles that does not belong to any jet
int * indices
maximal size array for indices works
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
bool merge_identical_protocones
The following flag indicates that identical protocones are to be merged automatically each time aroun...
std::vector< double > pt
list of particles' pt
int partial_clear()
partial clearance
int show()
show jets/candidates status
void set_user_scale(const Cuser_scale_base *user_scale_in)
associate a user-defined scale to order the stable cones
int init_pleft()
build initial list of left particles
Csplit_merge_ptcomparison ptcomparison
member used for detailed comparisons of pt's
int merge_collinear_and_remove_soft()
build the list 'p_uncol_hard' from p_remain by clustering collinear particles and removing particles ...
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.
const Cuser_scale_base * user_scale() const
return the user-defined scale (NULL if none)
std::vector< Cmomentum > particles
list of particles
double most_ambiguous_split
minimal difference in squared distance between a particle and two overlapping protojets when doing a ...
int add_protocones(std::vector< Cmomentum > *protocones, double R2, double ptmin=0.0)
add a list of protocones
~Csplit_merge()
default dtor
int save_contents(FILE *flux)
save final jets
double stable_cone_soft_pt2_cutoff
pt cutoff for the particles to put in p_uncol_hard this is meant to allow removing soft particles in ...
std::vector< Cmomentum > p_uncol_hard
list of particles remaining with collinear clustering
std::vector< Cjet > jets
list of jets
Csplit_merge()
default ctor
int full_clear()
full clearance
std::vector< Cmomentum > p_remain
list of particles remaining to deal with
int init_particles(std::vector< Cmomentum > &_particles)
initialisation function for particle list
a circulator that is foreseen to take as template member either a pointer or an iterator;