ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::Geant4::MMPrimaryGeneratorAction Class Reference

configures the run More...

#include <acts/blob/master/Examples/Algorithms/Geant4/include/ACTFW/Plugins/Geant4/MMPrimaryGeneratorAction.hpp>

+ Inheritance diagram for FW::Geant4::MMPrimaryGeneratorAction:
+ Collaboration diagram for FW::Geant4::MMPrimaryGeneratorAction:

Public Member Functions

 MMPrimaryGeneratorAction (const G4String &particleName="geantino", G4double energy=1000.*MeV, G4int randomSeed1=12345, G4int randomSeed2=23456)
 Constructor.
 
 ~MMPrimaryGeneratorAction () override
 Destructor.
 
void GeneratePrimaries (G4Event *) finaloverride
 Interface method to generate the primary.
 
G4ThreeVector direction ()
 Access method to get the initial direction.
 
G4ThreeVector startPosition ()
 Access method to get the start position.
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Static Public Member Functions

static MMPrimaryGeneratorActionInstance ()
 Static access method.
 

Private Attributes

std::unique_ptr< G4ParticleGunfParticleGun
 Pointer to the G4 particle gun.
 
G4ThreeVector m_position
 position to be returned
 
G4ThreeVector m_direction
 direction to be returned
 

Static Private Attributes

static MMPrimaryGeneratorActionfgInstance = nullptr
 Instance of the PrimaryGeneratorAction.
 

Detailed Description

configures the run

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

Definition at line 37 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 37 of file MMPrimaryGeneratorAction.hpp

Constructor & Destructor Documentation

FW::Geant4::MMPrimaryGeneratorAction::MMPrimaryGeneratorAction ( const G4String particleName = "geantino",
G4double  energy = 1000. * MeV,
G4int  randomSeed1 = 12345,
G4int  randomSeed2 = 23456 
)

Constructor.

Definition at line 24 of file MMPrimaryGeneratorAction.cpp.

View newest version in sPHENIX GitHub at line 24 of file MMPrimaryGeneratorAction.cpp

References fgInstance, fParticleGun, G4ParticleTable::GetParticleTable(), CLHEP::HepRandom::getTheEngine(), particle, G4UnitDefinition::PrintUnitsTable(), and CLHEP::HepRandomEngine::setSeed().

+ Here is the call graph for this function:

FW::Geant4::MMPrimaryGeneratorAction::~MMPrimaryGeneratorAction ( )
override

Destructor.

Definition at line 48 of file MMPrimaryGeneratorAction.cpp.

View newest version in sPHENIX GitHub at line 48 of file MMPrimaryGeneratorAction.cpp

Member Function Documentation

G4ThreeVector FW::Geant4::MMPrimaryGeneratorAction::direction ( )
inline

Access method to get the initial direction.

Definition at line 54 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 54 of file MMPrimaryGeneratorAction.hpp

References m_direction.

Referenced by FW::Geant4::MMEventAction::EndOfEventAction().

+ Here is the caller graph for this function:

void FW::Geant4::MMPrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
finaloverridevirtual

Interface method to generate the primary.

Implements G4VUserPrimaryGeneratorAction.

Definition at line 58 of file MMPrimaryGeneratorAction.cpp.

View newest version in sPHENIX GitHub at line 58 of file MMPrimaryGeneratorAction.cpp

References G4UniformRand, M_PI, phi, and theta().

+ Here is the call graph for this function:

FW::Geant4::MMPrimaryGeneratorAction * FW::Geant4::MMPrimaryGeneratorAction::Instance ( )
static

Static access method.

Definition at line 53 of file MMPrimaryGeneratorAction.cpp.

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

Referenced by FW::Geant4::MMEventAction::EndOfEventAction().

+ Here is the caller graph for this function:

G4ThreeVector FW::Geant4::MMPrimaryGeneratorAction::startPosition ( )
inline

Access method to get the start position.

Definition at line 57 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 57 of file MMPrimaryGeneratorAction.hpp

References m_position.

Member Data Documentation

FW::Geant4::MMPrimaryGeneratorAction * FW::Geant4::MMPrimaryGeneratorAction::fgInstance = nullptr
staticprivate

Instance of the PrimaryGeneratorAction.

Definition at line 61 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 61 of file MMPrimaryGeneratorAction.hpp

Referenced by MMPrimaryGeneratorAction().

std::unique_ptr<G4ParticleGun> FW::Geant4::MMPrimaryGeneratorAction::fParticleGun
private

Pointer to the G4 particle gun.

Definition at line 64 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 64 of file MMPrimaryGeneratorAction.hpp

Referenced by MMPrimaryGeneratorAction().

G4ThreeVector FW::Geant4::MMPrimaryGeneratorAction::m_direction
private

direction to be returned

Definition at line 69 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 69 of file MMPrimaryGeneratorAction.hpp

Referenced by direction().

G4ThreeVector FW::Geant4::MMPrimaryGeneratorAction::m_position
private

position to be returned

Definition at line 67 of file MMPrimaryGeneratorAction.hpp.

View newest version in sPHENIX GitHub at line 67 of file MMPrimaryGeneratorAction.hpp

Referenced by startPosition().


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