Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/src/G4EmExtraParametersMessenger.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 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/electromagnetic/utils/src/G4EmExtraParametersMessenger.cc (Version 11.3.0) and /processes/electromagnetic/utils/src/G4EmExtraParametersMessenger.cc (Version 10.7.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // -------------------------------------------     26 // -------------------------------------------------------------------
 27 //                                                 27 //
 28 // GEANT4 Class file                               28 // GEANT4 Class file
 29 //                                                 29 //
 30 // File name:     G4EmExtraParametersMessenger     30 // File name:     G4EmExtraParametersMessenger
 31 //                                                 31 //
 32 // Author:        Vladimir Ivanchenko              32 // Author:        Vladimir Ivanchenko 
 33 //                                                 33 //
 34 // Creation date: 07-05-2019                       34 // Creation date: 07-05-2019 
 35 //                                                 35 //
 36 // -------------------------------------------     36 // -------------------------------------------------------------------
 37 //                                                 37 //
 38                                                    38 
 39 //....oooOO0OOooo........oooOO0OOooo........oo     39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 40 //....oooOO0OOooo........oooOO0OOooo........oo     40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 41                                                    41 
 42 #include "G4EmExtraParametersMessenger.hh"         42 #include "G4EmExtraParametersMessenger.hh"
 43 #include "G4UIcommand.hh"                          43 #include "G4UIcommand.hh"
 44 #include "G4UIparameter.hh"                        44 #include "G4UIparameter.hh"
 45 #include "G4UIcmdWithABool.hh"                     45 #include "G4UIcmdWithABool.hh"
 46 #include "G4UIcmdWithAnInteger.hh"                 46 #include "G4UIcmdWithAnInteger.hh"
 47 #include "G4UIcmdWithADouble.hh"                   47 #include "G4UIcmdWithADouble.hh"
 48 #include "G4UIcmdWithADoubleAndUnit.hh"            48 #include "G4UIcmdWithADoubleAndUnit.hh"
 49 #include "G4UIcmdWithAString.hh"                   49 #include "G4UIcmdWithAString.hh"
 50 #include "G4UIcmdWith3VectorAndUnit.hh"            50 #include "G4UIcmdWith3VectorAndUnit.hh"
 51 #include "G4UImanager.hh"                          51 #include "G4UImanager.hh"
 52 #include "G4EmExtraParameters.hh"                  52 #include "G4EmExtraParameters.hh"
 53                                                    53 
 54 #include <sstream>                                 54 #include <sstream>
 55                                                    55 
 56 //....oooOO0OOooo........oooOO0OOooo........oo     56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 57                                                    57 
 58 G4EmExtraParametersMessenger::G4EmExtraParamet     58 G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(G4EmExtraParameters* ptr) 
 59   : theParameters(ptr)                             59   : theParameters(ptr)
 60 {                                                  60 {
 61   paiCmd = new G4UIcommand("/process/em/AddPAI     61   paiCmd = new G4UIcommand("/process/em/AddPAIRegion",this);
 62   paiCmd->SetGuidance("Activate PAI in the G4R     62   paiCmd->SetGuidance("Activate PAI in the G4Region.");
 63   paiCmd->SetGuidance("  partName  : particle      63   paiCmd->SetGuidance("  partName  : particle name (default - all)");
 64   paiCmd->SetGuidance("  regName   : G4Region      64   paiCmd->SetGuidance("  regName   : G4Region name");
 65   paiCmd->SetGuidance("  paiType   : PAI, PAIp     65   paiCmd->SetGuidance("  paiType   : PAI, PAIphoton");
 66   paiCmd->AvailableForStates(G4State_PreInit);     66   paiCmd->AvailableForStates(G4State_PreInit);
 67   paiCmd->SetToBeBroadcasted(false);           << 
 68                                                    67 
 69   auto part = new G4UIparameter("partName",'s' <<  68   G4UIparameter* part = new G4UIparameter("partName",'s',false);
 70   paiCmd->SetParameter(part);                      69   paiCmd->SetParameter(part);
 71                                                    70 
 72   auto pregName = new G4UIparameter("regName", <<  71   G4UIparameter* pregName = new G4UIparameter("regName",'s',false);
 73   paiCmd->SetParameter(pregName);                  72   paiCmd->SetParameter(pregName);
 74                                                    73 
 75   auto ptype = new G4UIparameter("type",'s',fa <<  74   G4UIparameter* ptype = new G4UIparameter("type",'s',false);
 76   paiCmd->SetParameter(ptype);                     75   paiCmd->SetParameter(ptype);
 77   ptype->SetParameterCandidates("pai PAI PAIph     76   ptype->SetParameterCandidates("pai PAI PAIphoton");
 78                                                    77 
 79   mscoCmd = new G4UIcommand("/process/em/AddEm     78   mscoCmd = new G4UIcommand("/process/em/AddEmRegion",this);
 80   mscoCmd->SetGuidance("Add optional EM config     79   mscoCmd->SetGuidance("Add optional EM configuration for a G4Region.");
 81   mscoCmd->SetGuidance("  regName  : G4Region      80   mscoCmd->SetGuidance("  regName  : G4Region name");
 82   mscoCmd->SetGuidance("  emType   : G4EmStand     81   mscoCmd->SetGuidance("  emType   : G4EmStandard, G4EmStandard_opt1, ...");
 83   mscoCmd->AvailableForStates(G4State_PreInit)     82   mscoCmd->AvailableForStates(G4State_PreInit);
 84   mscoCmd->SetToBeBroadcasted(false);          << 
 85                                                    83 
 86   auto mregName = new G4UIparameter("regName", <<  84   G4UIparameter* mregName = new G4UIparameter("regName",'s',false);
 87   mscoCmd->SetParameter(mregName);                 85   mscoCmd->SetParameter(mregName);
 88                                                    86 
 89   auto mtype = new G4UIparameter("mscType",'s' <<  87   G4UIparameter* mtype = new G4UIparameter("mscType",'s',false);
 90   mscoCmd->SetParameter(mtype);                    88   mscoCmd->SetParameter(mtype);
 91   mtype->SetParameterCandidates("G4EmStandard      89   mtype->SetParameterCandidates("G4EmStandard G4EmStandard_opt1 G4EmStandard_opt2 G4EmStandard_opt3 G4EmStandard_opt4 G4EmStandardGS G4EmStandardSS G4EmLivermore G4EmPenelope G4RadioactiveDecay");
 92                                                    90 
 93   SubSecCmd = new G4UIcmdWithAString("/process <<  91   SubSecCmd = new G4UIcommand("/process/eLoss/subsec",this);
 94   SubSecCmd->SetGuidance("Enable subcut genera <<  92   SubSecCmd->SetGuidance("Switch true/false the subcutoff generation per region.");
                                                   >>  93   SubSecCmd->SetGuidance("  subSec   : true/false");
 95   SubSecCmd->SetGuidance("  Region   : region      94   SubSecCmd->SetGuidance("  Region   : region name");
 96   SubSecCmd->AvailableForStates(G4State_PreIni     95   SubSecCmd->AvailableForStates(G4State_PreInit);
 97   SubSecCmd->SetToBeBroadcasted(false);        <<  96 
                                                   >>  97   G4UIparameter* subSec = new G4UIparameter("subSec",'s',false);
                                                   >>  98   SubSecCmd->SetParameter(subSec);
                                                   >>  99 
                                                   >> 100   G4UIparameter* subSecReg = new G4UIparameter("Region",'s',false);
                                                   >> 101   SubSecCmd->SetParameter(subSecReg);
 98                                                   102 
 99   StepFuncCmd = new G4UIcommand("/process/eLos    103   StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
100   StepFuncCmd->SetGuidance("Set the energy los    104   StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters for e+-.");
101   StepFuncCmd->SetGuidance("  dRoverR   : max     105   StepFuncCmd->SetGuidance("  dRoverR   : max Range variation per step");
102   StepFuncCmd->SetGuidance("  finalRange: rang    106   StepFuncCmd->SetGuidance("  finalRange: range for final step");
103   StepFuncCmd->SetGuidance("  unit      : unit    107   StepFuncCmd->SetGuidance("  unit      : unit of finalRange");
104   StepFuncCmd->AvailableForStates(G4State_PreI    108   StepFuncCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
105   StepFuncCmd->SetToBeBroadcasted(false);      << 
106                                                   109 
107   auto dRoverRPrm = new G4UIparameter("dRoverR << 110   G4UIparameter* dRoverRPrm = new G4UIparameter("dRoverR",'d',false);
108   dRoverRPrm->SetParameterRange("dRoverR>0. &&    111   dRoverRPrm->SetParameterRange("dRoverR>0. && dRoverR<=1.");
109   StepFuncCmd->SetParameter(dRoverRPrm);          112   StepFuncCmd->SetParameter(dRoverRPrm);
110                                                   113 
111   auto finalRangePrm = new G4UIparameter("fina << 114   G4UIparameter* finalRangePrm = new G4UIparameter("finalRange",'d',false);
112   finalRangePrm->SetParameterRange("finalRange    115   finalRangePrm->SetParameterRange("finalRange>0.");
113   StepFuncCmd->SetParameter(finalRangePrm);       116   StepFuncCmd->SetParameter(finalRangePrm);
114                                                   117 
115   auto unitPrm = new G4UIparameter("unit",'s', << 118   G4UIparameter* unitPrm = new G4UIparameter("unit",'s',true);
116   unitPrm->SetDefaultUnit("mm");                  119   unitPrm->SetDefaultUnit("mm");
117   StepFuncCmd->SetParameter(unitPrm);             120   StepFuncCmd->SetParameter(unitPrm);
118                                                   121 
119   StepFuncCmd1 = new G4UIcommand("/process/eLo    122   StepFuncCmd1 = new G4UIcommand("/process/eLoss/StepFunctionMuHad",this);
120   StepFuncCmd1->SetGuidance("Set the energy lo    123   StepFuncCmd1->SetGuidance("Set the energy loss step limitation parameters for muon/hadron.");
121   StepFuncCmd1->SetGuidance("  dRoverR   : max    124   StepFuncCmd1->SetGuidance("  dRoverR   : max Range variation per step");
122   StepFuncCmd1->SetGuidance("  finalRange: ran    125   StepFuncCmd1->SetGuidance("  finalRange: range for final step");
123   StepFuncCmd1->AvailableForStates(G4State_Pre    126   StepFuncCmd1->AvailableForStates(G4State_PreInit,G4State_Idle);
124   StepFuncCmd1->SetToBeBroadcasted(false);     << 
125                                                   127 
126   auto dRoverRPrm1 = new G4UIparameter("dRover << 128   G4UIparameter* dRoverRPrm1 = new G4UIparameter("dRoverRMuHad",'d',false);
127   dRoverRPrm1->SetParameterRange("dRoverRMuHad    129   dRoverRPrm1->SetParameterRange("dRoverRMuHad>0. && dRoverRMuHad<=1.");
128   StepFuncCmd1->SetParameter(dRoverRPrm1);        130   StepFuncCmd1->SetParameter(dRoverRPrm1);
129                                                   131 
130   auto finalRangePrm1 = new G4UIparameter("fin << 132   G4UIparameter* finalRangePrm1 = new G4UIparameter("finalRangeMuHad",'d',false);
131   finalRangePrm1->SetParameterRange("finalRang    133   finalRangePrm1->SetParameterRange("finalRangeMuHad>0.");
132   StepFuncCmd1->SetParameter(finalRangePrm1);     134   StepFuncCmd1->SetParameter(finalRangePrm1);
133                                                   135 
134   auto unitPrm1 = new G4UIparameter("unit",'s' << 136   G4UIparameter* unitPrm1 = new G4UIparameter("unit",'s',true);
135   unitPrm1->SetDefaultValue("mm");                137   unitPrm1->SetDefaultValue("mm");
136   StepFuncCmd1->SetParameter(unitPrm1);           138   StepFuncCmd1->SetParameter(unitPrm1);
137                                                   139 
138   StepFuncCmd2 = new G4UIcommand("/process/eLo    140   StepFuncCmd2 = new G4UIcommand("/process/eLoss/StepFunctionLightIons",this);
139   StepFuncCmd2->SetGuidance("Set the energy lo    141   StepFuncCmd2->SetGuidance("Set the energy loss step limitation parameters for light ions.");
140   StepFuncCmd2->SetGuidance("  dRoverR   : max    142   StepFuncCmd2->SetGuidance("  dRoverR   : max Range variation per step");
141   StepFuncCmd2->SetGuidance("  finalRange: ran    143   StepFuncCmd2->SetGuidance("  finalRange: range for final step");
142   StepFuncCmd2->AvailableForStates(G4State_Pre    144   StepFuncCmd2->AvailableForStates(G4State_PreInit,G4State_Idle);
143   StepFuncCmd2->SetToBeBroadcasted(false);     << 
144                                                   145 
145   auto dRoverRPrm2 = new G4UIparameter("dRover << 146   G4UIparameter* dRoverRPrm2 = new G4UIparameter("dRoverRLIons",'d',false);
146   dRoverRPrm2->SetParameterRange("dRoverRLIons    147   dRoverRPrm2->SetParameterRange("dRoverRLIons>0. && dRoverRLIons<=1.");
147   StepFuncCmd2->SetParameter(dRoverRPrm2);        148   StepFuncCmd2->SetParameter(dRoverRPrm2);
148                                                   149 
149   auto finalRangePrm2 = new G4UIparameter("fin << 150   G4UIparameter* finalRangePrm2 = new G4UIparameter("finalRangeLIons",'d',false);
150   finalRangePrm2->SetParameterRange("finalRang    151   finalRangePrm2->SetParameterRange("finalRangeLIons>0.");
151   StepFuncCmd2->SetParameter(finalRangePrm2);     152   StepFuncCmd2->SetParameter(finalRangePrm2);
152                                                   153 
153   auto unitPrm2 = new G4UIparameter("unit",'s' << 154   G4UIparameter* unitPrm2 = new G4UIparameter("unit",'s',true);
154   unitPrm2->SetDefaultValue("mm");                155   unitPrm2->SetDefaultValue("mm");
155   StepFuncCmd2->SetParameter(unitPrm2);           156   StepFuncCmd2->SetParameter(unitPrm2);
156                                                   157 
157   StepFuncCmd3 = new G4UIcommand("/process/eLo    158   StepFuncCmd3 = new G4UIcommand("/process/eLoss/StepFunctionIons",this);
158   StepFuncCmd3->SetGuidance("Set the energy lo    159   StepFuncCmd3->SetGuidance("Set the energy loss step limitation parameters for ions.");
159   StepFuncCmd3->SetGuidance("  dRoverR   : max    160   StepFuncCmd3->SetGuidance("  dRoverR   : max Range variation per step");
160   StepFuncCmd3->SetGuidance("  finalRange: ran    161   StepFuncCmd3->SetGuidance("  finalRange: range for final step");
161   StepFuncCmd3->AvailableForStates(G4State_Pre    162   StepFuncCmd3->AvailableForStates(G4State_PreInit,G4State_Idle);
162   StepFuncCmd3->SetToBeBroadcasted(false);     << 
163                                                   163 
164   auto dRoverRPrm3 = new G4UIparameter("dRover << 164   G4UIparameter* dRoverRPrm3 = new G4UIparameter("dRoverRMuHad",'d',false);
165   dRoverRPrm3->SetParameterRange("dRoverRIons>    165   dRoverRPrm3->SetParameterRange("dRoverRIons>0. && dRoverRIons<=1.");
166   StepFuncCmd3->SetParameter(dRoverRPrm3);        166   StepFuncCmd3->SetParameter(dRoverRPrm3);
167                                                   167 
168   auto finalRangePrm3 = new G4UIparameter("fin << 168   G4UIparameter* finalRangePrm3 = new G4UIparameter("finalRangeIons",'d',false);
169   finalRangePrm3->SetParameterRange("finalRang    169   finalRangePrm3->SetParameterRange("finalRangeIons>0.");
170   StepFuncCmd3->SetParameter(finalRangePrm3);     170   StepFuncCmd3->SetParameter(finalRangePrm3);
171                                                   171 
172   auto unitPrm3 = new G4UIparameter("unit",'s' << 172   G4UIparameter* unitPrm3 = new G4UIparameter("unit",'s',true);
173   unitPrm3->SetDefaultValue("mm");                173   unitPrm3->SetDefaultValue("mm");
174   StepFuncCmd3->SetParameter(unitPrm3);           174   StepFuncCmd3->SetParameter(unitPrm3);
175                                                   175 
176   bfCmd = new G4UIcommand("/process/em/setBias    176   bfCmd = new G4UIcommand("/process/em/setBiasingFactor",this);
177   bfCmd->SetGuidance("Set factor for the proce    177   bfCmd->SetGuidance("Set factor for the process cross section.");
178   bfCmd->SetGuidance("  procName   : process n    178   bfCmd->SetGuidance("  procName   : process name");
179   bfCmd->SetGuidance("  procFact   : factor");    179   bfCmd->SetGuidance("  procFact   : factor");
180   bfCmd->SetGuidance("  flagFact   : flag to c    180   bfCmd->SetGuidance("  flagFact   : flag to change weight");
181   bfCmd->AvailableForStates(G4State_PreInit,G4    181   bfCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
182   bfCmd->SetToBeBroadcasted(false);            << 
183                                                   182 
184   auto procName = new G4UIparameter("procName" << 183   G4UIparameter* procName = new G4UIparameter("procName",'s',false);
185   bfCmd->SetParameter(procName);                  184   bfCmd->SetParameter(procName);
186                                                   185 
187   auto procFact = new G4UIparameter("procFact" << 186   G4UIparameter* procFact = new G4UIparameter("procFact",'d',false);
188   bfCmd->SetParameter(procFact);                  187   bfCmd->SetParameter(procFact);
189                                                   188 
190   auto flagFact = new G4UIparameter("flagFact" << 189   G4UIparameter* flagFact = new G4UIparameter("flagFact",'s',false);
191   bfCmd->SetParameter(flagFact);                  190   bfCmd->SetParameter(flagFact);
192                                                   191 
193   fiCmd = new G4UIcommand("/process/em/setForc    192   fiCmd = new G4UIcommand("/process/em/setForcedInteraction",this);
194   fiCmd->SetGuidance("Set factor for the proce    193   fiCmd->SetGuidance("Set factor for the process cross section.");
195   fiCmd->SetGuidance("  procNam    : process n    194   fiCmd->SetGuidance("  procNam    : process name");
196   fiCmd->SetGuidance("  regNam     : region na    195   fiCmd->SetGuidance("  regNam     : region name");
197   fiCmd->SetGuidance("  tlength    : fixed tar    196   fiCmd->SetGuidance("  tlength    : fixed target length");
198   fiCmd->SetGuidance("  unitT      : length un    197   fiCmd->SetGuidance("  unitT      : length unit");
199   fiCmd->SetGuidance("  tflag      : flag to c    198   fiCmd->SetGuidance("  tflag      : flag to change weight");
200   fiCmd->AvailableForStates(G4State_PreInit,G4    199   fiCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
201   fiCmd->SetToBeBroadcasted(false);            << 
202                                                   200 
203   auto procNam = new G4UIparameter("procNam",' << 201   G4UIparameter* procNam = new G4UIparameter("procNam",'s',false);
204   fiCmd->SetParameter(procNam);                   202   fiCmd->SetParameter(procNam);
205                                                   203 
206   auto  regNam = new G4UIparameter("regNam",'s << 204   G4UIparameter* regNam = new G4UIparameter("regNam",'s',false);
207   fiCmd->SetParameter(regNam);                    205   fiCmd->SetParameter(regNam);
208                                                   206 
209   auto tlength = new G4UIparameter("tlength",' << 207   G4UIparameter* tlength = new G4UIparameter("tlength",'d',false);
210   tlength->SetParameterRange("tlength>0");        208   tlength->SetParameterRange("tlength>0");
211   fiCmd->SetParameter(tlength);                   209   fiCmd->SetParameter(tlength);
212                                                   210 
213   auto unitT = new G4UIparameter("unitT",'s',t << 211   G4UIparameter* unitT = new G4UIparameter("unitT",'s',true);
214   unitT->SetDefaultUnit("mm");                    212   unitT->SetDefaultUnit("mm");
215   fiCmd->SetParameter(unitT);                     213   fiCmd->SetParameter(unitT);
216                                                   214 
217   auto flagT = new G4UIparameter("tflag",'b',t << 215   G4UIparameter* flagT = new G4UIparameter("tflag",'b',true);
218   flagT->SetDefaultValue(true);                   216   flagT->SetDefaultValue(true);
219   fiCmd->SetParameter(flagT);                     217   fiCmd->SetParameter(flagT);
220                                                   218 
221   bsCmd = new G4UIcommand("/process/em/setSecB    219   bsCmd = new G4UIcommand("/process/em/setSecBiasing",this);
222   bsCmd->SetGuidance("Set bremsstrahlung or de    220   bsCmd->SetGuidance("Set bremsstrahlung or delta-e- splitting/Russian roulette per region.");
223   bsCmd->SetGuidance("  bProcNam : process nam    221   bsCmd->SetGuidance("  bProcNam : process name");
224   bsCmd->SetGuidance("  bRegNam  : region name    222   bsCmd->SetGuidance("  bRegNam  : region name");
225   bsCmd->SetGuidance("  bFactor  : number of s    223   bsCmd->SetGuidance("  bFactor  : number of split gamma or probability of Russian roulette");
226   bsCmd->SetGuidance("  bEnergy  : max energy     224   bsCmd->SetGuidance("  bEnergy  : max energy of a secondary for this biasing method");
227   bsCmd->SetGuidance("  bUnit    : energy unit    225   bsCmd->SetGuidance("  bUnit    : energy unit");
228   bsCmd->AvailableForStates(G4State_PreInit,G4    226   bsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
229   bsCmd->SetToBeBroadcasted(false);            << 
230                                                   227 
231   auto bProcNam = new G4UIparameter("bProcNam" << 228   G4UIparameter* bProcNam = new G4UIparameter("bProcNam",'s',false);
232   bsCmd->SetParameter(bProcNam);                  229   bsCmd->SetParameter(bProcNam);
233                                                   230 
234   auto bRegNam = new G4UIparameter("bRegNam",' << 231   G4UIparameter* bRegNam = new G4UIparameter("bRegNam",'s',false);
235   bsCmd->SetParameter(bRegNam);                   232   bsCmd->SetParameter(bRegNam);
236                                                   233 
237   auto bFactor = new G4UIparameter("bFactor",' << 234   G4UIparameter* bFactor = new G4UIparameter("bFactor",'d',false);
238   bsCmd->SetParameter(bFactor);                   235   bsCmd->SetParameter(bFactor);
239                                                   236 
240   auto bEnergy = new G4UIparameter("bEnergy",' << 237   G4UIparameter* bEnergy = new G4UIparameter("bEnergy",'d',false);
241   bsCmd->SetParameter(bEnergy);                   238   bsCmd->SetParameter(bEnergy);
242                                                   239 
243   auto bUnit = new G4UIparameter("bUnit",'s',t << 240   G4UIparameter* bUnit = new G4UIparameter("bUnit",'s',true);
244   bUnit->SetDefaultUnit("MeV");                   241   bUnit->SetDefaultUnit("MeV");
245   bsCmd->SetParameter(bUnit);                     242   bsCmd->SetParameter(bUnit);
246                                                   243 
247   dirSplitCmd = new G4UIcmdWithABool("/process    244   dirSplitCmd = new G4UIcmdWithABool("/process/em/setDirectionalSplitting",this);
248   dirSplitCmd->SetGuidance("Enable directional    245   dirSplitCmd->SetGuidance("Enable directional brem splitting");
249   dirSplitCmd->AvailableForStates(G4State_PreI    246   dirSplitCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
250   dirSplitCmd->SetToBeBroadcasted(false);      << 
251                                                   247 
252   qeCmd = new G4UIcmdWithABool("/process/em/Qu    248   qeCmd = new G4UIcmdWithABool("/process/em/QuantumEntanglement",this);
253   qeCmd->SetGuidance("Enable quantum entanglem    249   qeCmd->SetGuidance("Enable quantum entanglement");
254   qeCmd->AvailableForStates(G4State_PreInit,G4 << 250   qeCmd->AvailableForStates(G4State_PreInit);
255   qeCmd->SetToBeBroadcasted(false);            << 
256                                                   251 
257   dirSplitTargetCmd = new G4UIcmdWith3VectorAn    252   dirSplitTargetCmd = new G4UIcmdWith3VectorAndUnit("/process/em/setDirectionalSplittingTarget",this);
258   dirSplitTargetCmd->SetGuidance("Position of     253   dirSplitTargetCmd->SetGuidance("Position of arget for directional splitting");
259   dirSplitTargetCmd->AvailableForStates(G4Stat    254   dirSplitTargetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
260                                                   255 
261   dirSplitRadiusCmd = new G4UIcmdWithADoubleAn    256   dirSplitRadiusCmd = new G4UIcmdWithADoubleAndUnit("/process/em/setDirectionalSplittingRadius",this);
262   dirSplitRadiusCmd->SetGuidance("Radius of ta    257   dirSplitRadiusCmd->SetGuidance("Radius of target for directional splitting");
263   dirSplitRadiusCmd->AvailableForStates(G4Stat    258   dirSplitRadiusCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
264   dirSplitRadiusCmd->SetToBeBroadcasted(false) << 
265 }                                                 259 }
266                                                   260 
267 //....oooOO0OOooo........oooOO0OOooo........oo    261 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
268                                                   262 
269 G4EmExtraParametersMessenger::~G4EmExtraParame    263 G4EmExtraParametersMessenger::~G4EmExtraParametersMessenger()
270 {                                                 264 {
271   delete paiCmd;                                  265   delete paiCmd;
272   delete mscoCmd;                                 266   delete mscoCmd;
273   delete SubSecCmd;                               267   delete SubSecCmd;
274   delete bfCmd;                                   268   delete bfCmd;
275   delete fiCmd;                                   269   delete fiCmd;
276   delete bsCmd;                                   270   delete bsCmd;
277   delete qeCmd;                                   271   delete qeCmd;
278   delete StepFuncCmd;                             272   delete StepFuncCmd;
279   delete StepFuncCmd1;                            273   delete StepFuncCmd1;
280   delete StepFuncCmd2;                            274   delete StepFuncCmd2;
281   delete StepFuncCmd3;                            275   delete StepFuncCmd3;
282   delete dirSplitCmd;                             276   delete dirSplitCmd;
283   delete dirSplitTargetCmd;                       277   delete dirSplitTargetCmd;
284   delete dirSplitRadiusCmd;                       278   delete dirSplitRadiusCmd;
285 }                                                 279 }
286                                                   280 
287 //....oooOO0OOooo........oooOO0OOooo........oo    281 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
288                                                   282 
289 void G4EmExtraParametersMessenger::SetNewValue    283 void G4EmExtraParametersMessenger::SetNewValue(G4UIcommand* command, 
290                                                   284                                                G4String newValue)
291 {                                                 285 {
292   G4bool physicsModified = false;                 286   G4bool physicsModified = false;
293                                                   287 
294   if (command == paiCmd) {                        288   if (command == paiCmd) {
295     G4String s1(""),s2(""),s3("");                289     G4String s1(""),s2(""),s3("");
296     std::istringstream is(newValue);              290     std::istringstream is(newValue);
297     is >> s1 >> s2 >> s3;                         291     is >> s1 >> s2 >> s3;
298     theParameters->AddPAIModel(s1, s2, s3);       292     theParameters->AddPAIModel(s1, s2, s3);
299   } else if (command == mscoCmd) {                293   } else if (command == mscoCmd) {
300     G4String s1(""),s2("");                       294     G4String s1(""),s2("");
301     std::istringstream is(newValue);              295     std::istringstream is(newValue);
302     is >> s1 >> s2;                               296     is >> s1 >> s2;
303     theParameters->AddPhysics(s1, s2);            297     theParameters->AddPhysics(s1, s2);
304   } else if (command == StepFuncCmd || command    298   } else if (command == StepFuncCmd || command == StepFuncCmd1 || command == StepFuncCmd2 || command == StepFuncCmd3) {
305     G4double v1,v2;                               299     G4double v1,v2;
306     G4String unt;                                 300     G4String unt;
307     std::istringstream is(newValue);              301     std::istringstream is(newValue);
308     is >> v1 >> v2 >> unt;                        302     is >> v1 >> v2 >> unt;
309     v2 *= G4UIcommand::ValueOf(unt);              303     v2 *= G4UIcommand::ValueOf(unt);
310     if(command == StepFuncCmd) {                  304     if(command == StepFuncCmd) {
311       theParameters->SetStepFunction(v1,v2);      305       theParameters->SetStepFunction(v1,v2);
312     } else if(command == StepFuncCmd1) {          306     } else if(command == StepFuncCmd1) {
313       theParameters->SetStepFunctionMuHad(v1,v    307       theParameters->SetStepFunctionMuHad(v1,v2);
314     } else if(command == StepFuncCmd2) {          308     } else if(command == StepFuncCmd2) {
315       theParameters->SetStepFunctionLightIons(    309       theParameters->SetStepFunctionLightIons(v1,v2);
316     } else {                                      310     } else {
317       theParameters->SetStepFunctionIons(v1,v2    311       theParameters->SetStepFunctionIons(v1,v2);
318     }                                             312     }
319     physicsModified = true;                       313     physicsModified = true;
320   } else if (command == SubSecCmd) {              314   } else if (command == SubSecCmd) {
321     theParameters->SetSubCutRegion(newValue);  << 315     G4String s1, s2;
                                                   >> 316     std::istringstream is(newValue);
                                                   >> 317     is >> s1 >> s2;
                                                   >> 318     G4bool yes = false;
                                                   >> 319     if(s1 == "true") { yes = true; }
                                                   >> 320     theParameters->SetSubCutoff(yes,s2);
322   } else if (command == bfCmd) {                  321   } else if (command == bfCmd) {
323     G4double v1(1.0);                             322     G4double v1(1.0);
324     G4String s0(""),s1("");                       323     G4String s0(""),s1("");
325     std::istringstream is(newValue);              324     std::istringstream is(newValue);
326     is >> s0 >> v1 >> s1;                         325     is >> s0 >> v1 >> s1;
327     G4bool yes = false;                           326     G4bool yes = false;
328     if(s1 == "true") { yes = true; }              327     if(s1 == "true") { yes = true; }
329     theParameters->SetProcessBiasingFactor(s0,    328     theParameters->SetProcessBiasingFactor(s0,v1,yes);
330     physicsModified = true;                       329     physicsModified = true;
331   } else if (command == fiCmd) {                  330   } else if (command == fiCmd) {
332     G4double v1(0.0);                             331     G4double v1(0.0);
333     G4String s1(""),s2(""),s3(""),unt("mm");      332     G4String s1(""),s2(""),s3(""),unt("mm");
334     std::istringstream is(newValue);              333     std::istringstream is(newValue);
335     is >> s1 >> s2 >> v1 >> unt >> s3;            334     is >> s1 >> s2 >> v1 >> unt >> s3;
336     G4bool yes = false;                           335     G4bool yes = false;
337     if(s3 == "true") { yes = true; }              336     if(s3 == "true") { yes = true; }
338     v1 *= G4UIcommand::ValueOf(unt);              337     v1 *= G4UIcommand::ValueOf(unt);
339     theParameters->ActivateForcedInteraction(s    338     theParameters->ActivateForcedInteraction(s1,s2,v1,yes);
340     physicsModified = true;                       339     physicsModified = true;
341   } else if (command == bsCmd) {                  340   } else if (command == bsCmd) {
342     G4double fb(1.0),en(1.e+30);                  341     G4double fb(1.0),en(1.e+30);
343     G4String s1(""),s2(""),unt("MeV");            342     G4String s1(""),s2(""),unt("MeV");
344     std::istringstream is(newValue);              343     std::istringstream is(newValue);
345     is >> s1 >> s2 >> fb >> en >> unt;            344     is >> s1 >> s2 >> fb >> en >> unt;
346     en *= G4UIcommand::ValueOf(unt);              345     en *= G4UIcommand::ValueOf(unt);    
347     theParameters->ActivateSecondaryBiasing(s1    346     theParameters->ActivateSecondaryBiasing(s1,s2,fb,en);
348     physicsModified = true;                       347     physicsModified = true;
349   } else if (command == qeCmd) {                  348   } else if (command == qeCmd) {
350     theParameters->SetQuantumEntanglement(qeCm    349     theParameters->SetQuantumEntanglement(qeCmd->GetNewBoolValue(newValue));
351   } else if (command == dirSplitCmd) {            350   } else if (command == dirSplitCmd) {
352     theParameters->SetDirectionalSplitting(       351     theParameters->SetDirectionalSplitting(
353       dirSplitCmd->GetNewBoolValue(newValue));    352       dirSplitCmd->GetNewBoolValue(newValue));
354     physicsModified = true;                       353     physicsModified = true;
355   } else if (command == dirSplitTargetCmd) {      354   } else if (command == dirSplitTargetCmd) {
356     G4ThreeVector t = dirSplitTargetCmd->GetNe    355     G4ThreeVector t = dirSplitTargetCmd->GetNew3VectorValue(newValue);
357     theParameters->SetDirectionalSplittingTarg    356     theParameters->SetDirectionalSplittingTarget(t);
358     physicsModified = true;                       357     physicsModified = true;
359   } else if (command == dirSplitRadiusCmd) {      358   } else if (command == dirSplitRadiusCmd) {
360     G4double r = dirSplitRadiusCmd->GetNewDoub    359     G4double r = dirSplitRadiusCmd->GetNewDoubleValue(newValue);
361     theParameters->SetDirectionalSplittingRadi    360     theParameters->SetDirectionalSplittingRadius(r);
362     physicsModified = true;                       361     physicsModified = true;
363   }                                               362   }
364                                                   363   
365   if(physicsModified) {                           364   if(physicsModified) {
366     G4UImanager::GetUIpointer()->ApplyCommand(    365     G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
367   }                                               366   }
368 }                                                 367 }
369                                                   368 
370 //....oooOO0OOooo........oooOO0OOooo........oo    369 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
371                                                   370