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

#include <G4NuDEXNeutronCaptureModel.hh>

Inheritance diagram for G4NuDEXNeutronCaptureModel:

Public Member Functions

 G4NuDEXNeutronCaptureModel ()
virtual ~G4NuDEXNeutronCaptureModel ()
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) final
virtual void InitialiseModel () final
Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
virtual ~G4HadronicInteraction ()
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double GetMinEnergy () const
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
void SetMinEnergy (G4double anEnergy)
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
G4double GetMaxEnergy () const
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
void SetMaxEnergy (const G4double anEnergy)
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
G4int GetVerboseLevel () const
void SetVerboseLevel (G4int value)
const G4StringGetModelName () const
void DeActivateFor (const G4Material *aMaterial)
void ActivateFor (const G4Material *aMaterial)
void DeActivateFor (const G4Element *anElement)
void ActivateFor (const G4Element *anElement)
G4bool IsBlocked (const G4Material *aMaterial) const
G4bool IsBlocked (const G4Element *anElement) const
void SetRecoilEnergyThreshold (G4double val)
G4double GetRecoilEnergyThreshold () const
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
virtual void ModelDescription (std::ostream &outFile) const
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
G4bool operator== (const G4HadronicInteraction &right) const =delete
G4bool operator!= (const G4HadronicInteraction &right) const =delete

Additional Inherited Members

Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
G4bool IsBlocked () const
void Block ()
Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
G4int verboseLevel
G4double theMinEnergy
G4double theMaxEnergy
G4bool isBlocked

Detailed Description

Definition at line 67 of file G4NuDEXNeutronCaptureModel.hh.

Constructor & Destructor Documentation

◆ G4NuDEXNeutronCaptureModel()

G4NuDEXNeutronCaptureModel::G4NuDEXNeutronCaptureModel ( )
explicit

Definition at line 73 of file G4NuDEXNeutronCaptureModel.cc.

73 : G4HadronicInteraction( "nuDEX_neutronCapture" ) {
74 for ( G4int i = 0; i < G4NUDEX_MAXZA; i++ ) {
75 theStatisticalNucleus[i] = nullptr;
76 HasData[i] = 0;
77 }
78 BrOption = -1;
79 BandWidth = 0;
80 NuDEXLibDirectory = "";
81 photonEvaporation = nullptr;
82 auto ch = G4FindDataDir( "G4NUDEXLIBDATA" );
83 if ( ch == nullptr ) {
84 G4Exception( "G4NuDEXNeutronCaptureModel()", "had0707", FatalException, "Environment variable G4NUDEXLIBDATA is not defined" );
85 } else {
86 NuDEXLibDirectory = G4String(ch);
87 }
88}
const char * G4FindDataDir(const char *)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4NUDEX_MAXZA
int G4int
Definition G4Types.hh:85
G4HadronicInteraction(const G4String &modelName="HadronicModel")

◆ ~G4NuDEXNeutronCaptureModel()

G4NuDEXNeutronCaptureModel::~G4NuDEXNeutronCaptureModel ( )
virtual

Definition at line 104 of file G4NuDEXNeutronCaptureModel.cc.

104 {
105 for ( G4int i = 0; i < G4NUDEX_MAXZA; i++ ) {
106 if ( theStatisticalNucleus[i] ) delete theStatisticalNucleus[i];
107 }
108}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4NuDEXNeutronCaptureModel::ApplyYourself ( const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus )
finalvirtual

Reimplemented from G4HadronicInteraction.

Definition at line 111 of file G4NuDEXNeutronCaptureModel.cc.

111 {
112 theParticleChange.Clear();
113 theParticleChange.SetStatusChange( stopAndKill );
114 G4int A = theNucleus.GetA_asInt();
115 G4int Z = theNucleus.GetZ_asInt();
116 G4double time = aTrack.GetGlobalTime(); // Time in the lab frame
117 // Create initial state
118 G4LorentzVector lab4mom( 0.0, 0.0, 0.0, G4NucleiProperties::GetNuclearMass(A, Z) );
119 lab4mom += aTrack.Get4Momentum();
120 G4double systemMass = lab4mom.mag();
121 ++A; // Compound nucleus: target nucleus + neutron
123 // If the energy available is to small to do anything interesting, gives up
124 if ( systemMass - compoundMass <= lowestEnergyLimit ) return &theParticleChange;
125 G4ThreeVector boostFromCMtoLAB = lab4mom.boostVector();
126 G4double neutronEnergy = aTrack.GetKineticEnergy();
127
128 // Try to apply NuDEX
129 //G4int lspin = 0; // l-spin = 0, 1, 2 --> s-wave, p-wave, d-wave ...
130 //G4int jspinx2 = -1; // A negative value of jspinx2 means that is sampled according to the 2J+1 rule.
131 //G4int initialLevel = SelectInitialLevel( Z, A, neutronEnergy, lspin, jspinx2 );
132 G4int initialLevel = -1; // thermal neutron capture
133 std::vector< char > pType;
134 std::vector< G4double > pEnergy, pTime;
135 G4int npar = GenerateNeutronCaptureCascade( Z, A, neutronEnergy, initialLevel, pType, pEnergy, pTime );
136 if ( npar > 0 ) { // NuDEX can be applied
137
138 G4LorentzVector remainingLab4mom = lab4mom;
139 G4double latestEmission = time;
140 // Loop over the EM particles produced by 'GenerateNeutronCaptureCascade' and add them to the
141 // theParticleChange as secondaries. These particles are produced by NuDEX in the nucleus' rest-frame.
142 for ( G4int i = 0; i < npar; i++ ) {
143 G4ParticleDefinition* particleDef = nullptr;
144 if ( pType.at(i) == 'g' ) {
145 particleDef = G4Gamma::Definition();
146 } else if (pType.at(i) == 'e' ) {
147 particleDef = G4Electron::Definition();
148 } else if ( pType.at(i) == 'p' ) {
149 particleDef = G4Positron::Definition();
150 } else {
151 G4Exception( "G4NUDEXNeutronCaptureModel::ApplyYourself()", "had0707", FatalException, "Unknown particle type" );
152 }
153 G4double phi = G4UniformRand()*twopi;
154 G4double costheta = 2.0*G4UniformRand() - 1.0;
155 G4double sintheta = std::sqrt( 1.0 - costheta*costheta );
156 G4ThreeVector direction( sintheta*std::cos(phi), sintheta*std::sin(phi), costheta );
157 G4double mass = particleDef->GetPDGMass();
158 G4double particle3momMod = std::sqrt( pEnergy.at(i) * ( pEnergy.at(i) + 2.0*mass ) );
159 G4LorentzVector particle4mom( particle3momMod*direction, mass + pEnergy.at(i) ); // In the center-of-mass frame
160 particle4mom.boost( boostFromCMtoLAB ); // Now in the Lab frame
161 G4HadSecondary* secondary = new G4HadSecondary( new G4DynamicParticle( particleDef, particle4mom ) );
162 remainingLab4mom -= particle4mom;
163 // For simplicity, we neglect below the different frames of time (Lab) and pTime (center-of-mass)
164 secondary->SetTime( time + pTime.at(i) );
165 if ( latestEmission < time + pTime.at(i) ) latestEmission = time + pTime.at(i);
166 secondary->SetCreatorModelID( secID );
167 theParticleChange.AddSecondary( *secondary );
168 delete secondary;
169 }
170 // Treat now the residual nucleus (which is neglected by NuDEX)
171 const G4ParticleDefinition* resNuclDef = nullptr;
172 if ( Z == 1 && A == 2 ) resNuclDef = G4Deuteron::Definition();
173 else if ( Z == 1 && A == 3 ) resNuclDef = G4Triton::Definition();
174 else if ( Z == 2 && A == 3 ) resNuclDef = G4He3::Definition();
175 else if ( Z == 2 && A == 4 ) resNuclDef = G4Alpha::Alpha();
176 else resNuclDef = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon( Z, A, 0.0, noFloat, 0 );
177 if ( resNuclDef ) {
178 // To conserve energy-momentum, remainingLab4mom should be the Lorentz 4-momentum of the residual nucleus.
179 // Imposing the mass 'compoundMass' to the residual nucleus, and trying to conserve the total energy
180 // while keeping as low as possible the violation of the 3-momentum; in the case that the total energy
181 // cannot be conserved, the residual nucleus is produced at rest (in the Lab frame).
182 G4double resNuclLabEkin = std::max( remainingLab4mom.e() - compoundMass, 0.0 );
183 G4double resNuclLab3momMod = 0.0;
184 G4ThreeVector resNuclLabDir( 0.0, 0.0, 0.0 );
185 if ( resNuclLabEkin > 0.0 ) {
186 resNuclLab3momMod = std::sqrt( resNuclLabEkin * ( resNuclLabEkin + 2.0*compoundMass ) );
187 resNuclLabDir = remainingLab4mom.vect().unit();
188 }
189 G4LorentzVector resNuclLab4mom( resNuclLab3momMod*resNuclLabDir, resNuclLabEkin + compoundMass );
190 G4HadSecondary* secondary = new G4HadSecondary( new G4DynamicParticle( resNuclDef, resNuclLab4mom ) );
191 secondary->SetTime( latestEmission );
192 secondary->SetCreatorModelID( secID );
193 theParticleChange.AddSecondary( *secondary );
194 delete secondary;
195 }
196
197 } else { // NuDEX cannot be applied: use G4PhotonEvaporation
198
199 // Code taken from G4NeutronRadCapture
200
201 G4Fragment* aFragment = new G4Fragment( A, Z, lab4mom );
202 G4FragmentVector* fv = photonEvaporation->BreakUpFragment( aFragment );
203 if ( fv == nullptr ) fv = new G4FragmentVector;
204 fv->push_back( aFragment );
205 size_t n = fv->size();
206 for ( size_t i = 0; i < n; ++i ) {
207 G4Fragment* f = (*fv)[i];
208 G4double etot = f->GetMomentum().e();
209 Z = f->GetZ_asInt();
210 A = f->GetA_asInt();
211 const G4ParticleDefinition* theDef = nullptr;
212 if ( Z == 0 && A == 0 ) { theDef = f->GetParticleDefinition(); }
213 else if ( Z == 1 && A == 2 ) { theDef = G4Deuteron::Definition(); }
214 else if ( Z == 1 && A == 3 ) { theDef = G4Triton::Definition(); }
215 else if ( Z == 2 && A == 3 ) { theDef = G4He3::Definition(); }
216 else if ( Z == 2 && A == 4 ) { theDef = G4Alpha::Definition(); }
217 else {
218 G4double eexc = f->GetExcitationEnergy();
219 if ( eexc <= minExcitation ) eexc = 0.0;
220 theDef = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon( Z, A, eexc, noFloat, 0 );
221 }
222 G4double ekin = std::max( 0.0, etot - theDef->GetPDGMass() );
223 G4HadSecondary* news = new G4HadSecondary( new G4DynamicParticle( theDef, f->GetMomentum().vect().unit(), ekin ) );
224 G4double timeF = f->GetCreationTime();
225 if ( timeF < 0.0 ) timeF = 0.0;
226 news->SetTime( time + timeF );
227 news->SetCreatorModelID( secID );
228 theParticleChange.AddSecondary( *news );
229 delete news;
230 delete f;
231 }
232 delete fv;
233 }
234
235 return &theParticleChange;
236}
std::vector< G4Fragment * > G4FragmentVector
Definition G4Fragment.hh:65
@ stopAndKill
#define noFloat
Definition G4Ions.hh:119
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
const G4double A[17]
#define G4UniformRand()
Definition Randomize.hh:52
Hep3Vector unit() const
Hep3Vector vect() const
static G4Alpha * Definition()
Definition G4Alpha.cc:43
static G4Alpha * Alpha()
Definition G4Alpha.cc:83
static G4Deuteron * Definition()
Definition G4Deuteron.cc:45
static G4Electron * Definition()
Definition G4Electron.cc:45
G4double GetExcitationEnergy() const
const G4LorentzVector & GetMomentum() const
G4double GetCreationTime() const
G4int GetZ_asInt() const
const G4ParticleDefinition * GetParticleDefinition() const
G4int GetA_asInt() const
static G4Gamma * Definition()
Definition G4Gamma.cc:43
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
void SetTime(G4double aT)
void SetCreatorModelID(G4int id)
static G4He3 * Definition()
Definition G4He3.cc:45
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Positron * Definition()
Definition G4Positron.cc:45
static G4Triton * Definition()
Definition G4Triton.cc:45

◆ InitialiseModel()

void G4NuDEXNeutronCaptureModel::InitialiseModel ( )
finalvirtual

Reimplemented from G4HadronicInteraction.

Definition at line 91 of file G4NuDEXNeutronCaptureModel.cc.

91 {
92 if ( photonEvaporation != nullptr ) return;
93 G4DeexPrecoParameters* param = G4NuclearLevelData::GetInstance()->GetParameters();
94 minExcitation = param->GetMinExcitation();
95 photonEvaporation = new G4PhotonEvaporation;
96 photonEvaporation->Initialise();
97 photonEvaporation->SetICM( true );
98 secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
99 lowestEnergyLimit = 10.0*CLHEP::eV;
100 minExcitation = 0.1*CLHEP::keV;
101}
const G4String & GetModelName() const
G4DeexPrecoParameters * GetParameters()
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)

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