DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Private Attributes | List of all members
dd4hep::sim::Geant4ParticleInformation Class Reference

Wrapper to store user information in a G4Track. More...

#include <Geant4ParticleInformation.h>

Inheritance diagram for dd4hep::sim::Geant4ParticleInformation:
G4VUserTrackInformation

Public Member Functions

 Geant4ParticleInformation ()=default
 Default Constructor. More...
 
template<typename EXTENSION_TYPE >
 Geant4ParticleInformation (EXTENSION_TYPE *data)
 Initializing Constructor. More...
 
template<typename EXTENSION_TYPE >
 Geant4ParticleInformation (std::unique_ptr< EXTENSION_TYPE > &&data)
 Initializing Constructor. More...
 
 Geant4ParticleInformation (Geant4ParticleInformation &&copy)=default
 Move constructor. More...
 
 Geant4ParticleInformation (const Geant4ParticleInformation &copy)=delete
 Disable copy constructor. More...
 
Geant4ParticleInformationoperator= (Geant4ParticleInformation &&copy)=default
 Move assignemtn operator. More...
 
Geant4ParticleInformationoperator= (const Geant4ParticleInformation &copy)=delete
 Disable copy assignment. More...
 
virtual ~Geant4ParticleInformation ()=default
 Default destructor. More...
 
void set (ParticleExtension *data)
 Attach information. More...
 
template<typename EXTENSION_TYPE >
void set (std::unique_ptr< EXTENSION_TYPE > &&data)
 Attach information. More...
 
template<typename EXTENSION_TYPE >
EXTENSION_TYPE * get ()
 
ParticleExtensionget ()
 
ParticleExtensionrelease ()
 

Private Attributes

std::unique_ptr< ParticleExtensionextension
 Keep track of the user data. More...
 

Detailed Description

Wrapper to store user information in a G4Track.

Wrapper to store user information in a G4Track. The data of type ParticleExtension is moved from the G4Track to the Geant4Particle in the Geant4ParticleHandler if present. This automatically make the G4Track instance persistent as a Geant4Particle. Hence: Be careful to not assign the entity by default!

The data in the subclass of ParticleExtension defined by the user requires a dictionary to be stored to ROOT.

Author
M.Frank
Version
1.0

Definition at line 48 of file Geant4ParticleInformation.h.

Constructor & Destructor Documentation

◆ Geant4ParticleInformation() [1/5]

dd4hep::sim::Geant4ParticleInformation::Geant4ParticleInformation ( )
default

Default Constructor.

◆ Geant4ParticleInformation() [2/5]

template<typename EXTENSION_TYPE >
dd4hep::sim::Geant4ParticleInformation::Geant4ParticleInformation ( EXTENSION_TYPE *  data)
inline

Initializing Constructor.

Definition at line 100 of file Geant4ParticleInformation.h.

◆ Geant4ParticleInformation() [3/5]

template<typename EXTENSION_TYPE >
dd4hep::sim::Geant4ParticleInformation::Geant4ParticleInformation ( std::unique_ptr< EXTENSION_TYPE > &&  data)
inline

Initializing Constructor.

Definition at line 93 of file Geant4ParticleInformation.h.

◆ Geant4ParticleInformation() [4/5]

dd4hep::sim::Geant4ParticleInformation::Geant4ParticleInformation ( Geant4ParticleInformation &&  copy)
default

Move constructor.

◆ Geant4ParticleInformation() [5/5]

dd4hep::sim::Geant4ParticleInformation::Geant4ParticleInformation ( const Geant4ParticleInformation copy)
delete

Disable copy constructor.

◆ ~Geant4ParticleInformation()

virtual dd4hep::sim::Geant4ParticleInformation::~Geant4ParticleInformation ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ get() [1/2]

template<typename EXTENSION_TYPE >
EXTENSION_TYPE* dd4hep::sim::Geant4ParticleInformation::get ( )
inline

Definition at line 80 of file Geant4ParticleInformation.h.

◆ get() [2/2]

ParticleExtension* dd4hep::sim::Geant4ParticleInformation::get ( )
inline

Definition at line 83 of file Geant4ParticleInformation.h.

◆ operator=() [1/2]

Geant4ParticleInformation& dd4hep::sim::Geant4ParticleInformation::operator= ( const Geant4ParticleInformation copy)
delete

Disable copy assignment.

◆ operator=() [2/2]

Geant4ParticleInformation& dd4hep::sim::Geant4ParticleInformation::operator= ( Geant4ParticleInformation &&  copy)
default

Move assignemtn operator.

◆ release()

ParticleExtension* dd4hep::sim::Geant4ParticleInformation::release ( )
inline

Definition at line 86 of file Geant4ParticleInformation.h.

◆ set() [1/2]

void dd4hep::sim::Geant4ParticleInformation::set ( ParticleExtension data)
inline

Attach information.

Definition at line 73 of file Geant4ParticleInformation.h.

◆ set() [2/2]

template<typename EXTENSION_TYPE >
void dd4hep::sim::Geant4ParticleInformation::set ( std::unique_ptr< EXTENSION_TYPE > &&  data)
inline

Attach information.

Definition at line 77 of file Geant4ParticleInformation.h.

Member Data Documentation

◆ extension

std::unique_ptr<ParticleExtension> dd4hep::sim::Geant4ParticleInformation::extension
private

Keep track of the user data.

Definition at line 50 of file Geant4ParticleInformation.h.


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