30 #include "B4RunAction.hh"
31 #include "B4Analysis.hh"
50 G4cout <<
"Using " << analysisManager->GetType() <<
G4endl;
55 analysisManager->SetVerboseLevel(1);
56 analysisManager->SetNtupleMerging(
true);
63 analysisManager->CreateH1(
"Eabs",
"Edep in absorber", 100, 0., 800*
MeV);
64 analysisManager->CreateH1(
"Egap",
"Edep in gap", 100, 0., 100*
MeV);
65 analysisManager->CreateH1(
"Labs",
"trackL in absorber", 100, 0., 1*
m);
66 analysisManager->CreateH1(
"Lgap",
"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();
98 analysisManager->OpenFile(fileName);
108 if ( analysisManager->GetH1(1) ) {
109 G4cout <<
G4endl <<
" ----> print histograms statistic ";
117 G4cout <<
" EAbs : mean = "
118 <<
G4BestUnit(analysisManager->GetH1(0)->mean(),
"Energy")
120 <<
G4BestUnit(analysisManager->GetH1(0)->rms(),
"Energy") << G4endl;
122 G4cout <<
" EGap : mean = "
123 <<
G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
125 <<
G4BestUnit(analysisManager->GetH1(1)->rms(),
"Energy") << G4endl;
127 G4cout <<
" LAbs : mean = "
128 <<
G4BestUnit(analysisManager->GetH1(2)->mean(),
"Length")
130 <<
G4BestUnit(analysisManager->GetH1(2)->rms(),
"Length") << G4endl;
132 G4cout <<
" LGap : mean = "
133 <<
G4BestUnit(analysisManager->GetH1(3)->mean(),
"Length")
135 <<
G4BestUnit(analysisManager->GetH1(3)->rms(),
"Length") << G4endl;
140 analysisManager->Write();
141 analysisManager->CloseFile();