FastJet 3.0.2
|
00001 //STARTHEADER 00002 // $Id: FunctionOfPseudoJet.cc 2577 2011-09-13 15:11:38Z salam $ 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 #include <fastjet/FunctionOfPseudoJet.hh> 00030 #include <string> 00031 #include <sstream> 00032 00033 using namespace std; 00034 00035 FASTJET_BEGIN_NAMESPACE 00036 00037 // //---------------------------------------------------------------------- 00038 // /// helper for the selector "FunctionOfPJ(jet) > ref" 00039 // class SW_FofPJ_larger : public SelectorWorker { 00040 // public: 00041 // /// ctor with specification of the number of objects to keep 00042 // SW_FofPJ_larger(const FunctionOfPseudoJet<double> & fn, const double &ref) 00043 // : _fn(fn), _ref(ref){} 00044 // 00045 // /// return true if the jet is a pure-ghost jet 00046 // virtual bool pass(const PseudoJet & jet) const { return _fn(jet) > _ref; } 00047 // 00048 // /// returns a description of the worker 00049 // virtual string description() const { 00050 // ostringstream oss; 00051 // oss << "(" << _fn.description() << " > " << _ref << ")"; 00052 // return oss.str(); 00053 // } 00054 // 00055 // protected: 00056 // const FunctionOfPseudoJet<double> & _fn; 00057 // double _ref; 00058 // }; 00059 // 00060 // 00061 // // select objects that are (or are only made of) ghosts 00062 // Selector operator >(const FunctionOfPseudoJet<double> & fn, const double & ref){ 00063 // return Selector(new SW_FofPJ_larger(fn, ref)); 00064 // } 00065 // 00066 // 00067 // 00068 // //---------------------------------------------------------------------- 00069 // /// helper for the selector "FunctionOfPJ(jet) < ref" 00070 // class SW_FofPJ_smaller : public SelectorWorker { 00071 // public: 00072 // /// ctor with specification of the number of objects to keep 00073 // SW_FofPJ_smaller(const FunctionOfPseudoJet<double> & fn, const double &ref) 00074 // : _fn(fn), _ref(ref){} 00075 // 00076 // /// return true if the jet is a pure-ghost jet 00077 // virtual bool pass(const PseudoJet & jet) const { return _fn(jet) < _ref; } 00078 // 00079 // /// returns a description of the worker 00080 // virtual string description() const { 00081 // ostringstream oss; 00082 // oss << "(" << _fn.description() << " < " << _ref << ")"; 00083 // return oss.str(); 00084 // } 00085 // 00086 // protected: 00087 // const FunctionOfPseudoJet<double> & _fn; 00088 // double _ref; 00089 // }; 00090 // 00091 // 00092 // // select objects that are (or are only made of) ghosts 00093 // Selector operator <(const FunctionOfPseudoJet<double> & fn, const double & ref){ 00094 // return Selector(new SW_FofPJ_smaller(fn, ref)); 00095 // } 00096 // 00097 // 00098 // //---------------------------------------------------------------------- 00099 // /// helper for the selector "FunctionOfPJ(jet) >= ref" 00100 // class SW_FofPJ_larger_equal : public SelectorWorker { 00101 // public: 00102 // /// ctor with specification of the number of objects to keep 00103 // SW_FofPJ_larger_equal(const FunctionOfPseudoJet<double> & fn, const double &ref) 00104 // : _fn(fn), _ref(ref){} 00105 // 00106 // /// return true if the jet is a pure-ghost jet 00107 // virtual bool pass(const PseudoJet & jet) const { return _fn(jet) >= _ref; } 00108 // 00109 // /// returns a description of the worker 00110 // virtual string description() const { 00111 // ostringstream oss; 00112 // oss << "(" << _fn.description() << " >= " << _ref << ")"; 00113 // return oss.str(); 00114 // } 00115 // 00116 // protected: 00117 // const FunctionOfPseudoJet<double> & _fn; 00118 // double _ref; 00119 // }; 00120 // 00121 // 00122 // // select objects that are (or are only made of) ghosts 00123 // Selector operator >=(const FunctionOfPseudoJet<double> & fn, const double & ref){ 00124 // return Selector(new SW_FofPJ_larger_equal(fn, ref)); 00125 // } 00126 // 00127 // 00128 // 00129 // //---------------------------------------------------------------------- 00130 // /// helper for the selector "FunctionOfPJ(jet) <= ref" 00131 // class SW_FofPJ_smaller_equal : public SelectorWorker { 00132 // public: 00133 // /// ctor with specification of the number of objects to keep 00134 // SW_FofPJ_smaller_equal(const FunctionOfPseudoJet<double> & fn, const double &ref) 00135 // : _fn(fn), _ref(ref){} 00136 // 00137 // /// return true if the jet is a pure-ghost jet 00138 // virtual bool pass(const PseudoJet & jet) const { return _fn(jet) <= _ref; } 00139 // 00140 // /// returns a description of the worker 00141 // virtual string description() const { 00142 // ostringstream oss; 00143 // oss << "(" << _fn.description() << " <= " << _ref << ")"; 00144 // return oss.str(); 00145 // } 00146 // 00147 // protected: 00148 // const FunctionOfPseudoJet<double> & _fn; 00149 // double _ref; 00150 // }; 00151 // 00152 // 00153 // // select objects that are (or are only made of) ghosts 00154 // Selector operator <=(const FunctionOfPseudoJet<double> & fn, const double & ref){ 00155 // return Selector(new SW_FofPJ_smaller_equal(fn, ref)); 00156 // } 00157 // 00158 00159 FASTJET_END_NAMESPACE