Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CexmcParticleGun Class Reference

#include <CexmcParticleGun.hh>

Inheritance diagram for CexmcParticleGun:
Collaboration diagram for CexmcParticleGun:

Public Member Functions

 CexmcParticleGun (CexmcPhysicsManager *physicsManager, G4int nmbOfParticles=1)
 
 ~CexmcParticleGun ()
 
void PrepareForNewEvent (void)
 
const G4ThreeVectorGetOrigPosition (void) const
 
const G4ThreeVectorGetOrigDirection (void) const
 
G4double GetOrigMomentumAmp (void) const
 
void SetOrigPosition (const G4ThreeVector &position, G4bool fromMessenger=true)
 
void SetOrigDirection (const G4ThreeVector &direction, G4bool fromMessenger=true)
 
void SetOrigMomentumAmp (G4double momentumAmp, G4bool fromMessenger=true)
 
void SetBeamParticle (G4ParticleDefinition *particleDefinition, G4bool fromMessenger=true)
 
- Public Member Functions inherited from G4ParticleGun
 G4ParticleGun ()
 
 G4ParticleGun (G4int numberofparticles)
 
 G4ParticleGun (G4ParticleDefinition *particleDef, G4int numberofparticles=1)
 
virtual ~G4ParticleGun ()
 
virtual void GeneratePrimaryVertex (G4Event *evt)
 
void SetParticleDefinition (G4ParticleDefinition *aParticleDefinition)
 
void SetParticleEnergy (G4double aKineticEnergy)
 
void SetParticleMomentum (G4double aMomentum)
 
void SetParticleMomentum (G4ParticleMomentum aMomentum)
 
void SetParticleMomentumDirection (G4ParticleMomentum aMomentumDirection)
 
void SetParticleCharge (G4double aCharge)
 
void SetParticlePolarization (G4ThreeVector aVal)
 
void SetNumberOfParticles (G4int i)
 
G4ParticleDefinitionGetParticleDefinition () const
 
G4ParticleMomentum GetParticleMomentumDirection () const
 
G4double GetParticleEnergy () const
 
G4double GetParticleMomentum () const
 
G4double GetParticleCharge () const
 
G4ThreeVector GetParticlePolarization () const
 
G4int GetNumberOfParticles () const
 
- Public Member Functions inherited from G4VPrimaryGenerator
 G4VPrimaryGenerator ()
 
virtual ~G4VPrimaryGenerator ()
 
G4ThreeVector GetParticlePosition ()
 
G4double GetParticleTime ()
 
void SetParticlePosition (G4ThreeVector aPosition)
 
void SetParticleTime (G4double aTime)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPrimaryGenerator
static G4bool CheckVertexInsideWorld (const G4ThreeVector &pos)
 
- Protected Member Functions inherited from G4ParticleGun
virtual void SetInitialValues ()
 
- Protected Attributes inherited from G4ParticleGun
G4int NumberOfParticlesToBeGenerated
 
G4ParticleDefinitionparticle_definition
 
G4ParticleMomentum particle_momentum_direction
 
G4double particle_energy
 
G4double particle_momentum
 
G4double particle_charge
 
G4ThreeVector particle_polarization
 
- Protected Attributes inherited from G4VPrimaryGenerator
G4ThreeVector particle_position
 
G4double particle_time
 

Detailed Description

Definition at line 55 of file CexmcParticleGun.hh.

Constructor & Destructor Documentation

CexmcParticleGun::CexmcParticleGun ( CexmcPhysicsManager physicsManager,
G4int  nmbOfParticles = 1 
)
explicit

Definition at line 48 of file CexmcParticleGun.cc.

49  :
50  G4ParticleGun( nmbOfParticles ), physicsManager( physicsManager ),
51  origPos( 0, 0, 0 ), origDir( 0, 0, 0 ), origMomentumAmp( 0 ),
52  messenger( NULL )
53 {
54  messenger = new CexmcParticleGunMessenger( this );
55 }
CexmcParticleGun::~CexmcParticleGun ( )

Definition at line 58 of file CexmcParticleGun.cc.

59 {
60  delete messenger;
61 }

Member Function Documentation

const G4ThreeVector & CexmcParticleGun::GetOrigDirection ( void  ) const
inline

Definition at line 113 of file CexmcParticleGun.hh.

114 {
115  return origDir;
116 }

Here is the caller graph for this function:

G4double CexmcParticleGun::GetOrigMomentumAmp ( void  ) const
inline

Definition at line 119 of file CexmcParticleGun.hh.

120 {
121  return origMomentumAmp;
122 }

Here is the caller graph for this function:

const G4ThreeVector & CexmcParticleGun::GetOrigPosition ( void  ) const
inline

Definition at line 107 of file CexmcParticleGun.hh.

108 {
109  return origPos;
110 }

Here is the caller graph for this function:

void CexmcParticleGun::PrepareForNewEvent ( void  )
inline

Definition at line 99 of file CexmcParticleGun.hh.

100 {
101  /* this will prevent G4ParticleGun spam about kinetic energy redefinition */
102  particle_energy = 0.0;
103  particle_momentum = 0.0;
104 }
G4double particle_momentum
G4double particle_energy

Here is the caller graph for this function:

void CexmcParticleGun::SetBeamParticle ( G4ParticleDefinition particleDefinition,
G4bool  fromMessenger = true 
)
inline

Definition at line 157 of file CexmcParticleGun.hh.

159 {
160  if ( fromMessenger )
162 
163  SetParticleDefinition( particleDefinition );
164 }
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)

Here is the call graph for this function:

Here is the caller graph for this function:

void CexmcParticleGun::SetOrigDirection ( const G4ThreeVector direction,
G4bool  fromMessenger = true 
)
inline

Definition at line 135 of file CexmcParticleGun.hh.

137 {
138  if ( fromMessenger )
140 
141  origDir = direction;
142 
143  physicsManager->SetMaxIL( direction );
144 }
void SetMaxIL(const G4ThreeVector &direction)
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)

Here is the call graph for this function:

Here is the caller graph for this function:

void CexmcParticleGun::SetOrigMomentumAmp ( G4double  momentumAmp,
G4bool  fromMessenger = true 
)
inline

Definition at line 147 of file CexmcParticleGun.hh.

149 {
150  if ( fromMessenger )
152 
153  origMomentumAmp = momentumAmp;
154 }
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)

Here is the call graph for this function:

Here is the caller graph for this function:

void CexmcParticleGun::SetOrigPosition ( const G4ThreeVector position,
G4bool  fromMessenger = true 
)
inline

Definition at line 125 of file CexmcParticleGun.hh.

127 {
128  if ( fromMessenger )
130 
131  origPos = position;
132 }
#define position
Definition: xmlparse.cc:622
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)

Here is the call graph for this function:

Here is the caller graph for this function:


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