Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronHPIsotropic Class Reference

#include <G4NeutronHPIsotropic.hh>

+ Inheritance diagram for G4NeutronHPIsotropic:

Public Member Functions

 G4NeutronHPIsotropic ()
 
 ~G4NeutronHPIsotropic ()
 
void Init (std::ifstream &aDataFile)
 
G4ReactionProductSample (G4double anEnergy, G4double massCode, G4double mass)
 
G4double MeanEnergyOfThisInteraction ()
 
- Public Member Functions inherited from G4VNeutronHPEnergyAngular
 G4VNeutronHPEnergyAngular ()
 
virtual ~G4VNeutronHPEnergyAngular ()
 
virtual void Init (std::ifstream &aDataFile)=0
 
virtual G4ReactionProductSample (G4double anEnergy, G4double massCode, G4double mass)=0
 
virtual G4double MeanEnergyOfThisInteraction ()=0
 
void SetNeutron (G4ReactionProduct *aNeutron)
 
void SetTarget (G4ReactionProduct *aTarget)
 
G4ReactionProductGetTarget ()
 
G4ReactionProductGetNeutron ()
 
G4ReactionProductGetCMS ()
 
void SetQValue (G4double aValue)
 
virtual void ClearHistories ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VNeutronHPEnergyAngular
G4double GetQValue ()
 

Detailed Description

Definition at line 38 of file G4NeutronHPIsotropic.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPIsotropic()

G4NeutronHPIsotropic::G4NeutronHPIsotropic ( )
inline

Definition at line 42 of file G4NeutronHPIsotropic.hh.

42{}

◆ ~G4NeutronHPIsotropic()

G4NeutronHPIsotropic::~G4NeutronHPIsotropic ( )
inline

Definition at line 44 of file G4NeutronHPIsotropic.hh.

44{}

Member Function Documentation

◆ Init()

void G4NeutronHPIsotropic::Init ( std::ifstream &  aDataFile)
virtual

Implements G4VNeutronHPEnergyAngular.

Definition at line 46 of file G4NeutronHPIsotropic.cc.

47{
48}

◆ MeanEnergyOfThisInteraction()

G4double G4NeutronHPIsotropic::MeanEnergyOfThisInteraction ( )
inlinevirtual

Implements G4VNeutronHPEnergyAngular.

Definition at line 50 of file G4NeutronHPIsotropic.hh.

51 {
52 return -1.;
53 }

◆ Sample()

G4ReactionProduct * G4NeutronHPIsotropic::Sample ( G4double  anEnergy,
G4double  massCode,
G4double  mass 
)
virtual

Implements G4VNeutronHPEnergyAngular.

Definition at line 50 of file G4NeutronHPIsotropic.cc.

51{
53 G4int Z = static_cast<G4int>(massCode/1000);
54 G4int A = static_cast<G4int>(massCode-1000*Z);
55
56 if(massCode==0)
57 {
59 }
60 else if(A==0)
61 {
63 if(Z==1) result->SetDefinition(G4Positron::Positron());
64 }
65 else if(A==1)
66 {
68 if(Z==1) result->SetDefinition(G4Proton::Proton());
69 }
70 else if(A==2)
71 {
73 }
74 else if(A==3)
75 {
77 if(Z==2) result->SetDefinition(G4He3::He3());
78 }
79 else if(A==4)
80 {
82 //110607 TK modified following parts for migration to G4NDL3.15 (ENDF VII.r0)
83 //if(Z!=2) throw G4HadronicException(__FILE__, __LINE__, "Unknown ion case 1");
84 if(Z!=2)
85 {
86 result->SetDefinition( G4ParticleTable::GetParticleTable()->GetIon ( Z , A , 0.0 ) );
87 }
88 }
89 else
90 {
91 //110607 TK modified following parts for migration to G4NDL3.15 (ENDF VII.r0)
92 result->SetDefinition( G4ParticleTable::GetParticleTable()->GetIon ( Z , A , 0.0 ) );
93 //throw G4HadronicException(__FILE__, __LINE__, "G4NeutronHPIsotropic: Unknown ion case 2");
94 }
95
96 G4double cosTh = G4UniformRand();
97 G4double phi = twopi*G4UniformRand();
98 G4double theta = std::acos(cosTh);
99 G4double sinth = std::sin(theta);
100
101// we need the the Q value of the reaction
102 result->SetKineticEnergy(std::max(0.001*MeV, anEnergy+GetQValue()));
103 G4double mtot = result->GetTotalMomentum();
104 G4ThreeVector tempVector(mtot*sinth*std::cos(phi), mtot*sinth*std::sin(phi), mtot*std::cos(theta) );
105 result->SetMomentum(tempVector);
106
107 return result;
108}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4Electron * Electron()
Definition: G4Electron.cc:94
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4He3 * He3()
Definition: G4He3.cc:94
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * GetIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4Proton * Proton()
Definition: G4Proton.cc:93
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
void SetKineticEnergy(const G4double en)
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
static G4Triton * Triton()
Definition: G4Triton.cc:95

The documentation for this class was generated from the following files: