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) {
G4DLLIMPORT std::ostream G4cout
G4DecayTableMessenger(G4ParticleTable *pTable=0)
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
virtual ~G4DecayTableMessenger()
virtual G4String GetCurrentValue(G4UIcommand *command)
G4VDecayChannel * GetDecayChannel(G4int index) const
G4DecayTable * GetDecayTable() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4String ConvertToString(G4bool boolVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
G4String GetCurrentStringValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
static G4UImanager * GetUIpointer()
void SetBR(G4double value)