FastJet 3.0beta1
Boost.hh
00001 //STARTHEADER
00002 // $Id: Boost.hh 2397 2011-07-08 08:18:49Z soyez $
00003 //
00004 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin 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, write to the Free Software
00026 //  Foundation, Inc.:
00027 //      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //----------------------------------------------------------------------
00029 //ENDHEADER
00030 
00031 #ifndef __FASTJET_TOOL_BOOST_HH__
00032 #define __FASTJET_TOOL_BOOST_HH__
00033 
00034 #include <fastjet/PseudoJet.hh>
00035 #include <fastjet/FunctionOfPseudoJet.hh>
00036 #include <fastjet/PseudoJetStructureBase.hh>
00037 
00038 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00039 
00040 /// @ingroup tools_generic
00041 /// \class Boost
00042 /// Class to boost a PseudoJet
00043 ///
00044 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
00045 /// action if to boost the PseudoJet by a boost vector passed to its
00046 /// constructor
00047 class Boost : public FunctionOfPseudoJet<PseudoJet>{
00048 public:
00049   /// default ctor
00050   Boost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
00051 
00052   /// the action of the function: boost the PseudoJet by a boost
00053   /// vector _jet_rest
00054   PseudoJet result(const PseudoJet & original) const{
00055     PseudoJet result = original;
00056     return result.boost(_jet_rest);
00057   }
00058 
00059 protected:
00060   PseudoJet _jet_rest;  ///< the boost vector
00061 };
00062 
00063 /// @ingroup tools_generic
00064 /// \class Unboost
00065 /// Class to un-boost a PseudoJet
00066 ///
00067 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
00068 /// action if to un-boost the PseudoJet back in the restframe of the
00069 /// PseudoJet passed to its constructor
00070 class Unboost : public FunctionOfPseudoJet<PseudoJet>{
00071 public:
00072   /// default ctor
00073   Unboost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
00074 
00075   /// the action of the function: boost the PseudoJet to the rest
00076   /// frame of _jet_rest
00077   PseudoJet result(const PseudoJet & original) const{
00078     PseudoJet result = original;
00079     return result.unboost(_jet_rest);
00080   }
00081 
00082 protected:
00083   PseudoJet _jet_rest;  ///< the boost vector
00084 };
00085 
00086 FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
00087 
00088 #endif // __FASTJET_TRANSFORMER_HH__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends