36#include "G4RunManager.hh"
37#include "G4UnitsTable.hh"
41#include "Randomize.hh"
46 : G4UserEventAction(), fEnergyAbs(0.), fEnergyGas(0.), fTrackLAbs(0.) {}
63 garfieldPhysics->
Clear();
74 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
77 fGain = garfieldPhysics->
GetGain();
80 analysisManager->FillH1(1, fEnergyAbs);
81 analysisManager->FillH1(2, fTrackLAbs);
82 analysisManager->FillH1(3, fEnergyGas);
83 analysisManager->FillH1(4, fAvalancheSize);
84 analysisManager->FillH1(5, fGain);
87 analysisManager->FillNtupleDColumn(0, fEnergyAbs);
88 analysisManager->FillNtupleDColumn(1, fTrackLAbs);
89 analysisManager->FillNtupleDColumn(2, fEnergyGas);
90 analysisManager->FillNtupleDColumn(3, fAvalancheSize);
91 analysisManager->FillNtupleDColumn(4, fGain);
95 G4int eventID =
event->GetEventID();
96 G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
97 if ((printModulo > 0) && (eventID % printModulo == 0)) {
98 G4cout <<
"---> End of event: " << eventID << G4endl;
100 G4cout <<
" Absorber: total energy: " << std::setw(7)
101 << G4BestUnit(fEnergyAbs,
"Energy")
102 <<
" total track length: " << std::setw(7)
103 << G4BestUnit(fTrackLAbs,
"Length") << G4endl;
105 G4cout <<
" Gas: total energy: " << std::setw(7)
106 << G4BestUnit(fEnergyGas,
"Energy")
107 <<
" avalanche size: " << fAvalancheSize
108 <<
" 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()