59 :rndmFlag(
"off"),nSourceType(0),nSpectrumType(0),sourceGun(false)
92 delete particleSource;
119 switch(nSourceType) {
134 vertex0.
setMag(dVertexRadius);
149 }
while (vertex0.
dot(dir0) >= -0.7 * vertex0.
mag());
160 f = std::sin(theta) * std::cos(theta);
167 if (dVertexRadius > xy*0.5)
170 G4cout <<
"vertexRadius setted to " << xy*0.45 <<
G4endl;
171 dVertexRadius = xy*0.45;
174 if (dVertexRadius > z*0.5)
177 G4cout <<
"vertexRadius setted to " << z*0.45 <<
G4endl;
178 dVertexRadius = z*0.45;
182 vertex0.
setMag(dVertexRadius);
190 if (dir0.
mag() > 0.001)
192 theta0 = dir0.
theta();
200 vertex0.
rotate(theta0+
pi,rotationAxis);
209 switch(nSpectrumType) {
218 f = std::pow(pEnergy * (1/
GeV), -4.);
G4double GetWorldSizeZ() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void GeneratePrimaryVertex(G4Event *)
CLHEP::Hep3Vector G4ThreeVector
double dot(const Hep3Vector &) const
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
void GeneratePrimaries(G4Event *)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
const G4String & GetParticleName() const
static constexpr double twopi
~GammaRayTelPrimaryGeneratorAction()
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParticlePosition(G4ThreeVector aPosition)
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
void SetParticleEnergy(G4double aKineticEnergy)
static G4RunManager * GetRunManager()
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * GetParticleDefinition() const
static constexpr double GeV
static constexpr double MeV
static constexpr double pi
static constexpr double halfpi
G4double GetWorldSizeXY() const
GammaRayTelPrimaryGeneratorAction()
Hep3Vector & rotate(double, const Hep3Vector &)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)