FastJet  3.4.0
ATLASConePlugin.hh
1 //FJSTARTHEADER
2 // $Id$
3 //
4 // Copyright (c) 2007-2021, 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 // Note on the implementation:
32 // this implementation of the ATLAS Cone is based on the SpartyJet
33 // v2.20.0 implementation. See README for details
34 
35 #ifndef __ATLASCONEPLUGIN_HH__
36 #define __ATLASCONEPLUGIN_HH__
37 
38 #include "fastjet/JetDefinition.hh"
39 #include "fastjet/internal/thread_safety_helpers.hh" // helpers to write transparent code w&wo C++11 features
40 
41 // questionable whether this should be in fastjet namespace or not...
42 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
43 
44 // forward declaration to reduce includes
45 class PseudoJet;
46 
47 //----------------------------------------------------------------------
48 //
49 /// @ingroup plugins
50 /// \class ATLASConePlugin
51 /// Implementation of the ATLAS Cone (plugin for fastjet v2.4 upwards)
53 public:
54  /// Main constructor for the ATLASCone Plugin class.
55  ///
56  /// Apparently the default parameters in the ATLAS software are the
57  /// ones used here. SpartyJet uses a radius of 0.7, a seed threshold
58  /// of 1 GeV and an overlap threshold of 0.75
59  /// For the ATLAS SW defaults, see
60  /// http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/groups/JetRoutines/SpartyJet/atlas/
61  /// in the JetdoneFinderTools.cxx (rev1.1) and JetSplitMergeTool.cxx (rev1.1)
62  /// For SpartyJet, see atlas/ConeFinderTool.h
63  ///
64  /// Finally, to agree with FastJet standards, we do not specify a default R,
65  /// that in the ATLAS code is 0.7
66  ATLASConePlugin (double radius, double seedPt_in=2.0, double f_in=0.5)
67  : _radius(radius), _seedPt(seedPt_in), _f(f_in){}
68 
69  /// copy constructor
70  ATLASConePlugin (const ATLASConePlugin & 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  // access to the other parameters
83  /// seed threshold
84  double seedPt() const {return _seedPt;}
85 
86  /// split-merge overlap threshold
87  double f() const {return _f;}
88 
89 private:
90 
91  double _radius; ///< the cone radius
92  double _seedPt; ///< the pt seed threshold used in stable-cone search
93  double _f; ///< the overlap thresholod used in the split-merge
94 
95  static thread_safety_helpers::FirstTimeTrue _first_time;
96 
97  /// print a banner for reference to the 3rd-party code
98  void _print_banner(std::ostream *ostr) const;
99 };
100 
101 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
102 
103 #endif // __ATLASCONEPLUGIN_HH__
104 
Implementation of the ATLAS Cone (plugin for fastjet v2.4 upwards)
ATLASConePlugin(double radius, double seedPt_in=2.0, double f_in=0.5)
Main constructor for the ATLASCone Plugin class.
virtual double R() const
the plugin mechanism's standard way of accessing the jet radius here we return the R of the last alg ...
double f() const
split-merge overlap threshold
ATLASConePlugin(const ATLASConePlugin &plugin)
copy constructor
double seedPt() const
seed threshold
deals with clustering
a class that allows a user to introduce their own "plugin" jet finder
provides an object wich will return "true" the first time () is called and false afterwards