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

#include <geant4/tree/geant4-10.6-release/examples/advanced/medical_linac/include/ML2PrimaryGenerationAction.hh>

+ Inheritance diagram for CML2PrimaryGenerationAction:
+ Collaboration diagram for CML2PrimaryGenerationAction:

Public Member Functions

 CML2PrimaryGenerationAction (void)
 
 ~CML2PrimaryGenerationAction (void)
 
void design (G4double accTargetZPosition)
 
void GeneratePrimaries (G4Event *anEvent)
 
void inizialize (SPrimaryParticle *primaryParticleData)
 
void setNRecycling (G4int val)
 
void setNLoopsPhSpParticles (G4int val)
 
void setNMaxParticlesInRamPhaseSpace (G4int val)
 
void setGunMeanEnergy (G4double val)
 
void setGunStdEnergy (G4double val)
 
void setGunRadius (G4double val)
 
void setCalculatedPhaseSpaceFileIN (G4String val)
 
void setSourceTypeName (G4String val)
 
void setRotation (G4RotationMatrix *val)
 
G4int getNrecycling ()
 
G4int getSourceTypeName ()
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Static Public Member Functions

static
CML2PrimaryGenerationAction
GetInstance (void)
 

Private Member Functions

void setGunRandom ()
 
void setGunCalculatedPhaseSpace ()
 
void GenerateFromRandom ()
 
void GenerateFromCalculatedPhaseSpace ()
 
void fillParticlesContainer ()
 
void applySourceRotation ()
 

Private Attributes

G4int nRecycling
 
G4int nLoopsPhSpParticles
 
G4int nMaxParticlesInRamPhaseSpace
 
G4int idParticleSource
 
G4double GunMeanEnergy
 
G4double GunStdEnergy
 
G4double GunRadius
 
G4String calculatedPhaseSpaceFileIN
 
CML2PrimaryGenerationActionMessengerPrimaryGenerationActionMessenger
 
G4double accTargetZPosition
 
G4ThreeVector dir
 
G4ThreeVector pos
 
G4double ek
 
G4RotationMatrixrm
 
G4Timer myTime
 
G4double sinTheta
 
G4double cosTheta
 
G4double phi
 
G4double rho
 
G4double alpha
 
G4ParticleGunparticleGun
 
G4ParticleDefinitiongamma
 
G4ParticleDefinitionelectron
 
G4ParticleDefinitionpositron
 
SPrimaryParticleprimaryParticleData
 
Sparticleparticles
 
Sparticleparticle
 
int nParticle
 
int nPhSpParticles
 
int nRandomParticles
 
int idCurrentParticleSource
 
G4String sourceTypeName
 

Static Private Attributes

static
CML2PrimaryGenerationAction
instance = 0
 

Detailed Description

Definition at line 64 of file ML2PrimaryGenerationAction.hh.

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

Constructor & Destructor Documentation

CML2PrimaryGenerationAction::CML2PrimaryGenerationAction ( void  )

Definition at line 48 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 48 of file ML2PrimaryGenerationAction.cc

Referenced by GetInstance().

+ Here is the caller graph for this function:

CML2PrimaryGenerationAction::~CML2PrimaryGenerationAction ( void  )

Definition at line 109 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 109 of file ML2PrimaryGenerationAction.cc

References particleGun, and particles.

Member Function Documentation

void CML2PrimaryGenerationAction::applySourceRotation ( )
private

Definition at line 192 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 192 of file ML2PrimaryGenerationAction.cc

References dir, pos, and rm.

Referenced by GeneratePrimaries().

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::design ( G4double  accTargetZPosition)

Definition at line 81 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 81 of file ML2PrimaryGenerationAction.cc

References accTargetZPosition, id_phaseSpace, id_randomTarget, setGunCalculatedPhaseSpace(), and setGunRandom().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::fillParticlesContainer ( )
private

Definition at line 197 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 197 of file ML2PrimaryGenerationAction.cc

References a, G4RunManager::AbortRun(), accTargetZPosition, calculatedPhaseSpaceFileIN, d, Sparticle::dir, G4cout, G4endl, G4RunManager::GetRunManager(), in, Sparticle::kinEnergy, nMaxParticlesInRamPhaseSpace, particles, Sparticle::partPDGE, Sparticle::pos, CLHEP::Hep3Vector::set(), x, y, and z.

Referenced by GenerateFromCalculatedPhaseSpace().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::GenerateFromCalculatedPhaseSpace ( )
private

Definition at line 163 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 163 of file ML2PrimaryGenerationAction.cc

References Sparticle::dir, dir, ek, electron, fillParticlesContainer(), gamma, Sparticle::kinEnergy, nMaxParticlesInRamPhaseSpace, nParticle, nPhSpParticles, particleGun, particles, Sparticle::pos, pos, positron, and G4ParticleGun::SetParticleDefinition().

Referenced by GeneratePrimaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::GenerateFromRandom ( )
private

Definition at line 147 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 147 of file ML2PrimaryGenerationAction.cc

References accTargetZPosition, alpha, cosTheta, dir, ek, G4UniformRand, GunMeanEnergy, GunRadius, GunStdEnergy, mm, nRandomParticles, phi, pos, rho, CLHEP::Hep3Vector::set(), CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), CLHEP::Hep3Vector::setZ(), G4INCL::DeJongSpin::shoot(), sinTheta, and twopi.

Referenced by GeneratePrimaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CML2PrimaryGenerationAction * CML2PrimaryGenerationAction::GetInstance ( void  )
static

Definition at line 54 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 54 of file ML2PrimaryGenerationAction.cc

References CML2PrimaryGenerationAction(), and instance.

Referenced by main(), and CML2WorldConstruction::newGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int CML2PrimaryGenerationAction::getNrecycling ( )
inline

Definition at line 95 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 95 of file ML2PrimaryGenerationAction.hh

References nRecycling.

Referenced by main().

+ Here is the caller graph for this function:

G4int CML2PrimaryGenerationAction::getSourceTypeName ( )
inline

Definition at line 96 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 96 of file ML2PrimaryGenerationAction.hh

References idParticleSource.

void CML2PrimaryGenerationAction::inizialize ( SPrimaryParticle primaryParticleData)

Definition at line 62 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 62 of file ML2PrimaryGenerationAction.cc

References electron, G4ParticleTable::FindParticle(), gamma, G4ParticleTable::GetParticleTable(), nParticle, nPhSpParticles, nRandomParticles, particle, particleGun, positron, PrimaryGenerationActionMessenger, primaryParticleData, and rm.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::setCalculatedPhaseSpaceFileIN ( G4String  val)
inline

Definition at line 81 of file ML2PrimaryGenerationAction.hh.

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

References calculatedPhaseSpaceFileIN.

void CML2PrimaryGenerationAction::setGunCalculatedPhaseSpace ( )
private

Definition at line 102 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 102 of file ML2PrimaryGenerationAction.cc

References idCurrentParticleSource, idParticleSource, nMaxParticlesInRamPhaseSpace, particleGun, particles, and G4ParticleGun::SetNumberOfParticles().

Referenced by design().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::setGunMeanEnergy ( G4double  val)
inline

Definition at line 78 of file ML2PrimaryGenerationAction.hh.

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

References GunMeanEnergy.

void CML2PrimaryGenerationAction::setGunRadius ( G4double  val)
inline

Definition at line 80 of file ML2PrimaryGenerationAction.hh.

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

References GunRadius.

void CML2PrimaryGenerationAction::setGunRandom ( )
private

Definition at line 95 of file ML2PrimaryGenerationAction.cc.

View newest version in sPHENIX GitHub at line 95 of file ML2PrimaryGenerationAction.cc

References electron, idCurrentParticleSource, idParticleSource, particleGun, G4ParticleGun::SetNumberOfParticles(), and G4ParticleGun::SetParticleDefinition().

Referenced by design().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::setGunStdEnergy ( G4double  val)
inline

Definition at line 79 of file ML2PrimaryGenerationAction.hh.

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

References GunStdEnergy.

void CML2PrimaryGenerationAction::setNLoopsPhSpParticles ( G4int  val)
inline

Definition at line 75 of file ML2PrimaryGenerationAction.hh.

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

References nLoopsPhSpParticles.

void CML2PrimaryGenerationAction::setNMaxParticlesInRamPhaseSpace ( G4int  val)
inline

Definition at line 76 of file ML2PrimaryGenerationAction.hh.

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

References G4cout, G4endl, and nMaxParticlesInRamPhaseSpace.

void CML2PrimaryGenerationAction::setNRecycling ( G4int  val)
inline

Definition at line 74 of file ML2PrimaryGenerationAction.hh.

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

References nRecycling.

void CML2PrimaryGenerationAction::setRotation ( G4RotationMatrix val)
inline

Definition at line 94 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 94 of file ML2PrimaryGenerationAction.hh

References rm.

Referenced by CML2WorldConstruction::newGeometry().

+ Here is the caller graph for this function:

void CML2PrimaryGenerationAction::setSourceTypeName ( G4String  val)
inline

Definition at line 82 of file ML2PrimaryGenerationAction.hh.

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

References id_phaseSpace, id_randomTarget, and sourceTypeName.

Member Data Documentation

G4double CML2PrimaryGenerationAction::accTargetZPosition
private

Definition at line 113 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 113 of file ML2PrimaryGenerationAction.hh

Referenced by design(), fillParticlesContainer(), and GenerateFromRandom().

G4double CML2PrimaryGenerationAction::alpha
private

Definition at line 121 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 121 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom().

G4String CML2PrimaryGenerationAction::calculatedPhaseSpaceFileIN
private

Definition at line 110 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 110 of file ML2PrimaryGenerationAction.hh

Referenced by fillParticlesContainer(), and setCalculatedPhaseSpaceFileIN().

G4double CML2PrimaryGenerationAction::cosTheta
private

Definition at line 120 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 120 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom().

G4ThreeVector CML2PrimaryGenerationAction::dir
private

Definition at line 115 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 115 of file ML2PrimaryGenerationAction.hh

Referenced by applySourceRotation(), GenerateFromCalculatedPhaseSpace(), GenerateFromRandom(), and GeneratePrimaries().

G4double CML2PrimaryGenerationAction::ek
private

Definition at line 116 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 116 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), GenerateFromRandom(), and GeneratePrimaries().

G4ParticleDefinition* CML2PrimaryGenerationAction::electron
private

Definition at line 124 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 124 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), inizialize(), and setGunRandom().

G4ParticleDefinition* CML2PrimaryGenerationAction::gamma
private

Definition at line 123 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 123 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), and inizialize().

G4double CML2PrimaryGenerationAction::GunMeanEnergy
private

Definition at line 109 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 109 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom(), and setGunMeanEnergy().

G4double CML2PrimaryGenerationAction::GunRadius
private

Definition at line 109 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 109 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom(), and setGunRadius().

G4double CML2PrimaryGenerationAction::GunStdEnergy
private

Definition at line 109 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 109 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom(), and setGunStdEnergy().

int CML2PrimaryGenerationAction::idCurrentParticleSource
private

Definition at line 128 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 128 of file ML2PrimaryGenerationAction.hh

Referenced by GeneratePrimaries(), setGunCalculatedPhaseSpace(), and setGunRandom().

G4int CML2PrimaryGenerationAction::idParticleSource
private

Definition at line 108 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 108 of file ML2PrimaryGenerationAction.hh

Referenced by getSourceTypeName(), setGunCalculatedPhaseSpace(), and setGunRandom().

CML2PrimaryGenerationAction * CML2PrimaryGenerationAction::instance = 0
staticprivate

Definition at line 106 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 106 of file ML2PrimaryGenerationAction.hh

Referenced by GetInstance().

G4Timer CML2PrimaryGenerationAction::myTime
private

Definition at line 119 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 119 of file ML2PrimaryGenerationAction.hh

G4int CML2PrimaryGenerationAction::nLoopsPhSpParticles
private

Definition at line 108 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 108 of file ML2PrimaryGenerationAction.hh

Referenced by setNLoopsPhSpParticles().

G4int CML2PrimaryGenerationAction::nMaxParticlesInRamPhaseSpace
private
int CML2PrimaryGenerationAction::nParticle
private

Definition at line 128 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 128 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), and inizialize().

int CML2PrimaryGenerationAction::nPhSpParticles
private

Definition at line 128 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 128 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), and inizialize().

int CML2PrimaryGenerationAction::nRandomParticles
private

Definition at line 128 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 128 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom(), and inizialize().

G4int CML2PrimaryGenerationAction::nRecycling
private

Definition at line 108 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 108 of file ML2PrimaryGenerationAction.hh

Referenced by GeneratePrimaries(), getNrecycling(), and setNRecycling().

Sparticle * CML2PrimaryGenerationAction::particle
private

Definition at line 127 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 127 of file ML2PrimaryGenerationAction.hh

Referenced by inizialize().

G4ParticleGun* CML2PrimaryGenerationAction::particleGun
private
Sparticle* CML2PrimaryGenerationAction::particles
private
G4double CML2PrimaryGenerationAction::phi
private

Definition at line 120 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 120 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom().

G4ThreeVector CML2PrimaryGenerationAction::pos
private

Definition at line 115 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 115 of file ML2PrimaryGenerationAction.hh

Referenced by applySourceRotation(), GenerateFromCalculatedPhaseSpace(), GenerateFromRandom(), and GeneratePrimaries().

G4ParticleDefinition* CML2PrimaryGenerationAction::positron
private

Definition at line 125 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 125 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromCalculatedPhaseSpace(), and inizialize().

CML2PrimaryGenerationActionMessenger* CML2PrimaryGenerationAction::PrimaryGenerationActionMessenger
private

Definition at line 112 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 112 of file ML2PrimaryGenerationAction.hh

Referenced by inizialize().

SPrimaryParticle* CML2PrimaryGenerationAction::primaryParticleData
private

Definition at line 126 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 126 of file ML2PrimaryGenerationAction.hh

Referenced by GeneratePrimaries(), and inizialize().

G4double CML2PrimaryGenerationAction::rho
private

Definition at line 121 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 121 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom().

G4RotationMatrix* CML2PrimaryGenerationAction::rm
private

Definition at line 117 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 117 of file ML2PrimaryGenerationAction.hh

Referenced by applySourceRotation(), inizialize(), and setRotation().

G4double CML2PrimaryGenerationAction::sinTheta
private

Definition at line 120 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 120 of file ML2PrimaryGenerationAction.hh

Referenced by GenerateFromRandom().

G4String CML2PrimaryGenerationAction::sourceTypeName
private

Definition at line 129 of file ML2PrimaryGenerationAction.hh.

View newest version in sPHENIX GitHub at line 129 of file ML2PrimaryGenerationAction.hh

Referenced by setSourceTypeName().


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