]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/fastjet/fastjet/NestedDefsPlugin.hh
fixed assginment
[u/mrichter/AliRoot.git] / JETAN / fastjet / fastjet / NestedDefsPlugin.hh
CommitLineData
370be031 1//STARTHEADER
2// $Id: NestedDefsPlugin.hh 1394 2009-01-17 05:08:31Z soyez $
3//
4// Copyright (c) 2007-2008, Matteo Cacciari, Gavin 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 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 __NESTEDALGSPLUGIN_HH__
32#define __NESTEDALGSPLUGIN_HH__
33
34#include "fastjet/JetDefinition.hh"
35#include <list>
36#include <memory>
37#include <cmath>
38
39// questionable whether this should be in fastjet namespace or not...
40namespace fastjet { // defined in fastjet/internal/base.hh
41
42// another forward declaration to reduce includes
43class PseudoJet;
44
45//----------------------------------------------------------------------
46//
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.
51//
52class NestedDefsPlugin : public JetDefinition::Plugin {
53public:
54 /// Main constructor for the NestedDefs Plugin class.
55 ///
56 /// The argument is an initialised list of jet algorithms
57 NestedDefsPlugin (std::list<JetDefinition> &defs) :
58 _defs(defs){}
59
60 /// copy constructor
61 NestedDefsPlugin (const NestedDefsPlugin & plugin) {
62 *this = plugin;
63 }
64
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();}
71
72private:
73 std::list<JetDefinition> _defs;
74};
75
76} // fastjet namespace
77
78#endif // __SISCONEPLUGIN_HH__
79