53 : fDetector(detectorConstruction), fRndmFlag(
"off"), fFirst(false),
54 fXvertex(0.), fYvertex(0.), fZvertex(0.),
66 FindParticle(particleName=
"proton"));
95 GetNavigatorForTracking();
105 CreateTouchableHistoryHandle();
108 fGlobal2local = touchable->GetHistory()->GetTopTransform();
134 if (fRndmFlag ==
"on")
138 x0 = r0*std::cos(phi0);
139 y0 = r0*std::sin(phi0);
154 fVertexdefined =
true;
156 G4cout <<
" X coordinate of the primary vertex = " << fXvertex/
mm <<
164 fVertexdefined =
true;
166 G4cout <<
" Y coordinate of the primary vertex = " << fYvertex/
mm <<
174 fVertexdefined =
true;
176 G4cout <<
" Z coordinate of the primary vertex = " << fZvertex/
mm <<
Definition of the F04PrimaryGeneratorAction class.
CLHEP::Hep3Vector G4ThreeVector
virtual void GeneratePrimaries(G4Event *)
Definition of the F04PrimaryGeneratorMessenger class.
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
Definition of the F04DetectorConstruction class.
void SetParticlePosition(G4ThreeVector aPosition)
G4GLOB_DLL std::ostream G4cout
G4double GetTargetRadius()
virtual ~F04PrimaryGeneratorAction()
static G4TransportationManager * GetTransportationManager()
void SetParticleEnergy(G4double aKineticEnergy)
void SetZvertex(G4double z)
static G4ParticleTable * GetParticleTable()
F04PrimaryGeneratorAction(F04DetectorConstruction *)
void SetYvertex(G4double y)
void SetWorldVolume(G4VPhysicalVolume *pWorld)
void SetXvertex(G4double x)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4double GetTargetThickness()
G4VPhysicalVolume * GetWorldVolume() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)