1 | //STARTHEADER |
---|
2 | // $Id: NestedDefsPlugin.hh 2577 2011-09-13 15:11:38Z salam $ |
---|
3 | // |
---|
4 | // Copyright (c) 2007-2011, 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 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, see <http://www.gnu.org/licenses/>. |
---|
26 | //---------------------------------------------------------------------- |
---|
27 | //ENDHEADER |
---|
28 | |
---|
29 | #ifndef __NESTEDALGSPLUGIN_HH__ |
---|
30 | #define __NESTEDALGSPLUGIN_HH__ |
---|
31 | |
---|
32 | #include "fastjet/JetDefinition.hh" |
---|
33 | #include <list> |
---|
34 | #include <memory> |
---|
35 | #include <cmath> |
---|
36 | |
---|
37 | // questionable whether this should be in fastjet namespace or not... |
---|
38 | FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh |
---|
39 | |
---|
40 | // another forward declaration to reduce includes |
---|
41 | class PseudoJet; |
---|
42 | |
---|
43 | //---------------------------------------------------------------------- |
---|
44 | // |
---|
45 | /// @ingroup plugins |
---|
46 | /// \class NestedDefsPlugin |
---|
47 | /// Plugin to run multiple jet definitions successively (plugin for fastjet v2.4 upwards) |
---|
48 | /// |
---|
49 | /// NestedAglsPlugin is a plugin for fastjet (v2.4 upwards) that, given |
---|
50 | /// a list of jet definitions, performs the clustering by feeding the |
---|
51 | /// particles to the first algorithm and then, successively feeding the |
---|
52 | /// output to the next algorithm in the list. |
---|
53 | // |
---|
54 | class NestedDefsPlugin : public JetDefinition::Plugin { |
---|
55 | public: |
---|
56 | /// Main constructor for the NestedDefs Plugin class. |
---|
57 | /// |
---|
58 | /// The argument is an initialised list of jet algorithms |
---|
59 | NestedDefsPlugin (std::list<JetDefinition> &defs) : |
---|
60 | _defs(defs){} |
---|
61 | |
---|
62 | /// copy constructor |
---|
63 | NestedDefsPlugin (const NestedDefsPlugin & plugin) { |
---|
64 | *this = plugin; |
---|
65 | } |
---|
66 | |
---|
67 | // the things that are required by base class |
---|
68 | virtual std::string description () const; |
---|
69 | virtual void run_clustering(ClusterSequence &) const; |
---|
70 | /// the plugin mechanism's standard way of accessing the jet radius |
---|
71 | /// here we return the R of the last alg in the list |
---|
72 | virtual double R() const {return _defs.rbegin()->R();} |
---|
73 | |
---|
74 | private: |
---|
75 | std::list<JetDefinition> _defs; |
---|
76 | }; |
---|
77 | |
---|
78 | FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh |
---|
79 | |
---|
80 | #endif // __SISCONEPLUGIN_HH__ |
---|
81 | |
---|