48 #include "G4UnitsTable.hh"
49 #include "G4Neutron.hh"
52 #include "G4ParticleDefinition.hh"
53 #include "G4ParticleTable.hh"
54 #include "G4NistManager.hh"
55 #include "G4HadronicProcessStore.hh"
57 #include "G4NucleiProperties.hh"
58 #include "G4NistManager.hh"
59 #include "G4StableIsotopes.hh"
60 #include "G4SystemOfUnits.hh"
132 fHisto->
Add1D(
"h1",
"Elastic cross section (barn,1.0) as a functions of log10(p/GeV)",
134 fHisto->
Add1D(
"h2",
"Elastic cross section (barn) as a functions of log10(E/MeV)",
136 fHisto->
Add1D(
"h3",
"Inelastic cross section (barn) as a functions of log10(p/GeV)",
138 fHisto->
Add1D(
"h4",
"Inelastic cross section (barn) as a functions of log10(E/MeV)",
140 fHisto->
Add1D(
"h5",
"Capture cross section (barn) as a functions of log10(E/MeV)",
142 fHisto->
Add1D(
"h6",
"Fission cross section (barn) as a functions of log10(E/MeV)",
144 fHisto->
Add1D(
"h7",
"Charge exchange cross section (barn) as a functions of log10(E/MeV)",
146 fHisto->
Add1D(
"h8",
"Total cross section (barn) as a functions of log10(E/MeV)",
159 G4cout <<
"HistoManager: End of run actions are started" << G4endl;
162 const G4Element* elm =
163 G4NistManager::Instance()->FindOrBuildElement(
fElementName);
164 const G4Material* mat =
165 G4NistManager::Instance()->FindOrBuildMaterial(
"G4_"+
fElementName);
166 const G4ParticleDefinition* particle =
167 G4ParticleTable::GetParticleTable()->FindParticle(
fParticleName);
173 G4cout <<
"------------------------------------------------------------------------"
175 G4cout <<
" N E(MeV) Elastic(b) Inelastic(b)";
176 if(particle ==
fNeutron) { G4cout <<
" Capture(b) Fission(b)"; }
177 G4cout <<
" Total(b)" << G4endl;
178 G4cout <<
"------------------------------------------------------------------------"
181 if(!particle || !elm) {
182 G4cout <<
"HistoManager WARNING Particle or element undefined" << G4endl;
186 G4int prec = G4cout.precision();
189 G4HadronicProcessStore* store = G4HadronicProcessStore::Instance();
190 G4double mass = particle->GetPDGMass();
198 G4double de = (e2 - e1)/G4double(
fBinsE);
199 G4double dp = (p2 - p1)/G4double(
fBinsP);
201 G4double x = e1 - de*0.5;
202 G4double e, p, xs, xtot;
206 e = std::pow(10.,x)*MeV;
207 if(
fVerbose>0) G4cout << std::setw(5) << i << std::setw(12) << e;
208 xs = store->GetElasticCrossSectionPerAtom(particle,e,elm,mat);
210 if(
fVerbose>0) G4cout << std::setw(12) << xs/barn;
212 xs = store->GetInelasticCrossSectionPerAtom(particle,e,elm,mat);
214 if(
fVerbose>0) G4cout <<
" " << std::setw(12) << xs/barn;
217 xs = store->GetCaptureCrossSectionPerAtom(particle,e,elm,mat);
219 if(
fVerbose>0) G4cout <<
" " << std::setw(12) << xs/barn;
221 xs = store->GetFissionCrossSectionPerAtom(particle,e,elm,mat);
223 if(
fVerbose>0) G4cout <<
" " << std::setw(12) << xs/barn;
226 xs = store->GetChargeExchangeCrossSectionPerAtom(particle,e,elm,mat);
227 if(
fVerbose>0) G4cout <<
" " << std::setw(12) << xtot/barn << G4endl;
235 p = std::pow(10.,x)*GeV;
236 e = std::sqrt(p*p + mass*mass) - mass;
237 xs = store->GetElasticCrossSectionPerAtom(particle,e,elm,mat);
239 xs = store->GetInelasticCrossSectionPerAtom(particle,e,elm,mat);
243 G4cout <<
"-----------------------------------------------------------------"
246 G4cout.precision(prec);
void Fill(G4int, G4double, G4double)
const G4ParticleDefinition * fNeutron
void SetVerbose(G4int val)
void SetVerbose(G4int val)
void Add1D(const G4String &, const G4String &, G4int nb, G4double x1, G4double x2, G4double u=1.)
void SetHisto1D(G4int, G4int, G4double, G4double, G4double)
static HistoManager * GetPointer()
static HistoManager * fManager