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
G4ParticleHPFinalState.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ParticleHPFinalState.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
// 080721 Create adjust_final_state method by T. Koi
28
// 080801 Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
29
//
30
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
31
//
32
#ifndef G4ParticleHPFinalState_h
33
#define G4ParticleHPFinalState_h
34
35
#include "
G4ParticleHPManager.hh
"
36
#include "
G4Material.hh
"
37
#include "
G4FastVector.hh
"
38
#include "
G4HadFinalState.hh
"
39
#include "
G4ParticleHPNames.hh
"
40
#include "
G4ParticleHPVector.hh
"
41
#include "
G4HadProjectile.hh
"
42
#include "
G4Neutron.hh
"
43
#include "
G4Cache.hh
"
44
45
class
G4ParticleDefinition
;
46
47
class
G4ParticleHPFinalState
48
{
49
public
:
50
51
G4ParticleHPFinalState
()
52
{
53
hasFSData
=
true
;
54
hasXsec
=
true
;
55
hasAnyData
=
true
;
56
theBaseZ
= 0;
57
theBaseA
= 0;
58
theBaseM
= 0;
59
60
theNDLDataZ
= 0;
61
theNDLDataA
= 0;
62
theNDLDataM
= 0;
63
64
adjustResult
=
true
;
65
if
( std::getenv(
"G4PHP_DO_NOT_ADJUST_FINAL_STATE"
) )
adjustResult
=
false
;
66
67
theProjectile
=
G4Neutron::Neutron
();
68
69
theResult
.
Put
( 0 );
70
}
71
72
virtual
~G4ParticleHPFinalState
()
73
{
74
if
(
theResult
.
Get
() != 0)
delete
theResult
.
Get
();
75
}
76
77
void
Init
(
G4double
A
,
G4double
Z
,
G4String
& dirName,
G4String
& aFSType,
78
G4ParticleDefinition
* projectile)
79
{
80
G4int
M = 0;
81
Init
( A, Z, M, dirName, aFSType,const_cast<G4ParticleDefinition*>(projectile));
82
}
83
virtual
void
Init
(
G4double
A
,
G4double
Z
,
G4int
M,
G4String
& dirName,
84
G4String
& aFSType,
G4ParticleDefinition
* ) = 0;
85
virtual
G4HadFinalState
*
ApplyYourself
(
const
G4HadProjectile
& )
86
{
87
throw
G4HadronicException
(__FILE__, __LINE__,
"G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack) needs implementation"
);
88
return
0;
89
}
90
91
// this would better be done templating G4ParticleHPChannel...,
92
//
93
virtual
G4ParticleHPFinalState
*
New
() = 0;
94
95
G4bool
HasXsec
() {
return
hasXsec
; }
96
G4bool
HasFSData
() {
return
hasFSData
; }
97
G4bool
HasAnyData
() {
return
hasAnyData
; }
98
99
virtual
G4double
GetXsec
(
G4double
) {
return
0; }
100
virtual
G4ParticleHPVector
*
GetXsec
() {
return
0; }
101
102
void
SetA_Z
(
G4double
anA,
G4double
aZ,
G4int
aM=0) {
theBaseA
= anA;
theBaseZ
= aZ;
theBaseM
=aM; }
103
G4double
GetZ
() {
return
theBaseZ
; }
104
G4double
GetN
() {
return
theBaseA
; }
105
G4double
GetA
() {
return
theBaseA
; }
106
G4int
GetM
() {
return
theBaseM
; }
107
108
void
SetAZMs
(
G4double
anA,
G4double
aZ,
G4int
aM,
G4ParticleHPDataUsed
used)
109
{
110
theBaseA
= anA;
theBaseZ
= aZ;
theBaseM
=aM;
111
theNDLDataA
=(
G4int
)used.
GetA
();
112
theNDLDataZ
=(
G4int
)used.
GetZ
();
113
theNDLDataM
=used.
GetM
();
114
}
115
116
void
SetProjectile
(
G4ParticleDefinition
* projectile )
117
{
118
theProjectile
= projectile;
119
}
120
121
protected
:
122
123
void
adjust_final_state
(
G4LorentzVector
);
124
G4bool
DoNotAdjustFinalState
();
125
126
protected
:
127
128
G4bool
hasXsec
;
129
G4bool
hasFSData
;
130
G4bool
hasAnyData
;
131
G4ParticleHPNames
theNames
;
132
133
G4Cache< G4HadFinalState* >
theResult
;
134
G4ParticleDefinition
*
theProjectile
;
135
136
G4double
theBaseA
;
137
G4double
theBaseZ
;
138
G4int
theBaseM
;
139
140
G4int
theNDLDataZ
;
141
G4int
theNDLDataA
;
142
G4int
theNDLDataM
;
143
144
private
:
145
146
G4bool
adjustResult
;
147
};
148
#endif
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
particle_hp
include
G4ParticleHPFinalState.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:47
using
1.8.2 with
ECCE GitHub integration