Skip to content
Snippets Groups Projects
Commit 58e39c9f authored by Morfouace's avatar Morfouace
Browse files

Writting neutron induced fission cross section in MaterialManager

parent c6cb23a1
No related branches found
No related tags found
No related merge requests found
Pipeline #69196 passed
...@@ -1192,6 +1192,7 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d ...@@ -1192,6 +1192,7 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d
G4String path1; G4String path1;
G4String path2; G4String path2;
G4String path3; G4String path3;
G4String path4;
G4String ParticleName = Particle->GetParticleName(); G4String ParticleName = Particle->GetParticleName();
G4String MaterialName = it->second->GetName(); G4String MaterialName = it->second->GetName();
G4String ElementName = it->second->GetElement(i)->GetName(); G4String ElementName = it->second->GetElement(i)->GetName();
...@@ -1199,13 +1200,16 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d ...@@ -1199,13 +1200,16 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d
path1 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_elastic_" + ParticleName + "_" + ElementName + ".dat"; path1 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_elastic_" + ParticleName + "_" + ElementName + ".dat";
path2 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_inelastic_" + ParticleName + "_" + ElementName + ".dat"; path2 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_inelastic_" + ParticleName + "_" + ElementName + ".dat";
path3 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_capture_" + ParticleName + "_" + ElementName + ".dat"; path3 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_capture_" + ParticleName + "_" + ElementName + ".dat";
path4 = GlobalPath + "/Inputs/CrossSection/" + "G4XS_fission_" + ParticleName + "_" + ElementName + ".dat";
ofstream ofile_elastic; ofstream ofile_elastic;
ofstream ofile_inelastic; ofstream ofile_inelastic;
ofstream ofile_capture; ofstream ofile_capture;
ofstream ofile_fission;
ofile_elastic.open(path1); ofile_elastic.open(path1);
ofile_inelastic.open(path2); ofile_inelastic.open(path2);
ofile_capture.open(path3); ofile_capture.open(path3);
ofile_fission.open(path4);
//std::cout << path << std::endl; //std::cout << path << std::endl;
double xs; double xs;
double step_keV = 1*keV; double step_keV = 1*keV;
...@@ -1230,12 +1234,16 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d ...@@ -1230,12 +1234,16 @@ void MaterialManager::WriteCrossSectionTable(G4ParticleDefinition* Particle, G4d
// Capture Cross Section // Capture Cross Section
xs = store->GetCaptureCrossSectionPerAtom(Particle, E, it->second->GetElement(i), it->second); xs = store->GetCaptureCrossSectionPerAtom(Particle, E, it->second->GetElement(i), it->second);
ofile_capture << E/MeV << " " << xs/barn << G4endl; ofile_capture << E/MeV << " " << xs/barn << G4endl;
// Fission Cross Section
xs = store->GetFissionCrossSectionPerAtom(Particle, E, it->second->GetElement(i), it->second);
ofile_fission << E/MeV << " " << xs/barn << G4endl;
} }
ofile_elastic.close(); ofile_elastic.close();
ofile_inelastic.close(); ofile_inelastic.close();
ofile_capture.close(); ofile_capture.close();
ofile_fission.close();
} }
} }
} }
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Target Target
THICKNESS= 0.44 micrometer THICKNESS= 0.22 micrometer
RADIUS= 20 mm RADIUS= 20 mm
MATERIAL= C MATERIAL= C
ANGLE= 0 deg ANGLE= 0 deg
......
...@@ -84,9 +84,9 @@ void Analysis::TreatEvent(){ ...@@ -84,9 +84,9 @@ void Analysis::TreatEvent(){
E_sum += Scone->Energy[i]; E_sum += Scone->Energy[i];
} }
} }
E_sum = E_sum - E_init;
//if(Time_max>50) m_DetectedNeutron++; //if(Time_max>50) m_DetectedNeutron++;
if(Time_max>40 && E_sum>2) m_DetectedNeutron++; if(Time_max>50 && E_sum>0) m_DetectedNeutron++;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -125,11 +125,12 @@ void Analysis::End(){ ...@@ -125,11 +125,12 @@ void Analysis::End(){
cout << "DetectedNeutron: " << endl; cout << "DetectedNeutron: " << endl;
ofstream ofile; ofstream ofile;
ofile.open("macro/eff_scone_natGd25um_Esum2MeV.txt"); ofile.open("macro/eff_scone_natGd25um.txt");
//ofile.open("macro/eff_scone_menate.txt"); //ofile.open("macro/eff_scone_menate.txt");
for(int i=0; i< vDetectedNeutron.size(); i++){ for(int i=0; i< vDetectedNeutron.size(); i++){
//cout << "* " << vE_init[i] << " / " << vDetectedNeutron[i]/vDetectedNeutron[0]*99.4 << endl;
cout << "* " << vE_init[i] << " / " << vDetectedNeutron[i]/1e5*100 << endl; cout << "* " << vE_init[i] << " / " << vDetectedNeutron[i]/1e5*100 << endl;
//ofile << vE_init[i] << " " << vDetectedNeutron[i]/vDetectedNeutron[0]*99.3 << endl; //ofile << vE_init[i] << " " << vDetectedNeutron[i]/vDetectedNeutron[0]*99.4 << endl;
ofile << vE_init[i] << " " << vDetectedNeutron[i]/1e5*100 << endl; ofile << vE_init[i] << " " << vDetectedNeutron[i]/1e5*100 << endl;
} }
ofile.close(); ofile.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment