![]() |
|
|||
File indexing completed on 2025-02-22 10:55:44
0001 // -*- C++ -*- 0002 /////////////////////////////////////////////////////////////////////////////// 0003 // File: siscone.h // 0004 // Description: header file for the main SISCone class // 0005 // This file is part of the SISCone project. // 0006 // WARNING: this is not the main SISCone trunk but // 0007 // an adaptation to spherical coordinates // 0008 // For more details, see http://projects.hepforge.org/siscone // 0009 // // 0010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez // 0011 // // 0012 // This program is free software; you can redistribute it and/or modify // 0013 // it under the terms of the GNU General Public License as published by // 0014 // the Free Software Foundation; either version 2 of the License, or // 0015 // (at your option) any later version. // 0016 // // 0017 // This program is distributed in the hope that it will be useful, // 0018 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 0019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 0020 // GNU General Public License for more details. // 0021 // // 0022 // You should have received a copy of the GNU General Public License // 0023 // along with this program; if not, write to the Free Software // 0024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 0025 // // 0026 // $Revision:: $// 0027 // $Date:: $// 0028 /////////////////////////////////////////////////////////////////////////////// 0029 0030 #ifndef __SPH_SISCONE_H__ 0031 #define __SPH_SISCONE_H__ 0032 0033 #include "protocones.h" 0034 #include "split_merge.h" 0035 0036 namespace siscone_spherical{ 0037 0038 /** 0039 * \class CSphsiscone 0040 * final class: gather everything to compute the jet contents. 0041 * 0042 * This is the class user should use. 0043 * It computes the jet contents of a list of particles 0044 * given a cone radius and a threshold for splitting/merging. 0045 * 0046 * After the call to 'perform', the vector jets is filled with 0047 * the jets found. the 'contents' field of each jets contains 0048 * the indices of the particles included in that jet. 0049 */ 0050 class CSphsiscone : public CSphstable_cones, public CSphsplit_merge{ 0051 public: 0052 /// default ctor 0053 CSphsiscone(); 0054 0055 /// default dtor 0056 ~CSphsiscone(); 0057 0058 /** 0059 * compute the jets from a given particle set. 0060 * We are doing multiple passes such pass n_pass looks for jets among 0061 * all particles not put into jets during previous passes. 0062 * By default the number of passes is infinite (0). 0063 * \param _particles list of particles 0064 * \param _radius cone radius 0065 * \param _f shared energy threshold for splitting&merging 0066 * \param _n_pass_max maximum number of passes (0=full search) 0067 * \param _Emin minimum energy of the protojets 0068 * \param _split_merge_scale the scale choice for the split-merge procedure 0069 * NOTE: SM_Etilde 0070 * is always IR safe 0071 * SM_E 0072 * is IR unsafe for events with mom. conservation 0073 * 0074 * \return the number of jets found. 0075 */ 0076 int compute_jets(std::vector<CSphmomentum> &_particles, double _radius, double _f, 0077 int _n_pass_max=0, double _Emin=0.0, 0078 Esplit_merge_scale _split_merge_scale=SM_Etilde); 0079 0080 /** 0081 * compute the jets from a given particle set. 0082 * We are doing multiple passes such pass n_pass looks for jets among 0083 * all particles not put into jets during previous passes. 0084 * By default the number of passes is infinite (0). 0085 * \param _particles list of particles 0086 * \param _radius cone radius 0087 * \param _n_pass_max maximum number of passes (0=full search) 0088 * \param _Emin minimum energy of the protojets 0089 * \param _ordering_scale the ordering scale to decide which stable 0090 * cone is removed 0091 * 0092 * \return the number of jets found. 0093 */ 0094 int compute_jets_progressive_removal(std::vector<CSphmomentum> &_particles, double _radius, 0095 int _n_pass_max=0, double _Emin=0.0, 0096 Esplit_merge_scale _ordering_scale=SM_Etilde); 0097 0098 /** 0099 * recompute the jets with a different overlap parameter. 0100 * we use the same particles and R as in the preceeding call. 0101 * \param _f shared energy threshold for splitting&merging 0102 * \param _Emin minimum energy of the protojets 0103 * \param _split_merge_scale the scale choice for the split-merge procedure 0104 * split--merge variable 0105 * NOTE: using pt leads to IR unsafety for some events with momentum 0106 * conservation. So we strongly advise not to change the default 0107 * value. 0108 * \return the number of jets found, -1 if recomputation not allowed. 0109 */ 0110 int recompute_jets(double _f, double _Emin = 0.0, 0111 Esplit_merge_scale _split_merge_scale=SM_Etilde); 0112 0113 /// list of protocones found pass-by-pass 0114 std::vector<std::vector<CSphmomentum> > protocones_list; 0115 0116 // random number initialisation 0117 static bool init_done; ///< check random generator initialisation 0118 0119 #ifdef DEBUG_STABLE_CONES 0120 int nb_hash_cones_total, nb_hash_occupied_total; 0121 #endif 0122 0123 /** 0124 * A call to this function modifies the stream 0125 * used to print banners (by default cout). 0126 * 0127 * Please note that if you distribute 3rd party code 0128 * that links with SISCone, that 3rd party code must not 0129 * use this call turn off the printing of thw banner 0130 * by default. This requirement reflects the spirit of 0131 * clause 2c of the GNU Public License (v2), under which 0132 * SISCone is distributed. 0133 */ 0134 static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;} 0135 0136 /** 0137 * returns a pointer to the stream to be used to print banners 0138 * (cout by default) 0139 */ 0140 static std::ostream * banner_stream() {return _banner_ostr;} 0141 0142 private: 0143 bool rerun_allowed; ///< is recompute_jets allowed ? 0144 static std::ostream * _banner_ostr; ///< stream to use for banners 0145 0146 /// ensure things are initialised 0147 void _initialise_if_needed(); 0148 0149 }; 0150 0151 0152 // finally, a bunch of functions to access to 0153 // basic information (package name, version) 0154 //--------------------------------------------- 0155 0156 /** 0157 * return SISCone package name. 0158 * This is nothing but "SISCone", it is a replacement to the 0159 * SISCONE_PACKAGE_NAME string defined in config.h and which is not 0160 * guaranteed to be public. 0161 * \return the SISCone name as a string 0162 */ 0163 std::string siscone_package_name(); 0164 0165 /** 0166 * return SISCone version number. 0167 * \return a string of the form "X.Y.Z" with possible additional tag 0168 * (alpha, beta, devel) to mention stability status 0169 */ 0170 std::string siscone_version(); 0171 0172 } 0173 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |