1 | //FJSTARTHEADER
|
---|
2 | // $Id: NestedDefsPlugin.hh 4442 2020-05-05 07:50:11Z soyez $
|
---|
3 | //
|
---|
4 | // Copyright (c) 2007-2020, 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. They are described in the original FastJet paper,
|
---|
16 | // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
|
---|
17 | // FastJet as part of work towards a scientific publication, please
|
---|
18 | // quote the version you use and include a citation to the manual and
|
---|
19 | // optionally also to hep-ph/0512210.
|
---|
20 | //
|
---|
21 | // FastJet is distributed in the hope that it will be useful,
|
---|
22 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
23 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
24 | // GNU General Public License for more details.
|
---|
25 | //
|
---|
26 | // You should have received a copy of the GNU General Public License
|
---|
27 | // along with FastJet. If not, see <http://www.gnu.org/licenses/>.
|
---|
28 | //----------------------------------------------------------------------
|
---|
29 | //FJENDHEADER
|
---|
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...
|
---|
40 | FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
|
---|
41 |
|
---|
42 | // another forward declaration to reduce includes
|
---|
43 | class PseudoJet;
|
---|
44 |
|
---|
45 | //----------------------------------------------------------------------
|
---|
46 | //
|
---|
47 | /// @ingroup plugins
|
---|
48 | /// \class NestedDefsPlugin
|
---|
49 | /// Plugin to run multiple jet definitions successively (plugin for fastjet v2.4 upwards)
|
---|
50 | ///
|
---|
51 | /// NestedAglsPlugin is a plugin for fastjet (v2.4 upwards) that, given
|
---|
52 | /// a list of jet definitions, performs the clustering by feeding the
|
---|
53 | /// particles to the first algorithm and then, successively feeding the
|
---|
54 | /// output to the next algorithm in the list.
|
---|
55 | //
|
---|
56 | class NestedDefsPlugin : public JetDefinition::Plugin {
|
---|
57 | public:
|
---|
58 | /// Main constructor for the NestedDefs Plugin class.
|
---|
59 | ///
|
---|
60 | /// The argument is an initialised list of jet algorithms
|
---|
61 | NestedDefsPlugin (std::list<JetDefinition> &defs) :
|
---|
62 | _defs(defs){}
|
---|
63 |
|
---|
64 | /// copy constructor
|
---|
65 | NestedDefsPlugin (const NestedDefsPlugin & plugin) {
|
---|
66 | *this = plugin;
|
---|
67 | }
|
---|
68 |
|
---|
69 | // the things that are required by base class
|
---|
70 | virtual std::string description () const;
|
---|
71 | virtual void run_clustering(ClusterSequence &) const;
|
---|
72 | /// the plugin mechanism's standard way of accessing the jet radius
|
---|
73 | /// here we return the R of the last alg in the list
|
---|
74 | virtual double R() const {return _defs.rbegin()->R();}
|
---|
75 |
|
---|
76 | private:
|
---|
77 | std::list<JetDefinition> _defs;
|
---|
78 | };
|
---|
79 |
|
---|
80 | FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
|
---|
81 |
|
---|
82 | #endif // __SISCONEPLUGIN_HH__
|
---|
83 |
|
---|