34#include "G4RunManager.hh"
35#include "G4SystemOfUnits.hh"
36#include "G4UnitsTable.hh"
43 G4RunManager::GetRunManager()->SetPrintProgress(1);
48 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
49 G4cout <<
"Using " << analysisManager->GetType() << G4endl;
54 analysisManager->SetVerboseLevel(1);
55 analysisManager->SetFirstHistoId(1);
61 analysisManager->CreateH1(
"1",
"Edep in absorber", 100, 0., 800 * MeV);
62 analysisManager->CreateH1(
"2",
"trackL in absorber", 100, 0., 1 * m);
63 analysisManager->CreateH1(
"3",
"Edep in gas", 1000, 0., 100 * keV);
65 analysisManager->CreateH1(
"4",
"Avalanche size in gas", 10000, 0, 10000);
66 analysisManager->CreateH1(
"5",
"gain", 1000, 0., 100);
67 analysisManager->CreateH3(
"1",
"Track position", 200, -10 * cm, 10 * cm, 29,
68 -1.45 * cm, 1.45 * cm, 29, -1.45 * cm, 1.45 * cm);
72 analysisManager->CreateNtuple(
"Garfield",
"Edep and TrackL");
73 analysisManager->CreateNtupleDColumn(
"Eabs");
74 analysisManager->CreateNtupleDColumn(
"Labs");
75 analysisManager->CreateNtupleDColumn(
"Egas");
76 analysisManager->CreateNtupleDColumn(
"AvalancheSize");
77 analysisManager->CreateNtupleDColumn(
"Gain");
78 analysisManager->FinishNtuple();
84 delete G4AnalysisManager::Instance();
94 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
98 G4String fileName =
"Garfield";
99 analysisManager->OpenFile(fileName);
107 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
108 if (analysisManager->GetH1(1)) {
109 G4cout << G4endl <<
" ----> print histograms statistic ";
111 G4cout <<
"for the entire run " << G4endl << G4endl;
113 G4cout <<
"for the local thread " << G4endl << G4endl;
116 G4cout <<
" EAbs : mean = "
117 << G4BestUnit(analysisManager->GetH1(1)->mean(),
"Energy")
119 << G4BestUnit(analysisManager->GetH1(1)->rms(),
"Energy") << G4endl;
121 G4cout <<
" LAbs : mean = "
122 << G4BestUnit(analysisManager->GetH1(2)->mean(),
"Length")
124 << G4BestUnit(analysisManager->GetH1(2)->rms(),
"Length") << G4endl;
126 G4cout <<
" EGas : mean = "
127 << G4BestUnit(analysisManager->GetH1(3)->mean(),
"Energy")
129 << G4BestUnit(analysisManager->GetH1(3)->rms(),
"Energy") << G4endl;
131 G4cout <<
" Avalanche size : mean = " << analysisManager->GetH1(4)->mean()
132 <<
" rms = " << analysisManager->GetH1(4)->rms() << G4endl;
134 G4cout <<
" Gain : mean = " << analysisManager->GetH1(5)->mean()
135 <<
" rms = " << analysisManager->GetH1(5)->rms() << G4endl;
140 analysisManager->Write();
141 analysisManager->CloseFile();
Selection of the analysis technology.
Definition of the GarfieldRunAction class.
virtual void BeginOfRunAction(const G4Run *)
virtual void EndOfRunAction(const G4Run *)
virtual ~GarfieldRunAction()