FastJet 3.4.1
TrackJetPlugin.hh
1//FJSTARTHEADER
2// $Id$
3//
4// Copyright (c) 2007-2023, 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 __TRACKJETPLUGIN_HH__
32#define __TRACKJETPLUGIN_HH__
33
34#include "fastjet/JetDefinition.hh"
35#include "fastjet/internal/thread_safety_helpers.hh" // helpers to write transparent code w&wo C++11 features
36
37// questionable whether this should be in fastjet namespace or not...
38FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
39
40// another forward declaration to reduce includes
41class PseudoJet;
42
43//----------------------------------------------------------------------
44
45/// @ingroup plugins
46/// \class TrackJetPlugin
47/// Implementation of the TrackJet algorithm (plugin for fastjet v2.4 upwards)
48//
50public:
51 /// Main constructor for the TrackJet Plugin class.
52 ///
53 /// The argument is an initialised list of jet algorithms
54 /// \param _radius the distance at which point a particle is no longer
55 /// recombied into the jet
56 /// \param jet_recombination_scheme the recombination scheme used to
57 /// sum the 4-vecors inside the jet
58 /// \param track_recombination_scheme the recombination scheme used to
59 /// sum the 4-vecors when accumulating
60 /// track into a the jet
61 /// Both recombiners are defaulted to pt_scheme recomb as for the Rivet
62 /// implementation.
63 TrackJetPlugin (double radius,
64 RecombinationScheme jet_recombination_scheme=pt_scheme,
65 RecombinationScheme track_recombination_scheme=pt_scheme){
66 _radius = radius;
67 _radius2 = radius*radius;
68 _jet_recombiner = JetDefinition::DefaultRecombiner(jet_recombination_scheme);
69 _track_recombiner = JetDefinition::DefaultRecombiner(track_recombination_scheme);
70 }
71
72 /// copy constructor
73 TrackJetPlugin (const TrackJetPlugin & plugin) {
74 *this = plugin;
75 }
76
77 // the things that are required by base class
78 virtual std::string description () const;
79 virtual void run_clustering(ClusterSequence &) const;
80
81 /// the plugin mechanism's standard way of accessing the jet radius
82 /// here we return the R of the last alg in the list
83 virtual double R() const {return _radius;}
84
85private:
86 double _radius, _radius2;
87
89 JetDefinition::DefaultRecombiner _track_recombiner;
90
91 static thread_safety_helpers::FirstTimeTrue _first_time;
92
93 /// print a banner for reference to the 3rd-party code
94 void _print_banner(std::ostream *ostr) const;
95};
96
97FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
98
99#endif // __TRACKJETPLUGIN_HH__
100
deals with clustering
A class that will provide the recombination scheme facilities and/or allow a user to extend these fac...
a class that allows a user to introduce their own "plugin" jet finder
Implementation of the TrackJet algorithm (plugin for fastjet v2.4 upwards)
TrackJetPlugin(double radius, RecombinationScheme jet_recombination_scheme=pt_scheme, RecombinationScheme track_recombination_scheme=pt_scheme)
Main constructor for the TrackJet Plugin class.
TrackJetPlugin(const TrackJetPlugin &plugin)
copy constructor
virtual double R() const
the plugin mechanism's standard way of accessing the jet radius here we return the R of the last alg ...
provides an object wich will return "true" the first time () is called and false afterwards
RecombinationScheme
The various recombination schemes.