FastJet 3.0.2
TopTaggerBase.hh
00001 #ifndef __FASTJET_TOP_TAGGER_BASE_HH__
00002 #define __FASTJET_TOP_TAGGER_BASE_HH__
00003 
00004 //STARTHEADER
00005 // $Id: TopTaggerBase.hh 2689 2011-11-14 14:51:06Z soyez $
00006 //
00007 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
00008 //
00009 //----------------------------------------------------------------------
00010 // This file is part of FastJet.
00011 //
00012 //  FastJet is free software; you can redistribute it and/or modify
00013 //  it under the terms of the GNU General Public License as published by
00014 //  the Free Software Foundation; either version 2 of the License, or
00015 //  (at your option) any later version.
00016 //
00017 //  The algorithms that underlie FastJet have required considerable
00018 //  development and are described in hep-ph/0512210. If you use
00019 //  FastJet as part of work towards a scientific publication, please
00020 //  include a citation to the FastJet paper.
00021 //
00022 //  FastJet is distributed in the hope that it will be useful,
00023 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025 //  GNU General Public License for more details.
00026 //
00027 //  You should have received a copy of the GNU General Public License
00028 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
00029 //----------------------------------------------------------------------
00030 //ENDHEADER
00031 
00032 #include <fastjet/internal/base.hh>
00033 #include <fastjet/tools/Transformer.hh>
00034 
00035 FASTJET_BEGIN_NAMESPACE
00036 
00037 class TopTaggerBase;
00038 class TopTaggerBaseStructure;
00039 
00040 //----------------------------------------------------------------------
00041 /// @ingroup tools_taggers
00042 /// \class TopTaggerBase
00043 /// A base class that provides a common interface for top taggers
00044 /// that are able to return a W (in addition to the top itself).
00045 ///
00046 /// Top taggers that derive from this should satisfy the following 
00047 /// criteria:
00048 ///
00049 /// - their underlying structure should derive from TopTaggerBaseStructure
00050 /// - tagged tops should have two pieces, the first of which is the W candidate
00051 /// - they should apply the top and W selectors to decide if the top has been
00052 ///   tagged
00053 class TopTaggerBase : public Transformer {
00054 public:
00055   TopTaggerBase() : _top_selector(SelectorIdentity()),
00056                     _W_selector(SelectorIdentity()),
00057                     _top_selector_set(false),
00058                     _W_selector_set(false)              {}
00059 
00060   /// the type of the associated structure
00061   typedef TopTaggerBaseStructure StructureType;
00062 
00063   /// sets the selector that is applied to the top candidate
00064   void set_top_selector(const Selector & sel) {_top_selector = sel; _top_selector_set = true;}
00065   /// sets  the selector that is applied to the W candidate
00066   void set_W_selector  (const Selector & sel) {_W_selector   = sel; _W_selector_set = true;}
00067   
00068   /// returns a description of the top and W selectors
00069   virtual std::string description_of_selectors() const {
00070     std::string descr;
00071     if (_top_selector_set) descr = ", top selector: "+_top_selector.description();
00072     if (_W_selector_set) descr += ", W selector: "+_W_selector.description();
00073     return descr;
00074   }
00075 
00076 protected:
00077   /// computes the W helicity angle
00078   double _cos_theta_W(const PseudoJet & result) const;
00079 
00080   Selector _top_selector, _W_selector;
00081   bool _top_selector_set, _W_selector_set;
00082 };
00083 
00084 
00085 //----------------------------------------------------------------------
00086 /// @ingroup tools_taggers
00087 /// \class TopTaggerBaseStructure
00088 /// class that specifies the structure common to all top taggers
00089 ///
00090 /// Note that this specifies only the W, non_W part of the
00091 /// interface. An actual top tagger structure class will also need to
00092 /// derive from a PseudoJetStructureBase type class
00093 /// (e.g. CompositeJetStructure)
00094 class TopTaggerBaseStructure {
00095 public:
00096   virtual const PseudoJet & W() const = 0;
00097   virtual const PseudoJet & non_W() const = 0;
00098   virtual ~TopTaggerBaseStructure() {}
00099 };
00100 
00101 
00102 FASTJET_END_NAMESPACE
00103 
00104 #endif  //  __FASTJET_TOP_TAGGER_BASE_HH__
00105 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends