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) {