SISCone  2.0.5
siscone/spherical/vicinity.h
00001 // -*- C++ -*-
00003 // File: vicinity.h                                                          //
00004 // Description: header file for particle vicinity (Cvicinity class)          //
00005 // This file is part of the SISCone project.                                 //
00006 // WARNING: this is not the main SISCone trunk but                           //
00007 //          an adaptation to spherical coordinates                           //
00008 // For more details, see http://projects.hepforge.org/siscone                //
00009 //                                                                           //
00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez                          //
00011 //                                                                           //
00012 // This program is free software; you can redistribute it and/or modify      //
00013 // it under the terms of the GNU General Public License as published by      //
00014 // the Free Software Foundation; either version 2 of the License, or         //
00015 // (at your option) any later version.                                       //
00016 //                                                                           //
00017 // This program is distributed in the hope that it will be useful,           //
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of            //
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             //
00020 // GNU General Public License for more details.                              //
00021 //                                                                           //
00022 // You should have received a copy of the GNU General Public License         //
00023 // along with this program; if not, write to the Free Software               //
00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
00025 //                                                                           //
00026 // $Revision:: 255                                                          $//
00027 // $Date:: 2008-07-12 17:40:35 +0200 (Sat, 12 Jul 2008)                     $//
00029 
00030 #ifndef __SPH_VICINITY_H__
00031 #define __SPH_VICINITY_H__
00032 
00033 #include <siscone/vicinity.h>
00034 #include <vector>
00035 #include <list>
00036 #include "momentum.h"
00037 #include <siscone/defines.h>
00038 #ifdef USE_QUADTREE_FOR_STABILITY_TEST
00039 #include <siscone/quadtree.h>
00040 #endif
00041 
00042 namespace siscone_spherical{
00043 
00044   
00052 class CSphvicinity_elm{
00053  public:
00055   CSphmomentum *v;
00056 
00058   siscone::Cvicinity_inclusion *is_inside;   
00059 
00060   // centre variables
00061   CSph3vector centre;         
00062   double angle;            
00063   bool side;               
00064   double cocircular_range; 
00065 
00066 
00069   std::list<CSphvicinity_elm * > cocircular;                                          
00070 };
00071 
00073 bool ve_less(CSphvicinity_elm *ve1, CSphvicinity_elm *ve2);
00074 
00075 
00083 class CSphvicinity{
00084  public:
00086   CSphvicinity();
00087 
00089   CSphvicinity(std::vector<CSphmomentum> &_particle_list);
00090 
00092   ~CSphvicinity();
00093 
00098   void set_particle_list(std::vector<CSphmomentum> &_particle_list);
00099 
00105   void build(CSphmomentum *_parent, double _VR);
00106 
00107   // cone kinematical information
00108   CSphmomentum *parent;      
00109   double VR;                 
00110   double VR2;                
00111   double cosVR;              
00112   double R;                  
00113   double R2;                 
00114   double tan2R;              
00115   double D2_R;               
00116   double inv_R_EPS_COCIRC;   
00117   double inv_R_2EPS_COCIRC;  
00118 
00119   // particle list information
00120   int n_part;                                 
00121   std::vector<CSphmomentum> plist;            
00122 
00123   std::vector<siscone::Cvicinity_inclusion> pincluded; 
00124   CSphvicinity_elm *ve_list;                  
00125 #ifdef USE_QUADTREE_FOR_STABILITY_TEST
00126   siscone::Cquadtree *quadtree;               
00127 #endif
00128 
00129   // vicinity information
00130   std::vector<CSphvicinity_elm*> vicinity;    
00131   unsigned int vicinity_size;                 
00132 
00133  protected:
00139   void append_to_vicinity(CSphmomentum *v);
00140 
00141   // internal variables
00142   CSph3vector parent_centre;    
00143   CSph3vector angular_dir1;     
00144   CSph3vector angular_dir2;     
00145 };
00146 
00147 }
00148 
00149 #endif
The SISCone project has been developed by Gavin Salam and Gregory Soyez
Documentation generated on Mon Jun 4 2012 18:23:38 for SISCone by  Doxygen 1.7.6.1