ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4ParticleHPIsoData.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ParticleHPIsoData.hh
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
//
27
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
28
//
29
#ifndef G4ParticleHPIsoData_h
30
#define G4ParticleHPIsoData_h 1
31
32
// Hadronic Process: Very Low Energy Neutron X-Sections
33
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
34
// Has the Cross-section data for on isotope.
35
36
#include "
globals.hh
"
37
#include "
G4ios.hh
"
38
#include <fstream>
39
// #include <strstream>
40
#include <stdlib.h>
41
#include "
G4ParticleHPVector.hh
"
42
#include "
G4ParticleHPNames.hh
"
43
class
G4ParticleDefinition
;
44
45
class
G4ParticleHPIsoData
46
{
47
public
:
48
49
G4ParticleHPIsoData
()
50
{
51
theChannelData
= 0;
52
theFissionData
= 0;
53
theCaptureData
= 0;
54
theElasticData
= 0;
55
theInelasticData
= 0;
56
}
57
58
~G4ParticleHPIsoData
(){
if
(
theChannelData
!=0)
delete
theChannelData
;}
59
60
inline
G4double
GetXsec
(
G4double
energy
)
61
{
62
return
std::max
(0.,
theChannelData
->
GetXsec
(energy));
63
}
64
65
//G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
66
G4bool
Init
(
G4int
A
,
G4int
Z
,
G4double
abun,
G4String
dirName,
G4String
aFSType){
G4int
M = 0 ;
return
Init
( A, Z, M, abun, dirName, aFSType); };
67
G4bool
Init
(
G4int
A
,
G4int
Z
,
G4int
M,
G4double
abun,
G4String
dirName,
G4String
aFSType);
68
69
//void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
70
void
Init
(
G4int
A
,
G4int
Z
,
G4double
abun,
G4ParticleDefinition
* projectile,
const
char
* dataDirVariable) {
G4int
M =0;
71
Init
( A, Z, M, abun, projectile, dataDirVariable ); };
72
void
Init
(
G4int
A
,
G4int
Z
,
G4int
M,
G4double
abun,
G4ParticleDefinition
* projectile,
const
char
* dataDirVariable);
//fill PhysicsVector for this Isotope
73
74
inline
G4ParticleHPVector
*
MakeElasticData
()
75
{
return
theElasticData
;}
76
inline
G4ParticleHPVector
*
MakeFissionData
()
77
{
return
theFissionData
;}
78
inline
G4ParticleHPVector
*
MakeCaptureData
()
79
{
return
theCaptureData
;}
80
inline
G4ParticleHPVector
*
MakeInelasticData
()
81
{
return
theInelasticData
;}
82
inline
G4ParticleHPVector
*
MakeChannelData
()
83
{
return
theChannelData
;}
84
85
G4String
GetName
(
G4int
A
,
G4int
Z
,
G4String
base
,
G4String
rest);
86
87
inline
void
FillChannelData
(
G4ParticleHPVector
* aBuffer)
88
{
89
if
(
theChannelData
!=0)
throw
G4HadronicException
(__FILE__, __LINE__,
"IsoData has channel full already!!!"
);
90
theChannelData
=
new
G4ParticleHPVector
;
91
for
(
G4int
i=0; i<aBuffer->
GetVectorLength
(); i++)
92
{
93
theChannelData
->
SetPoint
(i, aBuffer->
GetPoint
(i));
94
}
95
theChannelData
->
Hash
();
96
}
97
98
inline
void
ThinOut
(
G4double
precision
)
99
{
100
if
(
theFissionData
)
theFissionData
->
ThinOut
(precision);
101
if
(
theCaptureData
)
theCaptureData
->
ThinOut
(precision);
102
if
(
theElasticData
)
theElasticData
->
ThinOut
(precision);
103
if
(
theInelasticData
)
theInelasticData
->
ThinOut
(precision);
104
}
105
106
private
:
107
108
G4ParticleHPVector
*
theFissionData
;
109
G4ParticleHPVector
*
theCaptureData
;
110
G4ParticleHPVector
*
theElasticData
;
111
G4ParticleHPVector
*
theInelasticData
;
112
G4ParticleHPVector
*
theChannelData
;
113
114
G4String
theFileName
;
115
G4ParticleHPNames
theNames
;
116
};
117
118
#endif
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
particle_hp
include
G4ParticleHPIsoData.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:47
using
1.8.2 with
ECCE GitHub integration