k4SimGeant4
Loading...
Searching...
No Matches
SimG4SaveSmearedParticles.h
Go to the documentation of this file.
1#ifndef SIMG4COMPONENTS_G4SAVESMEAREDPARTICLES_H
2#define SIMG4COMPONENTS_G4SAVESMEAREDPARTICLES_H
3
4// Gaudi
5#include "GaudiKernel/AlgTool.h"
6
7// FCCSW
8#include "k4FWCore/DataHandle.h"
10
11#include "edm4hep/RecoMCParticleLinkCollection.h"
12
13// datamodel
14namespace edm4hep {
15class ReconstructedParticleCollection;
16}
17
25class SimG4SaveSmearedParticles : public AlgTool, virtual public ISimG4SaveOutputTool {
26public:
27 explicit SimG4SaveSmearedParticles(const std::string& aType, const std::string& aName, const IInterface* aParent);
32 virtual StatusCode initialize();
36 virtual StatusCode finalize();
42 virtual StatusCode saveOutput(const G4Event& aEvent) final;
43
44private:
46 mutable DataHandle<edm4hep::ReconstructedParticleCollection> m_particles{"RecParticlesSmeared", Gaudi::DataHandle::Writer, this};
48 mutable DataHandle<edm4hep::RecoMCParticleLinkCollection> m_particlesMCparticles{"SmearedParticlesToParticles",
49 Gaudi::DataHandle::Writer, this};
50};
51
52#endif /* SIMG4COMPONENTS_G4SAVESMEAREDPARTICLES_H */
Interface to the output saving tool.
Definition ISimG4SaveOutputTool.h:17
Save 'reconstructed' (smeared) particles.
Definition SimG4SaveSmearedParticles.h:25
virtual ~SimG4SaveSmearedParticles()
Definition SimG4SaveSmearedParticles.cpp:28
DataHandle< edm4hep::ReconstructedParticleCollection > m_particles
Handle for the particles to be written.
Definition SimG4SaveSmearedParticles.h:46
virtual StatusCode finalize()
Finalize.
Definition SimG4SaveSmearedParticles.cpp:32
DataHandle< edm4hep::RecoMCParticleLinkCollection > m_particlesMCparticles
Handle for the associations between particles and MC particles to be written.
Definition SimG4SaveSmearedParticles.h:48
SimG4SaveSmearedParticles(const std::string &aType, const std::string &aName, const IInterface *aParent)
Definition SimG4SaveSmearedParticles.cpp:19
virtual StatusCode initialize()
Initialize.
Definition SimG4SaveSmearedParticles.cpp:30
virtual StatusCode saveOutput(const G4Event &aEvent) final
Save the data output.
Definition SimG4SaveSmearedParticles.cpp:34
Definition EventInformation.h:10