SISCone  2.0.5
siscone/hash.h
00001 // -*- C++ -*-
00003 // File: hash.h                                                              //
00004 // Description: header file for classes hash_element and hash_cones          //
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:: 224                                                          $//
00025 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)                     $//
00027 
00028 #ifndef __HASH_H__
00029 #define __HASH_H__
00030 
00031 #include "momentum.h"
00032 #include "reference.h"
00033 
00034 namespace siscone{
00035 
00045 class hash_element{
00046  public:
00047   Creference ref;      
00048   double eta;          
00049   double phi;          
00050   bool is_stable;      
00051 
00052   hash_element *next;  
00053 };
00054 
00062 class hash_cones{
00063  public:
00067   hash_cones(int _Np, double _R2);
00068 
00070   ~hash_cones();
00071 
00081   int insert(Cmomentum *v, Cmomentum *parent, Cmomentum *child, bool p_io, bool c_io);
00082 
00090   int insert(Cmomentum *v);
00091 
00093   hash_element **hash_array;
00094 
00096   int n_cones;
00097 
00099 #ifdef DEBUG_STABLE_CONES
00100   int n_occupied_cells;
00101 #endif
00102 
00104   int mask;
00105 
00108   double R2;
00109 
00118   inline bool is_inside(Cmomentum *centre, Cmomentum *v);
00119 };
00120 
00121 }
00122 #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