File indexing completed on 2025-01-18 09:57:13
0001 #ifndef __FASTJET_CONTRIB_ENERGYCORRELATOR_HH__
0002 #define __FASTJET_CONTRIB_ENERGYCORRELATOR_HH__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #include <fastjet/internal/base.hh>
0031 #include "fastjet/FunctionOfPseudoJet.hh"
0032
0033 #include <string>
0034 #include <climits>
0035
0036 FASTJET_BEGIN_NAMESPACE
0037
0038 namespace contrib{
0039
0040
0041
0042
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
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 class EnergyCorrelator : public FunctionOfPseudoJet<double> {
0116 friend class EnergyCorrelatorGeneralized;
0117
0118 public:
0119
0120 enum Measure {
0121 pt_R,
0122
0123 E_theta,
0124
0125 E_inv
0126
0127 };
0128
0129 enum Strategy {
0130 slow,
0131
0132
0133
0134 storage_array
0135
0136 };
0137
0138 public:
0139
0140
0141
0142
0143 EnergyCorrelator(unsigned int N,
0144 double beta,
0145 Measure measure = pt_R,
0146 Strategy strategy = storage_array) :
0147 _N(N), _beta(beta), _measure(measure), _strategy(strategy) {};
0148
0149
0150 virtual ~EnergyCorrelator(){}
0151
0152
0153
0154
0155 double result(const PseudoJet& jet) const;
0156
0157 std::string description() const;
0158
0159
0160 std::string description_parameters() const;
0161 std::string description_no_N() const;
0162
0163 private:
0164
0165 unsigned int _N;
0166 double _beta;
0167 Measure _measure;
0168 Strategy _strategy;
0169
0170 double energy(const PseudoJet& jet) const;
0171 double angleSquared(const PseudoJet& jet1, const PseudoJet& jet2) const;
0172 double multiply_angles(double angles[], int n_angles, unsigned int N_total) const;
0173 void precompute_energies_and_angles(std::vector<fastjet::PseudoJet> const &particles, double* energyStore, double** angleStore) const;
0174 double evaluate_n3(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0175 double evaluate_n4(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0176 double evaluate_n5(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0177 };
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187 class EnergyCorrelatorRatio : public FunctionOfPseudoJet<double> {
0188
0189 public:
0190
0191
0192
0193
0194
0195 EnergyCorrelatorRatio(unsigned int N,
0196 double beta,
0197 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0198 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0199 : _N(N), _beta(beta), _measure(measure), _strategy(strategy) {};
0200
0201 virtual ~EnergyCorrelatorRatio() {}
0202
0203
0204
0205
0206 double result(const PseudoJet& jet) const;
0207
0208 std::string description() const;
0209
0210 private:
0211
0212 unsigned int _N;
0213 double _beta;
0214
0215 EnergyCorrelator::Measure _measure;
0216 EnergyCorrelator::Strategy _strategy;
0217
0218
0219 };
0220
0221 inline double EnergyCorrelatorRatio::result(const PseudoJet& jet) const {
0222
0223 double numerator = EnergyCorrelator(_N + 1, _beta, _measure, _strategy).result(jet);
0224 double denominator = EnergyCorrelator(_N, _beta, _measure, _strategy).result(jet);
0225
0226 return numerator/denominator;
0227
0228 }
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241 class EnergyCorrelatorDoubleRatio : public FunctionOfPseudoJet<double> {
0242
0243 public:
0244
0245 EnergyCorrelatorDoubleRatio(unsigned int N,
0246 double beta,
0247 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0248 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0249 : _N(N), _beta(beta), _measure(measure), _strategy(strategy) {
0250
0251 if (_N < 1) throw Error("EnergyCorrelatorDoubleRatio: N must be 1 or greater.");
0252
0253 };
0254
0255 virtual ~EnergyCorrelatorDoubleRatio() {}
0256
0257
0258
0259
0260
0261 double result(const PseudoJet& jet) const;
0262
0263 std::string description() const;
0264
0265 private:
0266
0267 unsigned int _N;
0268 double _beta;
0269 EnergyCorrelator::Measure _measure;
0270 EnergyCorrelator::Strategy _strategy;
0271
0272
0273 };
0274
0275
0276 inline double EnergyCorrelatorDoubleRatio::result(const PseudoJet& jet) const {
0277
0278 double numerator = EnergyCorrelator(_N - 1, _beta, _measure, _strategy).result(jet) * EnergyCorrelator(_N + 1, _beta, _measure, _strategy).result(jet);
0279 double denominator = pow(EnergyCorrelator(_N, _beta, _measure, _strategy).result(jet), 2.0);
0280
0281 return numerator/denominator;
0282
0283 }
0284
0285
0286
0287
0288
0289
0290 class EnergyCorrelatorC1 : public FunctionOfPseudoJet<double> {
0291
0292 public:
0293
0294
0295
0296
0297
0298 EnergyCorrelatorC1(double beta,
0299 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0300 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0301 : _beta(beta), _measure(measure), _strategy(strategy) {};
0302
0303 virtual ~EnergyCorrelatorC1() {}
0304
0305
0306
0307
0308 double result(const PseudoJet& jet) const;
0309
0310 std::string description() const;
0311
0312 private:
0313
0314 double _beta;
0315
0316 EnergyCorrelator::Measure _measure;
0317 EnergyCorrelator::Strategy _strategy;
0318
0319
0320 };
0321
0322
0323 inline double EnergyCorrelatorC1::result(const PseudoJet& jet) const {
0324
0325 double numerator = EnergyCorrelator(2, _beta, _measure, _strategy).result(jet);
0326 double denominator = EnergyCorrelator(1, _beta, _measure, _strategy).result(jet);
0327
0328 return numerator/denominator/denominator;
0329
0330 }
0331
0332
0333
0334
0335
0336
0337
0338
0339 class EnergyCorrelatorC2 : public FunctionOfPseudoJet<double> {
0340
0341 public:
0342
0343
0344
0345
0346
0347 EnergyCorrelatorC2(double beta,
0348 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0349 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0350 : _beta(beta), _measure(measure), _strategy(strategy) {};
0351
0352 virtual ~EnergyCorrelatorC2() {}
0353
0354
0355
0356
0357 double result(const PseudoJet& jet) const;
0358
0359 std::string description() const;
0360
0361 private:
0362
0363 double _beta;
0364
0365 EnergyCorrelator::Measure _measure;
0366 EnergyCorrelator::Strategy _strategy;
0367
0368
0369 };
0370
0371
0372 inline double EnergyCorrelatorC2::result(const PseudoJet& jet) const {
0373
0374 double numerator3 = EnergyCorrelator(3, _beta, _measure, _strategy).result(jet);
0375 double numerator1 = EnergyCorrelator(1, _beta, _measure, _strategy).result(jet);
0376 double denominator = EnergyCorrelator(2, _beta, _measure, _strategy).result(jet);
0377
0378 return numerator3*numerator1/denominator/denominator;
0379
0380 }
0381
0382
0383
0384
0385
0386
0387
0388
0389 class EnergyCorrelatorD2 : public FunctionOfPseudoJet<double> {
0390
0391 public:
0392
0393
0394
0395
0396
0397 EnergyCorrelatorD2(double beta,
0398 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0399 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0400 : _beta(beta), _measure(measure), _strategy(strategy) {};
0401
0402 virtual ~EnergyCorrelatorD2() {}
0403
0404
0405
0406
0407 double result(const PseudoJet& jet) const;
0408
0409 std::string description() const;
0410
0411 private:
0412
0413 double _beta;
0414
0415 EnergyCorrelator::Measure _measure;
0416 EnergyCorrelator::Strategy _strategy;
0417
0418
0419 };
0420
0421
0422 inline double EnergyCorrelatorD2::result(const PseudoJet& jet) const {
0423
0424 double numerator3 = EnergyCorrelator(3, _beta, _measure, _strategy).result(jet);
0425 double numerator1 = EnergyCorrelator(1, _beta, _measure, _strategy).result(jet);
0426 double denominator2 = EnergyCorrelator(2, _beta, _measure, _strategy).result(jet);
0427
0428 return numerator3*numerator1*numerator1*numerator1/denominator2/denominator2/denominator2;
0429
0430 }
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467 class EnergyCorrelatorGeneralized : public FunctionOfPseudoJet<double> {
0468 public:
0469
0470
0471
0472
0473
0474 EnergyCorrelatorGeneralized(int v_angles,
0475 unsigned int N,
0476 double beta,
0477 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0478 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0479 : _angles(v_angles), _N(N), _beta(beta), _measure(measure), _strategy(strategy), _helper_correlator(1,_beta, _measure, _strategy) {};
0480
0481
0482 virtual ~EnergyCorrelatorGeneralized(){}
0483
0484
0485
0486
0487
0488 double result(const PseudoJet& jet) const;
0489 std::vector<double> result_all_angles(const PseudoJet& jet) const;
0490
0491 private:
0492
0493 int _angles;
0494 unsigned int _N;
0495 double _beta;
0496 EnergyCorrelator::Measure _measure;
0497 EnergyCorrelator::Strategy _strategy;
0498 EnergyCorrelator _helper_correlator;
0499
0500 double energy(const PseudoJet& jet) const;
0501 double angleSquared(const PseudoJet& jet1, const PseudoJet& jet2) const;
0502 double multiply_angles(double angles[], int n_angles, unsigned int N_total) const;
0503 void precompute_energies_and_angles(std::vector<fastjet::PseudoJet> const &particles, double* energyStore, double** angleStore) const;
0504 double evaluate_n3(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0505 double evaluate_n4(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0506 double evaluate_n5(unsigned int nC, unsigned int n_angles, double* energyStore, double** angleStore) const;
0507 };
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517 class EnergyCorrelatorGeneralizedD2 : public FunctionOfPseudoJet<double> {
0518
0519 public:
0520
0521
0522
0523
0524
0525 EnergyCorrelatorGeneralizedD2(
0526 double alpha,
0527 double beta,
0528 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0529 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0530 : _alpha(alpha), _beta(beta), _measure(measure), _strategy(strategy) {};
0531
0532 virtual ~EnergyCorrelatorGeneralizedD2() {}
0533
0534
0535
0536
0537 double result(const PseudoJet& jet) const;
0538
0539 std::string description() const;
0540
0541 private:
0542
0543 double _alpha;
0544 double _beta;
0545
0546 EnergyCorrelator::Measure _measure;
0547 EnergyCorrelator::Strategy _strategy;
0548
0549
0550 };
0551
0552
0553 inline double EnergyCorrelatorGeneralizedD2::result(const PseudoJet& jet) const {
0554
0555 double numerator = EnergyCorrelatorGeneralized(-1, 3, _alpha, _measure, _strategy).result(jet);
0556 double denominator = EnergyCorrelatorGeneralized(-1, 2, _beta, _measure, _strategy).result(jet);
0557
0558 return numerator/pow(denominator, 3.0*_alpha/_beta);
0559
0560 }
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571 class EnergyCorrelatorNseries : public FunctionOfPseudoJet<double> {
0572
0573 public:
0574
0575
0576
0577
0578
0579 EnergyCorrelatorNseries(
0580 unsigned int n,
0581 double beta,
0582 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0583 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0584 : _n(n), _beta(beta), _measure(measure), _strategy(strategy) {
0585
0586 if (_n < 1) throw Error("EnergyCorrelatorNseries: n must be 1 or greater.");
0587
0588 };
0589
0590 virtual ~EnergyCorrelatorNseries() {}
0591
0592
0593
0594
0595 double result(const PseudoJet& jet) const;
0596
0597 std::string description() const;
0598
0599 private:
0600
0601 unsigned int _n;
0602 double _beta;
0603 EnergyCorrelator::Measure _measure;
0604 EnergyCorrelator::Strategy _strategy;
0605
0606 };
0607
0608
0609 inline double EnergyCorrelatorNseries::result(const PseudoJet& jet) const {
0610
0611 if (_n == 1) return EnergyCorrelatorGeneralized(1, 2, 2*_beta, _measure, _strategy).result(jet);
0612
0613 double numerator = EnergyCorrelatorGeneralized(2, _n + 1, _beta, _measure, _strategy).result(jet);
0614 double denominator = EnergyCorrelatorGeneralized(1, _n, _beta, _measure, _strategy).result(jet);
0615
0616 return numerator/denominator/denominator;
0617
0618 }
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628 class EnergyCorrelatorN2 : public FunctionOfPseudoJet<double> {
0629
0630 public:
0631
0632
0633
0634
0635
0636 EnergyCorrelatorN2(double beta,
0637 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0638 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0639 : _beta(beta), _measure(measure), _strategy(strategy) {};
0640
0641 virtual ~EnergyCorrelatorN2() {}
0642
0643
0644
0645
0646 double result(const PseudoJet& jet) const;
0647
0648 std::string description() const;
0649
0650 private:
0651
0652 double _beta;
0653
0654 EnergyCorrelator::Measure _measure;
0655 EnergyCorrelator::Strategy _strategy;
0656
0657
0658 };
0659
0660
0661 inline double EnergyCorrelatorN2::result(const PseudoJet& jet) const {
0662
0663 double numerator = EnergyCorrelatorGeneralized(2, 3, _beta, _measure, _strategy).result(jet);
0664 double denominator = EnergyCorrelatorGeneralized(1, 2, _beta, _measure, _strategy).result(jet);
0665
0666 return numerator/denominator/denominator;
0667
0668 }
0669
0670
0671
0672
0673
0674
0675
0676
0677 class EnergyCorrelatorN3 : public FunctionOfPseudoJet<double> {
0678
0679 public:
0680
0681
0682
0683
0684
0685 EnergyCorrelatorN3(double beta,
0686 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0687 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0688 : _beta(beta), _measure(measure), _strategy(strategy) {};
0689
0690 virtual ~EnergyCorrelatorN3() {}
0691
0692
0693
0694
0695 double result(const PseudoJet& jet) const;
0696
0697 std::string description() const;
0698
0699 private:
0700
0701 double _beta;
0702
0703 EnergyCorrelator::Measure _measure;
0704 EnergyCorrelator::Strategy _strategy;
0705
0706
0707 };
0708
0709
0710 inline double EnergyCorrelatorN3::result(const PseudoJet& jet) const {
0711
0712 double numerator = EnergyCorrelatorGeneralized(2, 4, _beta, _measure, _strategy).result(jet);
0713 double denominator = EnergyCorrelatorGeneralized(1, 3, _beta, _measure, _strategy).result(jet);
0714
0715 return numerator/denominator/denominator;
0716
0717 }
0718
0719
0720
0721
0722
0723
0724
0725
0726
0727 class EnergyCorrelatorMseries : public FunctionOfPseudoJet<double> {
0728
0729 public:
0730
0731
0732
0733
0734
0735 EnergyCorrelatorMseries(
0736 unsigned int n,
0737 double beta,
0738 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0739 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0740 : _n(n), _beta(beta), _measure(measure), _strategy(strategy) {
0741
0742 if (_n < 1) throw Error("EnergyCorrelatorMseries: n must be 1 or greater.");
0743
0744 };
0745
0746 virtual ~EnergyCorrelatorMseries() {}
0747
0748
0749
0750
0751 double result(const PseudoJet& jet) const;
0752
0753 std::string description() const;
0754
0755 private:
0756
0757 unsigned int _n;
0758 double _beta;
0759 EnergyCorrelator::Measure _measure;
0760 EnergyCorrelator::Strategy _strategy;
0761
0762 };
0763
0764
0765 inline double EnergyCorrelatorMseries::result(const PseudoJet& jet) const {
0766
0767 if (_n == 1) return EnergyCorrelatorGeneralized(1, 2, _beta, _measure, _strategy).result(jet);
0768
0769 double numerator = EnergyCorrelatorGeneralized(1, _n + 1, _beta, _measure, _strategy).result(jet);
0770 double denominator = EnergyCorrelatorGeneralized(1, _n, _beta, _measure, _strategy).result(jet);
0771
0772 return numerator/denominator;
0773
0774 }
0775
0776
0777
0778
0779
0780
0781
0782 class EnergyCorrelatorM2 : public FunctionOfPseudoJet<double> {
0783
0784 public:
0785
0786
0787
0788
0789
0790 EnergyCorrelatorM2(double beta,
0791 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0792 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0793 : _beta(beta), _measure(measure), _strategy(strategy) {};
0794
0795 virtual ~EnergyCorrelatorM2() {}
0796
0797
0798
0799
0800 double result(const PseudoJet& jet) const;
0801
0802 std::string description() const;
0803
0804 private:
0805
0806 double _beta;
0807
0808 EnergyCorrelator::Measure _measure;
0809 EnergyCorrelator::Strategy _strategy;
0810
0811
0812 };
0813
0814
0815 inline double EnergyCorrelatorM2::result(const PseudoJet& jet) const {
0816
0817 double numerator = EnergyCorrelatorGeneralized(1, 3, _beta, _measure, _strategy).result(jet);
0818 double denominator = EnergyCorrelatorGeneralized(1, 2, _beta, _measure, _strategy).result(jet);
0819
0820 return numerator/denominator;
0821
0822 }
0823
0824
0825
0826
0827
0828
0829
0830
0831
0832
0833
0834
0835
0836 class EnergyCorrelatorCseries : public FunctionOfPseudoJet<double> {
0837
0838 public:
0839
0840 EnergyCorrelatorCseries(unsigned int N,
0841 double beta,
0842 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0843 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0844 : _N(N), _beta(beta), _measure(measure), _strategy(strategy) {
0845
0846 if (_N < 1) throw Error("EnergyCorrelatorCseries: N must be 1 or greater.");
0847
0848 };
0849
0850 virtual ~EnergyCorrelatorCseries() {}
0851
0852
0853
0854
0855
0856 double result(const PseudoJet& jet) const;
0857
0858 std::string description() const;
0859
0860 private:
0861
0862 unsigned int _N;
0863 double _beta;
0864 EnergyCorrelator::Measure _measure;
0865 EnergyCorrelator::Strategy _strategy;
0866
0867
0868 };
0869
0870
0871 inline double EnergyCorrelatorCseries::result(const PseudoJet& jet) const {
0872
0873 double numerator = EnergyCorrelatorGeneralized(-1, _N - 1, _beta, _measure, _strategy).result(jet) * EnergyCorrelatorGeneralized(-1, _N + 1, _beta, _measure, _strategy).result(jet);
0874 double denominator = pow(EnergyCorrelatorGeneralized(-1, _N, _beta, _measure, _strategy).result(jet), 2.0);
0875
0876 return numerator/denominator;
0877
0878 }
0879
0880
0881
0882
0883
0884
0885
0886 class EnergyCorrelatorUseries : public FunctionOfPseudoJet<double> {
0887
0888 public:
0889
0890
0891
0892
0893
0894 EnergyCorrelatorUseries(
0895 unsigned int n,
0896 double beta,
0897 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0898 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0899 : _n(n), _beta(beta), _measure(measure), _strategy(strategy) {
0900
0901 if (_n < 1) throw Error("EnergyCorrelatorUseries: n must be 1 or greater.");
0902
0903 };
0904
0905 virtual ~EnergyCorrelatorUseries() {}
0906
0907
0908
0909
0910 double result(const PseudoJet& jet) const;
0911
0912 std::string description() const;
0913
0914 private:
0915
0916 unsigned int _n;
0917 double _beta;
0918 EnergyCorrelator::Measure _measure;
0919 EnergyCorrelator::Strategy _strategy;
0920
0921 };
0922
0923
0924 inline double EnergyCorrelatorUseries::result(const PseudoJet& jet) const {
0925
0926 double answer = EnergyCorrelatorGeneralized(1, _n + 1, _beta, _measure, _strategy).result(jet);
0927 return answer;
0928
0929 }
0930
0931
0932
0933
0934
0935
0936
0937 class EnergyCorrelatorU1 : public FunctionOfPseudoJet<double> {
0938
0939 public:
0940
0941
0942
0943
0944
0945 EnergyCorrelatorU1(double beta,
0946 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0947 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0948 : _beta(beta), _measure(measure), _strategy(strategy) {};
0949
0950 virtual ~EnergyCorrelatorU1() {}
0951
0952
0953
0954
0955 double result(const PseudoJet& jet) const;
0956
0957 std::string description() const;
0958
0959 private:
0960
0961 double _beta;
0962
0963 EnergyCorrelator::Measure _measure;
0964 EnergyCorrelator::Strategy _strategy;
0965
0966
0967 };
0968
0969
0970 inline double EnergyCorrelatorU1::result(const PseudoJet& jet) const {
0971
0972 double answer = EnergyCorrelatorGeneralized(1, 2, _beta, _measure, _strategy).result(jet);
0973
0974 return answer;
0975
0976 }
0977
0978
0979
0980
0981
0982
0983
0984 class EnergyCorrelatorU2 : public FunctionOfPseudoJet<double> {
0985
0986 public:
0987
0988
0989
0990
0991
0992 EnergyCorrelatorU2(double beta,
0993 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
0994 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
0995 : _beta(beta), _measure(measure), _strategy(strategy) {};
0996
0997 virtual ~EnergyCorrelatorU2() {}
0998
0999
1000
1001
1002 double result(const PseudoJet& jet) const;
1003
1004 std::string description() const;
1005
1006 private:
1007
1008 double _beta;
1009
1010 EnergyCorrelator::Measure _measure;
1011 EnergyCorrelator::Strategy _strategy;
1012
1013
1014 };
1015
1016
1017 inline double EnergyCorrelatorU2::result(const PseudoJet& jet) const {
1018
1019 double answer = EnergyCorrelatorGeneralized(1, 3, _beta, _measure, _strategy).result(jet);
1020
1021 return answer;
1022
1023 }
1024
1025
1026
1027
1028
1029
1030
1031 class EnergyCorrelatorU3 : public FunctionOfPseudoJet<double> {
1032
1033 public:
1034
1035
1036
1037
1038
1039 EnergyCorrelatorU3(double beta,
1040 EnergyCorrelator::Measure measure = EnergyCorrelator::pt_R,
1041 EnergyCorrelator::Strategy strategy = EnergyCorrelator::storage_array)
1042 : _beta(beta), _measure(measure), _strategy(strategy) {};
1043
1044 virtual ~EnergyCorrelatorU3() {}
1045
1046
1047
1048
1049 double result(const PseudoJet& jet) const;
1050
1051 std::string description() const;
1052
1053 private:
1054
1055 double _beta;
1056
1057 EnergyCorrelator::Measure _measure;
1058 EnergyCorrelator::Strategy _strategy;
1059
1060
1061 };
1062
1063
1064 inline double EnergyCorrelatorU3::result(const PseudoJet& jet) const {
1065
1066 double answer = EnergyCorrelatorGeneralized(1, 4, _beta, _measure, _strategy).result(jet);
1067
1068 return answer;
1069
1070 }
1071
1072
1073
1074 }
1075
1076 FASTJET_END_NAMESPACE
1077
1078 #endif