59 :rndmFlag(
"off"),nSourceType(0),nSpectrumType(0)
95 delete particleSource;
122 switch(nSourceType) {
137 vertex0.
setMag(dVertexRadius);
152 }
while (vertex0.
dot(dir0) >= -0.7 * vertex0.
mag());
163 f = std::sin(theta) * std::cos(theta);
170 if (dVertexRadius > xy*0.5)
173 G4cout <<
"vertexRadius setted to " << xy*0.45 <<
G4endl;
174 dVertexRadius = xy*0.45;
177 if (dVertexRadius > z*0.5)
180 G4cout <<
"vertexRadius setted to " << z*0.45 <<
G4endl;
181 dVertexRadius = z*0.45;
185 vertex0.
setMag(dVertexRadius);
193 if (dir0.
mag() > 0.001)
195 theta0 = dir0.
theta();
203 vertex0.
rotate(theta0+
pi,rotationAxis);
212 switch(nSpectrumType) {
221 f = std::pow(pEnergy * (1/
GeV), -4.);
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void GeneratePrimaryVertex(G4Event *)
CLHEP::Hep3Vector G4ThreeVector
double dot(const Hep3Vector &) const
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
void GeneratePrimaries(G4Event *)
G4double GetWorldSizeXY()
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
~GammaRayTelPrimaryGeneratorAction()
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParticlePosition(G4ThreeVector aPosition)
G4GLOB_DLL std::ostream G4cout
void SetParticleEnergy(G4double aKineticEnergy)
static G4RunManager * GetRunManager()
static G4ParticleTable * GetParticleTable()
GammaRayTelPrimaryGeneratorAction()
Hep3Vector & rotate(double, const Hep3Vector &)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)