Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // ------------------------------------------- 28 // 29 // Geant4 source file 30 // 31 // File name: G4ParticleHPCaptureURR.cc 32 // 33 // Authors: Marek Zmeskal (CTU, Czech Tec 34 // Loic Thulliez (CEA France) 35 // 36 // Creation date: 4 June 2024 37 // 38 // Description: Class to handle URR range 39 // proper isotope cross-sect 40 // 41 // Modifications: 42 // 43 // ------------------------------------------- 44 // 45 // 46 47 #include "G4ParticleHPCaptureURR.hh" 48 #include "G4ParticleHPManager.hh" 49 #include "G4ParticleHPChannel.hh" 50 #include "G4NeutronHPCapture.hh" 51 #include "G4ParticleHPProbabilityTablesStore.h 52 #include "G4SystemOfUnits.hh" 53 #include "G4Threading.hh" 54 55 56 G4ParticleHPCaptureURR::G4ParticleHPCaptureURR 57 SetMinEnergy( 0.0 * CLHEP::eV ); 58 SetMaxEnergy( 20.0 * CLHEP::MeV ); 59 neutronHPcapture = new G4NeutronHPCapture; 60 } 61 62 63 G4ParticleHPCaptureURR::~G4ParticleHPCaptureUR 64 65 66 G4HadFinalState* G4ParticleHPCaptureURR::Apply 67 const G4Material* theMaterial = aTrack.GetMa 68 G4double kineticEnergy = aTrack.GetKineticEn 69 G4HadFinalState* theFinalState = nullptr; 70 if ( kineticEnergy < (*URRlimits).back().fir 71 return neutronHPcapture->ApplyYourself( aT 72 } 73 G4int elementI = -1; 74 G4int isotopeJ = -1; 75 G4int A = aNucleus.GetA_asInt(); 76 G4int Z = aNucleus.GetZ_asInt(); 77 // finds the element and isotope of the sele 78 for ( G4int i = 0; i < (G4int)theMaterial->G 79 if ( Z == theMaterial->GetElement(i)->GetZ 80 for ( G4int j = 0; j < (G4int)theMateria 81 if ( A == theMaterial->GetElement(i)-> 82 isotopeJ = j; 83 break; 84 } 85 } 86 // the loop cannot be ended here because 87 if ( isotopeJ != -1 ) { 88 // isotope was found and for loop is e 89 elementI = (G4int)theMaterial->GetElem 90 break; 91 } 92 } // end if find element 93 } // end element loop 94 // Check whether the energy is out of the UR 95 if ( kineticEnergy < (*URRlimits).at(element 96 // Call capture final state in G4ParicleHP 97 G4ParticleHPManager::GetInstance()->OpenRe 98 theFinalState = (*G4ParticleHPManager::Get 99 // Update target nucleus information accor 100 G4int selectedIsotope_A = G4ParticleHPMana 101 aNucleus.SetParameters( selectedIsotope_A, 102 const G4Element* target_element = (*G4Elem 103 const G4Isotope* target_isotope = nullptr; 104 // Find the selected isotope among in the 105 for ( G4int j = 0; j < (G4int)target_eleme 106 target_isotope = target_element->GetIsot 107 if ( target_isotope->GetN() == selectedI 108 } 109 aNucleus.SetIsotope( target_isotope ); 110 G4ParticleHPManager::GetInstance()->CloseR 111 } else { // the energy is inside the limits 112 // calls the final state for the found ele 113 theFinalState = ((*G4ParticleHPManager::Ge 114 } 115 return theFinalState; 116 } 117 118 119 void G4ParticleHPCaptureURR::BuildPhysicsTable 120 neutronHPcapture->BuildPhysicsTable( *(G4Neu 121 URRlimits = G4ParticleHPManager::GetInstance 122 if ( URRlimits == nullptr ) { 123 G4ParticleHPProbabilityTablesStore::GetIns 124 URRlimits = G4ParticleHPProbabilityTablesS 125 G4ParticleHPManager::GetInstance()->Regist 126 } 127 } 128 129 130 const std::pair< G4double, G4double > G4Partic 131 // max energy non-conservation is mass of he 132 return std::pair< G4double, G4double >( 10.0 133 } 134 135 136 G4int G4ParticleHPCaptureURR::GetVerboseLevel( 137 return G4ParticleHPManager::GetInstance()->G 138 } 139 140 141 void G4ParticleHPCaptureURR::SetVerboseLevel( 142 G4ParticleHPManager::GetInstance()->SetVerbo 143 } 144 145 146 void G4ParticleHPCaptureURR::ModelDescription( 147 outFile << "High Precision model based on E 148 } 149