elegent is hosted by Hepforge, IPPP Durham
Elegent
Constants.h
1 /********************************************************************************
2 
3  Copyright 2013 Jan Kašpar
4 
5  This file is part of Elegent (http://elegent.hepforge.org/).
6 
7  Elegent is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Elegent is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Elegent. If not, see <http://www.gnu.org/licenses/>.
19 
20 ********************************************************************************/
21 
22 #ifndef _elegent_constants_
23 #define _elegent_constants_
24 
25 #include "TComplex.h"
26 
27 namespace Elegent
28 {
29 
33 struct Constants
34 {
35  // physics constants
36  static double alpha;
37  static double proton_mass;
38  static double neutron_mass;
39  static double hbarc;
40  static double sq_hbarc;
41  static double M;
43  static double M_sq;
44  static double kappa;
45 
46  // mathematics constants
47  static double pi;
48  static double gamma;
49 
50  // physics data
51  double sqrt_s;
52  double s;
53  double ln_s;
54  double p_cms;
55  double sig_fac;
56  double t_min;
57 
59  enum ParticleMode {mPP, mAPP} pMode;
60 
61  Constants(double W = 0., ParticleMode mode = mPP)
62  {
63  Configure(W, mode);
64  }
65 
68  void Configure(double W, ParticleMode mode);
69 
72  static void Init(double W, ParticleMode mode);
73 
75  void Print();
76 };
77 
78 
79 extern TComplex i;
80 extern Constants *cnts;
81 
82 } // namespace
83 
84 #endif
static double sq_hbarc
GeV^2 * mbarn sigma/mbarn = sigma/GeV^-2 * sq_hbarc.
Definition: Constants.h:40
static double M
abbreviation for proton mass in GeV
Definition: Constants.h:42
static void Init(double W, ParticleMode mode)
initilize new instance of Constants and save its pointer to the `cnts' global variable.
Definition: Constants.cc:66
double t_min
negative
Definition: Constants.h:56
Definition: BHModel.h:28
void Configure(double W, ParticleMode mode)
Configure the constants.
Definition: Constants.cc:52
static double alpha
fine structure constant
Definition: Constants.h:36
double sig_fac
d sig/dt = sig_fac * |A|^2
Definition: Constants.h:55
double s
s / GeV^2
Definition: Constants.h:52
static double hbarc
GeV * fm.
Definition: Constants.h:39
static double kappa
the anomalous magnetic moment of proton
Definition: Constants.h:44
Set of constants used in Elegent calculations.
Definition: Constants.h:33
double ln_s
ln(s / GeV^2)
Definition: Constants.h:53
static double neutron_mass
GeV.
Definition: Constants.h:38
double p_cms
particle CMS impuls
Definition: Constants.h:54
void Print()
print the actual values
Definition: Constants.cc:78
static double pi
pi
Definition: Constants.h:47
double sqrt_s
sqrt_s / GeV
Definition: Constants.h:51
static double gamma
Euler's constant.
Definition: Constants.h:48
static double proton_mass
GeV.
Definition: Constants.h:37
ParticleMode
particle mode
Definition: Constants.h:59
static double M_sq
proton mass squared, GeV^2
Definition: Constants.h:43