Belle II Software  release-08-01-10
EventAction.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #ifndef EVENTACTION_H_
10 #define EVENTACTION_H_
11 
12 #include <mdst/dataobjects/MCParticleGraph.h>
13 
14 #include <G4UserEventAction.hh>
15 class G4Event;
16 
17 namespace Belle2 {
23  class MCParticleGraph;
24 
25  namespace Simulation {
26 
31  class EventAction : public G4UserEventAction {
32 
33  public:
40  EventAction(const std::string& mcCollectionName, MCParticleGraph& mcParticleGraph);
41 
45  virtual ~EventAction();
46 
52  void BeginOfEventAction(const G4Event* event);
53 
59  void EndOfEventAction(const G4Event* event);
60 
61 
62  protected:
63 
64  std::string m_mcCollectionName;
67  };
68 
69  } // end namespace Simulation
71 } // end namespace Belle2
72 
73 #endif /* EVENTACTION_H_ */
Class to build, validate and sort a particle decay chain.
The Event Action class.
Definition: EventAction.h:31
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
virtual ~EventAction()
Destructor.
Definition: EventAction.cc:31
EventAction(const std::string &mcCollectionName, MCParticleGraph &mcParticleGraph)
Constructor.
Definition: EventAction.cc:21
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
Abstract base class for different kinds of events.