ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
configures the run More...
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 MMPrimaryGeneratorAction * | Instance () |
Static access method. | |
Private Attributes | |
std::unique_ptr< G4ParticleGun > | fParticleGun |
Pointer to the G4 particle gun. | |
G4ThreeVector | m_position |
position to be returned | |
G4ThreeVector | m_direction |
direction to be returned | |
Static Private Attributes | |
static MMPrimaryGeneratorAction * | fgInstance = nullptr |
Instance of the PrimaryGeneratorAction. | |
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
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().
|
override |
Destructor.
Definition at line 48 of file MMPrimaryGeneratorAction.cpp.
View newest version in sPHENIX GitHub at line 48 of file MMPrimaryGeneratorAction.cpp
|
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().
|
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().
|
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().
|
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.
|
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().
|
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().
|
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().
|
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().