156 }
while (vertex0.
dot(dir0) >= -0.7 * vertex0.
mag());
167 f = std::sin(theta) * std::cos(theta);
177 G4cout <<
"vertexRadius setted to " << xy*0.45 <<
G4endl;
184 G4cout <<
"vertexRadius setted to " << z*0.45 <<
G4endl;
197 if (dir0.
mag() > 0.001)
199 theta0 = dir0.
theta();
207 vertex0.
rotate(theta0+
pi,rotationAxis);
219 pEnergy = y*9.0*
GeV + 1.0*
GeV;
224 pEnergy = std::pow(10,y)*
GeV;
231 f = std::pow(pEnergy * (1/
GeV), -4.);
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4RunManager * GetRunManager()
GammaRayTelPrimaryGeneratorAction()
G4double GetWorldSizeZ() const
CLHEP::Hep3Vector G4ThreeVector
static G4ParticleTable * GetParticleTable()
static constexpr double MeV
void GeneratePrimaryVertex(G4Event *)
const G4String & GetParticleName() const
const GammaRayTelDetectorConstruction * GammaRayTelDetector
double dot(const Hep3Vector &) const
G4ParticleGun * particleGun
void SetParticlePosition(G4ThreeVector aPosition)
void GeneratePrimaries(G4Event *)
GammaRayTelPrimaryGeneratorMessenger * gunMessenger
G4double GetWorldSizeXY() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
static constexpr double twopi
G4GeneralParticleSource * particleSource
static constexpr double halfpi
Hep3Vector & rotate(double, const Hep3Vector &)
~GammaRayTelPrimaryGeneratorAction()
G4double GetParticleEnergy() const
virtual void GeneratePrimaryVertex(G4Event *evt)
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
void SetParticleEnergy(G4double aKineticEnergy)
static constexpr double pi
G4ParticleDefinition * GetParticleDefinition() const
G4ParticleMomentum GetParticleMomentumDirection() const
static constexpr double GeV
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const