|
||||
File indexing completed on 2025-01-18 09:57:15
0001 // Nsubjettiness Package 0002 // Questions/Comments? jthaler@jthaler.net 0003 // 0004 // Copyright (c) 2011-14 0005 // Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason 0006 // 0007 // $Id: XConePlugin.hh 748 2014-10-02 06:13:28Z tjwilk $ 0008 //---------------------------------------------------------------------- 0009 // This file is part of FastJet contrib. 0010 // 0011 // It is free software; you can redistribute it and/or modify it under 0012 // the terms of the GNU General Public License as published by the 0013 // Free Software Foundation; either version 2 of the License, or (at 0014 // your option) any later version. 0015 // 0016 // It is distributed in the hope that it will be useful, but WITHOUT 0017 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 0018 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 0019 // License for more details. 0020 // 0021 // You should have received a copy of the GNU General Public License 0022 // along with this code. If not, see <http://www.gnu.org/licenses/>. 0023 //---------------------------------------------------------------------- 0024 0025 #ifndef __FASTJET_CONTRIB_XCONEPLUGIN_HH__ 0026 #define __FASTJET_CONTRIB_XCONEPLUGIN_HH__ 0027 0028 #include <fastjet/config.h> 0029 0030 #include "NjettinessPlugin.hh" 0031 0032 #include "fastjet/ClusterSequence.hh" 0033 #include "fastjet/JetDefinition.hh" 0034 0035 #include <string> 0036 #include <climits> 0037 0038 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 0039 0040 0041 namespace contrib { 0042 0043 ///------------------------------------------------------------------------ 0044 /// \class XConePlugin 0045 /// \brief Implements the XCone Jet Algorithm 0046 /** 0047 * An exclusive jet finder that identifies N jets. First N axes are found, then 0048 * particles are assigned to the nearest (approximte DeltaR) axis and for each axis the 0049 * corresponding jet is simply the four-momentum sum of these particles. 0050 * 0051 * The XConePlugin is based on NjettinessPlugin, but with sensible default 0052 * values for the AxesDefinition and MeasureDefinition. There are three arguments 0053 * 0054 * int N: number of exclusive jets to be found 0055 * double R0: approximate jet radius 0056 * double beta: determines style of jet finding with the recommended values being: 0057 * beta = 2: standard "mean" jets where jet momentum/axis align approximately. 0058 * beta = 1: recoil-free "median" variant where jet axis points at hardest cluster. 0059 * 0060 * The AxesDefinition is OnePass_GenET_GenKT_Axes, which uses a generalized kT 0061 * clustering algorithm matched to the beta value. 0062 * 0063 * The MeasureDefinition is the XConeMeasure, which is based on the 0064 * ConicalGeometric measure. 0065 */ 0066 class XConePlugin : public NjettinessPlugin { 0067 public: 0068 0069 /// Constructor with N, R0, and beta as the options. beta = 2.0 is the default 0070 /// All this does is use the NjettinessPlugin with OnePass_GenET_GenKT_Axes and the XConeMeasure. 0071 /// For more advanced usage, call NjettinessPlugin directly 0072 /// Note that the order of the R0 and beta values is reversed from the XConeMeasure to 0073 /// standard usage for Plugins. 0074 XConePlugin(int N, double R0, double beta = 2.0) 0075 : NjettinessPlugin(N, 0076 OnePass_GenET_GenKT_Axes(calc_delta(beta), calc_power(beta), R0), // use recommended axes method only 0077 XConeMeasure(beta, R0) // use recommended XCone measure. 0078 ), 0079 _N(N), _R0(R0), _beta(beta) 0080 {} 0081 0082 // The things that are required by base class. 0083 virtual std::string description () const; 0084 virtual double R() const {return _R0;} 0085 0086 // run_clustering is done by NjettinessPlugin 0087 0088 virtual ~XConePlugin() {} 0089 0090 private: 0091 0092 /// Static call used within the constructor to set the recommended delta value 0093 static double calc_delta(double beta) { 0094 double delta; 0095 if (beta > 1) delta = 1/(beta - 1); 0096 else delta = std::numeric_limits<int>::max(); // use winner take all 0097 return delta; 0098 } 0099 0100 /// Static call used within the constructor to set the recommended p value 0101 static double calc_power(double beta) { 0102 return (double) 1.0/beta; 0103 } 0104 0105 double _N; ///< Number of desired jets 0106 double _R0; ///< Jet radius 0107 double _beta; ///< Angular exponent (beta = 2.0 is dafault, beta = 1.0 is recoil-free) 0108 0109 public: 0110 0111 }; 0112 0113 0114 /// \class PseudoXConePlugin 0115 /// \brief Implements a faster, non-optimal version of the XCone Jet Algorithm 0116 /// 0117 /// A "poor man's" version of XCone with no minimization step 0118 /// Right now, used just for testing purposes by the developers 0119 class PseudoXConePlugin : public NjettinessPlugin { 0120 public: 0121 0122 /// Constructor with N, R0, and beta as the options. beta = 2.0 is the default 0123 /// All this does is use the NjettinessPlugin with GenET_GenKT_Axes and the XConeMeasure. 0124 PseudoXConePlugin(int N, double R0, double beta = 2.0) 0125 : NjettinessPlugin(N, 0126 GenET_GenKT_Axes(calc_delta(beta), calc_power(beta), R0), // poor man's axes 0127 XConeMeasure(beta, R0) // use recommended XCone measure. 0128 ), 0129 _N(N), _R0(R0), _beta(beta) 0130 {} 0131 0132 // The things that are required by base class. 0133 virtual std::string description () const; 0134 virtual double R() const {return _R0;} 0135 0136 // run_clustering is done by NjettinessPlugin 0137 0138 virtual ~PseudoXConePlugin() {} 0139 0140 private: 0141 0142 /// Static call used within the constructor to set the recommended delta value 0143 static double calc_delta(double beta) { 0144 double delta; 0145 if (beta > 1) delta = 1/(beta - 1); 0146 else delta = std::numeric_limits<int>::max(); // use winner take all 0147 return delta; 0148 } 0149 0150 /// Static call used within the constructor to set the recommended p value 0151 static double calc_power(double beta) { 0152 return (double) 1.0/beta; 0153 } 0154 0155 double _N; ///< Number of desired jets 0156 double _R0; ///< Jet radius 0157 double _beta; ///< Angular exponent (beta = 2.0 is dafault, beta = 1.0 is recoil-free) 0158 0159 public: 0160 0161 }; 0162 0163 0164 0165 } // namespace contrib 0166 0167 FASTJET_END_NAMESPACE 0168 0169 #endif // __FASTJET_CONTRIB_XConePlugin_HH__
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |