Changeset 49234af in git for external/fastjet/plugins/SISCone/siscone.cc
- Timestamp:
- Dec 9, 2014, 1:27:13 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 37deb3b, 9e991f8
- Parents:
- f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/plugins/SISCone/siscone.cc
rf6b6ee7 r49234af 21 21 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 22 22 // // 23 // $Revision:: 24 // $Date:: 23 // $Revision:: 371 $// 24 // $Date:: 2014-09-09 10:05:32 +0200 (Tue, 09 Sep 2014) $// 25 25 /////////////////////////////////////////////////////////////////////////////// 26 26 … … 29 29 //#else 30 30 //#define PACKAGE_NAME "SISCone" 31 //#define VERSION " 2.0.6"31 //#define VERSION "3.0.0" 32 32 //#warning "No config.h file available, using preset values" 33 33 //#endif … … 87 87 int _n_pass_max, double _ptmin, 88 88 Esplit_merge_scale _split_merge_scale){ 89 // initialise random number generator 90 if (!init_done){ 91 // initialise random number generator 92 ranlux_init(); 93 94 // do not do this again 95 init_done=true; 96 97 // print the banner 98 if (_banner_ostr != 0){ 99 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl; 100 (*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl; 101 (*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl; 102 (*_banner_ostr) << "# o" << endl; 103 (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl; 104 (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl; 105 (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl; 106 (*_banner_ostr) << "# o" << endl; 107 (*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl; 108 (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl; 109 (*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl; 110 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl; 111 (*_banner_ostr) << endl; 112 113 _banner_ostr->flush(); 114 } 115 } 89 _initialise_if_needed(); 116 90 117 91 // run some general safety tests (NB: f will be checked in split-merge) … … 174 148 } 175 149 150 151 /* 152 * compute the jets from a given particle set doing multiple passes 153 * such pass N looks for jets among all particles not put into jets 154 * during previous passes. 155 * - _particles list of particles 156 * - _radius cone radius 157 * - _n_pass_max maximum number of runs 158 * - _ptmin minimum pT of the protojets 159 * - _ordering_scale the ordering scale to decide which stable 160 * cone is removed 161 * return the number of jets found. 162 **********************************************************************/ 163 int Csiscone::compute_jets_progressive_removal(vector<Cmomentum> &_particles, double _radius, 164 int _n_pass_max, double _ptmin, 165 Esplit_merge_scale _ordering_scale){ 166 _initialise_if_needed(); 167 168 // run some general safety tests (NB: f will be checked in split-merge) 169 if (_radius <= 0.0 || _radius >= 0.5*M_PI) { 170 ostringstream message; 171 message << "Illegal value for cone radius, R = " << _radius 172 << " (legal values are 0<R<pi/2)"; 173 throw Csiscone_error(message.str()); 174 } 175 176 ptcomparison.split_merge_scale = _ordering_scale; 177 partial_clear(); // make sure some things are initialised properly 178 179 // init the split_merge algorithm with the initial list of particles 180 // this initialises particle list p_left of remaining particles to deal with 181 // 182 // this stores the "processed" particles in p_uncol_hard 183 init_particles(_particles); 184 jets.clear(); 185 186 bool unclustered_left; 187 rerun_allowed = false; 188 protocones_list.clear(); 189 190 do{ 191 //cout << n_left << " particle left" << endl; 192 193 // initialise stable_cone finder 194 // here we use the list of remaining particles 195 // AFTER COLLINEAR CLUSTERING !!!!!! 196 Cstable_cones::init(p_uncol_hard); 197 198 // get stable cones (stored in 'protocones') 199 unclustered_left = get_stable_cones(_radius); 200 201 // add the hardest stable cone to the list of jets 202 if (add_hardest_protocone_to_jets(&protocones, R2, _ptmin)) break; 203 204 _n_pass_max--; 205 } while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0)); 206 207 // split & merge 208 return jets.size(); 209 } 210 211 176 212 /* 177 213 * recompute the jets with a different overlap parameter. … … 205 241 } 206 242 243 // ensure things are initialised 244 void Csiscone::_initialise_if_needed(){ 245 // initialise random number generator 246 if (init_done) return; 247 248 // initialise random number generator 249 ranlux_init(); 250 251 // do not do this again 252 init_done=true; 253 254 // print the banner 255 if (_banner_ostr != 0){ 256 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl; 257 (*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl; 258 (*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl; 259 (*_banner_ostr) << "# o" << endl; 260 (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl; 261 (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl; 262 (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl; 263 (*_banner_ostr) << "# o" << endl; 264 (*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl; 265 (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl; 266 (*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl; 267 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl; 268 (*_banner_ostr) << endl; 269 270 _banner_ostr->flush(); 271 } 272 } 207 273 208 274 // finally, a bunch of functions to access to
Note:
See TracChangeset
for help on using the changeset viewer.