Geant4_10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
source
source
processes
hadronic
models
inclxx
utils
include
G4INCLGlobals.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// INCL++ intra-nuclear cascade model
27
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28
// Davide Mancusi, CEA
29
// Alain Boudard, CEA
30
// Sylvie Leray, CEA
31
// Joseph Cugnon, University of Liege
32
//
33
#define INCLXX_IN_GEANT4_MODE 1
34
35
#include "
globals.hh
"
36
37
#ifndef G4INCLGlobals_hh
38
#define G4INCLGlobals_hh 1
39
40
#include <cmath>
41
#include <string>
42
#include "
G4INCLParticleType.hh
"
43
44
namespace
G4INCL {
45
class
Particle;
46
47
namespace
PhysicalConstants {
49
const
G4double
hc
= 197.328;
50
52
const
G4double
hcSquared
=
hc
*
hc
;
53
55
const
G4double
Pf
= 1.37*
hc
;
56
// const G4double Pf = 1.36828*hc;
57
59
const
G4double
PfSquared
=
Pf
*
Pf
;
60
62
const
G4double
PfCubed
=
Pf
*
PfSquared
;
63
68
const
G4double
eSquared
= 1.439964;
69
}
70
71
namespace
Math {
72
const
G4double
pi
= 3.14159265358979323846264338328;
73
const
G4double
twoPi
= 2.0 *
pi
;
74
const
G4double
tenPi
= 10.0 *
pi
;
75
const
G4double
piOverTwo
= 0.5 *
pi
;
76
const
G4double
oneOverSqrtTwo
= 1./std::sqrt((
G4double
)2.);
77
const
G4double
oneOverSqrtThree
= 1./std::sqrt((
G4double
)3.);
78
const
G4double
oneThird
= 1./3.;
79
const
G4double
twoThirds
= 2./3.;
80
const
G4double
sqrtFiveThirds
= std::sqrt(5./3.);
81
const
G4double
sqrtThreeFifths
= std::sqrt(3./5.);
82
83
inline
G4double
toDegrees
(
G4double
radians) {
84
return
radians * (180.0 /
pi
);
85
}
86
87
inline
G4int
heaviside
(
G4int
n
) {
88
if
(n < 0)
return
0;
89
else
return
1;
90
}
91
92
inline
G4double
pow13
(
G4double
x
) {
93
return
std::pow(x,
oneThird
);
94
}
95
96
inline
G4double
powMinus13
(
G4double
x
) {
97
return
std::pow(x, -
oneThird
);
98
}
99
100
inline
G4double
pow23
(
G4double
x
) {
101
return
std::pow(x,
twoThirds
);
102
}
103
104
inline
G4double
aSinH
(
G4double
x
) {
105
return
std::log(x + std::sqrt(x*x+1.));
106
}
107
111
template
<
typename
T>
inline
G4int
sign
(
const
T t) {
112
return
t > 0 ? 1: t < 0 ? -1 : 0;
113
}
114
116
template
<
typename
T>
inline
T
max
(
const
T
t1
,
const
T
t2
) {
117
return
t1 > t2 ? t1 :
t2
;
118
}
119
121
template
<
typename
T>
inline
T
min
(
const
T
t1
,
const
T
t2
) {
122
return
t1 < t2 ? t1 :
t2
;
123
}
124
132
G4double
gaussianCDF
(
const
G4double
x
);
133
143
G4double
gaussianCDF
(
const
G4double
x
,
const
G4double
x0,
const
G4double
sigma);
144
145
}
146
147
namespace
ParticleConfig {
148
G4bool
isPair
(
Particle
const
*
const
p1,
Particle
const
*
const
p2,
ParticleType
t1
,
ParticleType
t2
);
149
}
150
151
namespace
String {
152
void
wrap
(std::string &str,
const
size_t
lineLength=78,
const
std::string &separators=
" \t"
);
153
void
replaceAll
(std::string &str,
const
std::string &from,
const
std::string &to,
const
size_t
maxPosition=std::string::npos);
154
}
155
}
156
#endif
t1
TTree * t1
Definition:
plottest35.C:26
G4INCL::Math::sqrtThreeFifths
const G4double sqrtThreeFifths
Definition:
G4INCLGlobals.hh:81
G4INCL::PhysicalConstants::PfCubed
const G4double PfCubed
Fermi momentum cubed [(MeV/c)^3].
Definition:
G4INCLGlobals.hh:62
G4INCL::PhysicalConstants::eSquared
const G4double eSquared
Coulomb conversion factor [MeV*fm].
Definition:
G4INCLGlobals.hh:68
G4INCL::Math::heaviside
G4int heaviside(G4int n)
Definition:
G4INCLGlobals.hh:87
G4INCL::Math::tenPi
const G4double tenPi
Definition:
G4INCLGlobals.hh:74
G4INCL::Math::pi
const G4double pi
Definition:
G4INCLGlobals.hh:72
G4INCL::PhysicalConstants::hc
const G4double hc
[MeV*fm]
Definition:
G4INCLGlobals.hh:49
G4INCL::Math::toDegrees
G4double toDegrees(G4double radians)
Definition:
G4INCLGlobals.hh:83
test.x
tuple x
Definition:
test.py:50
G4int
int G4int
Definition:
G4Types.hh:78
G4INCL::Math::pow23
G4double pow23(G4double x)
Definition:
G4INCLGlobals.hh:100
n
Char_t n[5]
Definition:
comparison_ascii.C:55
G4INCL::Math::aSinH
G4double aSinH(G4double x)
Definition:
G4INCLGlobals.hh:104
G4INCL::PhysicalConstants::hcSquared
const G4double hcSquared
[MeV^2*fm^2]
Definition:
G4INCLGlobals.hh:52
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4INCL::Math::sqrtFiveThirds
const G4double sqrtFiveThirds
Definition:
G4INCLGlobals.hh:80
G4INCL::Math::piOverTwo
const G4double piOverTwo
Definition:
G4INCLGlobals.hh:75
globals.hh
G4INCL::Math::oneOverSqrtThree
const G4double oneOverSqrtThree
Definition:
G4INCLGlobals.hh:77
G4INCL::Particle
Definition:
G4INCLParticle.hh:94
G4INCL::PhysicalConstants::PfSquared
const G4double PfSquared
Fermi momentum squared [(MeV/c)^2].
Definition:
G4INCLGlobals.hh:59
G4INCLParticleType.hh
G4INCL::Math::max
T max(const T t1, const T t2)
brief Return the largest of the two arguments
Definition:
G4INCLGlobals.hh:116
G4INCL::String::replaceAll
void replaceAll(std::string &str, const std::string &from, const std::string &to, const size_t maxPosition=std::string::npos)
G4INCL::PhysicalConstants::Pf
const G4double Pf
Fermi momentum [MeV/c].
Definition:
G4INCLGlobals.hh:55
G4INCL::Math::min
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
Definition:
G4INCLGlobals.hh:121
G4INCL::Math::twoPi
const G4double twoPi
Definition:
G4INCLGlobals.hh:73
t2
TTree * t2
Definition:
plottest35.C:36
G4INCL::ParticleConfig::isPair
G4bool isPair(Particle const *const p1, Particle const *const p2, ParticleType t1, ParticleType t2)
Definition:
G4INCLGlobals.cc:74
G4INCL::Math::twoThirds
const G4double twoThirds
Definition:
G4INCLGlobals.hh:79
G4double
double G4double
Definition:
G4Types.hh:76
G4INCL::Math::pow13
G4double pow13(G4double x)
Definition:
G4INCLGlobals.hh:92
G4INCL::Math::powMinus13
G4double powMinus13(G4double x)
Definition:
G4INCLGlobals.hh:96
G4INCL::Math::oneThird
const G4double oneThird
Definition:
G4INCLGlobals.hh:78
G4INCL::Math::gaussianCDF
G4double gaussianCDF(const G4double x)
Cumulative distribution function for Gaussian.
Definition:
G4INCLGlobals.cc:55
G4INCL::Math::sign
G4int sign(const T t)
Definition:
G4INCLGlobals.hh:111
G4INCL::Math::oneOverSqrtTwo
const G4double oneOverSqrtTwo
Definition:
G4INCLGlobals.hh:76
G4INCL::ParticleType
ParticleType
Definition:
G4INCLParticleType.hh:49
G4INCL::String::wrap
void wrap(std::string &str, const size_t lineLength=78, const std::string &separators=" \t")
Generated on Sat Dec 14 2013 14:34:54 for Geant4_10 by
1.8.5