31 #include "B4RunAction.hh"
32 #include "B4Analysis.hh"
68 G4cout <<
"Using " << analysisManager->GetType()
69 <<
" analysis manager" <<
G4endl;
78 analysisManager->OpenFile(fileName);
79 analysisManager->SetFirstHistoId(1);
83 analysisManager->CreateH1(
"1",
"Edep in absorber", 100, 0., 800*
MeV);
84 analysisManager->CreateH1(
"2",
"Edep in gap", 100, 0., 100*
MeV);
85 analysisManager->CreateH1(
"3",
"trackL in absorber", 100, 0., 1*
m);
86 analysisManager->CreateH1(
"4",
"trackL in gap", 100, 0., 50*
cm);
90 analysisManager->CreateNtuple(
"B4",
"Edep and TrackL");
91 analysisManager->CreateNtupleDColumn(
"Eabs");
92 analysisManager->CreateNtupleDColumn(
"Egap");
93 analysisManager->CreateNtupleDColumn(
"Labs");
94 analysisManager->CreateNtupleDColumn(
"Lgap");
95 analysisManager->FinishNtuple();
103 if ( nofEvents == 0 )
return;
108 if ( analysisManager->GetH1(1) ) {
109 G4cout <<
"\n ----> print histograms statistic \n" <<
G4endl;
112 <<
" EAbs : mean = " <<
G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
113 <<
" rms = " <<
G4BestUnit(analysisManager->GetH1(1)->rms(),
"Energy")
116 <<
" EGap : mean = " <<
G4BestUnit(analysisManager->GetH1(2)->mean(),
"Energy")
117 <<
" rms = " <<
G4BestUnit(analysisManager->GetH1(2)->rms(),
"Energy")
120 <<
" LAbs : mean = " <<
G4BestUnit(analysisManager->GetH1(3)->mean(),
"Length")
121 <<
" rms = " <<
G4BestUnit(analysisManager->GetH1(3)->rms(),
"Length")
124 <<
" LGap : mean = " <<
G4BestUnit(analysisManager->GetH1(4)->mean(),
"Length")
125 <<
" rms = " <<
G4BestUnit(analysisManager->GetH1(4)->rms(),
"Length")
131 analysisManager->Write();
132 analysisManager->CloseFile();
136 delete G4AnalysisManager::Instance();