49 generatorInput(
singleFixed), verboseLevel(0), n_particle(1),
50 particleName(
"pi-"), particleEnergy(100*
GeV), particlePosition(0.,0.,0.),
98 G4double theta = std::atan(std::exp(-eta))*2.;
99 G4double randomX = std::sin(theta)*std::cos(phi);
100 G4double randomY = std::sin(theta)*std::sin(phi);
108 << theta/
deg <<
" degree; Phi " << phi/
deg <<
" degree" <<
G4endl;
124 G4cout <<
" scanEtaStep " << scanEtaStep <<
" # of Steps " <<
etaSteps 126 G4cout <<
" scanPhiStep " << scanPhiStep <<
" # of Steps " <<
phiSteps 200 G4cerr <<
"CCalPrimaryGeneratorAction::SetMinimumEnergy: value " << p/
GeV 201 <<
"GeV is out of bounds, it will not be used" <<
G4endl;
207 G4cout <<
" CCalPrimaryGeneratorAction: setting min. value of energy to " 218 G4cerr <<
"CCalPrimaryGeneratorAction::SetMaximumEnergy: value " << p/
GeV 219 <<
"GeV is out of bounds, it will not be used" <<
G4endl;
225 G4cout <<
" CCalPrimaryGeneratorAction: setting max. value of energy to " 235 if (std::fabs(p)>2.*
pi) {
236 G4cerr <<
"CCalPrimaryGeneratorAction::SetMinimumPhi: setting value quite " 238 G4cerr <<
" Should be given in radians - Please check" <<
G4endl;
243 G4cout <<
" CCalPrimaryGeneratorAction: setting min. value of phi to " 253 if (std::fabs(p)>2.*
pi) {
254 G4cerr <<
"CCalPrimaryGeneratorAction::SetMaximumPhi: setting value quite " 256 G4cerr <<
" Should be given in radians - Please check" <<
G4endl;
261 G4cout <<
" CCalPrimaryGeneratorAction: setting max. value of phi to " 272 G4cerr <<
"CCalPrimaryGeneratorAction::SetStepsPhi: value " << val
273 <<
" is out of bounds, it will not be used" <<
G4endl;
279 G4cout <<
" CCalPrimaryGeneratorAction: setting no. of steps in phi to " 292 G4cout <<
" CCalPrimaryGeneratorAction: setting min. value of eta to " 304 G4cout <<
" CCalPrimaryGeneratorAction: setting max. value of eta to " 314 G4cerr<<
"CCalPrimaryGeneratorAction::SetStepsEta: value " << val <<
" is out of bounds, it will not be used"<<
G4endl;
320 G4cout <<
" CCalPrimaryGeneratorAction: setting no. of steps in eta to " 351 <<
"**********************************************************************" <<
G4endl 353 <<
"* CCalPrimaryGeneratorAction DEFAULT Random Energy/Direction setting:*" <<
G4endl 362 <<
"**********************************************************************" <<
G4endl;
365 <<
"**********************************************************************" <<
G4endl 367 <<
"* CCalPrimaryGeneratorAction DEFAULT Scan Direction settings : *" <<
G4endl 375 <<
"**********************************************************************" <<
G4endl;
378 <<
"*******************************************************************" <<
G4endl 380 <<
"* CCalPrimaryGeneratorAction: Current settings : *" <<
G4endl 389 <<
"*******************************************************************" <<
G4endl;
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetVerboseLevel(G4int val)
CLHEP::Hep3Vector G4ThreeVector
void GeneratePrimaries(G4Event *anEvent)
generatorInputType generatorInput
void SetMinimumEta(G4double p)
~CCalPrimaryGeneratorAction()
void SetMaximumEta(G4double p)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4ThreeVector GetParticlePosition()
void SetStepsPhi(G4int val)
virtual void GeneratePrimaryVertex(G4Event *evt)
CCalPrimaryGeneratorAction()
void SetStepsEta(G4int val)
G4ParticleMomentum GetParticleMomentumDirection() const
void SetScan(G4String val)
void SetParticlePosition(G4ThreeVector aPosition)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
void SetRandom(G4String val)
G4double GetParticleEnergy() const
void SetMinimumEnergy(G4double p)
void SetParticleEnergy(G4double aKineticEnergy)
static G4RunManager * GetRunManager()
void SetMinimumPhi(G4double p)
static G4ParticleTable * GetParticleTable()
void SetRunIDCounter(G4int i)
G4int GetNumberOfParticles() const
static const double degree
G4ThreeVector particleDir
CCalPrimaryGeneratorMessenger * gunMessenger
void SetMaximumEnergy(G4double p)
void SetMaximumPhi(G4double p)
void SetGunPosition(const G4ThreeVector &pos) const
G4ParticleDefinition * GetParticleDefinition() const
static const G4double pos
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4GLOB_DLL std::ostream G4cerr
G4ThreeVector particlePosition
G4ParticleGun * particleGun