33 #include "B4Analysis.hh"
52 G4cout <<
"Using " << analysisManager->GetType() <<
G4endl;
57 analysisManager->SetVerboseLevel(1);
58 analysisManager->SetFirstHistoId(1);
64 analysisManager->CreateH1(
"1",
"Edep in absorber", 100, 0., 800*
MeV);
65 analysisManager->CreateH1(
"2",
"Edep in gap", 100, 0., 100*
MeV);
66 analysisManager->CreateH1(
"3",
"trackL in absorber", 100, 0., 1*
m);
67 analysisManager->CreateH1(
"4",
"trackL in gap", 100, 0., 50*
cm);
71 analysisManager->CreateNtuple(
"B4",
"Edep and TrackL");
72 analysisManager->CreateNtupleDColumn(
"Eabs");
73 analysisManager->CreateNtupleDColumn(
"Egap");
74 analysisManager->CreateNtupleDColumn(
"Labs");
75 analysisManager->CreateNtupleDColumn(
"Lgap");
76 analysisManager->FinishNtuple();
83 delete G4AnalysisManager::Instance();
108 analysisManager->OpenFile(fileName);
118 if ( analysisManager->GetH1(1) ) {
119 G4cout <<
"\n ----> print histograms statistic ";
127 G4cout <<
" EAbs : mean = "
128 <<
G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
132 G4cout <<
" EGap : mean = "
133 <<
G4BestUnit(analysisManager->GetH1(2)->mean(),
"Energy")
137 G4cout <<
" LAbs : mean = "
138 <<
G4BestUnit(analysisManager->GetH1(3)->mean(),
"Length")
142 G4cout <<
" LGap : mean = "
143 <<
G4BestUnit(analysisManager->GetH1(4)->mean(),
"Length")
150 analysisManager->Write();
151 analysisManager->CloseFile();
void SetPrintProgress(G4int i)
Definition of the B4bRunData class.
virtual void BeginOfRunAction(const G4Run *)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
Definition of the B4bRunAction class.
ExG4HbookAnalysisManager G4AnalysisManager
static G4RunManager * GetRunManager()
virtual void EndOfRunAction(const G4Run *)
virtual G4Run * GenerateRun()