37#include "G4RunManager.hh"
39#include "G4UnitsTable.hh"
41#include "Randomize.hh"
47 G4UserEventAction(), fEnergyAbs(0.), fEnergyGas(0.), fTrackLAbs(0.) {
66 garfieldPhysics->
Clear();
77 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
80 fGain = garfieldPhysics->
GetGain();
83 analysisManager->FillH1(1, fEnergyAbs);
84 analysisManager->FillH1(2, fTrackLAbs);
85 analysisManager->FillH1(3, fEnergyGas);
86 analysisManager->FillH1(4, fAvalancheSize);
87 analysisManager->FillH1(5, fGain);
92 analysisManager->FillNtupleDColumn(0, fEnergyAbs);
93 analysisManager->FillNtupleDColumn(1, fTrackLAbs);
94 analysisManager->FillNtupleDColumn(2, fEnergyGas);
95 analysisManager->FillNtupleDColumn(3, fAvalancheSize);
96 analysisManager->FillNtupleDColumn(4, fGain);
100 G4int eventID =
event->GetEventID();
101 G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
102 if ((printModulo > 0) && (eventID % printModulo == 0)) {
103 G4cout <<
"---> End of event: " << eventID << G4endl;
105 G4cout <<
" Absorber: total energy: " << std::setw(7)
106 << G4BestUnit(fEnergyAbs,
"Energy")
107 <<
" total track length: " << std::setw(7)
108 << G4BestUnit(fTrackLAbs,
"Length") << G4endl;
110 G4cout <<
" Gas: total energy: " << std::setw(7)
111 << G4BestUnit(fEnergyGas,
"Energy") <<
" avalanche size: " << fAvalancheSize <<
" gain: " << fGain << G4endl;
Selection of the analysis technology.
Definition of the GarfieldEventAction class.
Definition of the GarfieldPhysics class.
Definition of the GarfieldRunAction class.
virtual void BeginOfEventAction(const G4Event *event)
virtual void EndOfEventAction(const G4Event *event)
virtual ~GarfieldEventAction()
static GarfieldPhysics * GetInstance()
double GetAvalancheSize()