File indexing completed on 2025-01-30 10:06:42
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
0026 #ifndef __FASTJET_CONTRIB_JETCLEANSER_HH__
0027 #define __FASTJET_CONTRIB_JETCLEANSER_HH__
0028
0029 #include <fastjet/internal/base.hh>
0030
0031 #include "fastjet/ClusterSequence.hh"
0032 #include "fastjet/Error.hh"
0033 #include "fastjet/JetDefinition.hh"
0034
0035
0036 #include <map>
0037 #include <sstream>
0038 #include <string>
0039
0040 FASTJET_BEGIN_NAMESPACE
0041
0042 namespace contrib{
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 class JetCleanser {
0062
0063 public:
0064 enum cleansing_mode {
0065 jvf_cleansing,
0066 linear_cleansing,
0067 gaussian_cleansing
0068 };
0069
0070 enum input_mode {
0071 input_nc_together,
0072
0073 input_nc_separate
0074
0075 };
0076
0077 public:
0078
0079 JetCleanser(JetDefinition subjet_def, cleansing_mode cmode, input_mode imode);
0080 JetCleanser(double rsub, cleansing_mode cmode, input_mode imode);
0081
0082
0083 ~JetCleanser(){}
0084
0085
0086 void SetGroomingParameters(double fcut, int nsjmin);
0087 inline void SetTrimming(double fcut) { SetGroomingParameters(fcut,0); }
0088 inline void SetFiltering(int nsj) { SetGroomingParameters(1.0,nsj); }
0089 void SetLinearParameters(double g0_mean=0.67);
0090 void SetGaussianParameters(double g0_mean=0.67, double g1_mean=0.67, double g0_width=0.15, double g1_width=0.25);
0091
0092
0093 std::string description() const;
0094 PseudoJet operator()(const PseudoJet & jet,
0095 const std::vector<PseudoJet> & tracks_lv,
0096 const std::vector<PseudoJet> & tracks_pu) const;
0097
0098 PseudoJet operator()(const std::vector<PseudoJet> & neutrals_all,
0099 const std::vector<PseudoJet> & tracks_lv,
0100 const std::vector<PseudoJet> & tracks_pu) const;
0101
0102 void _RunTests();
0103
0104
0105 private:
0106
0107
0108 static const double jc_zero;
0109
0110 double _rsub;
0111 double _fcut;
0112 double _nsjmin;
0113 JetDefinition _subjet_def;
0114
0115 cleansing_mode _cleansing_mode;
0116 input_mode _input_mode;
0117
0118 double _linear_gamma0_mean;
0119 double _gaussian_gamma0_mean;
0120 double _gaussian_gamma0_width;
0121 double _gaussian_gamma1_mean;
0122 double _gaussian_gamma1_width;
0123
0124
0125 void _SetDefaults();
0126 void _CheckRescalingValues(double & pt_all, const double & ptc_lv, const double & ptc_pu) const;
0127 double _GetSubjetRescaling_nctogether(double pt_all, double ptc_lv, double ptc_pu) const;
0128 double _GetSubjetRescaling_ncseparate(double ptn_all, double ptc_lv, double ptc_pu) const;
0129 double _GaussianGetMinimizedGamma0(double pt_all, double ptc_lv, double ptc_pu) const;
0130 double _GaussianGetGamma1(double gamma0, double pt_all, double ptc_lv, double ptc_pu) const;
0131 double _GaussianFunction(double x, void * params) const;
0132 void _RunTestRescaling(double pt_all, double ptc_lv, double ptc_pu) const;
0133 };
0134
0135
0136
0137 std::vector<PseudoJet> RescalePseudoJetVector(const std::vector<PseudoJet> & jets, const double s_factor);
0138
0139
0140 PseudoJet RescalePseudoJetConstituents(const PseudoJet & jet, const double s_factor);
0141
0142
0143 std::vector< std::vector<PseudoJet> > ClusterSets(const JetDefinition & jet_def,
0144 const std::vector<PseudoJet> & cluster_set,
0145 const std::vector< std::vector<PseudoJet> > & follow_sets,
0146 const double &ptmin=0.0);
0147
0148
0149
0150
0151
0152
0153
0154
0155 class FollowSetGhostInfo : public PseudoJet::UserInfoBase {
0156 public:
0157 inline FollowSetGhostInfo(int set_id, int ind_id) { _set_id = set_id; _ind_id = ind_id; }
0158 inline int GetSetId() { return _set_id; }
0159 inline int GetIndId() { return _ind_id; }
0160
0161 private:
0162 int _set_id;
0163 int _ind_id;
0164 };
0165
0166 }
0167
0168 FASTJET_END_NAMESPACE
0169
0170 #endif