[35cdc46] | 1 | //FJSTARTHEADER
|
---|
[b7b836a] | 2 | // $Id: Boost.hh 4354 2018-04-22 07:12:37Z salam $
|
---|
[d7d2da3] | 3 | //
|
---|
[b7b836a] | 4 | // Copyright (c) 2005-2018, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
|
---|
[d7d2da3] | 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
|
---|
[35cdc46] | 15 | // development. They are described in the original FastJet paper,
|
---|
| 16 | // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
|
---|
[d7d2da3] | 17 | // FastJet as part of work towards a scientific publication, please
|
---|
[35cdc46] | 18 | // quote the version you use and include a citation to the manual and
|
---|
| 19 | // optionally also to hep-ph/0512210.
|
---|
[d7d2da3] | 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 | //----------------------------------------------------------------------
|
---|
[35cdc46] | 29 | //FJENDHEADER
|
---|
[d7d2da3] | 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__
|
---|