Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
58e39c9f
Commit
58e39c9f
authored
4 years ago
by
Morfouace
Browse files
Options
Downloads
Patches
Plain Diff
Writting neutron induced fission cross section in MaterialManager
parent
c6cb23a1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#69196
passed
4 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NPSimulation/Core/MaterialManager.cc
+9
-1
9 additions, 1 deletion
NPSimulation/Core/MaterialManager.cc
Projects/PISTA/PISTA.detector
+1
-1
1 addition, 1 deletion
Projects/PISTA/PISTA.detector
Projects/Scone/Analysis.cxx
+5
-4
5 additions, 4 deletions
Projects/Scone/Analysis.cxx
with
15 additions
and
6 deletions
NPSimulation/Core/MaterialManager.cc
+
9
−
1
View file @
58e39c9f
...
@@ -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
();
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Projects/PISTA/PISTA.detector
+
1
−
1
View file @
58e39c9f
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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
...
...
This diff is collapsed.
Click to expand it.
Projects/Scone/Analysis.cxx
+
5
−
4
View file @
58e39c9f
...
@@ -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
>
4
0
&&
E_sum
>
2
)
m_DetectedNeutron
++
;
if
(
Time_max
>
5
0
&&
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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment