35 #include "HistoManager.hh"
36 #include "HistoMessenger.hh"
81 analysisManager->SetVerboseLevel(0);
82 G4String extension = analysisManager->GetFileType();
89 G4cout <<
"\n---> HistoManager::book(): cannot open " <<
fileName[1]
96 analysisManager->SetFirstHistoId(1);
118 analysisManager->Write();
119 analysisManager->CloseFile();
132 if (ih > kMaxHisto) {
133 G4cout <<
"---> warning from HistoManager::FillHisto() : histo " << ih
134 <<
"does not fExist; e= " << e <<
" w= " << weight <<
G4endl;
146 if (ih > kMaxHisto) {
147 G4cout <<
"---> warning from HistoManager::SetHisto() : histo " << ih
148 <<
"does not fExist" <<
G4endl;
152 const G4String id[] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
153 "10",
"11",
"12",
"13",
"14",
"15"};
156 "log10(Etransfert/Emu) muIonization",
157 "log10(Etransfert/Emu) muPair",
158 "log10(Etransfert/Emu) muBrems",
159 "log10(Etransfert/Emu) muNuclear",
160 "log10(Etransfert/Emu) hIonization",
161 "log10(Etransfert/Emu) hPair",
162 "log10(Etransfert/Emu) hBrems",
166 "log10(Etransfert/Emu) muIonization",
167 "log10(Etransfert/Emu) muPair",
168 "log10(Etransfert/Emu) muBrems",
169 "log10(Etransfert/Emu) muNuclear"
175 if (unit !=
"none") {
176 titl = title[ih] +
" (" + unit +
")";
190 G4cout <<
"----> SetHisto " << ih <<
": " << titl <<
"; "
191 << nbins <<
" bins from "
192 << vmin <<
" " << unit <<
" to " << vmax <<
" " << unit <<
G4endl;
200 if (ih >= kMaxHisto) {
201 G4cout <<
"---> warning from HistoManager::Normalize() : histo " << ih
202 <<
" fac= " << fac <<
G4endl;
213 if (ih < kMaxHisto) {
fAscii[ih] =
true;
fAscii[0] =
true; }
215 G4cout <<
"---> warning from HistoManager::PrintHisto() : histo " << ih
216 <<
"does not exist" <<
G4endl;
228 std::ofstream File(name, std::ios::out);
231 <<
"\n---> HistoManager::saveAscii(): cannot open " << name <<
G4endl;
235 File.setf( std::ios::scientific, std::ios::floatfield );
241 File <<
"\n 1D histogram " << ih <<
": " <<
fTitle[ih]
242 <<
"\n \n \t X \t\t Y" <<
G4endl;
245 File <<
" " << iBin <<
"\t"
246 <<
fHistPt[ih]->axis().bin_center(iBin) <<
"\t"
247 <<
fHistPt[ih]->bin_height(iBin)
G4String fTitle[kMaxHisto]
G4double fUnit[kMaxHisto]
G4double fVmax[kMaxHisto]
void Normalize(G4int id, G4double fac)
G4double fVmin[kMaxHisto]
void FillHisto(G4int id, G4double e, G4double weight=1.0)
G4AnaH1 * fHistPt[kMaxHisto]
static G4double GetValueOf(const G4String &)
G4CsvAnalysisManager G4AnalysisManager
void SetHisto(G4int, G4int, G4double, G4double, const G4String &unit="none")
G4String fLabel[kMaxHisto]
static const G4double fac
G4GLOB_DLL std::ostream G4cout
G4double fWidth[kMaxHisto]
HistoMessenger * fHistoMessenger