#include <G4NeutronHPFission.hh>
Inheritance diagram for G4NeutronHPFission:
Public Member Functions | |
G4NeutronHPFission () | |
~G4NeutronHPFission () | |
G4HadFinalState * | ApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus) |
virtual const std::pair< G4double, G4double > | GetFatalEnergyCheckLevels () const |
Definition at line 53 of file G4NeutronHPFission.hh.
G4NeutronHPFission::G4NeutronHPFission | ( | ) |
Definition at line 38 of file G4NeutronHPFission.cc.
References G4Element::GetElementTable(), G4Element::GetNumberOfElements(), G4HadronicInteraction::SetMaxEnergy(), and G4HadronicInteraction::SetMinEnergy().
00039 :G4HadronicInteraction("NeutronHPFission") 00040 { 00041 SetMinEnergy( 0.0 ); 00042 SetMaxEnergy( 20.*MeV ); 00043 if(!getenv("G4NEUTRONHPDATA")) 00044 throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files."); 00045 dirName = getenv("G4NEUTRONHPDATA"); 00046 G4String tString = "/Fission"; 00047 dirName = dirName + tString; 00048 numEle = G4Element::GetNumberOfElements(); 00049 //theFission = new G4NeutronHPChannel[numEle]; 00050 00051 //for (G4int i=0; i<numEle; i++) 00052 //{ 00053 //if((*(G4Element::GetElementTable()))[i]->GetZ()>89) 00054 // if((*(G4Element::GetElementTable()))[i]->GetZ()>87) //TK modified for ENDF-VII 00055 // { 00056 // theFission[i].Init((*(G4Element::GetElementTable()))[i], dirName); 00057 // theFission[i].Register(&theFS); 00058 // } 00059 //} 00060 00061 for ( G4int i = 0 ; i < numEle ; i++ ) 00062 { 00063 theFission.push_back( new G4NeutronHPChannel ); 00064 if((*(G4Element::GetElementTable()))[i]->GetZ()>87) //TK modified for ENDF-VII 00065 { 00066 (*theFission[i]).Init((*(G4Element::GetElementTable()))[i], dirName); 00067 (*theFission[i]).Register(&theFS); 00068 } 00069 } 00070 }
G4NeutronHPFission::~G4NeutronHPFission | ( | ) |
Definition at line 72 of file G4NeutronHPFission.cc.
00073 { 00074 //delete [] theFission; 00075 for ( std::vector<G4NeutronHPChannel*>::iterator 00076 it = theFission.begin() ; it != theFission.end() ; it++ ) 00077 { 00078 delete *it; 00079 } 00080 theFission.clear(); 00081 }
G4HadFinalState * G4NeutronHPFission::ApplyYourself | ( | const G4HadProjectile & | aTrack, | |
G4Nucleus & | aTargetNucleus | |||
) | [virtual] |
Implements G4HadronicInteraction.
Definition at line 84 of file G4NeutronHPFission.cc.
References G4NeutronHPManager::CloseReactionWhiteBoard(), G4UniformRand, G4Material::GetElement(), G4Element::GetIndex(), G4NeutronHPManager::GetInstance(), G4HadProjectile::GetMaterial(), G4Material::GetNumberOfElements(), G4Element::GetNumberOfElements(), G4Material::GetTemperature(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4Material::GetVecNbOfAtomsPerVolume(), CLHEP::detail::n, G4NeutronHPManager::OpenReactionWhiteBoard(), and G4Nucleus::SetParameters().
00085 { 00086 00087 if ( numEle < (G4int)G4Element::GetNumberOfElements() ) addChannelForNewElement(); 00088 00089 G4NeutronHPManager::GetInstance()->OpenReactionWhiteBoard(); 00090 const G4Material * theMaterial = aTrack.GetMaterial(); 00091 G4int n = theMaterial->GetNumberOfElements(); 00092 G4int index = theMaterial->GetElement(0)->GetIndex(); 00093 if(n!=1) 00094 { 00095 xSec = new G4double[n]; 00096 G4double sum=0; 00097 G4int i; 00098 const G4double * NumAtomsPerVolume = theMaterial->GetVecNbOfAtomsPerVolume(); 00099 G4double rWeight; 00100 G4NeutronHPThermalBoost aThermalE; 00101 for (i=0; i<n; i++) 00102 { 00103 index = theMaterial->GetElement(i)->GetIndex(); 00104 rWeight = NumAtomsPerVolume[i]; 00105 xSec[i] = (*theFission[index]).GetXsec(aThermalE.GetThermalEnergy(aTrack, 00106 theMaterial->GetElement(i), 00107 theMaterial->GetTemperature())); 00108 xSec[i] *= rWeight; 00109 sum+=xSec[i]; 00110 } 00111 G4double random = G4UniformRand(); 00112 G4double running = 0; 00113 for (i=0; i<n; i++) 00114 { 00115 running += xSec[i]; 00116 index = theMaterial->GetElement(i)->GetIndex(); 00117 //if(random<=running/sum) break; 00118 if( sum == 0 || random <= running/sum ) break; 00119 } 00120 delete [] xSec; 00121 } 00122 //return theFission[index].ApplyYourself(aTrack); 00123 G4HadFinalState* result = (*theFission[index]).ApplyYourself(aTrack); 00124 aNucleus.SetParameters(G4NeutronHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargA(),G4NeutronHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargZ()); 00125 G4NeutronHPManager::GetInstance()->CloseReactionWhiteBoard(); 00126 return result; 00127 }
const std::pair< G4double, G4double > G4NeutronHPFission::GetFatalEnergyCheckLevels | ( | ) | const [virtual] |
Reimplemented from G4HadronicInteraction.
Definition at line 129 of file G4NeutronHPFission.cc.
References DBL_MAX.
00130 { 00131 // max energy non-conservation is mass of heavy nucleus 00132 //return std::pair<G4double, G4double>(5*perCent,250*GeV); 00133 return std::pair<G4double, G4double>(5*perCent,DBL_MAX); 00134 }