File indexing completed on 2025-01-18 09:57:17
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
0027
0028
0029
0030
0031 #ifndef __CDFJETCLUPLUGIN_HH__
0032 #define __CDFJETCLUPLUGIN_HH__
0033
0034 #include "fastjet/JetDefinition.hh"
0035 #include "fastjet/PseudoJet.hh"
0036 #include <map>
0037 #include "fastjet/internal/thread_safety_helpers.hh" // helpers to write transparent code w&wo C++11 features
0038
0039
0040
0041 FASTJET_BEGIN_NAMESPACE
0042
0043
0044
0045
0046
0047 class CDFJetCluPlugin : public JetDefinition::Plugin {
0048 public:
0049
0050 CDFJetCluPlugin (double cone_radius_in,
0051 double overlap_threshold_in,
0052 double seed_threshold_in = 1.0,
0053 int iratch_in = 1) :
0054 _seed_threshold ( seed_threshold_in ),
0055 _cone_radius ( cone_radius_in ),
0056 _adjacency_cut ( 2 ),
0057 _max_iterations ( 100 ),
0058 _iratch ( iratch_in ),
0059 _overlap_threshold ( overlap_threshold_in ) {}
0060
0061
0062 CDFJetCluPlugin (double seed_threshold_in ,
0063 double cone_radius_in ,
0064 int adjacency_cut_in ,
0065 int max_iterations_in ,
0066 int iratch_in ,
0067 double overlap_threshold_in) :
0068 _seed_threshold (seed_threshold_in ),
0069 _cone_radius (cone_radius_in ),
0070 _adjacency_cut (adjacency_cut_in ),
0071 _max_iterations (max_iterations_in ),
0072 _iratch (iratch_in ),
0073 _overlap_threshold (overlap_threshold_in ) {}
0074
0075
0076 double seed_threshold () const {return _seed_threshold ;}
0077 double cone_radius () const {return _cone_radius ;}
0078 int adjacency_cut () const {return _adjacency_cut ;}
0079 int max_iterations () const {return _max_iterations ;}
0080 int iratch () const {return _iratch ;}
0081 double overlap_threshold () const {return _overlap_threshold ;}
0082
0083
0084
0085 virtual std::string description () const;
0086 virtual void run_clustering(ClusterSequence &) const;
0087
0088 virtual double R() const {return cone_radius();}
0089
0090 private:
0091
0092 double _seed_threshold ;
0093 double _cone_radius ;
0094 int _adjacency_cut ;
0095 int _max_iterations ;
0096 int _iratch ;
0097 double _overlap_threshold;
0098
0099
0100
0101
0102 void _insert_unique (PseudoJet & jet, std::map<double,int> & jetmap) const;
0103
0104 static thread_safety_helpers::FirstTimeTrue _first_time;
0105
0106
0107 void _print_banner(std::ostream *ostr) const;
0108 };
0109
0110 FASTJET_END_NAMESPACE
0111
0112 #endif