siscone is hosted by Hepforge, IPPP Durham

The SISCone Jet Algorithm

Version 3.0.6



SISCone 3.0.6
vicinity.h
1// -*- C++ -*-
3// File: vicinity.h //
4// Description: header file for particle vicinity (Cvicinity class) //
5// This file is part of the SISCone project. //
6// WARNING: this is not the main SISCone trunk but //
7// an adaptation to spherical coordinates //
8// For more details, see http://projects.hepforge.org/siscone //
9// //
10// Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez //
11// //
12// This program is free software; you can redistribute it and/or modify //
13// it under the terms of the GNU General Public License as published by //
14// the Free Software Foundation; either version 2 of the License, or //
15// (at your option) any later version. //
16// //
17// This program is distributed in the hope that it will be useful, //
18// but WITHOUT ANY WARRANTY; without even the implied warranty of //
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20// GNU General Public License for more details. //
21// //
22// You should have received a copy of the GNU General Public License //
23// along with this program; if not, write to the Free Software //
24// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
25// //
26// $Revision:: $//
27// $Date:: $//
29
30#ifndef __SPH_VICINITY_H__
31#define __SPH_VICINITY_H__
32
33#include <siscone/vicinity.h>
34#include <vector>
35#include <list>
36#include "momentum.h"
37#include <siscone/defines.h>
38#ifdef USE_QUADTREE_FOR_STABILITY_TEST
39#include <siscone/quadtree.h>
40#endif
41
42namespace siscone_spherical{
43
44
53 public:
56
59
60 // centre variables
62 double angle;
63 bool side;
66
69 std::list<CSphvicinity_elm * > cocircular;
70};
71
73bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2);
74
75
84 public:
87
89 CSphvicinity(std::vector<CSphmomentum> &_particle_list);
90
93
98 void set_particle_list(std::vector<CSphmomentum> &_particle_list);
99
105 void build(CSphmomentum *_parent, double _VR);
106
107 // cone kinematical information
109 double VR;
110 double VR2;
111 double cosVR;
112 double R;
113 double R2;
114 double tan2R;
115 double D2_R;
118
119 // particle list information
120 int n_part;
121 std::vector<CSphmomentum> plist;
123 std::vector<siscone::Cvicinity_inclusion> pincluded;
125#ifdef USE_QUADTREE_FOR_STABILITY_TEST
126 siscone::Cquadtree *quadtree;
127#endif
128
129 // vicinity information
130 std::vector<CSphvicinity_elm*> vicinity;
131 unsigned int vicinity_size;
132
133 protected:
140
141 // internal variables
145};
146
147}
148
149#endif
Implementation of a 2D quadtree.
Definition: quadtree.h:43
a class to keep track of inclusion status in cone and in cocircular region while using minimal resour...
Definition: vicinity.h:46
base class for managing the spatial part of Cmomentum (defined after)
Definition: momentum.h:54
base class for dynamic coordinates management
Definition: momentum.h:158
element in the vicinity of a parent.
Definition: vicinity.h:52
double cocircular_range
amount by which the angle can be varied while maintaining this point within co-circularity margin
Definition: vicinity.h:64
bool side
true if angle on the positive side, false otherwise
Definition: vicinity.h:63
CSph3vector centre
direction of the centre
Definition: vicinity.h:61
std::list< CSphvicinity_elm * > cocircular
list of elements co-circular with this one NB: empty list uses less mem than vector
Definition: vicinity.h:69
double angle
angle with parent
Definition: vicinity.h:62
CSphmomentum * v
pointer to the second borderline particle
Definition: vicinity.h:55
siscone::Cvicinity_inclusion * is_inside
variable to tell if the particle is inside or outside the cone
Definition: vicinity.h:58
list of element in the vicinity of a parent.
Definition: vicinity.h:83
double VR
radius of the vicinity
Definition: vicinity.h:109
~CSphvicinity()
default destructor
Definition: vicinity.cpp:90
CSphvicinity_elm * ve_list
list of vicinity elements built from particle list (size=2*n)
Definition: vicinity.h:124
std::vector< CSphmomentum > plist
the list of particles
Definition: vicinity.h:121
double D2_R
euclidian distance (squared) corresp. to the arc R
Definition: vicinity.h:115
double inv_R_2EPS_COCIRC
R / (2*EPSILON_COCIRCULAR)
Definition: vicinity.h:117
std::vector< siscone::Cvicinity_inclusion > pincluded
the inclusion state of particles
Definition: vicinity.h:123
CSph3vector angular_dir2
second direction to measure angles (sign)
Definition: vicinity.h:144
CSph3vector angular_dir1
main direction to measure angles
Definition: vicinity.h:143
CSphmomentum * parent
parent vector
Definition: vicinity.h:108
void append_to_vicinity(CSphmomentum *v)
append a particle to the 'vicinity' list after having tested it and computed the angular-ordering qua...
Definition: vicinity.cpp:234
std::vector< CSphvicinity_elm * > vicinity
list of points in parent's vicinity
Definition: vicinity.h:130
CSphvicinity()
default constructor
Definition: vicinity.cpp:62
double cosVR
cosine of the radius of the vicinity
Definition: vicinity.h:111
double tan2R
squared tangent of the normal radius
Definition: vicinity.h:114
void set_particle_list(std::vector< CSphmomentum > &_particle_list)
set the particle_list
Definition: vicinity.cpp:105
int n_part
number of particles
Definition: vicinity.h:120
CSph3vector parent_centre
parent centre
Definition: vicinity.h:142
unsigned int vicinity_size
number of elements in vicinity
Definition: vicinity.h:131
double VR2
squared radius of the vicinity
Definition: vicinity.h:110
double R
normal radius
Definition: vicinity.h:112
double inv_R_EPS_COCIRC
R / EPSILON_COCIRCULAR.
Definition: vicinity.h:116
double R2
squared normal radius
Definition: vicinity.h:113
void build(CSphmomentum *_parent, double _VR)
build the vicinity list from the list of points.
Definition: vicinity.cpp:177
CSphvicinity(std::vector< CSphmomentum > &_particle_list)
constructor with initialisation (see set_particle_list)

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