34 #include "PrimaryGeneratorAction.hh"
35 #include "DetectorConstruction.hh"
45 :fDetector(det), fPrimary(prim)
66 const Run* localRun =
static_cast<const Run*
>(run);
85 if (nEvents == 0) {
return; }
101 G4cout <<
"\n The run consists of " << nEvents <<
" "<< particle <<
" of "
102 <<
G4BestUnit(energy,
"Energy") <<
"\n through "
104 << matName <<
" (density: "
112 if (rms>0.) { rms = std::sqrt(rms); }
122 G4double ekin[100], dedxp[100], dedxmp[100], tdedxp[100], tdedxmp[100],
127 for(i = 0; i < 100; ++i) {
129 dedxp[i] = calc.
GetDEDX(ekin[i], proton, material);
133 dedxmp[i] = calc.
GetDEDX(ekin[i], part, material);
141 G4cout<<
"##################################################################"
143 G4cout<<
"### Stopping Powers and Cross Sections" <<
G4endl;
144 G4cout<<
"##################################################################"
147 G4cout<<
"# N E(MeV) p_dEdx(MeV/mm) mpl_dEdx(MeV/mm) xs(1/mm)"
149 G4cout<<
" restr tot restr tot p mpl"
151 G4cout<<
"##################################################################"
153 for(i=0; i<100; ++i) {
154 G4cout << std::setw(2) << i <<
"." << std::setw(9) << ekin[i]
155 << std::setw(8) << dedxp[i]
156 << std::setw(8) << tdedxp[i]
157 << std::setw(9) << dedxmp[i]
158 << std::setw(9) << tdedxmp[i]
159 << std::setw(10) << xsp[i]
160 << std::setw(10) << xsmp[i]
164 G4cout<<
"##################################################################"
172 for(i=0; i<100; ++i) {
177 std::log10(calc.
GetRange(ekin[i],
"proton",matName)/
mm));
179 std::log10(calc.
GetRange(ekin[i],
"monopole",matName)/
mm));