G4EnergyLossMessenger.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class file
00031 //
00032 // File name:     G4EnergyLossMessenger
00033 //
00034 // Author:        Michel Maire
00035 //
00036 // Creation date: 17-03-2011 (original version of 22-06-2000)
00037 //
00038 // Modifications:
00039 // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivanchenko)
00040 // 10-01-06 PreciseRange -> CSDARange (V.Ivanchenko)
00041 // 10-05-06 Add command MscStepLimit (V.Ivanchenko) 
00042 // 10-10-06 Add DEDXBinning command (V.Ivanchenko)
00043 // 07-02-07 Add MscLateralDisplacement command (V.Ivanchenko)
00044 // 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
00045 // 15-03-07 Send a message "/run/physicsModified" if reinitialisation
00046 //          is needed after the command (V.Ivanchenko)
00047 // 16-03-07 modify /process/eLoss/minsubsec command (V.Ivanchenko)
00048 // 18-05-07 add /process/msc directory and commands (V.Ivanchenko)
00049 // 11-03-08 add /process/em directory and commands (V.Ivanchenko)
00050 //
00051 // -------------------------------------------------------------------
00052 //
00053 
00054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00056 
00057 #include "G4EnergyLossMessenger.hh"
00058 
00059 #include "G4UIdirectory.hh"
00060 #include "G4UIcommand.hh"
00061 #include "G4UIparameter.hh"
00062 #include "G4UIcmdWithABool.hh"
00063 #include "G4UIcmdWithAnInteger.hh"
00064 #include "G4UIcmdWithADouble.hh"
00065 #include "G4UIcmdWithADoubleAndUnit.hh"
00066 #include "G4UIcmdWithAString.hh"
00067 #include "G4EmProcessOptions.hh"
00068 #include "G4UImanager.hh"
00069 #include "G4MscStepLimitType.hh"
00070 #include "G4EmProcessOptions.hh"
00071 
00072 #include <sstream>
00073 
00074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00075 
00076 G4EnergyLossMessenger::G4EnergyLossMessenger()
00077 {
00078   opt = 0;
00079   eLossDirectory = new G4UIdirectory("/process/eLoss/");
00080   eLossDirectory->SetGuidance("Commands for EM processes.");
00081   mscDirectory = new G4UIdirectory("/process/msc/");
00082   mscDirectory->SetGuidance("Commands for EM scattering processes.");
00083   emDirectory = new G4UIdirectory("/process/em/");
00084   emDirectory->SetGuidance("General commands for EM processes.");
00085 
00086   RndmStepCmd = new G4UIcmdWithABool("/process/eLoss/useCutAsFinalRange",this);
00087   RndmStepCmd->SetGuidance("Use cut in range as a final range");
00088   RndmStepCmd->SetParameterName("choice",true);
00089   RndmStepCmd->SetDefaultValue(false);
00090   RndmStepCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00091 
00092   EnlossFlucCmd = new G4UIcmdWithABool("/process/eLoss/fluct",this);
00093   EnlossFlucCmd->SetGuidance("Switch true/false the energy loss fluctuations.");
00094   EnlossFlucCmd->SetParameterName("choice",true);
00095   EnlossFlucCmd->SetDefaultValue(true);
00096   EnlossFlucCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00097 
00098   SubSecCmd = new G4UIcmdWithABool("/process/eLoss/subsec",this);
00099   SubSecCmd->SetGuidance("Switch true/false the subcutoff generation.");
00100   SubSecCmd->SetParameterName("choice",true);
00101   SubSecCmd->SetDefaultValue(true);
00102   SubSecCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00103 
00104   MinSubSecCmd = new G4UIcmdWithADouble("/process/eLoss/minsubsec",this);
00105   MinSubSecCmd->SetGuidance("Set the ratio subcut/cut ");
00106   MinSubSecCmd->SetParameterName("rcmin",true);
00107   MinSubSecCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00108 
00109   StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
00110   StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters.");
00111   StepFuncCmd->SetGuidance("  dRoverR   : max Range variation per step");
00112   StepFuncCmd->SetGuidance("  finalRange: range for final step");
00113 
00114   G4UIparameter* dRoverRPrm = new G4UIparameter("dRoverR",'d',false);
00115   dRoverRPrm->SetGuidance("max Range variation per step (fractional number)");
00116   dRoverRPrm->SetParameterRange("dRoverR>0. && dRoverR<=1.");
00117   StepFuncCmd->SetParameter(dRoverRPrm);
00118 
00119   G4UIparameter* finalRangePrm = new G4UIparameter("finalRange",'d',false);
00120   finalRangePrm->SetGuidance("range for final step");
00121   finalRangePrm->SetParameterRange("finalRange>0.");
00122   StepFuncCmd->SetParameter(finalRangePrm);
00123 
00124   G4UIparameter* unitPrm = new G4UIparameter("unit",'s',true);
00125   unitPrm->SetGuidance("unit of finalRange");
00126   unitPrm->SetDefaultValue("mm");
00127   G4String unitCandidates = 
00128     G4UIcommand::UnitsList(G4UIcommand::CategoryOf("mm"));
00129   unitPrm->SetParameterCandidates(unitCandidates);
00130 
00131   StepFuncCmd->SetParameter(unitPrm);
00132   StepFuncCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00133 
00134   MinEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minKinEnergy",this);
00135   MinEnCmd->SetGuidance("Set the min kinetic energy");
00136   MinEnCmd->SetParameterName("emin",true);
00137   MinEnCmd->SetUnitCategory("Energy");
00138   MinEnCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00139 
00140   MaxEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/maxKinEnergy",this);
00141   MaxEnCmd->SetGuidance("Set the max kinetic energy");
00142   MaxEnCmd->SetParameterName("emax",true);
00143   MaxEnCmd->SetUnitCategory("Energy");
00144   MaxEnCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00145 
00146   IntegCmd = new G4UIcmdWithABool("/process/eLoss/integral",this);
00147   IntegCmd->SetGuidance("Switch true/false the integral option");
00148   IntegCmd->SetParameterName("integ",true);
00149   IntegCmd->SetDefaultValue(true);
00150   IntegCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00151 
00152   rangeCmd = new G4UIcmdWithABool("/process/eLoss/CSDARange",this);
00153   rangeCmd->SetGuidance("Switch true/false the CSDA range calculation");
00154   rangeCmd->SetParameterName("range",true);
00155   rangeCmd->SetDefaultValue(true);
00156   rangeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00157 
00158   lpmCmd = new G4UIcmdWithABool("/process/eLoss/LPM",this);
00159   lpmCmd->SetGuidance("The flag of the LPM effect calculation");
00160   lpmCmd->SetParameterName("lpm",true);
00161   lpmCmd->SetDefaultValue(true);
00162   lpmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00163 
00164   splCmd = new G4UIcmdWithABool("/process/em/spline",this);
00165   splCmd->SetGuidance("The flag of usage spline for Physics Vectors");
00166   splCmd->SetParameterName("spl",true);
00167   splCmd->SetDefaultValue(false);
00168   splCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00169 
00170   aplCmd = new G4UIcmdWithABool("/process/em/applyCuts",this);
00171   aplCmd->SetGuidance("The flag to Apply Cuts for gamma processes");
00172   aplCmd->SetParameterName("apl",true);
00173   aplCmd->SetDefaultValue(false);
00174   aplCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00175 
00176   deCmd = new G4UIcmdWithABool("/process/em/fluo",this);
00177   deCmd->SetGuidance("The flag to enable/disable deexcitation");
00178   deCmd->SetParameterName("fluoFlag",true);
00179   deCmd->SetDefaultValue(false);
00180   deCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00181 
00182   auCmd = new G4UIcmdWithABool("/process/em/auger",this);
00183   auCmd->SetGuidance("The flag to enable/disable Auger electrons");
00184   auCmd->SetParameterName("augerFlag",true);
00185   auCmd->SetDefaultValue(false);
00186   auCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00187 
00188   pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
00189   pixeCmd->SetGuidance("The flag to enable/disable PIXE");
00190   pixeCmd->SetParameterName("pixeFlag",true);
00191   pixeCmd->SetDefaultValue(false);
00192   pixeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00193 
00194   pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
00195   pixeXsCmd->SetGuidance("The name of PIXE cross section");
00196   pixeXsCmd->SetParameterName("pixeXS",true);
00197   pixeXsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00198 
00199   pixeeXsCmd = new G4UIcmdWithAString("/process/em/pixeElecXSmodel",this);
00200   pixeeXsCmd->SetGuidance("The name of PIXE cross section for electron");
00201   pixeeXsCmd->SetParameterName("pixeEXS",true);
00202   pixeeXsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00203 
00204   deexCmd = new G4UIcommand("/process/em/deexcitation",this);
00205   deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
00206   deexCmd->SetGuidance("  regName   : G4Region name");
00207   deexCmd->SetGuidance("  flagFluo  : Fluorescence");
00208   deexCmd->SetGuidance("  flagAuger : Auger");
00209   deexCmd->SetGuidance("  flagPIXE  : PIXE");
00210 
00211   G4UIparameter* regName = new G4UIparameter("regName",'s',false);
00212   deexCmd->SetParameter(regName);
00213 
00214   G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
00215   deexCmd->SetParameter(flagFluo);
00216 
00217   G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
00218   deexCmd->SetParameter(flagAuger);
00219 
00220   G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
00221   deexCmd->SetParameter(flagPIXE);
00222 
00223   dedxCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsDEDX",this);
00224   dedxCmd->SetGuidance("Set number of bins for DEDX tables");
00225   dedxCmd->SetParameterName("binsDEDX",true);
00226   dedxCmd->SetDefaultValue(77);
00227   dedxCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00228 
00229   lamCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsLambda",this);
00230   lamCmd->SetGuidance("Set number of bins for Lambda tables");
00231   lamCmd->SetParameterName("binsL",true);
00232   lamCmd->SetDefaultValue(77);
00233   lamCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00234 
00235   verCmd = new G4UIcmdWithAnInteger("/process/eLoss/verbose",this);
00236   verCmd->SetGuidance("Set verbose level for EM physics");
00237   verCmd->SetParameterName("verb",true);
00238   verCmd->SetDefaultValue(1);
00239   verCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00240 
00241   ver1Cmd = new G4UIcmdWithAnInteger("/process/em/verbose",this);
00242   ver1Cmd->SetGuidance("Set verbose level for EM physics");
00243   ver1Cmd->SetParameterName("verb1",true);
00244   ver1Cmd->SetDefaultValue(1);
00245   ver1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00246 
00247   lllCmd = new G4UIcmdWithADouble("/process/eLoss/linLossLimit",this);
00248   lllCmd->SetGuidance("Set linearLossLimit parameter");
00249   lllCmd->SetParameterName("linlim",true);
00250   lllCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00251 
00252   labCmd = new G4UIcmdWithADouble("/process/eLoss/LambdaFactor",this);
00253   labCmd->SetGuidance("Set lambdaFactor parameter for integral option");
00254   labCmd->SetParameterName("Fl",true);
00255   labCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00256 
00257   mscCmd = new G4UIcmdWithAString("/process/msc/StepLimit",this);
00258   mscCmd->SetGuidance("Set msc step limitation type");
00259   mscCmd->SetParameterName("StepLim",true);
00260   mscCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00261 
00262   latCmd = new G4UIcmdWithABool("/process/msc/LateralDisplacement",this);
00263   latCmd->SetGuidance("Set flag of sampling of lateral displacement");
00264   latCmd->SetParameterName("lat",true);
00265   latCmd->SetDefaultValue(true);
00266   latCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00267 
00268   frCmd = new G4UIcmdWithADouble("/process/msc/RangeFactor",this);
00269   frCmd->SetGuidance("Set RangeFactor parameter for msc processes");
00270   frCmd->SetParameterName("Fr",true);
00271   frCmd->SetRange("Fr>0");
00272   frCmd->SetDefaultValue(0.04);
00273   frCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00274 
00275   fgCmd = new G4UIcmdWithADouble("/process/msc/GeomFactor",this);
00276   fgCmd->SetGuidance("Set GeomFactor parameter for msc processes");
00277   fgCmd->SetParameterName("Fg",true);
00278   fgCmd->SetRange("Fg>0");
00279   fgCmd->SetDefaultValue(3.5);
00280   fgCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00281 
00282   mscfCmd = new G4UIcmdWithADouble("/process/msc/FactorForAngleLimit",this);
00283   mscfCmd->SetGuidance("Set factor for computation of a limit for -t (invariant trasfer)");
00284   mscfCmd->SetParameterName("Fact",true);
00285   mscfCmd->SetRange("Fact>0");
00286   mscfCmd->SetDefaultValue(1.);
00287   mscfCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00288 
00289   skinCmd = new G4UIcmdWithADouble("/process/msc/Skin",this);
00290   skinCmd->SetGuidance("Set skin parameter for msc processes");
00291   skinCmd->SetParameterName("skin",true);
00292   skinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00293 
00294   angCmd = new G4UIcmdWithADoubleAndUnit("/process/msc/ThetaLimit",this);
00295   angCmd->SetGuidance("Set the limit on the polar angle for msc and single scattering");
00296   angCmd->SetParameterName("theta",true);
00297   angCmd->SetUnitCategory("Angle");
00298   angCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00299 
00300   bfCmd = new G4UIcommand("/process/em/setBiasingFactor",this);
00301   bfCmd->SetGuidance("Set factor for the process cross section.");
00302   bfCmd->SetGuidance("  procName   : process name");
00303   bfCmd->SetGuidance("  procFact   : factor");
00304   bfCmd->SetGuidance("  flagFact   : flag to change weight");
00305 
00306   G4UIparameter* procName = new G4UIparameter("procName",'s',false);
00307   bfCmd->SetParameter(procName);
00308 
00309   G4UIparameter* procFact = new G4UIparameter("procFact",'d',false);
00310   bfCmd->SetParameter(procFact);
00311 
00312   G4UIparameter* flagFact = new G4UIparameter("flagFact",'s',false);
00313   bfCmd->SetParameter(flagFact);
00314   bfCmd->AvailableForStates(G4State_Idle);
00315 
00316   fiCmd = new G4UIcommand("/process/em/setForcedInteraction",this);
00317   fiCmd->SetGuidance("Set factor for the process cross section.");
00318   fiCmd->SetGuidance("  procNam    : process name");
00319   fiCmd->SetGuidance("  regNam     : region name");
00320   fiCmd->SetGuidance("  tlength    : fixed target length");
00321   fiCmd->SetGuidance("  tflag      : flag to change weight");
00322 
00323   G4UIparameter* procNam = new G4UIparameter("procNam",'s',false);
00324   fiCmd->SetParameter(procNam);
00325 
00326   G4UIparameter* regNam = new G4UIparameter("regNam",'s',false);
00327   fiCmd->SetParameter(regNam);
00328 
00329   G4UIparameter* tlength = new G4UIparameter("tlength",'d',false);
00330   fiCmd->SetParameter(tlength);
00331 
00332   G4UIparameter* unitT = new G4UIparameter("unitT",'s',true);
00333   fiCmd->SetParameter(unitT);
00334   unitT->SetGuidance("unit of tlength");
00335 
00336   G4UIparameter* flagT = new G4UIparameter("tflag",'s',true);
00337   fiCmd->SetParameter(flagT);
00338   fiCmd->AvailableForStates(G4State_Idle);
00339 
00340   brCmd = new G4UIcommand("/process/em/setSecBiasing",this);
00341   brCmd->SetGuidance("Set bremsstrahlung or delta-electron splitting/Russian roullette per region.");
00342   brCmd->SetGuidance("  bProcNam : process name");
00343   brCmd->SetGuidance("  bRegNam  : region name");
00344   brCmd->SetGuidance("  bFactor  : number of splitted gamma or probability of Russian roulette");
00345   brCmd->SetGuidance("  bEnergy  : max energy of a secondary for this biasing method");
00346 
00347   G4UIparameter* bProcNam = new G4UIparameter("bProcNam",'s',false);
00348   brCmd->SetParameter(bProcNam);
00349 
00350   G4UIparameter* bRegNam = new G4UIparameter("bRegNam",'s',false);
00351   brCmd->SetParameter(bRegNam);
00352 
00353   G4UIparameter* bFactor = new G4UIparameter("bFactor",'d',false);
00354   brCmd->SetParameter(bFactor);
00355 
00356   G4UIparameter* bEnergy = new G4UIparameter("bEnergy",'d',false);
00357   brCmd->SetParameter(bEnergy);
00358 
00359   G4UIparameter* bUnit = new G4UIparameter("bUnit",'s',true);
00360   brCmd->SetParameter(bUnit);
00361   brCmd->SetGuidance("unit of energy");
00362 
00363   brCmd->AvailableForStates(G4State_Idle);
00364 }
00365 
00366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00367 
00368 G4EnergyLossMessenger::~G4EnergyLossMessenger()
00369 {
00370   delete opt;
00371   delete RndmStepCmd;
00372   delete EnlossFlucCmd;
00373   delete SubSecCmd;
00374   delete MinSubSecCmd;
00375   delete StepFuncCmd;
00376   delete deexCmd;
00377   delete eLossDirectory;
00378   delete mscDirectory;
00379   delete emDirectory;
00380   delete MinEnCmd;
00381   delete MaxEnCmd;
00382   delete IntegCmd;
00383   delete rangeCmd;
00384   delete lpmCmd;
00385   delete splCmd;
00386   delete aplCmd;
00387   delete latCmd;
00388   delete verCmd;
00389   delete ver1Cmd;
00390   delete mscCmd;
00391   delete dedxCmd;
00392   delete deCmd;
00393   delete auCmd;
00394   delete pixeCmd;
00395   delete pixeXsCmd;
00396   delete pixeeXsCmd;
00397   delete frCmd;
00398   delete fgCmd;
00399   delete lllCmd;
00400   delete lamCmd;
00401   delete labCmd;
00402   delete skinCmd;
00403   delete angCmd;
00404   delete mscfCmd;
00405   delete bfCmd;
00406   delete fiCmd;
00407   delete brCmd;
00408 }
00409 
00410 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00411 
00412 void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
00413 {
00414   if(!opt) { opt = new G4EmProcessOptions(); }
00415 
00416   if (command == RndmStepCmd) {
00417     opt->SetRandomStep(RndmStepCmd->GetNewBoolValue(newValue));
00418   } else if (command == EnlossFlucCmd) {
00419     opt->SetLossFluctuations(EnlossFlucCmd->GetNewBoolValue(newValue));
00420   } else if(command == SubSecCmd) {
00421     opt->SetSubCutoff(SubSecCmd->GetNewBoolValue(newValue));
00422     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00423   } else if (command == MinSubSecCmd) {
00424     opt->SetMinSubRange(MinSubSecCmd->GetNewDoubleValue(newValue));
00425     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00426   } else if (command == StepFuncCmd) {
00427     G4double v1,v2;
00428     G4String unt;
00429     std::istringstream is(newValue);
00430     is >> v1 >> v2 >> unt;
00431     v2 *= G4UIcommand::ValueOf(unt);
00432     opt->SetStepFunction(v1,v2);
00433   } else if (command == deexCmd) {
00434     G4String s1 (""), s2(""), s3(""), s4("");
00435     G4bool b2(false), b3(false), b4(false);
00436     std::istringstream is(newValue);
00437     is >> s1 >> s2 >> s3 >> s4;
00438     if(s2 == "true") { b2 = true; }
00439     if(s3 == "true") { b3 = true; }
00440     if(s4 == "true") { b4 = true; }
00441     opt->SetDeexcitationActiveRegion(s1,b2,b3,b4);
00442   } else if (command == deCmd) {
00443     opt->SetFluo(deCmd->GetNewBoolValue(newValue));
00444   } else if (command == auCmd) {
00445     opt->SetAuger(auCmd->GetNewBoolValue(newValue));
00446   } else if (command == pixeCmd) {
00447     opt->SetPIXE(pixeCmd->GetNewBoolValue(newValue));
00448   } else if (command == pixeXsCmd) {
00449     G4String name;
00450     if (newValue == "ecpssr_analytical") 
00451       {name = "ECPSSR_Analytical";}
00452     else if (newValue == "ecpssr_interpolated") 
00453       {name = "ECPSSR_FormFactor";}
00454     else 
00455       {name = newValue;}
00456     opt->SetPIXECrossSectionModel(name);
00457   } else if (command == pixeeXsCmd) {
00458     opt->SetPIXEElectronCrossSectionModel(newValue);
00459   } else if (command == mscCmd) {
00460     if(newValue == "Minimal") 
00461       opt->SetMscStepLimitation(fMinimal);
00462 
00463     else if(newValue == "UseDistanceToBoundary") 
00464       opt->SetMscStepLimitation(fUseDistanceToBoundary);
00465 
00466     else if(newValue == "UseSafety")
00467       opt->SetMscStepLimitation(fUseSafety);
00468 
00469     else {
00470       G4cout << "### G4EnergyLossMessenger WARNING: StepLimit type <" 
00471              << newValue << "> unknown!" << G4endl;
00472       return;
00473     }
00474     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00475   } else if (command == MinEnCmd) {
00476     opt->SetMinEnergy(MinEnCmd->GetNewDoubleValue(newValue));
00477     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00478   } else if (command == MaxEnCmd) { 
00479     opt->SetMaxEnergy(MaxEnCmd->GetNewDoubleValue(newValue));
00480     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00481   } else if (command == IntegCmd) {
00482     opt->SetIntegral(IntegCmd->GetNewBoolValue(newValue));
00483   } else if (command == rangeCmd) {
00484     opt->SetBuildCSDARange(rangeCmd->GetNewBoolValue(newValue));
00485     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00486   } else if (command == lpmCmd) {
00487     opt->SetLPMFlag(lpmCmd->GetNewBoolValue(newValue));
00488     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00489   } else if (command == splCmd) {
00490     opt->SetSplineFlag(splCmd->GetNewBoolValue(newValue));
00491     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00492   } else if (command == aplCmd) {
00493     opt->SetApplyCuts(aplCmd->GetNewBoolValue(newValue));
00494   } else if (command == latCmd) {
00495     opt->SetMscLateralDisplacement(latCmd->GetNewBoolValue(newValue));
00496     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00497   } else if (command == verCmd) {
00498     opt->SetVerbose(verCmd->GetNewIntValue(newValue));
00499   } else if (command == ver1Cmd) {
00500     opt->SetVerbose(ver1Cmd->GetNewIntValue(newValue));
00501   } else if (command == lllCmd) {
00502     opt->SetLinearLossLimit(lllCmd->GetNewDoubleValue(newValue));
00503   } else if (command == labCmd) {
00504     opt->SetLambdaFactor(labCmd->GetNewDoubleValue(newValue));
00505   } else if (command == skinCmd) {
00506     opt->SetSkin(skinCmd->GetNewDoubleValue(newValue));
00507     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00508   } else if (command == dedxCmd) { 
00509     opt->SetDEDXBinning(dedxCmd->GetNewIntValue(newValue));
00510     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00511   } else if (command == lamCmd) { 
00512     opt->SetLambdaBinning(lamCmd->GetNewIntValue(newValue));
00513     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00514   } else if (command == frCmd) {
00515     opt->SetMscRangeFactor(frCmd->GetNewDoubleValue(newValue));
00516     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00517   } else if (command == fgCmd) {
00518     opt->SetMscGeomFactor(fgCmd->GetNewDoubleValue(newValue));
00519     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00520   } else if (command == mscfCmd) {
00521     opt->SetFactorForAngleLimit(mscfCmd->GetNewDoubleValue(newValue));
00522     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00523   } else if (command == angCmd) { 
00524     opt->SetPolarAngleLimit(angCmd->GetNewDoubleValue(newValue));
00525     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00526   } else if (command == bfCmd) {
00527     G4double v1(1.0);
00528     G4String s0(""),s1("");
00529     std::istringstream is(newValue);
00530     is >> s0 >> v1 >> s1;
00531     G4bool yes = false;
00532     if(s1 == "true") { yes = true; }
00533     opt->SetProcessBiasingFactor(s0,v1,yes);
00534     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00535   } else if (command == fiCmd) {
00536     G4double v1(0.0);
00537     G4String s1(""),s2(""),s3(""),unt("mm");
00538     std::istringstream is(newValue);
00539     is >> s1 >> s2 >> v1 >> unt >> s3;
00540     G4bool yes = false;
00541     if(s3 == "true") { yes = true; }
00542     v1 *= G4UIcommand::ValueOf(unt);
00543     opt->ActivateForcedInteraction(s1,v1,s2,yes);
00544     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00545   } else if (command == brCmd) {
00546     G4double fb(1.0),en(1.e+30);
00547     G4String s1(""),s2(""),unt("MeV");
00548     std::istringstream is(newValue);
00549     is >> s1 >> s2 >> fb >> en >> unt;
00550     en *= G4UIcommand::ValueOf(unt);    
00551     if (s1=="phot"||s1=="compt"||s1=="conv") 
00552                 opt->ActivateSecondaryBiasingForGamma(s1,s2,fb,en);
00553     else opt->ActivateSecondaryBiasing(s1,s2,fb,en);
00554     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
00555   }  
00556 }
00557 
00558 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

Generated on Mon May 27 17:48:10 2013 for Geant4 by  doxygen 1.4.7