FastJet  3.0.6
Boost.hh
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 
36 FASTJET_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
45 class Boost : public FunctionOfPseudoJet<PseudoJet>{
46 public:
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 
57 protected:
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
68 class Unboost : public FunctionOfPseudoJet<PseudoJet>{
69 public:
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 
80 protected:
81  PseudoJet _jet_rest; ///< the boost vector
82 };
83 
84 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
85 
86 #endif // __FASTJET_TRANSFORMER_HH__
Class to un-boost a PseudoJet.
Definition: Boost.hh:68
PseudoJet & boost(const PseudoJet &prest)
transform this jet (given in the rest frame of prest) into a jet in the lab frame [NOT FULLY TESTED] ...
Definition: PseudoJet.cc:268
PseudoJet _jet_rest
the boost vector
Definition: Boost.hh:58
PseudoJet result(const PseudoJet &original) const
the action of the function: boost the PseudoJet to the rest frame of _jet_rest
Definition: Boost.hh:75
PseudoJet result(const PseudoJet &original) const
the action of the function: boost the PseudoJet by a boost vector _jet_rest
Definition: Boost.hh:52
PseudoJet _jet_rest
the boost vector
Definition: Boost.hh:81
PseudoJet & unboost(const PseudoJet &prest)
transform this jet (given in lab) into a jet in the rest frame of prest [NOT FULLY TESTED] ...
Definition: PseudoJet.cc:295
Boost(const PseudoJet &jet_rest)
default ctor
Definition: Boost.hh:48
base class providing interface for a generic function of a PseudoJet
Unboost(const PseudoJet &jet_rest)
default ctor
Definition: Boost.hh:71
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
Definition: PseudoJet.hh:65
Class to boost a PseudoJet.
Definition: Boost.hh:45