Fork me on GitHub

source: svn/trunk/external/fastjet/tools/Boost.hh@ 1176

Last change on this file since 1176 was 999, checked in by Pavel Demin, 12 years ago

add fastjet/tools

File size: 2.8 KB
Line 
1//STARTHEADER
2// $Id: Boost.hh 2689 2011-11-14 14:51:06Z soyez $
3//
4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
5//
6//----------------------------------------------------------------------
7// This file is part of FastJet.
8//
9// FastJet is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// The algorithms that underlie FastJet have required considerable
15// development and are described in hep-ph/0512210. If you use
16// FastJet as part of work towards a scientific publication, please
17// include a citation to the FastJet paper.
18//
19// FastJet is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22// GNU General Public License for more details.
23//
24// You should have received a copy of the GNU General Public License
25// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
26//----------------------------------------------------------------------
27//ENDHEADER
28
29#ifndef __FASTJET_TOOL_BOOST_HH__
30#define __FASTJET_TOOL_BOOST_HH__
31
32#include <fastjet/PseudoJet.hh>
33#include <fastjet/FunctionOfPseudoJet.hh>
34#include <fastjet/PseudoJetStructureBase.hh>
35
36FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
37
38/// @ingroup tools_generic
39/// \class Boost
40/// Class to boost a PseudoJet
41///
42/// This is a FunctionOfPseudoJet with return type PseudoJet. Its
43/// action if to boost the PseudoJet by a boost vector passed to its
44/// constructor
45class Boost : public FunctionOfPseudoJet<PseudoJet>{
46public:
47 /// default ctor
48 Boost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
49
50 /// the action of the function: boost the PseudoJet by a boost
51 /// vector _jet_rest
52 PseudoJet result(const PseudoJet & original) const{
53 PseudoJet res = original;
54 return res.boost(_jet_rest);
55 }
56
57protected:
58 PseudoJet _jet_rest; ///< the boost vector
59};
60
61/// @ingroup tools_generic
62/// \class Unboost
63/// Class to un-boost a PseudoJet
64///
65/// This is a FunctionOfPseudoJet with return type PseudoJet. Its
66/// action if to un-boost the PseudoJet back in the restframe of the
67/// PseudoJet passed to its constructor
68class Unboost : public FunctionOfPseudoJet<PseudoJet>{
69public:
70 /// default ctor
71 Unboost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
72
73 /// the action of the function: boost the PseudoJet to the rest
74 /// frame of _jet_rest
75 PseudoJet result(const PseudoJet & original) const{
76 PseudoJet res = original;
77 return res.unboost(_jet_rest);
78 }
79
80protected:
81 PseudoJet _jet_rest; ///< the boost vector
82};
83
84FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
85
86#endif // __FASTJET_TRANSFORMER_HH__
Note: See TracBrowser for help on using the repository browser.