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
125 for (i=0;i<(int) _particle_list.size();i++){
128 if (fabs(_particle_list[i].pz)!=_particle_list[i].E){
129 plist.push_back(_particle_list[i]);
141#ifdef USE_QUADTREE_FOR_STABILITY_TEST
152#ifdef USE_QUADTREE_FOR_STABILITY_TEST
154 quadtree =
new Cquadtree(0.0, 0.0, eta_max, M_PI);
160#ifdef USE_QUADTREE_FOR_STABILITY_TEST
161 quadtree->add(&
plist[i]);
208inline double sort_angle(
double s,
double c){
209 if (s==0)
return (c>0) ? 0.0 : 2.0;
211 return (s>0) ? 1-t/(1+fabs(t)) : 3-t/(1+fabs(t));
248 tmp = sqrt(
VR2/d2-1);
285 c = dot_product(OP,OC);
286 s = fabs(cross_product(OP,OC));
291 sqrt(1.0/inv_err2_sq);
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
#define EPSILON_COCIRCULAR
The following parameter controls cocircular situations.
const double twopi
definition of 2*M_PI which is useful a bit everyhere!