59 :theParticleTable(pTable)
66 thisDirectory =
new G4UIdirectory(
"/particle/property/decay/");
67 thisDirectory->
SetGuidance(
"Decay Table control commands.");
71 selectCmd->
SetGuidance(
"Enter index of decay mode.");
79 dumpCmd->
SetGuidance(
"Dump decay mode information.");
83 brCmd->
SetGuidance(
"Set branching ratio. [0< BR <1.0]");
85 brCmd->
SetRange(
"(br >=0.0) && (br <=1.0)");
99 if (SetCurrentParticle()==0) {
100 G4cout <<
"Particle is not selected yet !! Command ignored." <<
G4endl;
103 if (currentDecayTable==0) {
104 G4cout <<
"The particle has no decay table !! Command ignored." <<
G4endl;
108 if( command == dumpCmd ){
112 }
else if ( command == selectCmd ){
116 if ( currentChannel == 0 ) {
119 idxCurrentChannel =
index;
123 if ( currentChannel == 0 ) {
124 G4cout <<
"Select a decay channel. Command ignored." <<
G4endl;
127 if (command == brCmd) {
130 if( (br<0.0) || (br>1.0) ) {
131 G4cout <<
"Invalid brancing ratio. Command ignored." <<
G4endl;
133 currentChannel->
SetBR(br);
148 if (currentParticle != 0 ){
151 currentParticle = theParticleTable->
FindParticle(particleName);
152 idxCurrentChannel = -1;
153 currentDecayTable = 0;
156 return currentParticle;
159 currentParticle = theParticleTable->
FindParticle(particleName);
160 idxCurrentChannel = -1;
161 currentDecayTable = 0;
164 if (currentParticle != 0 ){
166 if ((currentDecayTable != 0 ) && (idxCurrentChannel >0) ) {
167 currentChannel = currentDecayTable->
GetDecayChannel(idxCurrentChannel);
169 idxCurrentChannel = -1;
173 return currentParticle;
180 if (SetCurrentParticle()==0) {
185 if( command == selectCmd ){
189 }
else if( command == brCmd ){
190 if ( currentChannel != 0) {
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetBR(G4double value)
G4String GetCurrentStringValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
virtual G4String GetCurrentValue(G4UIcommand *command)
static G4String ConvertToString(G4bool boolVal)
G4VDecayChannel * GetDecayChannel(G4int index) const
const G4String & GetParticleName() const
static G4UImanager * GetUIpointer()
G4DecayTable * GetDecayTable() const
G4GLOB_DLL std::ostream G4cout
virtual ~G4DecayTableMessenger()
static G4double GetNewDoubleValue(const char *paramString)
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
static G4ParticleTable * GetParticleTable()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
G4DecayTableMessenger(G4ParticleTable *pTable=0)