Fork me on GitHub

source: svn/trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.hh@ 296

Last change on this file since 296 was 11, checked in by severine ovyn, 16 years ago

Fastjet added; CDFCones directory has been changed

File size: 4.0 KB
RevLine 
[11]1//STARTHEADER
2// $Id: CDFJetCluPlugin.hh,v 1.1 2008-11-06 14:32:10 ovyn Exp $
3//
4// Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
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 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.
18//
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.
23//
24// You should have received a copy of the GNU General Public License
25// along with FastJet; if not, write to the Free Software
26// Foundation, Inc.:
27// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28//----------------------------------------------------------------------
29//ENDHEADER
30
31#ifndef __CDFJETCLUPLUGIN_HH__
32#define __CDFJETCLUPLUGIN_HH__
33
34#include "Utilities/Fastjet/include/fastjet/JetDefinition.hh"
35#include "Utilities/Fastjet/include/fastjet/PseudoJet.hh"
36#include <map>
37
38// questionable whether this should be in fastjet namespace or not...
39
40FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
41
42/// a plugin for fastjet-v2.1 that provides an interface to the CDF
43/// jetclu algorithm
44class CDFJetCluPlugin : public JetDefinition::Plugin {
45public:
46 /// a compact constructor
47 CDFJetCluPlugin (double cone_radius,
48 double overlap_threshold = 0.5,
49 double seed_threshold = 1.0,
50 int iratch = 1) :
51 _seed_threshold ( seed_threshold ),
52 _cone_radius ( cone_radius ),
53 _adjacency_cut ( 2 ),
54 _max_iterations ( 100 ),
55 _iratch ( iratch ),
56 _overlap_threshold ( overlap_threshold ) {}
57
58 /// a constructor that looks like the one provided by CDF
59 CDFJetCluPlugin (
60 double seed_threshold ,
61 double cone_radius ,
62 int adjacency_cut ,
63 int max_iterations ,
64 int iratch ,
65 double overlap_threshold) :
66 _seed_threshold (seed_threshold ),
67 _cone_radius (cone_radius ),
68 _adjacency_cut (adjacency_cut ),
69 _max_iterations (max_iterations ),
70 _iratch (iratch ),
71 _overlap_threshold (overlap_threshold ) {}
72
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 ;}
80
81
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();}
87
88
89private:
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};
104
105FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
106
107#endif // __CDFJETCLUPLUGIN_HH__
Note: See TracBrowser for help on using the repository browser.