FastJet  3.3.0
Boost.hh
1 //FJSTARTHEADER
2 // $Id: Boost.hh 3433 2014-07-23 08:17:03Z salam $
3 //
4 // Copyright (c) 2005-2014, 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. They are described in the original FastJet paper,
16 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
17 // FastJet as part of work towards a scientific publication, please
18 // quote the version you use and include a citation to the manual and
19 // optionally also to hep-ph/0512210.
20 //
21 // FastJet is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with FastJet. If not, see <http://www.gnu.org/licenses/>.
28 //----------------------------------------------------------------------
29 //FJENDHEADER
30 
31 #ifndef __FASTJET_TOOL_BOOST_HH__
32 #define __FASTJET_TOOL_BOOST_HH__
33 
34 #include <fastjet/PseudoJet.hh>
35 #include <fastjet/FunctionOfPseudoJet.hh>
36 #include <fastjet/PseudoJetStructureBase.hh>
37 
38 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
39 
40 /// @ingroup tools_generic
41 /// \class Boost
42 /// Class to boost a PseudoJet
43 ///
44 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
45 /// action if to boost the PseudoJet by a boost vector passed to its
46 /// constructor
47 class Boost : public FunctionOfPseudoJet<PseudoJet>{
48 public:
49  /// default ctor
50  Boost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
51 
52  /// the action of the function: boost the PseudoJet by a boost
53  /// vector _jet_rest
54  PseudoJet result(const PseudoJet & original) const{
55  PseudoJet res = original;
56  return res.boost(_jet_rest);
57  }
58 
59 protected:
60  PseudoJet _jet_rest; ///< the boost vector
61 };
62 
63 /// @ingroup tools_generic
64 /// \class Unboost
65 /// Class to un-boost a PseudoJet
66 ///
67 /// This is a FunctionOfPseudoJet with return type PseudoJet. Its
68 /// action if to un-boost the PseudoJet back in the restframe of the
69 /// PseudoJet passed to its constructor
70 class Unboost : public FunctionOfPseudoJet<PseudoJet>{
71 public:
72  /// default ctor
73  Unboost(const PseudoJet & jet_rest) : _jet_rest(jet_rest){}
74 
75  /// the action of the function: boost the PseudoJet to the rest
76  /// frame of _jet_rest
77  PseudoJet result(const PseudoJet & original) const{
78  PseudoJet res = original;
79  return res.unboost(_jet_rest);
80  }
81 
82 protected:
83  PseudoJet _jet_rest; ///< the boost vector
84 };
85 
86 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
87 
88 #endif // __FASTJET_TRANSFORMER_HH__
Class to un-boost a PseudoJet.
Definition: Boost.hh:70
PseudoJet & boost(const PseudoJet &prest)
transform this jet (given in the rest frame of prest) into a jet in the lab frame ...
Definition: PseudoJet.cc:286
PseudoJet _jet_rest
the boost vector
Definition: Boost.hh:60
PseudoJet result(const PseudoJet &original) const
the action of the function: boost the PseudoJet to the rest frame of _jet_rest
Definition: Boost.hh:77
PseudoJet result(const PseudoJet &original) const
the action of the function: boost the PseudoJet by a boost vector _jet_rest
Definition: Boost.hh:54
PseudoJet _jet_rest
the boost vector
Definition: Boost.hh:83
PseudoJet & unboost(const PseudoJet &prest)
transform this jet (given in lab) into a jet in the rest frame of prest
Definition: PseudoJet.cc:313
Boost(const PseudoJet &jet_rest)
default ctor
Definition: Boost.hh:50
base class providing interface for a generic function of a PseudoJet
Unboost(const PseudoJet &jet_rest)
default ctor
Definition: Boost.hh:73
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
Definition: PseudoJet.hh:67
Class to boost a PseudoJet.
Definition: Boost.hh:47