BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Generates primary particle vertices using BDSBunch. More...
#include <BDSLinkPrimaryGeneratorAction.hh>
Public Member Functions | |
BDSLinkPrimaryGeneratorAction (BDSBunch *bunchIn, int *currentElementIndexIn, BDSLinkDetectorConstruction *constructionIn, G4bool debugIn=false) | |
Bunch must have a valid particle definition (ie not nullptr). | |
virtual void | GeneratePrimaries (G4Event *) |
Main interface for Geant4. Prepare primary(ies) for the event. | |
void | SetWorldExtent (const BDSExtent worldExtentIn) |
Set the world extent that particle coordinates will be checked against. | |
Private Attributes | |
BDSBunch * | bunch |
BDSIM particle generator. | |
int * | currentElementIndex |
External integer for which element to track in. | |
BDSLinkDetectorConstruction * | construction |
Cache of detector construction for link registry of transforms. | |
G4bool | debug |
G4ParticleGun * | particleGun |
Geant4 particle gun that creates single particles. | |
BDSExtent | worldExtent |
World extent that particle coordinates are checked against to ensure they're inside it. | |
Generates primary particle vertices using BDSBunch.
Definition at line 39 of file BDSLinkPrimaryGeneratorAction.hh.
BDSLinkPrimaryGeneratorAction::BDSLinkPrimaryGeneratorAction | ( | BDSBunch * | bunchIn, |
int * | currentElementIndexIn, | ||
BDSLinkDetectorConstruction * | constructionIn, | ||
G4bool | debugIn = false |
||
) |
Bunch must have a valid particle definition (ie not nullptr).
Definition at line 38 of file BDSLinkPrimaryGeneratorAction.cc.
References particleGun.
|
virtual |
Definition at line 55 of file BDSLinkPrimaryGeneratorAction.cc.
|
virtual |
Main interface for Geant4. Prepare primary(ies) for the event.
Definition at line 60 of file BDSLinkPrimaryGeneratorAction.cc.
References BDSParticleCoords::ApplyOffset(), BDSParticleCoords::ApplyTransform(), bunch, BDSParticleDefinition::Charge(), construction, currentElementIndex, BDSExtent::Encompasses(), BDSBunch::GetNextParticleLocal(), BDSLinkDetectorConstruction::LinkRegistry(), BDSParticleDefinition::Mass(), BDSBunch::ParticleDefinition(), BDSParticleDefinition::ParticleDefinition(), particleGun, BDSEventInfo::SetSeedStateAtStart(), BDSException::what(), and worldExtent.
|
inline |
Set the world extent that particle coordinates will be checked against.
Definition at line 53 of file BDSLinkPrimaryGeneratorAction.hh.
References worldExtent.
Referenced by BDSLinkDetectorConstruction::UpdateWorldSolid().
|
private |
BDSIM particle generator.
Definition at line 57 of file BDSLinkPrimaryGeneratorAction.hh.
Referenced by GeneratePrimaries().
|
private |
Cache of detector construction for link registry of transforms.
Definition at line 59 of file BDSLinkPrimaryGeneratorAction.hh.
Referenced by GeneratePrimaries().
|
private |
External integer for which element to track in.
Definition at line 58 of file BDSLinkPrimaryGeneratorAction.hh.
Referenced by GeneratePrimaries().
|
private |
Definition at line 60 of file BDSLinkPrimaryGeneratorAction.hh.
|
private |
Geant4 particle gun that creates single particles.
Definition at line 61 of file BDSLinkPrimaryGeneratorAction.hh.
Referenced by BDSLinkPrimaryGeneratorAction(), and GeneratePrimaries().
|
private |
World extent that particle coordinates are checked against to ensure they're inside it.
Definition at line 64 of file BDSLinkPrimaryGeneratorAction.hh.
Referenced by GeneratePrimaries(), and SetWorldExtent().