k4SimGeant4
Loading...
Searching...
No Matches
SimG4GeantinosFromEdmTool.h
Go to the documentation of this file.
1#ifndef SIMG4COMPONENTS_G4GEANTINOSFROMEDMTOOL_H
2#define SIMG4COMPONENTS_G4GEANTINOSFROMEDMTOOL_H
3
4// from Gaudi
5#include "k4FWCore/DataHandle.h"
6#include "GaudiKernel/AlgTool.h"
7
9
10#include "G4VUserPrimaryGeneratorAction.hh"
11
12// Forward declarations
13// datamodel
14namespace edm4hep {
15class MCParticleCollection;
16}
17
18class SimG4GeantinosFromEdmTool : public AlgTool, virtual public ISimG4EventProviderTool {
19public:
21 SimG4GeantinosFromEdmTool(const std::string& type, const std::string& name, const IInterface* parent);
22
24
25 StatusCode initialize() final;
26
29 virtual G4Event* g4Event() final;
30
31private:
33 mutable DataHandle<edm4hep::MCParticleCollection> m_genParticles{"GenParticles", Gaudi::DataHandle::Reader, this};
34};
35
36#endif
Abstract interface to Geant4 Primary Generator classes.
Definition ISimG4EventProviderTool.h:17
Definition SimG4GeantinosFromEdmTool.h:18
DataHandle< edm4hep::MCParticleCollection > m_genParticles
Handle for the EDM MC particles to be read.
Definition SimG4GeantinosFromEdmTool.h:33
SimG4GeantinosFromEdmTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition SimG4GeantinosFromEdmTool.cpp:22
virtual ~SimG4GeantinosFromEdmTool()
Definition SimG4GeantinosFromEdmTool.cpp:29
StatusCode initialize() final
Definition SimG4GeantinosFromEdmTool.cpp:31
virtual G4Event * g4Event() final
Translates the input (edm4hep::MCParticleCollection) into a G4Event.
Definition SimG4GeantinosFromEdmTool.cpp:33
Definition EventInformation.h:10