Changeset 35cdc46 in git for external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh
- Timestamp:
- Sep 3, 2014, 3:18:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- be2222c
- Parents:
- 5b5a56b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh
r5b5a56b r35cdc46 5 5 // Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason 6 6 // 7 // $Id: Nsubjettiness.hh 670 2014-06-06 01:24:42Z jthaler $ 7 8 //---------------------------------------------------------------------- 8 9 // This file is part of FastJet contrib. … … 32 33 #include <string> 33 34 #include <climits> 34 35 35 36 36 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh … … 49 49 public: 50 50 51 // Main constructor, which takes N, axes/measure modes, 52 // and up to four parameters for parameters (i.e. beta, Rcutoff, etc depending on measure) 51 52 // Main constructor, which takes N, the AxesDefiniation, and the MeasureDefinition. 53 // The Definitions are given in NjettinessDefinition.hh 54 // 55 // The recommended AxesDefinitions are (more are available as listed in the README 56 // and defined in NjettinessDefinition.hh): 57 // KT_Axes : exclusive kt axes 58 // WTA_KT_Axes : exclusive kt with winner-take-all recombination 59 // OnePass_KT_Axes : one-pass minimization from kt starting point 60 // OnePass_WTA_KT_Axes : one-pass min. from wta_kt starting point 61 // 62 // The recommended measure definitions are (with the corresponding parameters) 63 // NormalizedMeasure(beta,R0) 64 // : This was the original N-subjettiness measure (dimensionless) 65 // UnnormalizedMeasure(beta) 66 // : This is the new recommended default, same as above but without 67 // : the normalization factor, and hence has units of GeV 68 // NormalizedCutoffMeasure(beta,R0,Rcutoff) 69 // : Same as normalized_measure, but cuts off at Rcutoff 70 // UnnormalizedCutoffMeasure(beta,Rcutoff) 71 // : Same as unnormalized_measure, but cuts off at Rcutoff 72 Nsubjettiness(int N, 73 const AxesDefinition& axes_def, 74 const MeasureDefinition& measure_def) 75 : _njettinessFinder(axes_def,measure_def), _N(N) {} 76 77 78 // Alternative constructors that define the measure via enums and parameters 79 // These constructors are likely be removed 80 // Zero parameter arguments 81 // (Currently, no measure uses this) 82 Nsubjettiness(int N, 83 Njettiness::AxesMode axes_mode, 84 Njettiness::MeasureMode measure_mode) 85 : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {} 86 87 // One parameter argument 88 // (for unnormalized_measure, para1=beta) 53 89 Nsubjettiness(int N, 54 90 Njettiness::AxesMode axes_mode, 55 91 Njettiness::MeasureMode measure_mode, 56 double para1 = NAN, 57 double para2 = NAN, 58 double para3 = NAN, 59 double para4 = NAN) 60 : _njettinessFinder(axes_mode, measure_mode, para1, para2, para3, para4), _N(N) {} 92 double para1) 93 : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {} 94 95 // Two parameter arguments 96 // (for normalized_measure, para1=beta, para2=R0) 97 // (for unnormalized_cutoff_measure, para1=beta, para2=Rcutoff) 98 Nsubjettiness(int N, 99 Njettiness::AxesMode axes_mode, 100 Njettiness::MeasureMode measure_mode, 101 double para1, 102 double para2) 103 : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {} 104 105 // Three parameter arguments 106 // (for unnormalized_cutoff_measure, para1=beta, para2=R0, para3=Rcutoff) 107 Nsubjettiness(int N, 108 Njettiness::AxesMode axes_mode, 109 Njettiness::MeasureMode measure_mode, 110 double para1, 111 double para2, 112 double para3) 113 : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {} 61 114 62 115 // Old constructor for backwards compatibility with v1.0, … … 67 120 double R0, 68 121 double Rcutoff=std::numeric_limits<double>::max()) 69 : _njettinessFinder(axes_mode, Njettiness::normalized_cutoff_measure, beta, R0, Rcutoff), _N(N) {} 70 71 122 : _njettinessFinder(axes_mode, NormalizedCutoffMeasure(beta,R0,Rcutoff)), _N(N) {} 123 72 124 /// returns tau_N, measured on the constituents of this jet 73 125 double result(const PseudoJet& jet) const; … … 86 138 } 87 139 140 /// returns subjet regions found by result() calculation (these have valid constituents) 141 /// Note that the axes and the subjets are not the same 142 std::vector<fastjet::PseudoJet> currentSubjets() const { 143 return _njettinessFinder.currentJets(); 144 } 145 146 /// returns components of tau_N without recalculating anything 147 TauComponents currentTauComponents() const { 148 return _njettinessFinder.currentTauComponents(); 149 } 150 88 151 // To set axes for manual use 89 void setAxes( std::vector<fastjet::PseudoJet>myAxes) {152 void setAxes(const std::vector<fastjet::PseudoJet> & myAxes) { 90 153 // Cross check that manual axes are being used is in Njettiness 91 154 _njettinessFinder.setAxes(myAxes); … … 95 158 private: 96 159 97 mutableNjettiness _njettinessFinder; // TODO: should muck with this so result can be const without this mutable160 Njettiness _njettinessFinder; // TODO: should muck with this so result can be const without this mutable 98 161 int _N; 99 162 … … 112 175 NsubjettinessRatio(int N, 113 176 int M, 177 const AxesDefinition & axes_def, 178 const MeasureDefinition & measure_def) 179 : _nsub_numerator(N,axes_def,measure_def), 180 _nsub_denominator(M,axes_def,measure_def) {} 181 182 // Alternative constructor with enums and parameters 183 // Again, likely to be removed 184 NsubjettinessRatio(int N, 185 int M, 186 Njettiness::AxesMode axes_mode, 187 Njettiness::MeasureMode measure_mode) 188 : _nsub_numerator(N, axes_mode, measure_mode), 189 _nsub_denominator(M, axes_mode, measure_mode) {} 190 191 192 NsubjettinessRatio(int N, 193 int M, 114 194 Njettiness::AxesMode axes_mode, 115 195 Njettiness::MeasureMode measure_mode, 116 double para1 = NAN, 117 double para2 = NAN, 118 double para3 = NAN, 119 double para4 = NAN) 120 : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3, para4), 121 _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3, para4) {} 122 123 //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness 196 double para1) 197 : _nsub_numerator(N, axes_mode, measure_mode, para1), 198 _nsub_denominator(M, axes_mode, measure_mode, para1) {} 199 200 NsubjettinessRatio(int N, 201 int M, 202 Njettiness::AxesMode axes_mode, 203 Njettiness::MeasureMode measure_mode, 204 double para1, 205 double para2) 206 : _nsub_numerator(N, axes_mode, measure_mode, para1, para2), 207 _nsub_denominator(M, axes_mode, measure_mode, para1, para2) {} 208 209 NsubjettinessRatio(int N, 210 int M, 211 Njettiness::AxesMode axes_mode, 212 Njettiness::MeasureMode measure_mode, 213 double para1, 214 double para2, 215 double para3) 216 : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3), 217 _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3) {} 218 219 //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness 124 220 double result(const PseudoJet& jet) const; 125 221
Note:
See TracChangeset
for help on using the changeset viewer.