40 #include "PrimaryGeneratorAction.hh"
120 boundYHalfLength*boundYHalfLength+
121 boundZHalfLength*boundZHalfLength);
123 G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
126 G4ThreeVector positionStart(boundPos.
x()+radius*sinTheta*std::cos(phi),
127 boundPos.
y()+radius*sinTheta*std::sin(phi),
128 boundPos.
z()+radius*cosTheta);
141 (positionDir-positionStart).unit());
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4double GetYHalfLength() const
CLHEP::Hep3Vector G4ThreeVector
static G4ParticleTable * GetParticleTable()
static constexpr double MeV
static constexpr double nm
G4VPhysicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
const G4ThreeVector & GetTranslation() const
void SetParticlePosition(G4ThreeVector aPosition)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
static constexpr double twopi
G4double GetXHalfLength() const
G4GLOB_DLL std::ostream G4cerr
static G4PhysicalVolumeStore * GetInstance()
virtual void GeneratePrimaryVertex(G4Event *evt)
G4VSolid * GetSolid() const
void SetParticleEnergy(G4double aKineticEnergy)
G4ParticleGun * fpParticleGun
void GeneratePrimaries(G4Event *)
G4double GetZHalfLength() const
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
~PrimaryGeneratorAction()
static G4LogicalVolumeStore * GetInstance()
G4LogicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const