File indexing completed on 2025-01-18 09:57:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef __FASTJET_CONTRIB_NSUBJETTINESS_HH__
0026 #define __FASTJET_CONTRIB_NSUBJETTINESS_HH__
0027
0028 #include <fastjet/internal/base.hh>
0029
0030 #include "Njettiness.hh"
0031
0032 #include "fastjet/FunctionOfPseudoJet.hh"
0033 #include <string>
0034 #include <climits>
0035
0036 FASTJET_BEGIN_NAMESPACE
0037
0038 namespace contrib {
0039
0040
0041 class Nsubjettiness;
0042 class NsubjettinessRatio;
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086 class Nsubjettiness : public FunctionOfPseudoJet<double> {
0087
0088 public:
0089
0090
0091
0092 Nsubjettiness(int N,
0093 const AxesDefinition& axes_def,
0094 const MeasureDefinition& measure_def)
0095 : _njettinessFinder(axes_def,measure_def), _N(N) {}
0096
0097
0098 double result(const PseudoJet& jet) const;
0099
0100
0101 TauComponents component_result(const PseudoJet& jet) const;
0102
0103
0104 void setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
0105
0106 _njettinessFinder.setAxes(myAxes);
0107 }
0108
0109
0110 std::vector<fastjet::PseudoJet> seedAxes() const {
0111 return _njettinessFinder.seedAxes();
0112 }
0113
0114
0115 std::vector<fastjet::PseudoJet> currentAxes() const {
0116 return _njettinessFinder.currentAxes();
0117 }
0118
0119
0120
0121 std::vector<fastjet::PseudoJet> currentSubjets() const {
0122 return _njettinessFinder.currentJets();
0123 }
0124
0125
0126 TauComponents currentTauComponents() const {
0127 return _njettinessFinder.currentTauComponents();
0128 }
0129
0130
0131 TauPartition currentPartition() const {
0132 return _njettinessFinder.currentPartition();
0133 }
0134
0135 private:
0136
0137
0138 Njettiness _njettinessFinder;
0139
0140 int _N;
0141
0142
0143 static LimitedWarning _old_constructor_warning;
0144
0145 public:
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 Nsubjettiness(int N,
0156 Njettiness::AxesMode axes_mode,
0157 Njettiness::MeasureMode measure_mode)
0158 : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {
0159 _old_constructor_warning.warn("Nsubjettiness: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the Nsubjettiness constructor based on AxesDefinition and MeasureDefinition instead.");
0160 }
0161
0162
0163
0164
0165 Nsubjettiness(int N,
0166 Njettiness::AxesMode axes_mode,
0167 Njettiness::MeasureMode measure_mode,
0168 double para1)
0169 : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {
0170 _old_constructor_warning.warn("Nsubjettiness: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the Nsubjettiness constructor based on AxesDefinition and MeasureDefinition instead.");
0171 }
0172
0173
0174
0175
0176
0177 Nsubjettiness(int N,
0178 Njettiness::AxesMode axes_mode,
0179 Njettiness::MeasureMode measure_mode,
0180 double para1,
0181 double para2)
0182 : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {
0183 _old_constructor_warning.warn("Nsubjettiness: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the Nsubjettiness constructor based on AxesDefinition and MeasureDefinition instead.");
0184 }
0185
0186
0187
0188
0189 Nsubjettiness(int N,
0190 Njettiness::AxesMode axes_mode,
0191 Njettiness::MeasureMode measure_mode,
0192 double para1,
0193 double para2,
0194 double para3)
0195 : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {
0196 _old_constructor_warning.warn("Nsubjettiness: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the Nsubjettiness constructor based on AxesDefinition and MeasureDefinition instead.");
0197 }
0198
0199
0200
0201
0202 Nsubjettiness(int N,
0203 Njettiness::AxesMode axes_mode,
0204 double beta,
0205 double R0,
0206 double Rcutoff=std::numeric_limits<double>::max())
0207 : _njettinessFinder(axes_mode, NormalizedCutoffMeasure(beta,R0,Rcutoff)), _N(N) {
0208 _old_constructor_warning.warn("Nsubjettiness: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the Nsubjettiness constructor based on AxesDefinition and MeasureDefinition instead.");
0209 }
0210
0211 };
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222 class NsubjettinessRatio : public FunctionOfPseudoJet<double> {
0223 public:
0224
0225
0226 NsubjettinessRatio(int N,
0227 int M,
0228 const AxesDefinition & axes_def,
0229 const MeasureDefinition & measure_def)
0230 : _nsub_numerator(N,axes_def,measure_def),
0231 _nsub_denominator(M,axes_def,measure_def) {
0232 if (axes_def.needsManualAxes()) {
0233 throw Error("NsubjettinessRatio does not support ManualAxes mode.");
0234 }
0235 }
0236
0237
0238 double result(const PseudoJet& jet) const;
0239
0240 private:
0241
0242 Nsubjettiness _nsub_numerator;
0243 Nsubjettiness _nsub_denominator;
0244
0245 public:
0246
0247
0248
0249
0250
0251
0252
0253
0254 NsubjettinessRatio(int N,
0255 int M,
0256 Njettiness::AxesMode axes_mode,
0257 Njettiness::MeasureMode measure_mode)
0258 : _nsub_numerator(N, axes_mode, measure_mode),
0259 _nsub_denominator(M, axes_mode, measure_mode) {}
0260
0261
0262
0263 NsubjettinessRatio(int N,
0264 int M,
0265 Njettiness::AxesMode axes_mode,
0266 Njettiness::MeasureMode measure_mode,
0267 double para1)
0268 : _nsub_numerator(N, axes_mode, measure_mode, para1),
0269 _nsub_denominator(M, axes_mode, measure_mode, para1) {}
0270
0271
0272
0273 NsubjettinessRatio(int N,
0274 int M,
0275 Njettiness::AxesMode axes_mode,
0276 Njettiness::MeasureMode measure_mode,
0277 double para1,
0278 double para2)
0279 : _nsub_numerator(N, axes_mode, measure_mode, para1, para2),
0280 _nsub_denominator(M, axes_mode, measure_mode, para1, para2) {}
0281
0282
0283
0284 NsubjettinessRatio(int N,
0285 int M,
0286 Njettiness::AxesMode axes_mode,
0287 Njettiness::MeasureMode measure_mode,
0288 double para1,
0289 double para2,
0290 double para3)
0291 : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3),
0292 _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3) {}
0293
0294
0295 };
0296
0297 }
0298
0299 FASTJET_END_NAMESPACE
0300
0301 #endif