FastJet  3.4.0
CMSIterativeConePlugin.hh
1 //FJSTARTHEADER
2 // $Id: CMSIterativeConePlugin.hh 1508 2009-04-10 22:46:49Z soyez $
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 #ifndef __CMSITERATIVECONEPLUGIN_HH__
32 #define __CMSITERATIVECONEPLUGIN_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...
38 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
39 
40 // forward declaration to reduce includes
41 class PseudoJet;
42 
43 //----------------------------------------------------------------------
44 //
45 
46 /// @ingroup plugins
47 /// \class CMSIterativeConePlugin
48 /// Implementation of the CMS Iterative Cone (plugin for fastjet v2.4 upwards)
50 public:
51  /// Main constructor for the CMSIterativeCone Plugin class.
52  ///
53  /// The arguments are
54  /// ConeRadius the radius of the cone
55  /// SeedThreshold a threshold for the seeds to iterate from
56  ///
57  /// NOTE: to be more coherent with all other fastjet plugins,
58  /// we've put the radius before the seed threshold.
59  /// CMS does the opposite.
60  /// In this way, we also put a default value of 0 for the
61  /// seed threshold.
62  CMSIterativeConePlugin (double ConeRadius, double SeedThreshold=1.0) :
63  theConeRadius(ConeRadius), theSeedThreshold(SeedThreshold){}
64 
65  /// copy constructor
67  *this = plugin;
68  }
69 
70  // the things that are required by base class
71  virtual std::string description () const;
72  virtual void run_clustering(ClusterSequence &) const;
73 
74  /// the plugin mechanism's standard way of accessing the jet radius
75  /// here we return the R of the last alg in the list
76  virtual double R() const {return theConeRadius;}
77 
78  /// get the seed threshold
79  virtual double seed_threshold() const {return theSeedThreshold;}
80 
81 private:
82  double theConeRadius; ///< cone radius
83  double theSeedThreshold; ///< seed threshold
84 
85  static thread_safety_helpers::FirstTimeTrue _first_time;
86 
87  /// print a banner for reference to the 3rd-party code
88  void _print_banner(std::ostream *ostr) const;
89 };
90 
91 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
92 
93 #endif // __CMSITERATIVECONEPLUGIN_HH__
94 
Implementation of the CMS Iterative Cone (plugin for fastjet v2.4 upwards)
CMSIterativeConePlugin(double ConeRadius, double SeedThreshold=1.0)
Main constructor for the CMSIterativeCone Plugin class.
virtual double seed_threshold() const
get the seed threshold
CMSIterativeConePlugin(const CMSIterativeConePlugin &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 ...
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