51 #ifdef DEBUG_STABLE_CONES
59 int nbits = (int) (log(_Np*_R2*_Np/4.0)/log(2.0));
69 for (i=0;i<mask+1;i++)
81 for (i=0;i<mask+1;i++){
82 while (hash_array[i]!=NULL){
84 hash_array[i] = hash_array[i]->
next;
104 int index = (v->
ref.
ref[0]) & mask;
107 elm = hash_array[index];
109 #ifdef DEBUG_STABLE_CONES
131 elm->
is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
135 elm->
next = hash_array[index];
136 hash_array[index] = elm;
147 elm->
is_stable = !((is_inside(v, parent)^p_io)||(is_inside(v, child)^c_io));
173 int index = (v->
ref.
ref[0]) & mask;
177 elm = hash_array[index];
193 elm->
next = hash_array[index];
194 hash_array[index] = elm;
222 dx = centre->
eta - v->
eta;
223 dy = fabs(centre->
phi - v->
phi);
227 return dx*dx+dy*dy<R2;
hash_element * next
pointer to the next element
base class for dynamic coordinates management
double eta
centre: eta coordinate
Creference ref
reference number for the vector
hash_cones(int _Np, double _R2)
constructor with initialisation
information on store cones candidates.
double phi
particle azimuthal angle
bool is_stable
true if stable w.r.t. "border particles"
unsigned int ref[3]
actual data for the reference
void build_etaphi()
build eta-phi from 4-momentum info !!! WARNING !!! !!! computing eta and phi is time-consuming !!! !!...
int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io)
insert a new candidate into the hash.
double phi
centre: phi coordinate
bool is_inside(Cmomentum *centre, Cmomentum *v)
test if a particle is inside a cone of given centre.
double eta
particle pseudo-rapidity