32 #include "B4Analysis.hh"
51 G4cout <<
"Using " << analysisManager->GetType() <<
G4endl;
56 analysisManager->SetVerboseLevel(1);
57 analysisManager->SetNtupleMerging(
true);
64 analysisManager->CreateH1(
"Eabs",
"Edep in absorber", 100, 0., 800*
MeV);
65 analysisManager->CreateH1(
"Egap",
"Edep in gap", 100, 0., 100*
MeV);
66 analysisManager->CreateH1(
"Labs",
"trackL in absorber", 100, 0., 1*
m);
67 analysisManager->CreateH1(
"Lgap",
"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();
108 analysisManager->OpenFile(fileName);
118 if ( analysisManager->GetH1(1) ) {
119 G4cout <<
G4endl <<
" ----> print histograms statistic ";
127 G4cout <<
" EAbs : mean = "
128 <<
G4BestUnit(analysisManager->GetH1(0)->mean(),
"Energy")
130 <<
G4BestUnit(analysisManager->GetH1(0)->rms(),
"Energy") << G4endl;
132 G4cout <<
" EGap : mean = "
133 <<
G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
135 <<
G4BestUnit(analysisManager->GetH1(1)->rms(),
"Energy") << G4endl;
137 G4cout <<
" LAbs : mean = "
138 <<
G4BestUnit(analysisManager->GetH1(2)->mean(),
"Length")
140 <<
G4BestUnit(analysisManager->GetH1(2)->rms(),
"Length") << G4endl;
142 G4cout <<
" LGap : mean = "
143 <<
G4BestUnit(analysisManager->GetH1(3)->mean(),
"Length")
145 <<
G4BestUnit(analysisManager->GetH1(3)->rms(),
"Length") << G4endl;
150 analysisManager->Write();
151 analysisManager->CloseFile();