k4SimGeant4
All Classes Namespaces Files Functions Variables Typedefs Friends Modules Pages
SimG4SaveTrajectory Class Reference

Tool to save Geant4 Trajectory data. More...

#include <SimG4SaveTrajectory.h>

Inheritance diagram for SimG4SaveTrajectory:
Collaboration diagram for SimG4SaveTrajectory:

Public Member Functions

 SimG4SaveTrajectory (const std::string &aType, const std::string &aName, const IInterface *aParent)
 
virtual ~SimG4SaveTrajectory ()
 
virtual StatusCode initialize ()
 Initialize.
 
virtual StatusCode finalize ()
 Finalize.
 
virtual StatusCode saveOutput (const G4Event &aEvent) final
 Save the data output.
 
- Public Member Functions inherited from ISimG4SaveOutputTool
 DeclareInterfaceID (ISimG4SaveOutputTool, 1, 0)
 

Private Attributes

ServiceHandle< IGeoSvc > m_geoSvc
 Pointer to the geometry service.
 
DataHandle< edm4hep::TrackerHit3DCollectionm_trackHits
 Handle for trajectory hits including position information.
 

Detailed Description

Tool to save Geant4 Trajectory data.

Requires Geant to be run with the command "/tracking/storeTrajectory 1". Note that access to trajectories is expensive, so this tool should only be used for debugging and visualisation.

Constructor & Destructor Documentation

◆ SimG4SaveTrajectory()

SimG4SaveTrajectory::SimG4SaveTrajectory ( const std::string & aType,
const std::string & aName,
const IInterface * aParent )
explicit

◆ ~SimG4SaveTrajectory()

SimG4SaveTrajectory::~SimG4SaveTrajectory ( )
virtual

Member Function Documentation

◆ finalize()

StatusCode SimG4SaveTrajectory::finalize ( )
virtual

Finalize.

Returns
status code

◆ initialize()

StatusCode SimG4SaveTrajectory::initialize ( )
virtual

Initialize.

Returns
status code

◆ saveOutput()

StatusCode SimG4SaveTrajectory::saveOutput ( const G4Event & aEvent)
finalvirtual

Save the data output.

Parameters
[in]aEventEvent with data to save.
Returns
status code

Implements ISimG4SaveOutputTool.

Member Data Documentation

◆ m_geoSvc

ServiceHandle<IGeoSvc> SimG4SaveTrajectory::m_geoSvc
private

Pointer to the geometry service.

◆ m_trackHits

DataHandle<edm4hep::TrackerHit3DCollection> SimG4SaveTrajectory::m_trackHits
mutableprivate
Initial value:
{"Hits/Trajectory",
Gaudi::DataHandle::Writer, this}

Handle for trajectory hits including position information.


The documentation for this class was generated from the following files: