2 // $Id: CDFJetCluPlugin.hh 1493 2009-03-11 19:15:17Z salam $
4 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
6 //----------------------------------------------------------------------
7 // This file is part of FastJet.
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.
14 // The algorithms that underlie FastJet have required considerable
15 // development and are described in hep-ph/0512210. If you use
16 // FastJet as part of work towards a scientific publication, please
17 // include a citation to the FastJet paper.
19 // FastJet is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
24 // You should have received a copy of the GNU General Public License
25 // along with FastJet; if not, write to the Free Software
27 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 //----------------------------------------------------------------------
31 #ifndef __CDFJETCLUPLUGIN_HH__
32 #define __CDFJETCLUPLUGIN_HH__
34 #include "fastjet/JetDefinition.hh"
35 #include "fastjet/PseudoJet.hh"
38 // questionable whether this should be in fastjet namespace or not...
40 namespace fastjet { // defined in fastjet/internal/base.hh
42 /// a plugin for fastjet-v2.1 that provides an interface to the CDF
44 class CDFJetCluPlugin : public JetDefinition::Plugin {
46 /// a compact constructor
47 CDFJetCluPlugin (double cone_radius,
48 double overlap_threshold,
49 double seed_threshold = 1.0,
51 _seed_threshold ( seed_threshold ),
52 _cone_radius ( cone_radius ),
54 _max_iterations ( 100 ),
56 _overlap_threshold ( overlap_threshold ) {}
58 /// a constructor that looks like the one provided by CDF
60 double seed_threshold ,
65 double overlap_threshold) :
66 _seed_threshold (seed_threshold ),
67 _cone_radius (cone_radius ),
68 _adjacency_cut (adjacency_cut ),
69 _max_iterations (max_iterations ),
71 _overlap_threshold (overlap_threshold ) {}
73 // some functions to return info about parameters
74 double seed_threshold () const {return _seed_threshold ;}
75 double cone_radius () const {return _cone_radius ;}
76 int adjacency_cut () const {return _adjacency_cut ;}
77 int max_iterations () const {return _max_iterations ;}
78 int iratch () const {return _iratch ;}
79 double overlap_threshold () const {return _overlap_threshold ;}
82 // the things that are required by base class
83 virtual std::string description () const;
84 virtual void run_clustering(ClusterSequence &) const;
85 /// the plugin mechanism's standard way of accessing the jet radius
86 virtual double R() const {return cone_radius();}
91 double _seed_threshold ;
96 double _overlap_threshold;
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;
105 } // fastjet namespace
107 #endif // __CDFJETCLUPLUGIN_HH__