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10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/radioactive_decay/src/G4RadioactiveDecayMessenger.cc (Version 11.3.0) and /processes/hadronic/models/radioactive_decay/src/G4RadioactiveDecayMessenger.cc (Version 3.2)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //////////////////////////////////////////////    
 27 //                                                
 28 //  GEANT4 Class source file                      
 29 //                                                
 30 //  G4RadioactiveDecayMessenger                   
 31 //  Author: D.H. Wright (SLAC)                    
 32 //  Date:   29 August 2017                        
 33 //                                                
 34 //  Based on the code of F. Lei and P.R. Trusc    
 35 //                                                
 36 //////////////////////////////////////////////    
 37                                                   
 38 #include "G4RadioactiveDecayMessenger.hh"         
 39 #include "G4NuclearLevelData.hh"                  
 40 #include "G4VRadioactiveDecay.hh"                 
 41                                                   
 42 #include <sstream>                                
 43 #include "G4HadronicException.hh"                 
 44                                                   
 45                                                   
 46 G4RadioactiveDecayMessenger::G4RadioactiveDeca    
 47 :theRadDecay(ptr)                                 
 48 {                                                 
 49   rdmDirectory = new G4UIdirectory("/process/h    
 50   rdmDirectory->SetGuidance("Controls for the     
 51                                                   
 52   // Command to define the limits on nucleus t    
 53   nucleuslimitsCmd = new G4UIcmdWithNucleusLim    
 54   nucleuslimitsCmd->SetGuidance("Set the atomi    
 55   nucleuslimitsCmd->SetParameterName("AMin","A    
 56                                                   
 57   // Select a logical volume for RDM              
 58   avolumeCmd = new G4UIcmdWithAString("/proces    
 59   avolumeCmd->SetGuidance("Supply a logical vo    
 60   avolumeCmd->SetParameterName("AVolume",false    
 61                                                   
 62   // De-select a logical volume for RDM           
 63   deavolumeCmd = new G4UIcmdWithAString("/proc    
 64   deavolumeCmd->SetGuidance("Supply a logical     
 65   deavolumeCmd->SetParameterName("AVolume",fal    
 66                                                   
 67   // Select all logical volumes for RDM           
 68   allvolumesCmd = new G4UIcmdWithoutParameter(    
 69   allvolumesCmd->SetGuidance(" apply RDM to al    
 70   //  allvolumeCmd->SetParameterName("AddAVolu    
 71                                                   
 72   // De-select all logical volumes for RDM        
 73   deallvolumesCmd = new G4UIcmdWithoutParamete    
 74   deallvolumesCmd->SetGuidance(" RDM is not ap    
 75   //  deallvolumesCmd->SetParameterName("Remov    
 76                                                   
 77   // Command to invoke atomic relaxation or no    
 78   armCmd = new G4UIcmdWithABool("/process/had/    
 79   armCmd->SetGuidance("True: ARM is applied; f    
 80   armCmd->SetParameterName("ApplyARM",true);      
 81   armCmd->SetDefaultValue(true);                  
 82   //armCmd->AvailableForStates(G4State_PreInit    
 83                                                   
 84   // Command to set the directional bias (coll    
 85   colldirCmd = new G4UIcmdWith3Vector("/proces    
 86   colldirCmd->SetGuidance("Supply the directio    
 87   colldirCmd->SetParameterName("X","Y","Z",fal    
 88                                                   
 89   // Command to set the directional bias (coll    
 90   collangleCmd = new G4UIcmdWithADoubleAndUnit    
 91   collangleCmd->SetGuidance("Supply maximum an    
 92   collangleCmd->SetParameterName("HalfAngle",f    
 93   collangleCmd->SetUnitCategory("Angle");         
 94                                                   
 95   // This command setup the verbose level of r    
 96   verboseCmd = new G4UIcmdWithAnInteger("/proc    
 97   verboseCmd->SetGuidance("Set verbose level:     
 98   verboseCmd->SetParameterName("VerboseLevel",    
 99   verboseCmd->SetDefaultValue(1);                 
100   verboseCmd->SetRange("VerboseLevel>=0");        
101                                                   
102   // Use a user-defined decay datafile for a g    
103   userDecayDataCmd = new G4UIcommand("/process    
104   userDecayDataCmd->SetGuidance("Supply user-d    
105   G4UIparameter* Z_para= new G4UIparameter("Z_    
106   Z_para->SetParameterRange("Z_isotope > 0");     
107   Z_para->SetGuidance("Z: Charge number of iso    
108   G4UIparameter* A_para= new G4UIparameter("A_    
109   A_para->SetParameterRange("A_isotope > 1");     
110   A_para->SetGuidance("A: mass number of isoto    
111   G4UIparameter* FileName_para= new G4UIparame    
112   FileName_para->SetGuidance("Name of the user    
113   userDecayDataCmd->SetParameter(Z_para);         
114   userDecayDataCmd->SetParameter(A_para);         
115   userDecayDataCmd->SetParameter(FileName_para    
116                                                   
117   // Use a user-defined evaporation data file     
118   userEvaporationDataCmd = new G4UIcommand("/p    
119   userEvaporationDataCmd->SetGuidance("Supply     
120   G4UIparameter* Zpara= new G4UIparameter("Z_i    
121   Zpara->SetParameterRange("Z_isotope > 0");      
122   Zpara->SetGuidance("Z: Charge number of isot    
123   G4UIparameter* Apara= new G4UIparameter("A_i    
124   Apara->SetParameterRange("A_isotope > 1");      
125   Apara->SetGuidance("A: mass number of isotop    
126   G4UIparameter* FileNamepara= new G4UIparamet    
127   FileNamepara->SetGuidance("Name of the user     
128   userEvaporationDataCmd->SetParameter(Zpara);    
129   userEvaporationDataCmd->SetParameter(Apara);    
130   userEvaporationDataCmd->SetParameter(FileNam    
131                                                   
132   // Command to set the threshold for very lon    
133   // decays of nuclides at rest happening late    
134   thresholdForVeryLongDecayTimeCmd = new G4UIc    
135   thresholdForVeryLongDecayTimeCmd->SetGuidanc    
136   thresholdForVeryLongDecayTimeCmd->SetParamet    
137   thresholdForVeryLongDecayTimeCmd->SetUnitCat    
138 }                                                 
139                                                   
140                                                   
141 G4RadioactiveDecayMessenger::~G4RadioactiveDec    
142 {                                                 
143   delete rdmDirectory;                            
144   delete nucleuslimitsCmd;                        
145   delete verboseCmd;                              
146   delete avolumeCmd;                              
147   delete deavolumeCmd;                            
148   delete allvolumesCmd;                           
149   delete deallvolumesCmd;                         
150   delete armCmd;                                  
151   delete userDecayDataCmd;                        
152   delete userEvaporationDataCmd;                  
153   delete colldirCmd;                              
154   delete collangleCmd;                            
155   delete thresholdForVeryLongDecayTimeCmd;        
156 }                                                 
157                                                   
158                                                   
159 void                                              
160 G4RadioactiveDecayMessenger::SetNewValue(G4UIc    
161 {                                                 
162   if ( command == nucleuslimitsCmd ) {            
163     theRadDecay->                                 
164     SetNucleusLimits( nucleuslimitsCmd->GetNew    
165   } else if ( command == avolumeCmd ) {           
166     theRadDecay->SelectAVolume( newValues );      
167   } else if ( command == deavolumeCmd ) {         
168     theRadDecay->DeselectAVolume( newValues );    
169   } else if ( command == allvolumesCmd ) {        
170     theRadDecay->SelectAllVolumes();              
171   } else if ( command == deallvolumesCmd ) {      
172     theRadDecay->DeselectAllVolumes();            
173   } else if (command == verboseCmd) {             
174     theRadDecay->SetVerboseLevel(verboseCmd->G    
175   } else if (command == armCmd) {                 
176     theRadDecay->SetARM(armCmd->GetNewBoolValu    
177   } else if ( command == userDecayDataCmd ) {     
178     G4int Z,A;                                    
179     G4String file_name;                           
180     const char* nv = (const char*)newValues;      
181     std::istringstream is(nv);                    
182     is >> Z >> A >> file_name;                    
183     theRadDecay->AddUserDecayDataFile(Z,A,file    
184   } else if ( command == userEvaporationDataCm    
185     G4int Z,A;                                    
186     G4String file_name;                           
187     const char* nv = (const char*)newValues;      
188     std::istringstream is(nv);                    
189     is >> Z >> A >> file_name;                    
190     G4NuclearLevelData::GetInstance()->AddPriv    
191   } else if ( command == colldirCmd ) {           
192     theRadDecay->SetDecayDirection( colldirCmd    
193   } else if ( command == collangleCmd ) {         
194     theRadDecay->SetDecayHalfAngle( collangleC    
195   } else if (command == thresholdForVeryLongDe    
196     theRadDecay->SetThresholdForVeryLongDecayT    
197   }                                               
198 }                                                 
199                                                   
200