siscone is hosted by Hepforge, IPPP Durham

The SISCone Jet Algorithm

Version 3.0.6



SISCone 3.0.6
siscone::hash_cones Class Reference

list of cones candidates. More...

#include <hash.h>

Collaboration diagram for siscone::hash_cones:

Public Member Functions

 hash_cones (int _Np, double _R2)
 constructor with initialisation More...
 
 ~hash_cones ()
 destructor More...
 
int insert (Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io)
 insert a new candidate into the hash. More...
 
int insert (Cmomentum *v)
 insert a new candidate into the hash. More...
 
bool is_inside (Cmomentum *centre, Cmomentum *v)
 test if a particle is inside a cone of given centre. More...
 

Public Attributes

hash_element ** hash_array
 the cone data itself More...
 
int n_cones
 number of elements More...
 
int mask
 number of occupied cells More...
 
double R2
 circle radius (squared) NOTE: need to be set before any call to 'insert' More...
 

Detailed Description

list of cones candidates.

We store in this class all the hash_elements and give functions to manipulate them.

Definition at line 62 of file hash.h.

Constructor & Destructor Documentation

◆ hash_cones()

siscone::hash_cones::hash_cones ( int  _Np,
double  _R2 
)

constructor with initialisation

Parameters
_Npnumber of particles
_R2cone radius (squared)

Definition at line 47 of file hash.cpp.

References hash_array, mask, n_cones, and R2.

◆ ~hash_cones()

siscone::hash_cones::~hash_cones ( )

destructor

Definition at line 77 of file hash.cpp.

References hash_array, mask, and siscone::hash_element::next.

Member Function Documentation

◆ insert() [1/2]

int siscone::hash_cones::insert ( Cmomentum v)

insert a new candidate into the hash.

Parameters
v4-momentum of te cone to add Note, in this case, we assume stability. We also assume that eta and phi are computed for v
Returns
0 on success, 1 on error

Definition at line 171 of file hash.cpp.

References siscone::hash_element::eta, siscone::Cmomentum::eta, hash_array, siscone::hash_element::is_stable, mask, n_cones, siscone::hash_element::next, siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref, siscone::Cmomentum::ref, and siscone::Creference::ref.

◆ insert() [2/2]

int siscone::hash_cones::insert ( Cmomentum v,
Cmomentum parent,
Cmomentum child,
bool  p_io,
bool  c_io 
)

insert a new candidate into the hash.

Parameters
v4-momentum of te cone to add
parentparent particle defining the cone
childchild particle defining the cone
p_iowhether the parent has to belong to the cone or not
c_iowhether the child has to belong to the cone or not
Returns
0 on success, 1 on error

Definition at line 102 of file hash.cpp.

References siscone::Cmomentum::build_etaphi(), siscone::hash_element::eta, siscone::Cmomentum::eta, hash_array, is_inside(), siscone::hash_element::is_stable, mask, n_cones, siscone::hash_element::next, siscone::hash_element::phi, siscone::Cmomentum::phi, siscone::hash_element::ref, siscone::Cmomentum::ref, and siscone::Creference::ref.

◆ is_inside()

bool siscone::hash_cones::is_inside ( Cmomentum centre,
Cmomentum v 
)
inline

test if a particle is inside a cone of given centre.

check if the particle of coordinates 'v' is inside the circle of radius R centered at 'centre'.

Parameters
centrecentre of the circle
vparticle to test
Returns
true if inside, false if outside

Definition at line 219 of file hash.cpp.

References siscone::Cmomentum::eta, siscone::Cmomentum::phi, and R2.

Referenced by insert().

Member Data Documentation

◆ hash_array

hash_element** siscone::hash_cones::hash_array

the cone data itself

Definition at line 93 of file hash.h.

Referenced by hash_cones(), insert(), and ~hash_cones().

◆ mask

int siscone::hash_cones::mask

number of occupied cells

number of cells-1

Definition at line 104 of file hash.h.

Referenced by hash_cones(), insert(), and ~hash_cones().

◆ n_cones

int siscone::hash_cones::n_cones

number of elements

Definition at line 96 of file hash.h.

Referenced by hash_cones(), and insert().

◆ R2

double siscone::hash_cones::R2

circle radius (squared) NOTE: need to be set before any call to 'insert'

Definition at line 108 of file hash.h.

Referenced by hash_cones(), and is_inside().


The documentation for this class was generated from the following files:

The SISCone project has been developed by Gavin Salam and Gregory Soyez
Documentation generated on Tue Jun 20 2023 18:08:37 for SISCone by  Doxygen 1.9.4