48 :fParticleGun(fPtclGun),fShootIon(false),
49 fAtomicNumber(0),fAtomicMass(0),fIonCharge(0),fIonExciteEnergy(0.0),
50 fIonFloatingLevelBase(
'\0'),fIonEnergyLevel(0)
79 candidateList +=
"ion ";
96 momCmd->
SetGuidance(
"Set momentum. This command is equivalent to two commands /gun/direction and /gun/momentumAmp");
125 polCmd->
SetRange(
"Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1.");
210 if (newValues ==
"ion") {
218 ed <<
"Particle [" << newValues <<
"] is not found.";
227 else if( command==
momCmd )
235 else if( command==
polCmd )
239 else if( command==
ionCmd )
244 ed <<
"Set /gun/particle to ion before using /gun/ion command";
251 depWarn <<
"\nCommand /gun/ionL is deprecated and will be removed in release 10.5.\n"
252 <<
"Use /gun/ion instead.\n";
258 ed <<
"Set /gun/particle to ion before using /gun/ion command";
276 {
G4cerr <<
" G4ParticleGun: was defined in terms of momentum." <<
G4endl; }
284 {
G4cerr <<
" G4ParticleGun: was defined in terms of kinetic energy." <<
G4endl; }
297 else if( command==
polCmd )
301 else if( command==
ionCmd )
367 if (sQ.
isNull()||sQ==
"noFloat")
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void DumpTable(const G4String &particle_name="ALL")
void SetGuidance(const char *aGuidance)
void SetParticleTime(G4double aTime)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
CLHEP::Hep3Vector G4ThreeVector
G4UIcmdWith3VectorAndUnit * momCmd
std::ostringstream G4ExceptionDescription
G4DecayTable * GetDecayTable() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void IonCommand(G4String newValues)
static G4ParticleTable * GetParticleTable()
static G4Geantino * Geantino()
G4UIcmdWithAString * particleCmd
static G4IonTable * GetIonTable()
void SetNewValue(G4UIcommand *command, G4String newValues)
static constexpr double keV
G4UIcmdWithAnInteger * numberCmd
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
G4ParticleTable * particleTable
G4String GetCurrentValue(G4UIcommand *command)
const G4String & GetParticleName() const
void SetRange(const char *rs)
void SetDefaultValue(const char *defVal)
G4UIcmdWithoutParameter * listCmd
void SetParticlePosition(G4ThreeVector aPosition)
G4PTblDicIterator * GetIterator() const
void reset(G4bool ifSkipIon=true)
G4double GetParticleMomentum() const
void IonLevelCommand(G4String newValues)
G4double GetParticleTime()
G4double fIonExciteEnergy
G4int GetNumberOfParticles() const
void SetParameter(G4UIparameter *const newParameter)
void SetDefaultValue(const char *theDefaultValue)
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * energyCmd
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4ThreeVector GetParticlePolarization() const
G4UIcmdWithADoubleAndUnit * timeCmd
void SetParticlePolarization(G4ThreeVector aVal)
~G4ParticleGunMessenger()
G4ParticleGunMessenger(G4ParticleGun *fPtclGun)
void SetCandidates(const char *candidateList)
G4UIcmdWithADoubleAndUnit * momAmpCmd
G4GLOB_DLL std::ostream G4cerr
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4String ConvertToString(G4bool boolVal)
G4UIcmdWith3VectorAndUnit * positionCmd
static constexpr double eplus
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreeVector GetParticlePosition()
G4UIcmdWith3Vector * polCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4double GetParticleEnergy() const
char fIonFloatingLevelBase
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
G4double StoD(G4String s)
static constexpr double cm
void SetParticleEnergy(G4double aKineticEnergy)
G4bool IsShortLived() const
void SetParticleMomentum(G4double aMomentum)
G4UIdirectory * gunDirectory
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4ParticleGun * fParticleGun
void SetDefaultUnit(const char *defUnit)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
G4ParticleDefinition * GetParticleDefinition() const
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParameterCandidates(const char *theString)
void SetNumberOfParticles(G4int i)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWith3Vector * directionCmd
static constexpr double GeV
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
void SetParticleCharge(G4double aCharge)
void SetDefaultUnit(const char *defUnit)