EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::PrimaryGeneratorAction Class Referencefinal

configures the run More...

#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/PrimaryGeneratorAction.hpp>

+ Inheritance diagram for ActsExamples::PrimaryGeneratorAction:
+ Collaboration diagram for ActsExamples::PrimaryGeneratorAction:

Classes

struct  Config
 

Public Member Functions

 PrimaryGeneratorAction (const Config &cfg)
 Construct the action and ensure singleton usage.
 
 ~PrimaryGeneratorAction () finaloverride
 
void GeneratePrimaries (G4Event *) finaloverride
 Interface method to generate the primary.
 
const G4ThreeVector & direction () const
 Access method to get the initial direction.
 
const G4ThreeVector & position () const
 Access method to get the initial position.
 

Static Public Member Functions

static PrimaryGeneratorActioninstance ()
 Static access method.
 

Private Attributes

Config m_cfg
 The config class.
 
std::unique_ptr< G4ParticleGun > m_particleGun
 Pointer to the G4 particle gun.
 
G4ThreeVector m_position
 position to be returned
 
G4ThreeVector m_direction
 direction to be returned
 

Static Private Attributes

static PrimaryGeneratorActions_instance = nullptr
 Instance of the PrimaryGeneratorAction.
 

Detailed Description

configures the run

The PrimaryGeneratorAction is the implementation of the Geant4 class G4VUserPrimaryGeneratorAction. It generates a random direction and shoots a geantino.

Definition at line 32 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 32 of file PrimaryGeneratorAction.hpp

Constructor & Destructor Documentation

PrimaryGeneratorAction::PrimaryGeneratorAction ( const Config cfg)
PrimaryGeneratorAction::~PrimaryGeneratorAction ( )
finaloverride

Definition at line 53 of file PrimaryGeneratorAction.cpp.

View newest version in sPHENIX GitHub at line 53 of file PrimaryGeneratorAction.cpp

References s_instance.

Member Function Documentation

const G4ThreeVector& ActsExamples::PrimaryGeneratorAction::direction ( ) const
inline

Access method to get the initial direction.

Definition at line 74 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 74 of file PrimaryGeneratorAction.hpp

References m_direction.

Referenced by ActsExamples::EventAction::EndOfEventAction().

+ Here is the caller graph for this function:

PrimaryGeneratorAction * PrimaryGeneratorAction::instance ( )
static

Static access method.

Definition at line 25 of file PrimaryGeneratorAction.cpp.

View newest version in sPHENIX GitHub at line 25 of file PrimaryGeneratorAction.cpp

References s_instance.

Referenced by ActsExamples::EventAction::EndOfEventAction().

+ Here is the caller graph for this function:

const G4ThreeVector& ActsExamples::PrimaryGeneratorAction::position ( ) const
inline

Access method to get the initial position.

Definition at line 77 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 77 of file PrimaryGeneratorAction.hpp

References m_position.

Member Data Documentation

Config ActsExamples::PrimaryGeneratorAction::m_cfg
private

The config class.

Definition at line 81 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 81 of file PrimaryGeneratorAction.hpp

Referenced by GeneratePrimaries(), and PrimaryGeneratorAction().

G4ThreeVector ActsExamples::PrimaryGeneratorAction::m_direction
private

direction to be returned

Definition at line 91 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 91 of file PrimaryGeneratorAction.hpp

Referenced by direction(), and GeneratePrimaries().

std::unique_ptr<G4ParticleGun> ActsExamples::PrimaryGeneratorAction::m_particleGun
private

Pointer to the G4 particle gun.

Definition at line 87 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 87 of file PrimaryGeneratorAction.hpp

Referenced by GeneratePrimaries(), and PrimaryGeneratorAction().

G4ThreeVector ActsExamples::PrimaryGeneratorAction::m_position
private

position to be returned

Definition at line 89 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 89 of file PrimaryGeneratorAction.hpp

Referenced by GeneratePrimaries(), and position().

PrimaryGeneratorAction * PrimaryGeneratorAction::s_instance = nullptr
staticprivate

Instance of the PrimaryGeneratorAction.

Definition at line 84 of file PrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 84 of file PrimaryGeneratorAction.hpp

Referenced by instance(), PrimaryGeneratorAction(), and ~PrimaryGeneratorAction().


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