#include <G4QMessenger.hh>
Inheritance diagram for G4QMessenger:
Public Member Functions | |
~G4QMessenger () | |
void | Add (G4QNeutrinoPhysics *weak) |
void | Add (G4QPhotoNuclearPhysics *photo) |
void | SetNewValue (G4UIcommand *aComm, G4String aS) |
G4String | GetCurrentValue (G4UIcommand *aComm) |
Static Public Member Functions | |
static G4QMessenger * | GetPointer () |
Definition at line 55 of file G4QMessenger.hh.
G4QMessenger::~G4QMessenger | ( | ) |
Definition at line 64 of file G4QMessenger.cc.
00065 { 00066 delete rootDir; 00067 if(photoDir) 00068 { 00069 delete photoDir; 00070 delete theSynchR; 00071 delete minGamSR; 00072 delete theGamN; 00073 delete theEleN; 00074 delete theMuoN; 00075 delete theTauN; 00076 delete biasPhotoN; 00077 } 00078 else if(weakDir) 00079 { 00080 delete weakDir; 00081 delete theNuElN; 00082 delete theNuMuN; 00083 delete theNuTaN; 00084 delete biasNuNuc; 00085 } 00086 }
void G4QMessenger::Add | ( | G4QPhotoNuclearPhysics * | photo | ) |
Definition at line 135 of file G4QMessenger.cc.
References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithAString::SetParameterName(), and G4UIcommand::SetRange().
00136 { 00137 thePhoto = photo; 00138 00139 weakDir = new G4UIdirectory("/CHIPS_physics/photoNuclear/"); 00140 weakDir->SetGuidance("weak (neutrino) processes"); 00141 00142 // use G4UIcmdWithADouble for weighting of processes 00143 00144 // command for synchrotron radiation. 00145 theSynchR = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/SynchRadiation",this); 00146 theSynchR->SetGuidance("Switching on/off synchrotron radiation."); 00147 theSynchR->SetParameterName("status",false); 00148 theSynchR->SetCandidates("on off"); 00149 theSynchR->SetDefaultValue("off"); 00150 theSynchR->AvailableForStates(G4State_PreInit, G4State_Idle); 00151 00152 minGamSR = new G4UIcmdWithADouble("/CHIPS_physics/photoNuclear/MinGamma_SynchRad", this); 00153 minGamSR->SetGuidance("Set a minimum gamma for Synchratron Radiation"); 00154 minGamSR->SetParameterName("MinGamma_SynchRad", false); 00155 minGamSR->SetRange("MinGamma_SynchRad >> 1."); 00156 minGamSR->SetDefaultValue(227.); 00157 minGamSR->AvailableForStates(G4State_PreInit, G4State_Idle); 00158 00159 // command for gamma-nuclear physics. 00160 theGamN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/GammaNuclear",this); 00161 theGamN->SetGuidance("Switching of gamma-nuclear physics."); 00162 theGamN->SetParameterName("status",false); 00163 theGamN->SetCandidates("on off"); 00164 theGamN->SetDefaultValue("on"); 00165 theGamN->AvailableForStates(G4State_PreInit, G4State_Idle); 00166 00167 // command for electro-nuclear physics. 00168 theEleN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/ElectroNuclear",this); 00169 theEleN->SetGuidance("Switching of electron-nuclear physics."); 00170 theEleN->SetParameterName("status",false); 00171 theEleN->SetCandidates("on off"); 00172 theEleN->SetDefaultValue("off"); 00173 theEleN->AvailableForStates(G4State_PreInit, G4State_Idle); 00174 00175 // command for muon-nuclear physics. 00176 theMuoN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/MuonNuclear",this); 00177 theMuoN->SetGuidance("Switching of muon nuclear physics."); 00178 theMuoN->SetParameterName("status",false); 00179 theMuoN->SetCandidates("on off"); 00180 theMuoN->SetDefaultValue("off"); 00181 theMuoN->AvailableForStates(G4State_PreInit, G4State_Idle); 00182 00183 // command for tau-nuclear physics. 00184 theTauN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/TauNuclear",this); 00185 theTauN->SetGuidance("Switching of tau nuclear physics."); 00186 theTauN->SetParameterName("status",false); 00187 theTauN->SetCandidates("on off"); 00188 theTauN->SetDefaultValue("off"); 00189 theTauN->AvailableForStates(G4State_PreInit, G4State_Idle); 00190 00191 00192 biasPhotoN = new G4UIcmdWithADouble("/CHIPS_physics/photoNuclear/PhotoN_Biasing", this); 00193 biasPhotoN->SetGuidance("Set a biasing coefficient for photo-nuclear ractions"); 00194 biasPhotoN->SetParameterName("PhotoN_Biasing", false); 00195 biasPhotoN->SetRange("PhotoN_Biasing > 0."); 00196 biasPhotoN->SetDefaultValue(1.); 00197 biasPhotoN->AvailableForStates(G4State_PreInit, G4State_Idle); 00198 }
void G4QMessenger::Add | ( | G4QNeutrinoPhysics * | weak | ) |
Definition at line 95 of file G4QMessenger.cc.
References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithAString::SetParameterName(), and G4UIcommand::SetRange().
Referenced by G4QNeutrinoPhysics::G4QNeutrinoPhysics(), and G4QPhotoNuclearPhysics::G4QPhotoNuclearPhysics().
00096 { 00097 theWeak = weak; 00098 00099 weakDir = new G4UIdirectory("/CHIPS_physics/neutrino/"); 00100 weakDir->SetGuidance("weak (neutrino) processes"); 00101 00102 // commands for neutrino_el-nuclear physics. 00103 theNuElN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuElNuclear",this); 00104 theNuElN->SetGuidance("Switching of nu_el-nuclear physics."); 00105 theNuElN->SetParameterName("status",false); 00106 theNuElN->SetCandidates("on off"); 00107 theNuElN->SetDefaultValue("off"); 00108 theNuElN->AvailableForStates(G4State_PreInit, G4State_Idle); 00109 00110 // commands for neutrino_mu-nuclear physics. 00111 theNuMuN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuMuNuclear",this); 00112 theNuMuN->SetGuidance("Switching of nu_mu-nuclear physics."); 00113 theNuMuN->SetParameterName("status",false); 00114 theNuMuN->SetCandidates("on off"); 00115 theNuMuN->SetDefaultValue("off"); 00116 theNuMuN->AvailableForStates(G4State_PreInit, G4State_Idle); 00117 00118 // commands for neutrino_tau-nuclear physics. 00119 theNuTaN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuTauNuclear",this); 00120 theNuTaN->SetGuidance("Switching of nu_tau-nuclear physics."); 00121 theNuTaN->SetParameterName("status",false); 00122 theNuTaN->SetCandidates("on off"); 00123 theNuTaN->SetDefaultValue("off"); 00124 theNuTaN->AvailableForStates(G4State_PreInit, G4State_Idle); 00125 00126 // command for biasing of neutrino-nuclear reactions 00127 biasNuNuc = new G4UIcmdWithADouble("/CHIPS_physics/neutrino/NuNuc_Biasing", this); 00128 biasNuNuc->SetGuidance("Set a biasing coefficient for neutrino-nuclear ractions"); 00129 biasNuNuc->SetParameterName("NuNuc_Biasing", false); 00130 biasNuNuc->SetRange("NuNuc_Biasing > 0."); 00131 biasNuNuc->SetDefaultValue(1.); 00132 biasNuNuc->AvailableForStates(G4State_PreInit, G4State_Idle); 00133 }
G4String G4QMessenger::GetCurrentValue | ( | G4UIcommand * | aComm | ) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 221 of file G4QMessenger.cc.
References G4QPhotoNuclearPhysics::GetElPosNuclearOnOff(), G4QPhotoNuclearPhysics::GetGammaNuclearOnOff(), G4QPhotoNuclearPhysics::GetMuonNuclearOnOff(), G4QNeutrinoPhysics::GetNuElNuclearOnOff(), G4QNeutrinoPhysics::GetNuMuNuclearOnOff(), G4QNeutrinoPhysics::GetNuTauNuclearOnOff(), G4QPhotoNuclearPhysics::GetSynchRadOnOff(), and G4QPhotoNuclearPhysics::GetTauNuclearOnOff().
00222 { 00223 if(photoDir) 00224 { 00225 if (aComm==theSynchR) return thePhoto->GetSynchRadOnOff(); 00226 else if(aComm==theGamN) return thePhoto->GetGammaNuclearOnOff(); 00227 else if(aComm==theEleN) return thePhoto->GetElPosNuclearOnOff(); 00228 else if(aComm==theMuoN) return thePhoto->GetMuonNuclearOnOff(); 00229 else if(aComm==theTauN) return thePhoto->GetTauNuclearOnOff(); 00230 } 00231 else if(weakDir) 00232 { 00233 if (aComm==theNuElN) return theWeak->GetNuElNuclearOnOff(); 00234 else if(aComm==theNuMuN) return theWeak->GetNuMuNuclearOnOff(); 00235 else if(aComm==theNuTaN) return theWeak->GetNuTauNuclearOnOff(); 00236 } 00237 return "not_defined"; 00238 }
G4QMessenger * G4QMessenger::GetPointer | ( | ) | [static] |
Definition at line 89 of file G4QMessenger.cc.
Referenced by G4QNeutrinoPhysics::G4QNeutrinoPhysics(), and G4QPhotoNuclearPhysics::G4QPhotoNuclearPhysics().
00090 { 00091 static G4QMessenger theMessenger; //**Static body of CHIPS Messenger** 00092 return &theMessenger; 00093 }
void G4QMessenger::SetNewValue | ( | G4UIcommand * | aComm, | |
G4String | aS | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 200 of file G4QMessenger.cc.
References G4UIcmdWithADouble::GetNewDoubleValue(), G4QPhotoNuclearPhysics::SetElPosNuclearOnOff(), G4QPhotoNuclearPhysics::SetGammaNuclearOnOff(), G4QPhotoNuclearPhysics::SetMinGammaSR(), G4QPhotoNuclearPhysics::SetMuonNuclearOnOff(), G4QNeutrinoPhysics::SetNuElNuclearOnOff(), G4QNeutrinoPhysics::SetNuMuNuclearOnOff(), G4QNeutrinoPhysics::SetNuNuclearBias(), G4QNeutrinoPhysics::SetNuTauNuclearOnOff(), G4QPhotoNuclearPhysics::SetPhotoNucBias(), G4QPhotoNuclearPhysics::SetSynchRadOnOff(), and G4QPhotoNuclearPhysics::SetTauNuclearOnOff().
00201 { 00202 if(photoDir) 00203 { 00204 if (aComm==theSynchR) thePhoto->SetSynchRadOnOff(aS); 00205 else if(aComm==minGamSR) thePhoto->SetMinGammaSR(minGamSR->GetNewDoubleValue(aS)); 00206 else if(aComm==theGamN) thePhoto->SetGammaNuclearOnOff(aS); 00207 else if(aComm==theMuoN) thePhoto->SetElPosNuclearOnOff(aS); 00208 else if(aComm==theMuoN) thePhoto->SetMuonNuclearOnOff(aS); 00209 else if(aComm==theMuoN) thePhoto->SetTauNuclearOnOff(aS); 00210 else if(aComm==biasPhotoN)thePhoto->SetPhotoNucBias(biasPhotoN->GetNewDoubleValue(aS)); 00211 } 00212 else if(weakDir) 00213 { 00214 if (aComm==theNuElN) theWeak->SetNuElNuclearOnOff(aS); 00215 else if(aComm==theNuMuN) theWeak->SetNuMuNuclearOnOff(aS); 00216 else if(aComm==theNuTaN) theWeak->SetNuTauNuclearOnOff(aS); 00217 else if(aComm==biasNuNuc) theWeak->SetNuNuclearBias(biasNuNuc->GetNewDoubleValue(aS)); 00218 } 00219 }