EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
configures the run More...
#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/PrimaryGeneratorAction.hpp>
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 PrimaryGeneratorAction * | instance () |
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 PrimaryGeneratorAction * | s_instance = nullptr |
Instance of the PrimaryGeneratorAction. | |
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
PrimaryGeneratorAction::PrimaryGeneratorAction | ( | const Config & | cfg | ) |
Construct the action and ensure singleton usage.
Definition at line 29 of file PrimaryGeneratorAction.cpp.
View newest version in sPHENIX GitHub at line 29 of file PrimaryGeneratorAction.cpp
References ActsExamples::PrimaryGeneratorAction::Config::energy, m_cfg, m_particleGun, particle, ActsExamples::PrimaryGeneratorAction::Config::particleName, ActsExamples::PrimaryGeneratorAction::Config::randomSeed1, ActsExamples::PrimaryGeneratorAction::Config::randomSeed2, and s_instance.
|
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.
|
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().
|
finaloverride |
Interface method to generate the primary.
Definition at line 57 of file PrimaryGeneratorAction.cpp.
View newest version in sPHENIX GitHub at line 57 of file PrimaryGeneratorAction.cpp
References cos(), Acts::VectorHelpers::eta(), ActsExamples::PrimaryGeneratorAction::Config::etaRange, m_cfg, m_direction, m_particleGun, m_position, phi, ActsExamples::PrimaryGeneratorAction::Config::phiRange, ActsExamples::PrimaryGeneratorAction::Config::samplingVariable, theta(), ActsExamples::PrimaryGeneratorAction::Config::vertexPosX, ActsExamples::PrimaryGeneratorAction::Config::vertexPosY, ActsExamples::PrimaryGeneratorAction::Config::vertexPosZ, ActsExamples::PrimaryGeneratorAction::Config::vertexSigmaX, ActsExamples::PrimaryGeneratorAction::Config::vertexSigmaY, and ActsExamples::PrimaryGeneratorAction::Config::vertexSigmaZ.
|
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().
|
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.
|
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().
|
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().
|
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().
|
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().
|
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().