Changes in external/fastjet/tools/Subtractor.hh [273e668:d7d2da3] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/tools/Subtractor.hh
r273e668 rd7d2da3 1 // FJSTARTHEADER2 // $Id: Subtractor.hh 3670 2014-09-08 14:17:59Z soyez$1 //STARTHEADER 2 // $Id: Subtractor.hh 2577 2011-09-13 15:11:38Z salam $ 3 3 // 4 // Copyright (c) 2005-201 4, Matteo Cacciari, Gavin P. Salam and Gregory Soyez4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 5 5 // 6 6 //---------------------------------------------------------------------- … … 13 13 // 14 14 // The algorithms that underlie FastJet have required considerable 15 // development. They are described in the original FastJet paper, 16 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use 15 // development and are described in hep-ph/0512210. If you use 17 16 // FastJet as part of work towards a scientific publication, please 18 // quote the version you use and include a citation to the manual and 19 // optionally also to hep-ph/0512210. 17 // include a citation to the FastJet paper. 20 18 // 21 19 // FastJet is distributed in the hope that it will be useful, … … 27 25 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 28 26 //---------------------------------------------------------------------- 29 // FJENDHEADER27 //ENDHEADER 30 28 31 29 #ifndef __FASTJET_TOOLS_SUBTRACTOR_HH__ 32 30 #define __FASTJET_TOOLS_SUBTRACTOR_HH__ 33 31 34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)35 32 #include "fastjet/tools/Transformer.hh" // to derive Subtractor from Transformer 36 33 #include "fastjet/tools/BackgroundEstimatorBase.hh" // used as a ctor argument … … 64 61 /// define a subtractor based on a BackgroundEstimator 65 62 Subtractor(BackgroundEstimatorBase * bge) : 66 _bge(bge), _rho(-1.0) { set_defaults();}63 _bge(bge), _rho(-1.0) {} 67 64 68 65 /// define a subtractor that uses a fixed value of rho, the background … … 70 67 Subtractor(double rho); 71 68 72 /// define a subtractor that uses a fixed value of rho and rho_m;73 /// both must be >= 0;74 Subtractor(double rho, double rho_m);75 76 69 /// default constructor 77 Subtractor() : _bge(0), _rho(_invalid_rho) { set_defaults();}70 Subtractor() : _bge(0), _rho(_invalid_rho) {} 78 71 79 72 /// default dtor 80 73 virtual ~Subtractor(){}; 81 82 /// @name configuring the behaviour83 //\{84 //----------------------------------------------------------------85 86 /// reset all parameters to default values87 ///88 /// Note: by default, the rho_m term is not included and the safety89 /// test for the mass is not done. This is mostly for backwards90 /// compatibility with FastJet 3.0 and is highly likely to change in91 /// a future release of FastJet92 void set_defaults();93 94 /// when 'use_rho_m' is true, include in the subtraction the95 /// correction from rho_m, the purely longitudinal,96 /// particle-mass-induced component of the background density per97 /// unit area98 ///99 /// Note: this will be switched off by default (for backwards100 /// compatibility with FastJet 3.0) but is highly likely to change101 /// in a future release of FastJet102 void set_use_rho_m(bool use_rho_m_in = true){103 if (_bge == 0 && _rho_m < 0) {104 throw Error("Subtractor: rho_m support works only for Subtractors constructed with a background estimator or an explicit rho_m value");105 }106 _use_rho_m=use_rho_m_in;107 }108 109 /// returns whether or not the rho_m component is used110 bool use_rho_m() const{ return _use_rho_m;}111 112 /// when 'safe_mass' is true, ensure that the mass of the subtracted113 /// 4-vector remain positive114 ///115 /// when true, if the subtracted mass is negative, we return a116 /// 4-vector with 0 mass, pt and phi from the subtracted 4-vector117 /// and the rapidity of the original, unsubtracted jet.118 ///119 /// Note: this will be switched off by default (for backwards120 /// compatibility with FastJet 3.0) but is highly likely to change121 /// in a future release of FastJet122 void set_safe_mass(bool safe_mass_in=true){ _safe_mass=safe_mass_in;}123 124 /// returns whether or not safety tests on the mass are included125 bool safe_mass() const{ return _safe_mass;}126 127 /// This is mostly intended for cherge-hadron-subtracted type of128 /// events where we wich to use vertex information to improve the129 /// subtraction.130 ///131 /// Given the following parameters:132 /// \param sel_known_vertex selects the particles with a133 /// known vertex origin134 /// \param sel_leading_vertex amongst the particles with a135 /// known vertex origin, select those136 /// coming from the leading vertex137 /// Momentum identified as coming from the leading vertex will be138 /// kept, momentum identified as coming from a non-leading vertex139 /// will be eliminated and a regular area-median subtraction will be140 /// applied on the 4-vector sum of the particles with unknown vertex141 /// origin.142 ///143 /// When this is set, we shall ensure that the pt of the subtracted144 /// 4-vector is at least the pt of the particles that are known to145 /// come from the leading vertex (if it fails, subtraction returns146 /// the component that is known to come from the leading vertex ---147 /// or, the original unsubtracted jet if it contains no particles148 /// from the leading vertex). Furthermore, when safe_mass() is on, we149 /// also impose a similar constraint on the mass of the subtracted150 /// 4-vector (if the test fails, the longitudinal part of the151 /// subtracted 4-vector is taken from the component that is known to152 /// come from the leading vertex).153 void set_known_selectors(const Selector &sel_known_vertex,154 const Selector &sel_leading_vertex){155 _sel_known_vertex = sel_known_vertex;156 _sel_leading_vertex = sel_leading_vertex;157 }158 159 //\}160 161 /// @name description and action162 //\{163 //----------------------------------------------------------------164 74 165 75 /// returns a jet that's subtracted … … 172 82 virtual std::string description() const; 173 83 174 //\}175 84 protected: 176 /// compute the 4-vector that should be subtracted from the given177 /// jet178 PseudoJet _amount_to_subtract(const PseudoJet &jet) const;179 85 180 86 /// the tool used to estimate the background 181 87 /// if has to be mutable in case its underlying selector takes a reference jet 182 88 mutable BackgroundEstimatorBase * _bge; 183 /// the fixed value of rho and/or rho_m to use if the user has selected that option 184 double _rho, _rho_m; 185 186 // configuration parameters/flags 187 bool _use_rho_m; ///< include the rho_m correction 188 bool _safe_mass; ///< ensures that the subtracted mass is +ve 189 190 Selector _sel_known_vertex; ///< selects the particles with a 191 ///< known vertex origin 192 Selector _sel_leading_vertex; ///< amongst the particles with a 193 ///< known vertex origin, select those 194 ///< coming from the leading vertex 89 /// the fixed value of rho to use if the user has selected that option 90 double _rho; 195 91 196 92 /// a value of rho that is used as a default to label that the stored … … 202 98 // that's not allowed in an include file. 203 99 static const double _invalid_rho; 204 205 mutable LimitedWarning _unused_rho_m_warning;206 100 }; 207 101
Note:
See TracChangeset
for help on using the changeset viewer.