SISCone  2.0.5
siscone/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 // For more details, see http://projects.hepforge.org/siscone                //
00007 //                                                                           //
00008 // Copyright (c) 2006 Gavin Salam and Gregory Soyez                          //
00009 //                                                                           //
00010 // This program is free software; you can redistribute it and/or modify      //
00011 // it under the terms of the GNU General Public License as published by      //
00012 // the Free Software Foundation; either version 2 of the License, or         //
00013 // (at your option) any later version.                                       //
00014 //                                                                           //
00015 // This program is distributed in the hope that it will be useful,           //
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of            //
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             //
00018 // GNU General Public License for more details.                              //
00019 //                                                                           //
00020 // You should have received a copy of the GNU General Public License         //
00021 // along with this program; if not, write to the Free Software               //
00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
00023 //                                                                           //
00024 // $Revision:: 123                                                          $//
00025 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)                     $//
00027 
00028 #ifndef __VICINITY_H__
00029 #define __VICINITY_H__
00030 
00031 #include <vector>
00032 #include <list>
00033 #include "momentum.h"
00034 #include "defines.h"
00035 #include "quadtree.h"
00036 
00037 namespace siscone{
00038 
00039   
00040 
00046 class Cvicinity_inclusion {
00047 public:
00049   Cvicinity_inclusion() : cone(false), cocirc(false) {}
00050 
00051   bool cone;    
00052   bool cocirc;  
00053 };
00054 
00055 
00063 class Cvicinity_elm{
00064  public:
00066   Cmomentum *v;
00067 
00069   Cvicinity_inclusion *is_inside;   
00070 
00071   // centre variables
00072   double eta;              
00073   double phi;              
00074   double angle;            
00075   bool side;               
00076   double cocircular_range; 
00077 
00078 
00081   std::list<Cvicinity_elm * > cocircular;                                          
00082 };
00083 
00085 bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2);
00086 
00087 
00095 class Cvicinity{
00096  public:
00098   Cvicinity();
00099 
00101   Cvicinity(std::vector<Cmomentum> &_particle_list);
00102 
00104   ~Cvicinity();
00105 
00110   void set_particle_list(std::vector<Cmomentum> &_particle_list);
00111 
00117   void build(Cmomentum *_parent, double _VR);
00118 
00119   // cone kinematical information
00120   Cmomentum *parent;         
00121   double VR;                 
00122   double VR2;                
00123   double R;                  
00124   double R2;                 
00125   double inv_R_EPS_COCIRC;   
00126   double inv_R_2EPS_COCIRC;  
00127 
00128   // particle list information
00129   int n_part;                                 
00130   std::vector<Cmomentum> plist;               
00131   std::vector<Cvicinity_inclusion> pincluded; 
00132   Cvicinity_elm *ve_list;                     
00133 #ifdef USE_QUADTREE_FOR_STABILITY_TEST
00134   Cquadtree *quadtree;                        
00135 #endif
00136 
00137   // vicinity information
00138   std::vector<Cvicinity_elm*> vicinity;       
00139   unsigned int vicinity_size;                 
00140 
00141  protected:
00147   void append_to_vicinity(Cmomentum *v);
00148 
00149   // internal variables
00150   double pcx;    
00151   double pcy;    
00152 };
00153 
00154 }
00155 
00156 #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