FastJet 3.0.2
ATLASConePlugin.hh
00001 //STARTHEADER
00002 // $Id: ATLASConePlugin.hh 2758 2011-11-24 08:31:58Z soyez $
00003 //
00004 // Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
00005 //
00006 //----------------------------------------------------------------------
00007 // This file is part of FastJet.
00008 //
00009 //  FastJet is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU General Public License as published by
00011 //  the Free Software Foundation; either version 2 of the License, or
00012 //  (at your option) any later version.
00013 //
00014 //  The algorithms that underlie FastJet have required considerable
00015 //  development and are described in hep-ph/0512210. If you use
00016 //  FastJet as part of work towards a scientific publication, please
00017 //  include a citation to the FastJet paper.
00018 //
00019 //  FastJet is distributed in the hope that it will be useful,
00020 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 //  GNU General Public License for more details.
00023 //
00024 //  You should have received a copy of the GNU General Public License
00025 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
00026 //----------------------------------------------------------------------
00027 //ENDHEADER
00028 
00029 // Note on the implementation:
00030 //   this implementation of the ATLAS Cone is based on the SpartyJet
00031 //   v2.20.0 implementation. See README for details
00032 
00033 #ifndef __ATLASCONEPLUGIN_HH__
00034 #define __ATLASCONEPLUGIN_HH__
00035 
00036 #include "fastjet/JetDefinition.hh"
00037 
00038 // questionable whether this should be in fastjet namespace or not...
00039 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00040 
00041 // forward declaration to reduce includes
00042 class PseudoJet;
00043 
00044 //----------------------------------------------------------------------
00045 //
00046 /// @ingroup plugins
00047 /// \class ATLASConePlugin
00048 /// Implementation of the ATLAS Cone (plugin for fastjet v2.4 upwards)
00049 class ATLASConePlugin : public JetDefinition::Plugin {
00050 public:
00051   /// Main constructor for the ATLASCone Plugin class.
00052   ///
00053   /// Apparently the default parameters in the ATLAS software are the
00054   /// ones used here. SpartyJet uses a radius of 0.7, a seed threshold
00055   /// of 1 GeV and an overlap threshold of 0.75
00056   /// For the ATLAS SW defaults, see
00057   ///   http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/groups/JetRoutines/SpartyJet/atlas/
00058   /// in the JetdoneFinderTools.cxx (rev1.1) and JetSplitMergeTool.cxx (rev1.1)
00059   /// For SpartyJet, see atlas/ConeFinderTool.h
00060   ///
00061   /// Finally, to agree with FastJet standards, we do not specify a default R,
00062   /// that in the ATLAS code is 0.7
00063   ATLASConePlugin (double radius, double seedPt_in=2.0, double f_in=0.5)
00064     : _radius(radius), _seedPt(seedPt_in), _f(f_in){}
00065 
00066   /// copy constructor
00067   ATLASConePlugin (const ATLASConePlugin & plugin) {
00068     *this = plugin;
00069   }
00070 
00071   // the things that are required by base class
00072   virtual std::string description () const;
00073   virtual void run_clustering(ClusterSequence &) const;
00074 
00075   /// the plugin mechanism's standard way of accessing the jet radius
00076   /// here we return the R of the last alg in the list
00077   virtual double R() const {return _radius;}
00078 
00079   // access to the other parameters
00080   /// seed threshold
00081   double seedPt() const {return _seedPt;}
00082 
00083   /// split-merge overlap threshold
00084   double f() const {return _f;}
00085 
00086 private:
00087 
00088   double _radius;   ///< the cone radius
00089   double _seedPt;   ///< the pt seed threshold used in stable-cone search
00090   double _f;        ///< the overlap thresholod used in the split-merge
00091 
00092   static bool _first_time;
00093 
00094   /// print a banner for reference to the 3rd-party code
00095   void _print_banner(std::ostream *ostr) const;
00096 };
00097 
00098 FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
00099 
00100 #endif // __ATLASCONEPLUGIN_HH__
00101 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends