34 #include "DetectorConstruction.hh"
35 #include "PrimaryGeneratorAction.hh"
36 #include "HistoManager.hh"
52 fDetector(det),fParticle(0),
77 const Run* localRun =
static_cast<const Run*
>(run);
89 for (
unsigned int i = 0; i < localRun->
fluence.size(); ++i)
92 catch(
const std::out_of_range&)
96 for (
unsigned int i = 0; i < localRun->
fluence1.size(); ++i)
99 catch(
const std::out_of_range&)
103 for (
unsigned int i = 0; i < localRun->
fluence2.size(); ++i)
106 catch(
const std::out_of_range&)
110 for (
unsigned int i = 0; i < localRun->
fNbEntries.size(); ++i)
113 catch(
const std::out_of_range&)
136 G4cout <<
"\n ======================== run summary ======================\n";
143 << material->
GetName() <<
" (density: "
152 analysisManager->
ScaleH1(1,fac);
153 analysisManager->
ScaleH1(2,fac);
154 analysisManager->
ScaleH1(3,fac);
155 analysisManager->
ScaleH1(5,fac);
156 analysisManager->
ScaleH1(6,fac);
171 analysisManager->
SetH1(ih, 120, 0*
mm, 240*
mm,
"mm");
212 if(variance > 0.) rms = std::sqrt(variance);
228 G4double err0 = fnorm2/fnorm, err1 = 0.;
237 error = ratio*std::sqrt(err1*err1 + err0*err0);
243 analysisManager->
FillH1(4,rmean,ratio);
255 G4String fileName = name +
".ascii";
256 std::ofstream File(fileName, std::ios::out);
258 std::ios::fmtflags mode = File.flags();
259 File.setf( std::ios::scientific, std::ios::floatfield );
260 G4int prec = File.precision(3);
262 File <<
" Fluence density distribution \n "
263 <<
"\n ibin \t radius (mm) \t Nb \t fluence\t norma fl\t rms/nfl (%) \n"
278 File.setf(mode,std::ios::floatfield);
279 File.precision(prec);