Belle II Software  release-08-01-10
EventAction Class Reference

The Event Action class. More...

#include <EventAction.h>

Inheritance diagram for EventAction:
Collaboration diagram for EventAction:

Public Member Functions

 EventAction (const std::string &mcCollectionName, MCParticleGraph &mcParticleGraph)
 Constructor. More...
 
virtual ~EventAction ()
 Destructor.
 
void BeginOfEventAction (const G4Event *event)
 This method is invoked before converting the primary particles to G4Track objects. More...
 
void EndOfEventAction (const G4Event *event)
 This method is invoked at the very end of event processing. More...
 

Protected Attributes

std::string m_mcCollectionName
 The name of the MCParticle collection to which the MCParticles should be written.
 
MCParticleGraphm_mcParticleGraph
 Reference to the MCParticle graph which is converted to a MCParticle list by this class.
 

Detailed Description

The Event Action class.

This class is invoked by G4EventManager for each event.

Definition at line 31 of file EventAction.h.

Constructor & Destructor Documentation

◆ EventAction()

EventAction ( const std::string &  mcCollectionName,
MCParticleGraph mcParticleGraph 
)

Constructor.

Parameters
mcCollectionNameThe name of the MCParticle collection.
mcParticleGraphReference to the MCParticle graph.
createRelationIf set to true the relation collection Hit -> MCParticle is created.

Definition at line 21 of file EventAction.cc.

21  :
22  G4UserEventAction(), m_mcCollectionName(mcCollectionName), m_mcParticleGraph(mcParticleGraph)
23 {
24  if (false) {
25  G4Event* event;
26  BeginOfEventAction(event);
27  EndOfEventAction(event);
28  }
29 }
std::string m_mcCollectionName
The name of the MCParticle collection to which the MCParticles should be written.
Definition: EventAction.h:64
MCParticleGraph & m_mcParticleGraph
Reference to the MCParticle graph which is converted to a MCParticle list by this class.
Definition: EventAction.h:65
void EndOfEventAction(const G4Event *event)
This method is invoked at the very end of event processing.
Definition: EventAction.cc:43
void BeginOfEventAction(const G4Event *event)
This method is invoked before converting the primary particles to G4Track objects.
Definition: EventAction.cc:36

Member Function Documentation

◆ BeginOfEventAction()

void BeginOfEventAction ( const G4Event *  event)

This method is invoked before converting the primary particles to G4Track objects.

Parameters
eventPointer to the current G4Event object.

Definition at line 36 of file EventAction.cc.

◆ EndOfEventAction()

void EndOfEventAction ( const G4Event *  event)

This method is invoked at the very end of event processing.

Parameters
eventThe pointer to the G4Event object which allows to access trajectories, hits collections and/or digits collections.

Definition at line 43 of file EventAction.cc.


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