38 #include "HistoManager.hh"
45 fNtuple1(0), fNtuple2(0),
46 fEabs(0.), fEgap(0.) ,fLabs(0.), fLgap(0.)
72 fRootFile =
new TFile(fileName,
"RECREATE");
74 G4cout <<
" HistoManager::Book :"
75 <<
" problem creating the ROOT TFile "
81 fHisto[0] =
new TH1D(
"EAbs",
"Edep in absorber (MeV)", 100, 0., 800*
CLHEP::MeV);
85 fHisto[2] =
new TH1D(
"LAbs",
"trackL in absorber (mm)", 100, 0., 1*
CLHEP::m);
87 fHisto[3] =
new TH1D(
"LGap",
"trackL in gap (mm)", 100, 0., 50*
CLHEP::cm);
94 fNtuple1 =
new TTree(
"Ntuple1",
"Edep");
99 fNtuple2 =
new TTree(
"Ntuple2",
"TrackL");
103 G4cout <<
"\n----> Output file is open in " << fileName <<
G4endl;
115 G4cout <<
"\n----> Histograms and ntuples are saved\n" <<
G4endl;
122 if (ih >= kMaxHisto) {
123 G4cerr <<
"---> warning from HistoManager::FillHisto() : histo " << ih
124 <<
" does not exist. (xbin=" << xbin <<
" weight=" << weight <<
")"
135 if (ih >= kMaxHisto) {
136 G4cout <<
"---> warning from HistoManager::Normalize() : histo " << ih
137 <<
" does not exist. (fac=" << fac <<
")" <<
G4endl;
161 G4cout <<
"\n ----> print histograms statistic \n" <<
G4endl;
167 if (name[0] ==
'E' ) unitCategory =
"Energy";
168 if (name[0] ==
'L' ) unitCategory =
"Length";
171 <<
": mean = " <<
G4BestUnit(h1->GetMean(), unitCategory)
172 <<
" rms = " <<
G4BestUnit(h1->GetRMS(), unitCategory )