FastJet 3.0.4
TrackJetPlugin.hh
00001 //STARTHEADER
00002 // $Id: TrackJetPlugin.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 #ifndef __TRACKJETPLUGIN_HH__
00030 #define __TRACKJETPLUGIN_HH__
00031 
00032 #include "fastjet/JetDefinition.hh"
00033 
00034 // questionable whether this should be in fastjet namespace or not...
00035 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00036 
00037 // another forward declaration to reduce includes
00038 class PseudoJet;
00039 
00040 //----------------------------------------------------------------------
00041 
00042 /// @ingroup plugins
00043 /// \class TrackJetPlugin
00044 /// Implementation of the TrackJet algorithm (plugin for fastjet v2.4 upwards)
00045 //
00046 class TrackJetPlugin : public JetDefinition::Plugin {
00047 public:
00048   /// Main constructor for the TrackJet Plugin class.  
00049   ///
00050   /// The argument is an initialised list of jet algorithms
00051   /// \param _radius  the distance at which point a particle is no longer
00052   ///                 recombied into the jet
00053   /// \param jet_recombination_scheme  the recombination scheme used to 
00054   ///                                  sum the 4-vecors inside the jet
00055   /// \param track_recombination_scheme  the recombination scheme used to 
00056   ///                                    sum the 4-vecors when accumulating
00057   ///                                    track into a the jet
00058   /// Both recombiners are defaulted to pt_scheme recomb as for the Rivet
00059   /// implementation.
00060   TrackJetPlugin (double radius, 
00061                   RecombinationScheme jet_recombination_scheme=pt_scheme, 
00062                   RecombinationScheme track_recombination_scheme=pt_scheme){
00063     _radius  = radius;
00064     _radius2 = radius*radius;
00065     _jet_recombiner = JetDefinition::DefaultRecombiner(jet_recombination_scheme);
00066     _track_recombiner = JetDefinition::DefaultRecombiner(track_recombination_scheme);
00067   }
00068 
00069   /// copy constructor
00070   TrackJetPlugin (const TrackJetPlugin & plugin) {
00071     *this = plugin;
00072   }
00073 
00074   // the things that are required by base class
00075   virtual std::string description () const;
00076   virtual void run_clustering(ClusterSequence &) const;
00077 
00078   /// the plugin mechanism's standard way of accessing the jet radius
00079   /// here we return the R of the last alg in the list
00080   virtual double R() const {return _radius;}
00081 
00082 private:
00083   double _radius, _radius2;
00084 
00085   JetDefinition::DefaultRecombiner _jet_recombiner;
00086   JetDefinition::DefaultRecombiner _track_recombiner;
00087 
00088   static bool _first_time;
00089 
00090   /// print a banner for reference to the 3rd-party code
00091   void _print_banner(std::ostream *ostr) const;
00092 };
00093 
00094 FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
00095 
00096 #endif // __TRACKJETPLUGIN_HH__
00097 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends