Geant4  10.02.p03
IORTEventAction Class Reference

#include <IORTEventAction.hh>

Inheritance diagram for IORTEventAction:
Collaboration diagram for IORTEventAction:

Public Member Functions

 IORTEventAction ()
 
 ~IORTEventAction ()
 
void BeginOfEventAction (const G4Event *)
 
void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void SetDrawFlag (G4String val)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Private Attributes

G4String drawFlag
 
G4int hitsCollectionID
 
G4int printModulo
 
IORTEventActionMessengerpointerEventMessenger
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 49 of file IORTEventAction.hh.

Constructor & Destructor Documentation

◆ IORTEventAction()

IORTEventAction::IORTEventAction ( )

Definition at line 57 of file IORTEventAction.cc.

57  :
59 {
60  hitsCollectionID = -1;
62 }
IORTEventActionMessenger * pointerEventMessenger

◆ ~IORTEventAction()

IORTEventAction::~IORTEventAction ( )

Definition at line 65 of file IORTEventAction.cc.

66 {
67  delete pointerEventMessenger;
68 }
IORTEventActionMessenger * pointerEventMessenger

Member Function Documentation

◆ BeginOfEventAction()

void IORTEventAction::BeginOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 71 of file IORTEventAction.cc.

72 {
73  G4int evtNb = evt->GetEventID();
74 
75  //printing survey
76  if (evtNb%printModulo == 0)
77  G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
78 
80  if(hitsCollectionID == -1)
81  hitsCollectionID = pSDManager -> GetCollectionID("IORTDetectorHitsCollection");
82 
83 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4int GetEventID() const
Definition: G4Event.hh:151
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ EndOfEventAction()

void IORTEventAction::EndOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 86 of file IORTEventAction.cc.

87 {
88  if(hitsCollectionID < 0)
89  return;
90  G4HCofThisEvent* HCE = evt -> GetHCofThisEvent();
91 
92  // Clear voxels hit list
94  if (matrix) matrix -> ClearHitTrack();
95 
96  if(HCE)
97  {
99  if(CHC)
100  {
101  if(matrix)
102  {
103  // Fill the matrix with the information: voxel and associated energy deposit
104  // in the detector at the end of the event
105 
106  G4int HitCount = CHC -> entries();
107  for (G4int h=0; h<HitCount; h++)
108  {
109  G4int i = ((*CHC)[h]) -> GetXID();
110  G4int j = ((*CHC)[h]) -> GetYID();
111  G4int k = ((*CHC)[h]) -> GetZID();
112  G4double energyDeposit = ((*CHC)[h]) -> GetEdep();
113  matrix -> Fill(i, j, k, energyDeposit/MeV);
114  }
115  }
116  }
117  }
118 }
static const double MeV
Definition: G4SIunits.hh:211
int G4int
Definition: G4Types.hh:78
TNtupleSim Fill(f1, f2, f3, f4)
static IORTMatrix * GetInstance()
Definition: IORTMatrix.cc:61
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ SetDrawFlag()

void IORTEventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 64 of file IORTEventAction.hh.

65  {
66  drawFlag = val;
67  };
Here is the caller graph for this function:

◆ SetPrintModulo()

void IORTEventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 59 of file IORTEventAction.hh.

60  {
61  printModulo = val;
62  };
Here is the caller graph for this function:

Member Data Documentation

◆ drawFlag

G4String IORTEventAction::drawFlag
private

Definition at line 67 of file IORTEventAction.hh.

◆ hitsCollectionID

G4int IORTEventAction::hitsCollectionID
private

Definition at line 71 of file IORTEventAction.hh.

◆ pointerEventMessenger

IORTEventActionMessenger* IORTEventAction::pointerEventMessenger
private

Definition at line 74 of file IORTEventAction.hh.

◆ printModulo

G4int IORTEventAction::printModulo
private

Definition at line 73 of file IORTEventAction.hh.


The documentation for this class was generated from the following files: