Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics
src
TG4CrossSectionType.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4CrossSectionType.h
"
16
17
//_____________________________________________________________________________
18
G4String
TG4CrossSectionTypeName
(G4int type)
19
{
20
switch
(type) {
21
case
kElastic
:
22
return
"Elastic"
;
23
case
kInelastic
:
24
return
"Inelastic"
;
25
case
kCapture
:
26
return
"Capture"
;
27
case
kFission
:
28
return
"Fission"
;
29
case
kChargeExchange
:
30
return
"ChargeExchange"
;
31
default
:
32
return
"Undefined"
;
33
}
34
}
35
36
//_____________________________________________________________________________
37
TG4CrossSectionType
GetCrossSectionType
(G4int type)
38
{
39
switch
(type) {
40
case
kElastic
:
41
return
kElastic
;
42
case
kInelastic
:
43
return
kInelastic
;
44
case
kCapture
:
45
return
kCapture
;
46
case
kFission
:
47
return
kFission
;
48
case
kChargeExchange
:
49
return
kChargeExchange
;
50
default
:
51
return
kNoCrossSectionType
;
52
}
53
}
54
55
//_____________________________________________________________________________
56
TG4CrossSectionType
GetCrossSectionType
(G4String name)
57
{
58
if
(name ==
TG4CrossSectionTypeName
(
kElastic
))
59
return
kElastic
;
60
else
if
(name ==
TG4CrossSectionTypeName
(
kInelastic
))
61
return
kInelastic
;
62
else
if
(name ==
TG4CrossSectionTypeName
(
kCapture
))
63
return
kCapture
;
64
else
if
(name ==
TG4CrossSectionTypeName
(
kFission
))
65
return
kFission
;
66
else
if
(name ==
TG4CrossSectionTypeName
(
kChargeExchange
))
67
return
kChargeExchange
;
68
else
69
return
kNoCrossSectionType
;
70
}
TG4CrossSectionTypeName
G4String TG4CrossSectionTypeName(G4int type)
Return name for given cross section type.
Definition
TG4CrossSectionType.cxx:18
GetCrossSectionType
TG4CrossSectionType GetCrossSectionType(G4int type)
Convert G4int to TG4CrossSectionType (for loops).
Definition
TG4CrossSectionType.cxx:37
TG4CrossSectionType.h
Definition of the enumeration TG4CrossSectionType.
TG4CrossSectionType
TG4CrossSectionType
Enumeration for cross section types.
Definition
TG4CrossSectionType.h:24
kNoCrossSectionType
@ kNoCrossSectionType
no cross section type
Definition
TG4CrossSectionType.h:30
kCapture
@ kCapture
capture cross section
Definition
TG4CrossSectionType.h:27
kElastic
@ kElastic
elastic cross section
Definition
TG4CrossSectionType.h:25
kFission
@ kFission
fission cross section
Definition
TG4CrossSectionType.h:28
kInelastic
@ kInelastic
inelastic cross section
Definition
TG4CrossSectionType.h:26
kChargeExchange
@ kChargeExchange
charge exchane cross section
Definition
TG4CrossSectionType.h:29
Generated on
for Geant4 VMC by
1.17.0