]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/fastjet/siscone/spherical/siscone.h
added pdet-ppart over ppart histogram for detector response
[u/mrichter/AliRoot.git] / JETAN / fastjet / siscone / spherical / siscone.h
1 // -*- C++ -*-
2 ///////////////////////////////////////////////////////////////////////////////
3 // File: siscone.h                                                           //
4 // Description: header file for the main SISCone 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:: 261                                                          $//
27 // $Date:: 2008-07-23 17:54:30 +0200 (Wed, 23 Jul 2008)                     $//
28 ///////////////////////////////////////////////////////////////////////////////
29
30 #ifndef __SPH_SISCONE_H__
31 #define __SPH_SISCONE_H__
32
33 #include "protocones.h"
34 #include "split_merge.h"
35
36 namespace siscone_spherical{
37
38 /**
39  * \class CSphsiscone
40  * final class: gather everything to compute the jet contents.
41  * 
42  * This is the class user should use.
43  * It computes the jet contents of a list of particles
44  * given a cone radius and a threshold for splitting/merging.
45  *
46  * After the call to 'perform', the vector jets is filled with
47  * the jets found. the 'contents' field of each jets contains
48  * the indices of the particles included in that jet. 
49  */
50 class CSphsiscone : public CSphstable_cones, public CSphsplit_merge{
51  public:
52   /// default ctor
53   CSphsiscone();
54
55   /// default dtor
56   ~CSphsiscone();
57
58   /**
59    * compute the jets from a given particle set.
60    * We are doing multiple passes such pass n_pass looks for jets among 
61    * all particles not put into jets during previous passes.
62    * By default the number of passes is infinite (0). 
63    * \param _particles   list of particles
64    * \param _radius      cone radius
65    * \param _f           shared energy threshold for splitting&merging
66    * \param _n_pass_max  maximum number of passes (0=full search)
67    * \param _Emin        minimum energy of the protojets
68    * \param _split_merge_scale    the scale choice for the split-merge procedure
69    *        NOTE: SM_Etilde  
70    *                    is always IR safe
71    *              SM_E
72    *                    is IR unsafe for events with mom. conservation
73    *
74    * \return the number of jets found.
75    */
76   int compute_jets(std::vector<CSphmomentum> &_particles, double _radius, double _f, 
77                    int _n_pass_max=0, double _Emin=0.0,
78                    Esplit_merge_scale _split_merge_scale=SM_Etilde);
79
80   /**
81    * recompute the jets with a different overlap parameter.
82    * we use the same particles and R as in the preceeding call.
83    * \param _f           shared energy threshold for splitting&merging
84    * \param _Emin        minimum energy of the protojets
85    * \param _split_merge_scale    the scale choice for the split-merge procedure
86    *                                           split--merge variable
87    *        NOTE: using pt leads to IR unsafety for some events with momentum
88    *              conservation. So we strongly advise not to change the default
89    *              value.
90    * \return the number of jets found, -1 if recomputation not allowed.
91    */
92   int recompute_jets(double _f, double _Emin = 0.0,
93                      Esplit_merge_scale _split_merge_scale=SM_Etilde);
94
95   /// list of protocones found pass-by-pass
96   std::vector<std::vector<CSphmomentum> > protocones_list;
97
98   // random number initialisation
99   static bool init_done;      ///< check random generator initialisation
100
101 #ifdef DEBUG_STABLE_CONES
102   int nb_hash_cones_total, nb_hash_occupied_total;
103 #endif
104
105  private:
106   bool rerun_allowed;         ///< is recompute_jets allowed ?
107 };
108
109   
110 // finally, a bunch of functions to access to 
111 // basic information (package name, version)
112 //---------------------------------------------
113
114 /** 
115  * return SISCone package name.
116  * This is nothing but "SISCone", it is a replacement to the
117  * PACKAGE_NAME string defined in config.h and which is not
118  * public by default.
119  * \return the SISCone name as a string
120  */
121 std::string siscone_package_name();
122
123 /** 
124  * return SISCone version number.
125  * \return a string of the form "X.Y.Z" with possible additional tag
126  *         (alpha, beta, devel) to mention stability status
127  */
128 std::string siscone_version();
129
130 }
131 #endif