Belle II Software  release-05-02-19
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 33 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 23 of file EventAction.cc.

23  :
24  G4UserEventAction(), m_mcCollectionName(mcCollectionName), m_mcParticleGraph(mcParticleGraph)
25 {
26  if (false) {
27  G4Event* event;
28  BeginOfEventAction(event);
29  EndOfEventAction(event);
30  }
31 }

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 38 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 45 of file EventAction.cc.


The documentation for this class was generated from the following files:
Belle2::Simulation::EventAction::BeginOfEventAction
void BeginOfEventAction(const G4Event *event)
This method is invoked before converting the primary particles to G4Track objects.
Definition: EventAction.cc:38
Belle2::Simulation::EventAction::m_mcCollectionName
std::string m_mcCollectionName
The name of the MCParticle collection to which the MCParticles should be written.
Definition: EventAction.h:66
Belle2::Simulation::EventAction::m_mcParticleGraph
MCParticleGraph & m_mcParticleGraph
Reference to the MCParticle graph which is converted to a MCParticle list by this class.
Definition: EventAction.h:67
Belle2::Simulation::EventAction::EndOfEventAction
void EndOfEventAction(const G4Event *event)
This method is invoked at the very end of event processing.
Definition: EventAction.cc:45