Geant4-11
Public Member Functions | Static Public Member Functions | Protected Attributes
G4VPrimaryGenerator Class Referenceabstract

#include <G4VPrimaryGenerator.hh>

Inheritance diagram for G4VPrimaryGenerator:
G4GeneralParticleSource G4HEPEvtInterface G4ParticleGun G4SingleParticleSource

Public Member Functions

 G4VPrimaryGenerator ()
 
virtual void GeneratePrimaryVertex (G4Event *evt)=0
 
G4ThreeVector GetParticlePosition ()
 
G4double GetParticleTime ()
 
void SetParticlePosition (G4ThreeVector aPosition)
 
void SetParticleTime (G4double aTime)
 
virtual ~G4VPrimaryGenerator ()
 

Static Public Member Functions

static G4bool CheckVertexInsideWorld (const G4ThreeVector &pos)
 

Protected Attributes

G4ThreeVector particle_position
 
G4double particle_time = 0.0
 

Detailed Description

Definition at line 44 of file G4VPrimaryGenerator.hh.

Constructor & Destructor Documentation

◆ G4VPrimaryGenerator()

G4VPrimaryGenerator::G4VPrimaryGenerator ( )

Definition at line 37 of file G4VPrimaryGenerator.cc.

38{;}

◆ ~G4VPrimaryGenerator()

G4VPrimaryGenerator::~G4VPrimaryGenerator ( )
virtual

Definition at line 40 of file G4VPrimaryGenerator.cc.

41{;}

Member Function Documentation

◆ CheckVertexInsideWorld()

G4bool G4VPrimaryGenerator::CheckVertexInsideWorld ( const G4ThreeVector pos)
static

Definition at line 43 of file G4VPrimaryGenerator.cc.

44{
46 -> GetNavigatorForTracking();
47
48 G4VPhysicalVolume* world= navigator-> GetWorldVolume();
49 G4VSolid* solid = world-> GetLogicalVolume()-> GetSolid();
50 EInside qinside = solid-> Inside(pos);
51
52 return (qinside != kInside) ? false : true;
53}
static const G4double pos
static G4TransportationManager * GetTransportationManager()
EInside
Definition: geomdefs.hh:67
@ kInside
Definition: geomdefs.hh:70

References G4TransportationManager::GetTransportationManager(), kInside, write_gdml::navigator, and pos.

◆ GeneratePrimaryVertex()

virtual void G4VPrimaryGenerator::GeneratePrimaryVertex ( G4Event evt)
pure virtual

◆ GetParticlePosition()

G4ThreeVector G4VPrimaryGenerator::GetParticlePosition ( )
inline

Definition at line 60 of file G4VPrimaryGenerator.hh.

60{ return particle_position; }
G4ThreeVector particle_position

References particle_position.

Referenced by export_G4ParticleGun(), and G4ParticleGunMessenger::GetCurrentValue().

◆ GetParticleTime()

G4double G4VPrimaryGenerator::GetParticleTime ( )
inline

Definition at line 61 of file G4VPrimaryGenerator.hh.

61{ return particle_time; }

References particle_time.

Referenced by export_G4ParticleGun(), and G4ParticleGunMessenger::GetCurrentValue().

◆ SetParticlePosition()

void G4VPrimaryGenerator::SetParticlePosition ( G4ThreeVector  aPosition)
inline

◆ SetParticleTime()

void G4VPrimaryGenerator::SetParticleTime ( G4double  aTime)
inline

Field Documentation

◆ particle_position

G4ThreeVector G4VPrimaryGenerator::particle_position
protected

◆ particle_time

G4double G4VPrimaryGenerator::particle_time = 0.0
protected

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