FastJet  3.1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
CDFJetCluPlugin.hh
1 //FJSTARTHEADER
2 // $Id: CDFJetCluPlugin.hh 3433 2014-07-23 08:17:03Z salam $
3 //
4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
5 //
6 //----------------------------------------------------------------------
7 // This file is part of FastJet.
8 //
9 // FastJet is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // The algorithms that underlie FastJet have required considerable
15 // development. They are described in the original FastJet paper,
16 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
17 // FastJet as part of work towards a scientific publication, please
18 // quote the version you use and include a citation to the manual and
19 // optionally also to hep-ph/0512210.
20 //
21 // FastJet is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with FastJet. If not, see <http://www.gnu.org/licenses/>.
28 //----------------------------------------------------------------------
29 //FJENDHEADER
30 
31 #ifndef __CDFJETCLUPLUGIN_HH__
32 #define __CDFJETCLUPLUGIN_HH__
33 
34 #include "fastjet/JetDefinition.hh"
35 #include "fastjet/PseudoJet.hh"
36 #include <map>
37 
38 // questionable whether this should be in fastjet namespace or not...
39 
40 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
41 
42 /// @ingroup plugins
43 /// \class CDFJetCluPlugin
44 /// Implementation of the JetClu algorithm from CDF (plugin for
45 /// fastjet-v2.1 upwards)
47 public:
48  /// a compact constructor
49  CDFJetCluPlugin (double cone_radius_in,
50  double overlap_threshold_in,
51  double seed_threshold_in = 1.0,
52  int iratch_in = 1) :
53  _seed_threshold ( seed_threshold_in ),
54  _cone_radius ( cone_radius_in ),
55  _adjacency_cut ( 2 ),
56  _max_iterations ( 100 ),
57  _iratch ( iratch_in ),
58  _overlap_threshold ( overlap_threshold_in ) {}
59 
60  /// a constructor that looks like the one provided by CDF
61  CDFJetCluPlugin (double seed_threshold_in ,
62  double cone_radius_in ,
63  int adjacency_cut_in ,
64  int max_iterations_in ,
65  int iratch_in ,
66  double overlap_threshold_in) :
67  _seed_threshold (seed_threshold_in ),
68  _cone_radius (cone_radius_in ),
69  _adjacency_cut (adjacency_cut_in ),
70  _max_iterations (max_iterations_in ),
71  _iratch (iratch_in ),
72  _overlap_threshold (overlap_threshold_in ) {}
73 
74  // some functions to return info about parameters
75  double seed_threshold () const {return _seed_threshold ;}
76  double cone_radius () const {return _cone_radius ;}
77  int adjacency_cut () const {return _adjacency_cut ;}
78  int max_iterations () const {return _max_iterations ;}
79  int iratch () const {return _iratch ;}
80  double overlap_threshold () const {return _overlap_threshold ;}
81 
82 
83  // the things that are required by base class
84  virtual std::string description () const;
85  virtual void run_clustering(ClusterSequence &) const;
86  /// the plugin mechanism's standard way of accessing the jet radius
87  virtual double R() const {return cone_radius();}
88 
89 private:
90 
91  double _seed_threshold ;
92  double _cone_radius ;
93  int _adjacency_cut ;
94  int _max_iterations ;
95  int _iratch ;
96  double _overlap_threshold;
97 
98  /// given a jet try inserting its energy into the map -- if that
99  /// energy entry already exists, modify the jet infinitesimally so
100  /// as ensure that the jet energy is unique
101  void _insert_unique (PseudoJet & jet, std::map<double,int> & jetmap) const;
102 
103  static bool _first_time;
104 
105  /// print a banner for reference to the 3rd-party code
106  void _print_banner(std::ostream *ostr) const;
107 };
108 
109 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
110 
111 #endif // __CDFJETCLUPLUGIN_HH__
CDFJetCluPlugin(double seed_threshold_in, double cone_radius_in, int adjacency_cut_in, int max_iterations_in, int iratch_in, double overlap_threshold_in)
a constructor that looks like the one provided by CDF
CDFJetCluPlugin(double cone_radius_in, double overlap_threshold_in, double seed_threshold_in=1.0, int iratch_in=1)
a compact constructor
Implementation of the JetClu algorithm from CDF (plugin for fastjet-v2.1 upwards) ...
a class that allows a user to introduce their own "plugin" jet finder
virtual double R() const
the plugin mechanism's standard way of accessing the jet radius
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
Definition: PseudoJet.hh:67