Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4PrimaryGeneratorAction Class Reference

Primary generator action defined via TVirtualMCStack and TVirtualMCApplication. More...

#include <TG4PrimaryGeneratorAction.h>

Inheritance diagram for TG4PrimaryGeneratorAction:

Public Member Functions

 TG4PrimaryGeneratorAction ()
 
virtual ~TG4PrimaryGeneratorAction ()
 
virtual void GeneratePrimaries (G4Event *event)
 
void SetSkipUnknownParticles (G4bool value)
 Set the option to skip particles which do not exist in Geant4.
 
G4bool GetSkipUnknownParticles () const
 Return the option to skip particles which do not exist in Geant4.
 
- Public Member Functions inherited from TG4Verbose
 TG4Verbose (const G4String &cmdName)
 
 TG4Verbose (const G4String &cmdName, G4int verboseLevel)
 
virtual ~TG4Verbose ()
 
virtual void VerboseLevel (G4int level)
 
virtual G4int VerboseLevel () const
 

Private Member Functions

G4bool CheckVMCStack (TVirtualMCStack *stack) const
 
G4bool CheckParticleDefinition (const G4ParticleDefinition *particleDefinition, const TParticle *particle) const
 
G4double GetProperCharge (const G4ParticleDefinition *particleDefinition, const TParticle *particle) const
 
G4PrimaryVertex * AddParticleToVertex (G4Event *event, G4PrimaryVertex *vertex, const G4ParticleDefinition *particleDefinition, const G4ThreeVector &position, G4double time, const G4ThreeVector &momentum, G4double energy, const G4ThreeVector &polarization, G4double charge, G4double weight) const
 
void TransformPrimaries (G4Event *event)
 
void TransformTracks (G4Event *event)
 

Private Attributes

TG4PrimaryGeneratorMessengerfMessenger
 Messenger.
 
TG4ParticlesManagerfParticlesManager
 Thread-local particles manager.
 
TG4TrackManagerfTrackManager
 Thread-local track manager.
 
TVirtualMCStack * fMCStack
 Thread-local stacks.
 
TMCManagerStack * fMCManagerStack
 
G4bool fCached
 Flag whether thread-local variables have been cached.
 
G4bool fSkipUnknownParticles
 Option to skip particles which do not exist in Geant4.
 

Detailed Description

Primary generator action defined via TVirtualMCStack and TVirtualMCApplication.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 41 of file TG4PrimaryGeneratorAction.h.

Constructor & Destructor Documentation

◆ TG4PrimaryGeneratorAction()

TG4PrimaryGeneratorAction::TG4PrimaryGeneratorAction ( )

Default constructor

Definition at line 55 of file TG4PrimaryGeneratorAction.cxx.

◆ ~TG4PrimaryGeneratorAction()

TG4PrimaryGeneratorAction::~TG4PrimaryGeneratorAction ( )
virtual

Destructor

Definition at line 71 of file TG4PrimaryGeneratorAction.cxx.

Member Function Documentation

◆ GeneratePrimaries()

void TG4PrimaryGeneratorAction::GeneratePrimaries ( G4Event * event)
virtual

Generate primary particles by the selected generator.

Definition at line 304 of file TG4PrimaryGeneratorAction.cxx.

◆ SetSkipUnknownParticles()

void TG4PrimaryGeneratorAction::SetSkipUnknownParticles ( G4bool value)
inline

Set the option to skip particles which do not exist in Geant4.

Definition at line 92 of file TG4PrimaryGeneratorAction.h.

Referenced by TG4PrimaryGeneratorMessenger::SetNewValue().

◆ GetSkipUnknownParticles()

G4bool TG4PrimaryGeneratorAction::GetSkipUnknownParticles ( ) const
inline

Return the option to skip particles which do not exist in Geant4.

Definition at line 98 of file TG4PrimaryGeneratorAction.h.

◆ CheckVMCStack()

G4bool TG4PrimaryGeneratorAction::CheckVMCStack ( TVirtualMCStack * stack) const
private

Definition at line 83 of file TG4PrimaryGeneratorAction.cxx.

Referenced by TransformPrimaries(), and TransformTracks().

◆ CheckParticleDefinition()

G4bool TG4PrimaryGeneratorAction::CheckParticleDefinition ( const G4ParticleDefinition * particleDefinition,
const TParticle * particle ) const
private

Definition at line 101 of file TG4PrimaryGeneratorAction.cxx.

Referenced by TransformPrimaries(), and TransformTracks().

◆ GetProperCharge()

G4double TG4PrimaryGeneratorAction::GetProperCharge ( const G4ParticleDefinition * particleDefinition,
const TParticle * particle ) const
private

Definition at line 126 of file TG4PrimaryGeneratorAction.cxx.

Referenced by TransformPrimaries(), and TransformTracks().

◆ AddParticleToVertex()

G4PrimaryVertex * TG4PrimaryGeneratorAction::AddParticleToVertex ( G4Event * event,
G4PrimaryVertex * vertex,
const G4ParticleDefinition * particleDefinition,
const G4ThreeVector & position,
G4double time,
const G4ThreeVector & momentum,
G4double energy,
const G4ThreeVector & polarization,
G4double charge,
G4double weight ) const
private

Definition at line 142 of file TG4PrimaryGeneratorAction.cxx.

Referenced by TransformPrimaries(), and TransformTracks().

◆ TransformPrimaries()

void TG4PrimaryGeneratorAction::TransformPrimaries ( G4Event * event)
private

Create a new G4PrimaryVertex objects for each TParticle in the VMC stack.

Definition at line 171 of file TG4PrimaryGeneratorAction.cxx.

Referenced by GeneratePrimaries().

◆ TransformTracks()

void TG4PrimaryGeneratorAction::TransformTracks ( G4Event * event)
private

Create a new G4PrimaryVertex objects for each TParticle in the VMC stack.

Definition at line 229 of file TG4PrimaryGeneratorAction.cxx.

Referenced by GeneratePrimaries().

Member Data Documentation

◆ fMessenger

TG4PrimaryGeneratorMessenger* TG4PrimaryGeneratorAction::fMessenger
private

Messenger.

Definition at line 75 of file TG4PrimaryGeneratorAction.h.

Referenced by TG4PrimaryGeneratorAction(), and ~TG4PrimaryGeneratorAction().

◆ fParticlesManager

TG4ParticlesManager* TG4PrimaryGeneratorAction::fParticlesManager
private

Thread-local particles manager.

Definition at line 77 of file TG4PrimaryGeneratorAction.h.

Referenced by GeneratePrimaries(), GetProperCharge(), TransformPrimaries(), and TransformTracks().

◆ fTrackManager

TG4TrackManager* TG4PrimaryGeneratorAction::fTrackManager
private

Thread-local track manager.

Definition at line 79 of file TG4PrimaryGeneratorAction.h.

Referenced by GeneratePrimaries(), TransformPrimaries(), and TransformTracks().

◆ fMCStack

TVirtualMCStack* TG4PrimaryGeneratorAction::fMCStack
private

Thread-local stacks.

Definition at line 81 of file TG4PrimaryGeneratorAction.h.

Referenced by GeneratePrimaries(), and TransformPrimaries().

◆ fMCManagerStack

TMCManagerStack* TG4PrimaryGeneratorAction::fMCManagerStack
private

Definition at line 82 of file TG4PrimaryGeneratorAction.h.

Referenced by GeneratePrimaries(), and TransformTracks().

◆ fCached

G4bool TG4PrimaryGeneratorAction::fCached
private

Flag whether thread-local variables have been cached.

Definition at line 84 of file TG4PrimaryGeneratorAction.h.

Referenced by GeneratePrimaries().

◆ fSkipUnknownParticles

G4bool TG4PrimaryGeneratorAction::fSkipUnknownParticles
private

Option to skip particles which do not exist in Geant4.

Definition at line 86 of file TG4PrimaryGeneratorAction.h.

Referenced by CheckParticleDefinition(), GetSkipUnknownParticles(), and SetSkipUnknownParticles().


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