Bayeux  3.4.1
Core Foundation library for SuperNEMO
kinematics.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-06-06
4  * Last modified: 2014-06-06
5  *
6  * License:
7  * Copyright 2014 F. Mauger
8  *
9  * This program 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 3 of the License, or (at
12  * your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  * Description:
25  *
26  * Utilities related to kinematics.
27  *
28  * History:
29  *
30  */
31 
32 #ifndef GENBB_HELP_KINEMATICS_H
33 #define GENBB_HELP_KINEMATICS_H 1
34 
35 namespace genbb {
36 
38  class kinematics
39  {
40  public:
41 
43  kinematics();
44 
46  double m() const;
47 
49  double w() const;
50 
52  double k() const;
53 
55  double p() const;
56 
58  double beta() const;
59 
61  double gamma() const;
62 
64  double v() const;
65 
67  void reset();
68 
70  void initialize_from_m_w(double m_, double w_);
71 
73  void initialize_from_m_k(double m_, double k_);
74 
76  void initialize_from_m_p(double m_, double p_);
77 
78  private:
79 
80  double _m_;
81  double _w_;
82  double _k_;
83  double _p_;
84 
85  };
86 
87 } // end of namespace genbb
88 
89 #endif // GENBB_HELP_KINEMATICS_H
90 
91 // Local Variables: --
92 // mode: c++ --
93 // End: --
double gamma() const
Return the gamma=v/c factor.
double w() const
Return the total energy.
double v() const
Return the velocity.
double k() const
Return the kinetic energy.
void initialize_from_m_p(double m_, double p_)
Initialize from mass and momentum.
void reset()
Invalidate.
void initialize_from_m_w(double m_, double w_)
Initialize from mass and total energy.
void initialize_from_m_k(double m_, double k_)
Initialize from mass and kinetic energy.
double m() const
Return the mass.
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
kinematics()
Default constructor.
double p() const
Return the momentum.
Relastivistic particle kinematics.
Definition: kinematics.h:38
double beta() const
Return the beta=v/c=p/w factor.