Belle II Software
development
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 <framework/dataobjects/EventMetaData.h>
13
#include <framework/datastore/StoreObjPtr.h>
14
#include <mdst/dataobjects/MCParticleGraph.h>
15
16
#include <G4UserEventAction.hh>
17
18
#include <fstream>
19
20
class
G4Event;
21
22
namespace
Belle2
{
28
class
MCParticleGraph;
29
30
namespace
Simulation {
31
36
class
EventAction
:
public
G4UserEventAction {
37
38
public
:
44
EventAction
(
const
std::string& mcCollectionName,
MCParticleGraph
& mcParticleGraph);
45
49
virtual
~EventAction
();
50
56
void
BeginOfEventAction
(
const
G4Event* event);
57
63
void
EndOfEventAction
(
const
G4Event* event);
64
68
std::ofstream*
getVREventStream
()
const
{
return
m_VREventStream
; }
69
70
protected
:
71
72
std::string
m_mcCollectionName
;
73
MCParticleGraph
&
m_mcParticleGraph
;
75
private
:
76
77
bool
m_writeSimSteps
{
false
};
78
std::ofstream*
m_VREventStream
{
nullptr
};
79
StoreObjPtr<EventMetaData>
m_evtMetaData
;
81
};
82
83
}
// end namespace Simulation
85
}
// end namespace Belle2
86
87
#endif
/* EVENTACTION_H_ */
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition:
MCParticleGraph.h:37
Belle2::Simulation::EventAction
The Event Action class.
Definition:
EventAction.h:36
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:72
Belle2::Simulation::EventAction::m_VREventStream
std::ofstream * m_VREventStream
Output stream for writing each step of event's history for the Virtual Reality.
Definition:
EventAction.h:78
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:73
Belle2::Simulation::EventAction::m_writeSimSteps
bool m_writeSimSteps
Flag for writing out the simulation steps.
Definition:
EventAction.h:77
Belle2::Simulation::EventAction::~EventAction
virtual ~EventAction()
Destructor.
Definition:
EventAction.cc:36
Belle2::Simulation::EventAction::m_evtMetaData
StoreObjPtr< EventMetaData > m_evtMetaData
Event metadata.
Definition:
EventAction.h:79
Belle2::Simulation::EventAction::getVREventStream
std::ofstream * getVREventStream() const
This method gets the output stream for the event-history steps.
Definition:
EventAction.h:68
Belle2::Simulation::EventAction::EndOfEventAction
void EndOfEventAction(const G4Event *event)
This method is invoked at the very end of event processing.
Definition:
EventAction.cc:64
Belle2::Simulation::EventAction::BeginOfEventAction
void BeginOfEventAction(const G4Event *event)
This method is invoked before converting the primary particles to G4Track objects.
Definition:
EventAction.cc:46
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition:
StoreObjPtr.h:96
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
simulation
kernel
include
EventAction.h
Generated on Fri Nov 8 2024 02:41:25 for Belle II Software by
1.9.6