k4SimGeant4
Loading...
Searching...
No Matches
EventInformation.h
Go to the documentation of this file.
1#ifndef SIMG4COMMON_EVENTINFORMATION_H
2#define SIMG4COMMON_EVENTINFORMATION_H
3
4#include "G4VUserEventInformation.hh"
5
6#include <iostream>
7#include <map>
8
9class G4Track;
10namespace edm4hep {
11class MCParticleCollection;
12}
13
23namespace sim {
24class EventInformation : public G4VUserEventInformation {
25public:
29 virtual ~EventInformation() = default;
34 void setCollections( edm4hep::MCParticleCollection*& aMcParticleCollection);
36 void addParticle(const G4Track* aSecondary);
37
38 void Print() const {};
39
40private:
42 edm4hep::MCParticleCollection* m_mcParticles;
44 std::map<size_t, size_t> m_g4IdToEndVertexMap;
45};
46}
47#endif /* define SIMG4COMMON_EVENTINFORMATION_H */
Additional event information.
Definition EventInformation.h:24
void setCollections(edm4hep::MCParticleCollection *&aMcParticleCollection)
Set external pointers to point at the particle and vertex collections.
Definition EventInformation.cpp:14
edm4hep::MCParticleCollection * m_mcParticles
Pointer to the particle collection, ownership is intended to be transfered to SaveTool.
Definition EventInformation.h:42
void Print() const
Definition EventInformation.h:38
EventInformation()
Default constructor.
Definition EventInformation.cpp:10
std::map< size_t, size_t > m_g4IdToEndVertexMap
Map to get the edm end vertex id from a Geant4 unique particle ID.
Definition EventInformation.h:44
void addParticle(const G4Track *aSecondary)
Add a particle to be tracked in the EDM collections.
Definition EventInformation.cpp:19
virtual ~EventInformation()=default
Destructor.
Definition EventInformation.h:10
Conversion between units.
Definition ConstantField.h:14