FastJet 3.0.2
|
00001 //STARTHEADER 00002 // $Id: PxConePlugin.hh 2758 2011-11-24 08:31:58Z soyez $ 00003 // 00004 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 00005 // 00006 //---------------------------------------------------------------------- 00007 // This file is part of FastJet. 00008 // 00009 // FastJet is free software; you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation; either version 2 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // The algorithms that underlie FastJet have required considerable 00015 // development and are described in hep-ph/0512210. If you use 00016 // FastJet as part of work towards a scientific publication, please 00017 // include a citation to the FastJet paper. 00018 // 00019 // FastJet is distributed in the hope that it will be useful, 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 // GNU General Public License for more details. 00023 // 00024 // You should have received a copy of the GNU General Public License 00025 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 00026 //---------------------------------------------------------------------- 00027 //ENDHEADER 00028 00029 #ifndef __PXCONEPLUGIN_HH__ 00030 #define __PXCONEPLUGIN_HH__ 00031 00032 #include "fastjet/JetDefinition.hh" 00033 00034 // questionable whether this should be in fastjet namespace or not... 00035 00036 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 00037 00038 //---------------------------------------------------------------------- 00039 // 00040 /// @ingroup plugins 00041 /// \class PxConePlugin 00042 /// Implementation of the PxCone algorithm (plugin for fastjet v2.1 upwards) 00043 /// 00044 /// PxConePlugin is a plugin for fastjet (v2.1 upwards) that provides 00045 /// an interface to the fortran pxcone iterative cone algorithm with 00046 /// midpoint seeds. 00047 /// 00048 /// Pxcone was written by Luis del Pozo and Michael H. Seymour. It is 00049 /// not a "supported" program, so if you encounter problems, you are 00050 /// on your own... 00051 /// 00052 /// Note that pxcone sometimes encounters non-stable iterations; in 00053 /// such cases it returns an error -- the plugin propagates this by 00054 /// throwing a fastjet::Error exception; if the user wishes to have 00055 /// robust code, they should catch this exception. 00056 /// 00057 /// Pxcone has a hard-coded limit (by default 4000) on the maximum 00058 /// number of particles and protojets; if the number of particles or 00059 /// protojets exceeds this, again a fastjet::Error exception will be 00060 /// thrown. 00061 /// 00062 /// The functionality of pxcone is described at 00063 /// http://www.hep.man.ac.uk/u/wplano/ConeJet.ps 00064 // 00065 //---------------------------------------------------------------------- 00066 class PxConePlugin : public JetDefinition::Plugin { 00067 public: 00068 00069 /// constructor for the PxConePlugin, whose arguments have the 00070 /// following meaning: 00071 /// 00072 /// - the cone_radius is as usual in cone algorithms 00073 /// 00074 /// - stables cones (protojets) below min_jet_energy are discarded 00075 /// before calling the splitting procedure to resolve overlaps 00076 /// (called epslon in pxcone). 00077 /// 00078 /// - when two protojets overlap, if 00079 /// (overlapping_Et)/(Et_of_softer_protojet) < overlap_threshold 00080 /// the overlapping energy is split between the two protojets; 00081 /// otherwise the less energetic protojet is discarded. Called 00082 /// ovlim in pxcone. 00083 /// 00084 /// - pxcone carries out p-scheme recombination, and the resulting 00085 /// jets are massless; setting E_scheme_jets = true (default 00086 /// false) doesn't change the jet composition, but the final 00087 /// momentum sum for the jets is carried out by direct 00088 /// four-vector addition instead of p-scheme recombination. 00089 /// 00090 PxConePlugin (double cone_radius_in , 00091 double min_jet_energy_in = 5.0 , 00092 double overlap_threshold_in = 0.5, 00093 bool E_scheme_jets_in = false) : 00094 _cone_radius (cone_radius_in ), 00095 _min_jet_energy (min_jet_energy_in ), 00096 _overlap_threshold (overlap_threshold_in), 00097 _E_scheme_jets (E_scheme_jets_in ) {} 00098 00099 00100 // some functions to return info about parameters ---------------- 00101 00102 /// the cone radius 00103 double cone_radius () const {return _cone_radius ;} 00104 00105 /// minimum jet energy (protojets below this are thrown own before 00106 /// merging/splitting) -- called epslon in pxcone 00107 double min_jet_energy () const {return _min_jet_energy ;} 00108 00109 /// Maximum fraction of overlap energy in a jet -- called ovlim in pxcone. 00110 double overlap_threshold () const {return _overlap_threshold ;} 00111 00112 /// if true then the final jets are returned as the E-scheme recombination 00113 /// of the particle momenta (by default, pxcone returns massless jets with 00114 /// a mean phi,eta type of recombination); regardless of what is 00115 /// returned, the internal pxcone jet-finding procedure is 00116 /// unaffected. 00117 bool E_scheme_jets() const {return _E_scheme_jets ;} 00118 00119 00120 // the things that are required by base class 00121 virtual std::string description () const; 00122 virtual void run_clustering(ClusterSequence &) const; 00123 /// the plugin mechanism's standard way of accessing the jet radius 00124 virtual double R() const {return cone_radius();} 00125 00126 private: 00127 00128 double _cone_radius ; 00129 double _min_jet_energy ; 00130 double _overlap_threshold ; 00131 00132 bool _E_scheme_jets; 00133 00134 static bool _first_time; 00135 00136 /// print a banner for reference to the 3rd-party code 00137 void _print_banner(std::ostream *ostr) const; 00138 }; 00139 00140 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh 00141 00142 #endif // __PXCONEPLUGIN_HH__