Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:17

0001 //FJSTARTHEADER
0002 // $Id: CMSIterativeConePlugin.hh 1508 2009-04-10 22:46:49Z soyez $
0003 //
0004 // Copyright (c) 2007-2021, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
0005 //
0006 //----------------------------------------------------------------------
0007 // This file is part of FastJet.
0008 //
0009 //  FastJet is free software; you can redistribute it and/or modify
0010 //  it under the terms of the GNU General Public License as published by
0011 //  the Free Software Foundation; either version 2 of the License, or
0012 //  (at your option) any later version.
0013 //
0014 //  The algorithms that underlie FastJet have required considerable
0015 //  development. They are described in the original FastJet paper,
0016 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
0017 //  FastJet as part of work towards a scientific publication, please
0018 //  quote the version you use and include a citation to the manual and
0019 //  optionally also to hep-ph/0512210.
0020 //
0021 //  FastJet is distributed in the hope that it will be useful,
0022 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
0023 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0024 //  GNU General Public License for more details.
0025 //
0026 //  You should have received a copy of the GNU General Public License
0027 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
0028 //----------------------------------------------------------------------
0029 //FJENDHEADER
0030 
0031 #ifndef __CMSITERATIVECONEPLUGIN_HH__
0032 #define __CMSITERATIVECONEPLUGIN_HH__
0033 
0034 #include "fastjet/JetDefinition.hh"
0035 #include "fastjet/internal/thread_safety_helpers.hh"  // helpers to write transparent code w&wo C++11 features
0036 
0037 // questionable whether this should be in fastjet namespace or not...
0038 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
0039 
0040 // forward declaration to reduce includes
0041 class PseudoJet;
0042 
0043 //----------------------------------------------------------------------
0044 //
0045 
0046 /// @ingroup plugins
0047 /// \class CMSIterativeConePlugin
0048 /// Implementation of the CMS Iterative Cone (plugin for fastjet v2.4 upwards)
0049 class CMSIterativeConePlugin : public JetDefinition::Plugin {
0050 public:
0051   /// Main constructor for the CMSIterativeCone Plugin class.  
0052   ///
0053   /// The arguments are
0054   ///   ConeRadius      the radius of the cone
0055   ///   SeedThreshold   a threshold for the seeds to iterate from
0056   ///
0057   /// NOTE: to be more coherent with all other fastjet plugins,
0058   ///       we've put the radius before the seed threshold. 
0059   ///       CMS does the opposite.
0060   ///       In this way, we also put a default value of 0 for the 
0061   ///       seed threshold.
0062   CMSIterativeConePlugin (double ConeRadius, double SeedThreshold=1.0) :
0063     theConeRadius(ConeRadius), theSeedThreshold(SeedThreshold){}
0064 
0065   /// copy constructor
0066   CMSIterativeConePlugin (const CMSIterativeConePlugin & plugin) {
0067     *this = plugin;
0068   }
0069 
0070   // the things that are required by base class
0071   virtual std::string description () const;
0072   virtual void run_clustering(ClusterSequence &) const;
0073 
0074   /// the plugin mechanism's standard way of accessing the jet radius
0075   /// here we return the R of the last alg in the list
0076   virtual double R() const {return theConeRadius;}
0077 
0078   /// get the seed threshold
0079   virtual double seed_threshold() const {return theSeedThreshold;}
0080 
0081 private:
0082   double theConeRadius;     ///< cone radius
0083   double theSeedThreshold;  ///< seed threshold
0084 
0085   static thread_safety_helpers::FirstTimeTrue _first_time;
0086 
0087   /// print a banner for reference to the 3rd-party code
0088   void _print_banner(std::ostream *ostr) const;
0089 };
0090 
0091 FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
0092 
0093 #endif // __CMSITERATIVECONEPLUGIN_HH__
0094