FastJet 3.0.2
Boost.hh
00001 //STARTHEADER
00002 // $Id: Boost.hh 2689 2011-11-14 14:51:06Z soyez $
00003 //
00004 // Copyright (c) 2005-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 __FASTJET_TOOL_BOOST_HH__
00030 #define __FASTJET_TOOL_BOOST_HH__
00031 
00032 #include <fastjet/PseudoJet.hh>
00033 #include <fastjet/FunctionOfPseudoJet.hh>
00034 #include <fastjet/PseudoJetStructureBase.hh>
00035 
00036 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00037 
00038 /// @ingroup tools_generic
00039 /// \class Boost
00040 /// Class to boost a PseudoJet
00041 ///
00042 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
00043 /// action if to boost the PseudoJet by a boost vector passed to its
00044 /// constructor
00045 class Boost : public FunctionOfPseudoJet<PseudoJet>{
00046 public:
00047   /// default ctor
00048   Boost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
00049 
00050   /// the action of the function: boost the PseudoJet by a boost
00051   /// vector _jet_rest
00052   PseudoJet result(const PseudoJet & original) const{
00053     PseudoJet res = original;
00054     return res.boost(_jet_rest);
00055   }
00056 
00057 protected:
00058   PseudoJet _jet_rest;  ///< the boost vector
00059 };
00060 
00061 /// @ingroup tools_generic
00062 /// \class Unboost
00063 /// Class to un-boost a PseudoJet
00064 ///
00065 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
00066 /// action if to un-boost the PseudoJet back in the restframe of the
00067 /// PseudoJet passed to its constructor
00068 class Unboost : public FunctionOfPseudoJet<PseudoJet>{
00069 public:
00070   /// default ctor
00071   Unboost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
00072 
00073   /// the action of the function: boost the PseudoJet to the rest
00074   /// frame of _jet_rest
00075   PseudoJet result(const PseudoJet & original) const{
00076     PseudoJet res = original;
00077     return res.unboost(_jet_rest);
00078   }
00079 
00080 protected:
00081   PseudoJet _jet_rest;  ///< the boost vector
00082 };
00083 
00084 FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
00085 
00086 #endif // __FASTJET_TRANSFORMER_HH__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends