ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
B5PrimaryGeneratorAction Class Reference

#include <geant4/tree/geant4-10.6-release/examples/basic/B5/include/B5PrimaryGeneratorAction.hh>

+ Inheritance diagram for B5PrimaryGeneratorAction:
+ Collaboration diagram for B5PrimaryGeneratorAction:

Public Member Functions

 B5PrimaryGeneratorAction ()
 
virtual ~B5PrimaryGeneratorAction ()
 
virtual void GeneratePrimaries (G4Event *)
 
void SetMomentum (G4double val)
 
G4double GetMomentum () const
 
void SetSigmaMomentum (G4double val)
 
G4double GetSigmaMomentum () const
 
void SetSigmaAngle (G4double val)
 
G4double GetSigmaAngle () const
 
void SetRandomize (G4bool val)
 
G4bool GetRandomize () const
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Private Member Functions

void DefineCommands ()
 

Private Attributes

G4ParticleGunfParticleGun
 
G4GenericMessengerfMessenger
 
G4ParticleDefinitionfPositron
 
G4ParticleDefinitionfMuon
 
G4ParticleDefinitionfPion
 
G4ParticleDefinitionfKaon
 
G4ParticleDefinitionfProton
 
G4double fMomentum
 
G4double fSigmaMomentum
 
G4double fSigmaAngle
 
G4bool fRandomizePrimary
 

Detailed Description

Primary generator

A single particle is generated. User can select

  • the initial momentum and angle
  • the momentum and angle spreads
  • random selection of a particle type from proton, kaon+, pi+, muon+, e+

Definition at line 50 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 50 of file B5PrimaryGeneratorAction.hh

Constructor & Destructor Documentation

B5PrimaryGeneratorAction::B5PrimaryGeneratorAction ( )

Definition at line 42 of file B5PrimaryGeneratorAction.cc.

View newest version in sPHENIX GitHub at line 42 of file B5PrimaryGeneratorAction.cc

References DefineCommands(), fKaon, fMuon, fParticleGun, fPion, fPositron, fProton, G4ParticleTable::GetParticleTable(), m, G4ParticleGun::SetParticleDefinition(), and G4VPrimaryGenerator::SetParticlePosition().

+ Here is the call graph for this function:

B5PrimaryGeneratorAction::~B5PrimaryGeneratorAction ( )
virtual

Definition at line 72 of file B5PrimaryGeneratorAction.cc.

View newest version in sPHENIX GitHub at line 72 of file B5PrimaryGeneratorAction.cc

References fMessenger, and fParticleGun.

Member Function Documentation

void B5PrimaryGeneratorAction::DefineCommands ( )
private

Definition at line 122 of file B5PrimaryGeneratorAction.cc.

View newest version in sPHENIX GitHub at line 122 of file B5PrimaryGeneratorAction.cc

References G4GenericMessenger::DeclareProperty(), G4GenericMessenger::DeclarePropertyWithUnit(), fMessenger, fMomentum, fRandomizePrimary, fSigmaAngle, fSigmaMomentum, G4GenericMessenger::Command::SetDefaultValue(), G4GenericMessenger::Command::SetParameterName(), and G4GenericMessenger::Command::SetRange().

Referenced by B5PrimaryGeneratorAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void B5PrimaryGeneratorAction::GeneratePrimaries ( G4Event event)
virtual
G4double B5PrimaryGeneratorAction::GetMomentum ( ) const
inline

Definition at line 59 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 59 of file B5PrimaryGeneratorAction.hh

References fMomentum.

G4bool B5PrimaryGeneratorAction::GetRandomize ( ) const
inline

Definition at line 68 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 68 of file B5PrimaryGeneratorAction.hh

References fRandomizePrimary.

G4double B5PrimaryGeneratorAction::GetSigmaAngle ( ) const
inline

Definition at line 65 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 65 of file B5PrimaryGeneratorAction.hh

References fSigmaAngle.

G4double B5PrimaryGeneratorAction::GetSigmaMomentum ( ) const
inline

Definition at line 62 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 62 of file B5PrimaryGeneratorAction.hh

References fSigmaMomentum.

void B5PrimaryGeneratorAction::SetMomentum ( G4double  val)
inline

Definition at line 58 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 58 of file B5PrimaryGeneratorAction.hh

References fMomentum.

void B5PrimaryGeneratorAction::SetRandomize ( G4bool  val)
inline

Definition at line 67 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 67 of file B5PrimaryGeneratorAction.hh

References fRandomizePrimary.

void B5PrimaryGeneratorAction::SetSigmaAngle ( G4double  val)
inline

Definition at line 64 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 64 of file B5PrimaryGeneratorAction.hh

References fSigmaAngle.

void B5PrimaryGeneratorAction::SetSigmaMomentum ( G4double  val)
inline

Definition at line 61 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 61 of file B5PrimaryGeneratorAction.hh

References fSigmaMomentum.

Member Data Documentation

G4ParticleDefinition* B5PrimaryGeneratorAction::fKaon
private

Definition at line 78 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 78 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4GenericMessenger* B5PrimaryGeneratorAction::fMessenger
private

Definition at line 74 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 74 of file B5PrimaryGeneratorAction.hh

Referenced by DefineCommands(), and ~B5PrimaryGeneratorAction().

G4double B5PrimaryGeneratorAction::fMomentum
private

Definition at line 80 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 80 of file B5PrimaryGeneratorAction.hh

Referenced by DefineCommands(), GeneratePrimaries(), GetMomentum(), and SetMomentum().

G4ParticleDefinition* B5PrimaryGeneratorAction::fMuon
private

Definition at line 76 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 76 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleGun* B5PrimaryGeneratorAction::fParticleGun
private

Definition at line 73 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 73 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), GeneratePrimaries(), and ~B5PrimaryGeneratorAction().

G4ParticleDefinition* B5PrimaryGeneratorAction::fPion
private

Definition at line 77 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 77 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleDefinition* B5PrimaryGeneratorAction::fPositron
private

Definition at line 75 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 75 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleDefinition* B5PrimaryGeneratorAction::fProton
private

Definition at line 79 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 79 of file B5PrimaryGeneratorAction.hh

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4bool B5PrimaryGeneratorAction::fRandomizePrimary
private

Definition at line 83 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 83 of file B5PrimaryGeneratorAction.hh

Referenced by DefineCommands(), GeneratePrimaries(), GetRandomize(), and SetRandomize().

G4double B5PrimaryGeneratorAction::fSigmaAngle
private

Definition at line 82 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 82 of file B5PrimaryGeneratorAction.hh

Referenced by DefineCommands(), GeneratePrimaries(), GetSigmaAngle(), and SetSigmaAngle().

G4double B5PrimaryGeneratorAction::fSigmaMomentum
private

Definition at line 81 of file B5PrimaryGeneratorAction.hh.

View newest version in sPHENIX GitHub at line 81 of file B5PrimaryGeneratorAction.hh

Referenced by DefineCommands(), GeneratePrimaries(), GetSigmaMomentum(), and SetSigmaMomentum().


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