2 // $Id: NestedDefsPlugin.hh 1394 2009-01-17 05:08:31Z soyez $
4 // Copyright (c) 2007-2008, Matteo Cacciari, Gavin Salam and Gregory Soyez
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 __NESTEDALGSPLUGIN_HH__
32 #define __NESTEDALGSPLUGIN_HH__
34 #include "fastjet/JetDefinition.hh"
39 // questionable whether this should be in fastjet namespace or not...
40 namespace fastjet { // defined in fastjet/internal/base.hh
42 // another forward declaration to reduce includes
45 //----------------------------------------------------------------------
47 /// NestedAglsPlugin is a plugin for fastjet (v2.4 upwards) that, given
48 /// a list of jet definitions, performs the clustering by feeding the
49 /// particles to the first algorithm and then, successively feeding the
50 /// output to the next algorithm in the list.
52 class NestedDefsPlugin : public JetDefinition::Plugin {
54 /// Main constructor for the NestedDefs Plugin class.
56 /// The argument is an initialised list of jet algorithms
57 NestedDefsPlugin (std::list<JetDefinition> &defs) :
61 NestedDefsPlugin (const NestedDefsPlugin & plugin) {
65 // the things that are required by base class
66 virtual std::string description () const;
67 virtual void run_clustering(ClusterSequence &) const;
68 /// the plugin mechanism's standard way of accessing the jet radius
69 /// here we return the R of the last alg in the list
70 virtual double R() const {return _defs.rbegin()->R();}
73 std::list<JetDefinition> _defs;
76 } // fastjet namespace
78 #endif // __SISCONEPLUGIN_HH__