1 | //STARTHEADER |
---|
2 | // $Id: TrackJetPlugin.hh 2758 2011-11-24 08:31:58Z soyez $ |
---|
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 __TRACKJETPLUGIN_HH__ |
---|
30 | #define __TRACKJETPLUGIN_HH__ |
---|
31 | |
---|
32 | #include "fastjet/JetDefinition.hh" |
---|
33 | |
---|
34 | // questionable whether this should be in fastjet namespace or not... |
---|
35 | FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh |
---|
36 | |
---|
37 | // another forward declaration to reduce includes |
---|
38 | class PseudoJet; |
---|
39 | |
---|
40 | //---------------------------------------------------------------------- |
---|
41 | |
---|
42 | /// @ingroup plugins |
---|
43 | /// \class TrackJetPlugin |
---|
44 | /// Implementation of the TrackJet algorithm (plugin for fastjet v2.4 upwards) |
---|
45 | // |
---|
46 | class TrackJetPlugin : public JetDefinition::Plugin { |
---|
47 | public: |
---|
48 | /// Main constructor for the TrackJet Plugin class. |
---|
49 | /// |
---|
50 | /// The argument is an initialised list of jet algorithms |
---|
51 | /// \param _radius the distance at which point a particle is no longer |
---|
52 | /// recombied into the jet |
---|
53 | /// \param jet_recombination_scheme the recombination scheme used to |
---|
54 | /// sum the 4-vecors inside the jet |
---|
55 | /// \param track_recombination_scheme the recombination scheme used to |
---|
56 | /// sum the 4-vecors when accumulating |
---|
57 | /// track into a the jet |
---|
58 | /// Both recombiners are defaulted to pt_scheme recomb as for the Rivet |
---|
59 | /// implementation. |
---|
60 | TrackJetPlugin (double radius, |
---|
61 | RecombinationScheme jet_recombination_scheme=pt_scheme, |
---|
62 | RecombinationScheme track_recombination_scheme=pt_scheme){ |
---|
63 | _radius = radius; |
---|
64 | _radius2 = radius*radius; |
---|
65 | _jet_recombiner = JetDefinition::DefaultRecombiner(jet_recombination_scheme); |
---|
66 | _track_recombiner = JetDefinition::DefaultRecombiner(track_recombination_scheme); |
---|
67 | } |
---|
68 | |
---|
69 | /// copy constructor |
---|
70 | TrackJetPlugin (const TrackJetPlugin & plugin) { |
---|
71 | *this = plugin; |
---|
72 | } |
---|
73 | |
---|
74 | // the things that are required by base class |
---|
75 | virtual std::string description () const; |
---|
76 | virtual void run_clustering(ClusterSequence &) const; |
---|
77 | |
---|
78 | /// the plugin mechanism's standard way of accessing the jet radius |
---|
79 | /// here we return the R of the last alg in the list |
---|
80 | virtual double R() const {return _radius;} |
---|
81 | |
---|
82 | private: |
---|
83 | double _radius, _radius2; |
---|
84 | |
---|
85 | JetDefinition::DefaultRecombiner _jet_recombiner; |
---|
86 | JetDefinition::DefaultRecombiner _track_recombiner; |
---|
87 | |
---|
88 | static bool _first_time; |
---|
89 | |
---|
90 | /// print a banner for reference to the 3rd-party code |
---|
91 | void _print_banner(std::ostream *ostr) const; |
---|
92 | }; |
---|
93 | |
---|
94 | FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh |
---|
95 | |
---|
96 | #endif // __TRACKJETPLUGIN_HH__ |
---|
97 | |
---|