45bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2){
46 return ve1->angle < ve2->angle;
64#ifdef USE_QUADTREE_FOR_STABILITY_TEST
77#ifdef USE_QUADTREE_FOR_STABILITY_TEST
92#ifdef USE_QUADTREE_FOR_STABILITY_TEST
105#ifdef USE_QUADTREE_FOR_STABILITY_TEST
114#ifdef USE_QUADTREE_FOR_STABILITY_TEST
141#ifdef USE_QUADTREE_FOR_STABILITY_TEST
152#ifdef USE_QUADTREE_FOR_STABILITY_TEST
160#ifdef USE_QUADTREE_FOR_STABILITY_TEST
208inline double sort_angle(
double s,
double c){
209 if (
s==0)
return (
c>0) ? 0.0 : 2.0;
285 c = dot_product(
OP,
OC);
base class for dynamic coordinates management
int index
internal particle number
double eta
particle pseudo-rapidity
double phi
particle azimuthal angle
Implementation of a 2D quadtree.
class for holding a two-vector
element in the vicinity of a parent.
Cmomentum * v
pointer to the second borderline particle
double angle
angle with parent
std::list< Cvicinity_elm * > cocircular
list of elements co-circular with this one NB: empty list uses less mem than vector
double eta
eta coordinate of the center
double phi
phi coordinate of the center
Cvicinity_inclusion * is_inside
variable to tell if the particle is inside or outside the cone
double cocircular_range
amount by which the angle can be varied while maintaining this point within co-circularity margin
bool side
true if angle on the positive side, false otherwise
a class to keep track of inclusion status in cone and in cocircular region while using minimal resour...
Cmomentum * parent
parent vector
int n_part
number of particles
std::vector< Cvicinity_inclusion > pincluded
the inclusion state of particles
double inv_R_EPS_COCIRC
R / EPSILON_COCIRCULAR.
Cvicinity_elm * ve_list
list of vicinity elements built from particle list (size=2*n)
double pcx
parent centre (eta)
void append_to_vicinity(Cmomentum *v)
append a particle to the 'vicinity' list after having tested it and computed the angular-ordering qua...
double pcy
parent centre (phi)
std::vector< Cmomentum > plist
the list of particles
std::vector< Cvicinity_elm * > vicinity
list of points in parent's vicinity
unsigned int vicinity_size
number of elements in vicinity
double VR
radius of the vicinity
double VR2
squared radius of the vicinity
double R2
squared normal radius
void build(Cmomentum *_parent, double _VR)
build the vicinity list from the list of points.
double inv_R_2EPS_COCIRC
R / (2*EPSILON_COCIRCULAR)
Cvicinity()
default constructor
~Cvicinity()
default destructor
void set_particle_list(std::vector< Cmomentum > &_particle_list)
set the particle_list
a circulator that is foreseen to take as template member either a pointer or an iterator;
#define EPSILON_COCIRCULAR
The following parameter controls cocircular situations.
const double twopi
definition of 2*M_PI which is useful a bit everyhere!