Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPFinalState.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//
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
36#include "G4Material.hh"
37#include "G4HadFinalState.hh"
38#include "G4ParticleHPNames.hh"
39#include "G4ParticleHPVector.hh"
40#include "G4HadProjectile.hh"
41#include "G4Neutron.hh"
42#include "G4Cache.hh"
43
45
47{
48public:
49
51 {
52 hasFSData = true;
53 hasXsec = true;
54 hasAnyData = true;
55 theBaseZ = 0;
56 theBaseA = 0;
57 theBaseM = 0;
58
59 theNDLDataZ = 0;
60 theNDLDataA = 0;
61 theNDLDataM = 0;
62
64
65 theResult.Put( 0 );
66
67 secID = -1;
68 }
69
71 {
72 if (theResult.Get() != 0) delete theResult.Get();
73 }
74
75 void Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType,
76 G4ParticleDefinition* projectile)
77 {
78 G4int M = 0;
79 Init ( A, Z, M, dirName, aFSType,const_cast<G4ParticleDefinition*>(projectile));
80 }
81 virtual void Init (G4double A, G4double Z, G4int M, G4String & dirName,
82 G4String & aFSType, G4ParticleDefinition* ) = 0;
84 {
85 throw G4HadronicException(__FILE__, __LINE__, "G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack) needs implementation");
86 return 0;
87 }
88
89 // this would better be done templating G4ParticleHPChannel...,
90 //
91 virtual G4ParticleHPFinalState * New() = 0;
92
93 G4bool HasXsec() { return hasXsec; }
96
97 virtual G4double GetXsec(G4double ) { return 0; }
98 virtual G4ParticleHPVector * GetXsec() { return 0; }
99
100 void SetA_Z(G4double anA, G4double aZ, G4int aM=0) {theBaseA = anA; theBaseZ = aZ; theBaseM=aM; }
101 G4double GetZ() { return theBaseZ; }
102 G4double GetN() { return theBaseA; }
103 G4double GetA() { return theBaseA; }
104 G4int GetM() { return theBaseM; }
105
107 {
108 theBaseA = anA; theBaseZ = aZ; theBaseM=aM;
109 theNDLDataA=(G4int)used.GetA();
110 theNDLDataZ=(G4int)used.GetZ();
111 theNDLDataM=used.GetM();
112 }
113
115 {
116 theProjectile = projectile;
117 }
118
119protected:
120
122
127
130
134
138
139 G4int secID; // Creator model ID for the secondaries created by this class or derived ones
140};
141#endif
#define M(row, col)
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
value_type & Get() const
Definition: G4Cache.hh:315
void Put(const value_type &val) const
Definition: G4Cache.hh:321
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
virtual G4double GetXsec(G4double)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &)
void Init(G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
virtual void Init(G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)=0
void SetA_Z(G4double anA, G4double aZ, G4int aM=0)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
virtual G4ParticleHPFinalState * New()=0
G4ParticleDefinition * theProjectile
G4Cache< G4HadFinalState * > theResult
void SetProjectile(G4ParticleDefinition *projectile)
void adjust_final_state(G4LorentzVector)
virtual G4ParticleHPVector * GetXsec()