Constructor. 
   17     _gunGenerator(gunGenerator) {
 
   19   G4String gunDir(
"/GGS/generatorActions/gun/");
 
   22   _gunDir = 
new G4UIdirectory(gunDir.data());
 
   23   _gunDir->SetGuidance(
"Gun primary generator control");
 
   25   _checkAcceptance = 
new G4UIcmdWithAString((gunDir + 
"checkAcceptance").data(), 
this);
 
   26   _checkAcceptance->SetGuidance(
 
   27       "When random ON, shoot randomly inside detector volume (true) or in all random directions (false)");
 
   28   _checkAcceptance->SetGuidance(
"  Choice : true (default), false");
 
   29   _checkAcceptance->SetParameterName(
"insideAcceptance", 
true);
 
   30   _checkAcceptance->SetDefaultValue(
"true");
 
   31   _checkAcceptance->SetCandidates(
"true false");
 
   32   _checkAcceptance->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   34   _positionCmd = 
new G4UIcmdWith3VectorAndUnit((gunDir + 
"position").data(), 
this);
 
   35   _positionCmd->SetGuidance(
"If rndm off, starting position of the particle. Default units:[cm]");
 
   36   _positionCmd->SetParameterName(
"x0", 
"y0", 
"z0", 
false);
 
   37   _positionCmd->SetUnitCategory(
"Length");
 
   38   _positionCmd->SetDefaultUnit(
"cm");
 
   39   _positionCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   41   _minPositionCmd = 
new G4UIcmdWith3VectorAndUnit((gunDir + 
"minPosition").data(), 
this);
 
   42   _minPositionCmd->SetGuidance(
 
   43       "If rndm on, Minimum range for uniform generation in [xmin,xmax]  [ymin,ymax]  [zmin,zmax]  Def. units:[cm]");
 
   44   _minPositionCmd->SetParameterName(
"xmin", 
"ymin", 
"zmin", 
false);
 
   45   _minPositionCmd->SetUnitCategory(
"Length");
 
   46   _minPositionCmd->SetDefaultUnit(
"cm");
 
   47   _minPositionCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   49   _maxPositionCmd = 
new G4UIcmdWith3VectorAndUnit((gunDir + 
"maxPosition").data(), 
this);
 
   50   _maxPositionCmd->SetGuidance(
 
   51       "If rndm on, Maximum range for uniform generation in [xmin,xmax]  [ymin,ymax]  [zmin,zmax]  Def. units:[cm]");
 
   52   _maxPositionCmd->SetParameterName(
"xmax", 
"ymax", 
"zmax", 
false);
 
   53   _maxPositionCmd->SetUnitCategory(
"Length");
 
   54   _maxPositionCmd->SetDefaultUnit(
"cm");
 
   55   _maxPositionCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   57   _energyCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"energy").data(), 
this);
 
   58   _energyCmd->SetGuidance(
"If rndm off, set beam energy [GeV]");
 
   59   _energyCmd->SetParameterName(
"energy", 
false);
 
   60   _energyCmd->SetRange(
"energy>=0.");
 
   61   _energyCmd->SetUnitCategory(
"Energy");
 
   62   _energyCmd->SetDefaultUnit(
"GeV");
 
   63   _energyCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   65   _minEnergyCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"minEnergy").data(), 
this);
 
   66   _minEnergyCmd->SetGuidance(
"If rndm on, set minimum simulated energy [GeV]");
 
   67   _minEnergyCmd->SetParameterName(
"minEnergy", 
false);
 
   68   _minEnergyCmd->SetRange(
"minEnergy>=0.");
 
   69   _minEnergyCmd->SetUnitCategory(
"Energy");
 
   70   _minEnergyCmd->SetDefaultUnit(
"GeV");
 
   71   _minEnergyCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   73   _maxEnergyCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"maxEnergy").data(), 
this);
 
   74   _maxEnergyCmd->SetGuidance(
"If rndm on, set maximum simulated energy [GeV]");
 
   75   _maxEnergyCmd->SetParameterName(
"maxEnergy", 
false);
 
   76   _maxEnergyCmd->SetRange(
"maxEnergy>=0.");
 
   77   _maxEnergyCmd->SetUnitCategory(
"Energy");
 
   78   _maxEnergyCmd->SetDefaultUnit(
"GeV");
 
   79   _maxEnergyCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   81   _spectralIndexCmd = 
new G4UIcmdWithADouble((gunDir + 
"spectralIndex").data(), 
this);
 
   82   _spectralIndexCmd->SetGuidance(
 
   83       "If rndm on, set spectral index for energy power law. If not defined then uniform simulation!");
 
   84   _spectralIndexCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   86   _thetaCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"theta").data(), 
this);
 
   87   _thetaCmd->SetGuidance(
"If rndm off, set theta angle [deg]");
 
   88   _thetaCmd->SetParameterName(
"theta", 
false);
 
   89   _thetaCmd->SetRange(
"theta>=0. && theta<=90.");
 
   90   _thetaCmd->SetUnitCategory(
"Angle");
 
   91   _thetaCmd->SetDefaultUnit(
"deg");
 
   92   _thetaCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
   94   _minThetaCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"minTheta").data(), 
this);
 
   95   _minThetaCmd->SetGuidance(
 
   96       "If rndm 'on', set min theta angle for uniform simulation in [minTheta,maxTheta]. Default unit: deg");
 
   97   _minThetaCmd->SetParameterName(
"minTheta", 
false);
 
   98   _minThetaCmd->SetUnitCategory(
"Angle");
 
   99   _minThetaCmd->SetDefaultUnit(
"deg");
 
  100   _minThetaCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  102   _maxThetaCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"maxTheta").data(), 
this);
 
  103   _maxThetaCmd->SetGuidance(
 
  104       "If rndm 'on', set max theta angle for uniform simulation in [minTheta,maxTheta]. Default unit: deg");
 
  105   _maxThetaCmd->SetParameterName(
"maxTheta", 
false);
 
  106   _maxThetaCmd->SetUnitCategory(
"Angle");
 
  107   _maxThetaCmd->SetDefaultUnit(
"deg");
 
  108   _maxThetaCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  110   _phiCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"phi").data(), 
this);
 
  111   _phiCmd->SetGuidance(
"If rndm off, set phi angle [deg]");
 
  112   _phiCmd->SetParameterName(
"Phi", 
false);
 
  114   _phiCmd->SetUnitCategory(
"Angle");
 
  115   _phiCmd->SetDefaultUnit(
"deg");
 
  116   _phiCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  118   _minPhiCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"minPhi").data(), 
this);
 
  119   _minPhiCmd->SetGuidance(
 
  120       "If rndm 'on', set min Phi angle for uniform simulation in [minPhi,maxPhi]. Default unit: deg");
 
  121   _minPhiCmd->SetParameterName(
"minPhi", 
false);
 
  122   _minPhiCmd->SetUnitCategory(
"Angle");
 
  123   _minPhiCmd->SetDefaultUnit(
"deg");
 
  124   _minPhiCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  126   _maxPhiCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"maxPhi").data(), 
this);
 
  127   _maxPhiCmd->SetGuidance(
 
  128       "If rndm 'on', set max Phi angle for uniform simulation in [minPhi,maxPhi]. Default unit: deg");
 
  129   _maxPhiCmd->SetParameterName(
"maxPhi", 
false);
 
  130   _maxPhiCmd->SetUnitCategory(
"Angle");
 
  131   _maxPhiCmd->SetDefaultUnit(
"deg");
 
  132   _maxPhiCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  134   _gunParticleCmd = 
new G4UIcmdWithAString((gunDir + 
"particle").data(), 
this);
 
  135   _gunParticleCmd->SetGuidance(
"Particle to shoot.");
 
  136   _gunParticleCmd->SetGuidance(
"  Eg. e+, proton, mu-");
 
  137   _gunParticleCmd->SetParameterName(
"GunParticle", 
false);
 
  138   _gunParticleCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  140   _sphereCenterCmd = 
new G4UIcmdWith3VectorAndUnit((gunDir + 
"sphereCenter").data(), 
this);
 
  141   _sphereCenterCmd->SetGuidance(
"Center of generation sphere. Default unit: cm");
 
  142   _sphereCenterCmd->SetParameterName(
"sphereCenterX", 
"sphereCenterY", 
"sphereCenterZ", 
false);
 
  143   _sphereCenterCmd->SetUnitCategory(
"Length");
 
  144   _sphereCenterCmd->SetDefaultUnit(
"cm");
 
  145   _sphereCenterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  147   _sphereCapPositionCmd = 
new G4UIcmdWith3VectorAndUnit((gunDir + 
"sphereCapPosition").data(), 
this);
 
  148   _sphereCapPositionCmd->SetGuidance(
 
  149       "Position of the center of the spherical cap particle generator with respect to the sphere center. Default unit: cm");
 
  150   _sphereCapPositionCmd->SetParameterName(
"sphereCapPositionX", 
"sphereCapPositionY", 
"sphereCapPositionZ", 
false);
 
  151   _sphereCapPositionCmd->SetUnitCategory(
"Length");
 
  152   _sphereCapPositionCmd->SetDefaultUnit(
"cm");
 
  153   _sphereCapPositionCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 
  155   _sphereCapExtensionCmd = 
new G4UIcmdWithADoubleAndUnit((gunDir + 
"sphereCapExtension").data(), 
this);
 
  156   _sphereCapExtensionCmd->SetGuidance(
 
  157       "Angular half-width of the spherical cap particle generator with respect to the sphere center. Default unit: deg");
 
  158   _sphereCapExtensionCmd->SetParameterName(
"sphereCapExtension", 
false);
 
  159   _sphereCapExtensionCmd->SetUnitCategory(
"Angle");
 
  160   _sphereCapExtensionCmd->SetDefaultUnit(
"deg");
 
  161   _sphereCapExtensionCmd->AvailableForStates(G4State_PreInit, G4State_Idle);