72 G4ParticleHPManager::GetInstance()->OpenReactionWhiteBoard();
73 if (std::getenv(
"NeutronHPCapture"))
74 G4cout <<
" ####### ArParticleHPCapture called" << G4endl;
75 const G4Material* theMaterial = aTrack.GetMaterial();
76 G4int
n = theMaterial->GetNumberOfElements();
77 G4int index = theMaterial->GetElement(0)->GetIndex();
79 G4double* xSec =
new G4double[
n];
82 const G4double* NumAtomsPerVolume = theMaterial->GetVecNbOfAtomsPerVolume();
84 G4ParticleHPThermalBoost aThermalE;
85 for (i = 0; i <
n; i++) {
86 index = theMaterial->GetElement(i)->GetIndex();
87 rWeight = NumAtomsPerVolume[i];
88 xSec[i] = ((*theCapture)[index])
89 ->GetXsec(aThermalE.GetThermalEnergy(
90 aTrack, theMaterial->GetElement(i), theMaterial->GetTemperature()));
94 G4double random = G4UniformRand();
96 for (i = 0; i <
n; i++) {
98 index = theMaterial->GetElement(i)->GetIndex();
99 if (sum == 0 || random <= running / sum)
103 i = std::max(0, n - 1);
107 G4HadFinalState* result = ((*theCapture)[index])->
ApplyYourself(aTrack);
110 aNucleus.SetParameters(G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargA(),
111 G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargZ());
112 const G4Element* target_element = (*G4Element::GetElementTable())[index];
113 const G4Isotope* target_isotope = NULL;
114 G4int iele = target_element->GetNumberOfIsotopes();
115 for (G4int j = 0; j != iele; j++) {
116 target_isotope = target_element->GetIsotope(j);
117 if (target_isotope->GetN() ==
118 G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargA())
121 aNucleus.SetIsotope(target_isotope);
123 G4ParticleHPManager::GetInstance()->CloseReactionWhiteBoard();
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus) override