30 #ifndef __SPH_SPLIT_MERGE_H__
31 #define __SPH_SPLIT_MERGE_H__
101 enum Esplit_merge_scale {
107 std::string split_merge_scale_name(Esplit_merge_scale sms);
159 typedef std::multiset<siscone_spherical::CSphjet,CSphsplit_merge_ptcomparison>::iterator cjet_iterator;
162 typedef std::vector<siscone_spherical::CSphjet>::iterator jet_iterator;
191 int init(std::vector<CSphmomentum> &_particles, std::vector<CSphmomentum> *protocones,
double R2,
double Emin=0.0);
217 use_E_weighted_splitting = _use_E_weighted_splitting;
254 int add_protocones(std::vector<CSphmomentum> *protocones,
double R2,
double Emin=0.0);
265 int perform(
double overlap_tshold,
double Emin=0.0);
333 bool get_overlap(
const CSphjet &j1,
const CSphjet &j2,
double *v);
347 bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);
357 bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);
376 void compute_Etilde(
CSphjet &j);
380 std::auto_ptr<std::multiset<CSphjet,CSphsplit_merge_ptcomparison> > candidates;
390 bool use_E_weighted_splitting;
392 #ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES
393 std::set<siscone::Creference> cand_refs;
void get_difference(const CSphjet &j1, const CSphjet &j2, CSphmomentum *v, double *E_tilde) const
get the difference between 2 jets, calculated such that rounding errors will not affect the result ev...
int set_E_weighted_splitting(bool _use_E_weighted_splitting)
use an energy-dependent boundary for splitting When called with true, the criterium for splitting two...
int n
number of particles inside
CSphsplit_merge()
default ctor
std::vector< double > particles_norm2
norm^2 of the particle (3-vect part)
std::string SM_scale_name() const
return the name corresponding to the SM scale variable
std::vector< CSphmomentum > particles
list of particles
Esplit_merge_scale split_merge_scale
the following parameter controls the variable we're using for the split-merge process i...
a class that allows us to carry out comparisons of pt of jets, using information from exact particle ...
bool operator()(const CSphjet &jet1, const CSphjet &jet2) const
comparison of 2 CSphjet
double sm_var2
ordering variable used for ordering and overlap in the split–merge.
int merge_collinear_and_remove_soft()
build the list 'p_uncol_hard' from p_remain by clustering collinear particles note that thins in only...
std::vector< CSphmomentum > * particles
pointer to the list of particles
double SM_var2_hardest_cut_off
stop split–merge when the SM_var of the hardest protojet is below this cut-off. ...
double stable_cone_soft_E2_cutoff
Energy cutoff for the particles to put in p_uncol_hard this is meant to allow removing soft particles...
std::vector< CSphjet > jets
list of jets
bool merge_identical_protocones
The following flag indicates that identical protocones are to be merged automatically each time aroun...
int * indices
maximal size array for indices works
Class used to split and merge jets.
int full_clear()
full clearance
int init_particles(std::vector< CSphmomentum > &_particles)
initialisation function for particle list
int save_contents(FILE *flux)
save final jets
CSphtheta_phi_range range
covered range in eta-phi
int n_pass
index of the run
double most_ambiguous_split
minimal difference in squared distance between a particle and two overlapping protojets when doing a ...
CSphsplit_merge_ptcomparison ptcomparison
member used for detailed comparisons of pt's
int add_protocones(std::vector< CSphmomentum > *protocones, double R2, double Emin=0.0)
add a list of protocones
CSphmomentum v
jet momentum
class for holding a covering range in eta-phi
double E_tilde
sum of E_i [ 1 +|p_i x p_J|^2/(|p_i|^2 E_J^2)]
std::vector< CSphmomentum > p_uncol_hard
list of particles remaining with collinear clustering
int init(std::vector< CSphmomentum > &_particles, std::vector< CSphmomentum > *protocones, double R2, double Emin=0.0)
initialisation function
~CSphsplit_merge()
default dtor
int pass
pass at which the jet has been found It starts at 0 (first pass), -1 means infinite rapidity ...
std::vector< CSphmomentum > p_remain
list of particles remaining to deal with
std::vector< int > contents
particle contents (list of indices)
int show()
show jets/candidates status
int partial_clear()
partial clearance
int perform(double overlap_tshold, double Emin=0.0)
really do the splitting and merging At the end, the vector jets is filled with the jets found...
int idx_size
number of elements in indices1
int init_pleft()
build initial list of left particles
base class for dynamic coordinates management
CSphsplit_merge_ptcomparison()
default ctor
std::vector< double > * particles_norm2
pointer to the particles's norm^2
int n_left
numer of particles that does not belong to any jet