31 #include "B4RunAction.hh"
32 #include "B4Analysis.hh"
51 G4cout <<
"Using " << analysisManager->GetType() <<
G4endl;
56 analysisManager->SetVerboseLevel(1);
57 analysisManager->SetFirstHistoId(1);
63 analysisManager->CreateH1(
"1",
"Edep in absorber", 100, 0., 800*
MeV);
64 analysisManager->CreateH1(
"2",
"Edep in gap", 100, 0., 100*
MeV);
65 analysisManager->CreateH1(
"3",
"trackL in absorber", 100, 0., 1*
m);
66 analysisManager->CreateH1(
"4",
"trackL in gap", 100, 0., 50*
cm);
70 analysisManager->CreateNtuple(
"B4",
"Edep and TrackL");
71 analysisManager->CreateNtupleDColumn(
"Eabs");
72 analysisManager->CreateNtupleDColumn(
"Egap");
73 analysisManager->CreateNtupleDColumn(
"Labs");
74 analysisManager->CreateNtupleDColumn(
"Lgap");
75 analysisManager->FinishNtuple();
82 delete G4AnalysisManager::Instance();
98 analysisManager->OpenFile(fileName);
108 if ( analysisManager->GetH1(1) ) {
109 G4cout <<
"\n ----> print histograms statistic ";
117 G4cout <<
" EAbs : mean = "
118 <<
G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
122 G4cout <<
" EGap : mean = "
123 <<
G4BestUnit(analysisManager->GetH1(2)->mean(),
"Energy")
127 G4cout <<
" LAbs : mean = "
128 <<
G4BestUnit(analysisManager->GetH1(3)->mean(),
"Length")
132 G4cout <<
" LGap : mean = "
133 <<
G4BestUnit(analysisManager->GetH1(4)->mean(),
"Length")
140 analysisManager->Write();
141 analysisManager->CloseFile();
void SetPrintProgress(G4int i)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
ExG4HbookAnalysisManager G4AnalysisManager
static G4RunManager * GetRunManager()
virtual void EndOfRunAction(const G4Run *)
virtual void BeginOfRunAction(const G4Run *)