Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleHPChannel.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// Hadronic Process: Very Low Energy Neutron X-Sections
27// original by H.P. Wellisch, TRIUMF, 14-Feb-97
28// Builds and has the Cross-section data for one element and channel.
29//
30// Bug fixes and workarounds in the destructor, F.W.Jones 06-Jul-1999
31// 070612 Fix memory leaking by T. Koi
32//
33// 080520 Delete unnecessary dependencies by T. Koi
34
35// P. Arce, June-2014 Conversion neutron_hp to particle_hp
36// V. Ivanchenko, July-2023 Basic revision of particle HP classes
37//
38
39#ifndef G4ParticleHPChannel_h
40#define G4ParticleHPChannel_h 1
41
42#include "G4Element.hh"
43#include "G4HadProjectile.hh"
44#include "G4Material.hh"
49#include "G4ParticleHPVector.hh"
50#include "G4StableIsotopes.hh"
52#include "globals.hh"
53
55
57{
58public:
59 G4ParticleHPChannel(G4ParticleDefinition* projectile = nullptr);
60
62
64
65 G4double GetWeightedXsec(G4double energy, G4int isoNumber);
66
67 G4double GetFSCrossSection(G4double energy, G4int isoNumber);
68
69 G4bool IsActive(G4int isoNumber) const
70 {
71 return active[isoNumber];
72 }
73
75 {
76 return theFinalStates[isoNumber]->HasFSData();
77 }
78
80 {
81 return theFinalStates[isoNumber]->HasAnyData();
82 }
83
85
86 void Init(G4Element* theElement, const G4String& dirName);
87
88 void Init(G4Element* theElement, const G4String& dirName,
89 const G4String& fsType);
90
91 void UpdateData(G4int A, G4int Z, G4int index, G4double abundance,
92 G4ParticleDefinition* projectile)
93 {
94 UpdateData(A, Z, 0, index, abundance, projectile);
95 }
96
97 void UpdateData(G4int A, G4int Z, G4int M, G4int index, G4double abundance,
98 G4ParticleDefinition* projectile);
99
100 void Harmonise(G4ParticleHPVector*& theStore, G4ParticleHPVector* theNew);
101
103 G4int isoNumber = -1,
104 G4bool isElastic = false);
105
106 G4int GetNiso() const { return niso; }
107
108 G4double GetN(G4int i) const { return theFinalStates[i]->GetN(); }
109 G4double GetZ(G4int i) const { return theFinalStates[i]->GetZ(); }
110 G4double GetM(G4int i) const { return theFinalStates[i]->GetM(); }
111
113 {
114 G4bool result = false;
115 for (G4int i = 0; i < niso; ++i) {
116 if (theFinalStates[i]->HasAnyData()) {
117 result = true;
118 break;
119 }
120 }
121 return result;
122 }
123
124 void DumpInfo();
125
126 G4String& GetFSType() { return theFSType; }
127
128 G4ParticleHPFinalState** GetFinalStates() const { return theFinalStates; }
129
132 (const G4ParticleHPChannel &right) = delete;
133
134protected:
136
137private:
138 G4ParticleDefinition* theProjectile;
139
140 G4ParticleHPVector* theChannelData;
141 G4Element* theElement{nullptr};
142
143 // total (element) cross-section for this channel
144 G4ParticleHPVector* theBuffer{nullptr};
145
146 G4ParticleHPIsoData* theIsotopeWiseData{nullptr};
147 // these are the isotope-wise cross-sections for each final state.
148 G4ParticleHPFinalState** theFinalStates{nullptr};
149 // also these are isotope-wise pionters, parallel to the above.
150
151 G4WendtFissionFragmentGenerator* wendtFissionGenerator{nullptr};
152 G4bool* active{nullptr};
153 G4int niso{-1};
154 G4int registerCount{-1};
155
156 G4String theDir{""};
157 G4String theFSType{""};
158};
159
160#endif
#define M(row, col)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4double A[17]
G4ParticleHPChannel(G4ParticleHPChannel &)=delete
G4double GetZ(G4int i) const
G4bool HasAnyData(G4int isoNumber)
void UpdateData(G4int A, G4int Z, G4int index, G4double abundance, G4ParticleDefinition *projectile)
G4ParticleHPChannel(G4ParticleDefinition *projectile=nullptr)
G4bool HasFSData(G4int isoNumber)
G4double GetN(G4int i) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack, G4int isoNumber=-1, G4bool isElastic=false)
void Harmonise(G4ParticleHPVector *&theStore, G4ParticleHPVector *theNew)
G4bool IsActive(G4int isoNumber) const
G4double GetWeightedXsec(G4double energy, G4int isoNumber)
G4double GetM(G4int i) const
G4ParticleHPFinalState ** GetFinalStates() const
G4bool Register(G4ParticleHPFinalState *theFS)
G4double GetXsec(G4double energy)
void Init(G4Element *theElement, const G4String &dirName)
G4ParticleHPManager * fManager
G4double GetFSCrossSection(G4double energy, G4int isoNumber)