Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/physics_lists/lists/src/G4PhysListFactory.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 /physics_lists/lists/src/G4PhysListFactory.cc (Version 11.3.0) and /physics_lists/lists/src/G4PhysListFactory.cc (Version 11.2.2)


  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 //                                                 28 //
 29 // ClassName:  G4PhysListFactory                   29 // ClassName:  G4PhysListFactory
 30 //                                                 30 //
 31 // Author: 21 April 2008 V. Ivanchenko             31 // Author: 21 April 2008 V. Ivanchenko
 32 //                                                 32 //
 33 // Modified:                                       33 // Modified:
 34 //                                                 34 //
 35 // 2023.04.12 A.Ribon added _HPT variants (i.e     35 // 2023.04.12 A.Ribon added _HPT variants (i.e. HP + thermal scattering)
 36 // 2014.08.05 K.L.Genser used provision for Ha     36 // 2014.08.05 K.L.Genser used provision for Hadronic Physics Variant M in 
 37 //            Shielding for ShieldingM             37 //            Shielding for ShieldingM
 38 //                                                 38 //
 39 //--------------------------------------------     39 //----------------------------------------------------------------------------
 40 //                                                 40 //
 41                                                    41 
 42 #include "G4PhysListFactory.hh"                    42 #include "G4PhysListFactory.hh"
 43 #include "FTFP_BERT.hh"                            43 #include "FTFP_BERT.hh"
 44 #include "FTFP_BERT_HP.hh"                         44 #include "FTFP_BERT_HP.hh"
 45 #include "FTFP_BERT_TRV.hh"                        45 #include "FTFP_BERT_TRV.hh"
 46 #include "FTFP_BERT_ATL.hh"                        46 #include "FTFP_BERT_ATL.hh"
 47 #include "FTFQGSP_BERT.hh"                         47 #include "FTFQGSP_BERT.hh"
 48 #include "FTFP_INCLXX.hh"                          48 #include "FTFP_INCLXX.hh"
 49 #include "FTFP_INCLXX_HP.hh"                       49 #include "FTFP_INCLXX_HP.hh"
 50 #include "FTF_BIC.hh"                              50 #include "FTF_BIC.hh"
 51 #include "LBE.hh"                                  51 #include "LBE.hh"
 52 #include "QBBC.hh"                                 52 #include "QBBC.hh"
 53 #include "QGSP_BERT.hh"                            53 #include "QGSP_BERT.hh"
 54 #include "QGSP_BERT_HP.hh"                         54 #include "QGSP_BERT_HP.hh"
 55 #include "QGSP_BIC.hh"                             55 #include "QGSP_BIC.hh"
 56 #include "QGSP_BIC_HP.hh"                          56 #include "QGSP_BIC_HP.hh"
 57 #include "QGSP_BIC_HPT.hh"                         57 #include "QGSP_BIC_HPT.hh"
 58 #include "QGSP_BIC_AllHP.hh"                       58 #include "QGSP_BIC_AllHP.hh"
 59 #include "QGSP_FTFP_BERT.hh"                       59 #include "QGSP_FTFP_BERT.hh"
 60 #include "QGS_BIC.hh"                              60 #include "QGS_BIC.hh"
 61 #include "QGSP_INCLXX.hh"                          61 #include "QGSP_INCLXX.hh"
 62 #include "QGSP_INCLXX_HP.hh"                       62 #include "QGSP_INCLXX_HP.hh"
 63 #include "Shielding.hh"                            63 #include "Shielding.hh"
 64 #include "ShieldingLEND.hh"                        64 #include "ShieldingLEND.hh"
 65 #include "NuBeam.hh"                               65 #include "NuBeam.hh"
 66 #include "G4ThermalNeutrons.hh"                    66 #include "G4ThermalNeutrons.hh"
 67                                                    67 
 68 #include "G4EmStandardPhysics.hh"                  68 #include "G4EmStandardPhysics.hh"
 69 #include "G4EmStandardPhysics_option1.hh"          69 #include "G4EmStandardPhysics_option1.hh"
 70 #include "G4EmStandardPhysics_option2.hh"          70 #include "G4EmStandardPhysics_option2.hh"
 71 #include "G4EmStandardPhysics_option3.hh"          71 #include "G4EmStandardPhysics_option3.hh"
 72 #include "G4EmStandardPhysics_option4.hh"          72 #include "G4EmStandardPhysics_option4.hh"
 73 #include "G4EmStandardPhysicsGS.hh"                73 #include "G4EmStandardPhysicsGS.hh"
 74 #include "G4EmStandardPhysicsSS.hh"                74 #include "G4EmStandardPhysicsSS.hh"
 75 #include "G4EmStandardPhysicsWVI.hh"               75 #include "G4EmStandardPhysicsWVI.hh"
 76 #include "G4EmLowEPPhysics.hh"                     76 #include "G4EmLowEPPhysics.hh"
 77 #include "G4EmLivermorePhysics.hh"                 77 #include "G4EmLivermorePhysics.hh"
 78 #include "G4EmPenelopePhysics.hh"                  78 #include "G4EmPenelopePhysics.hh"
 79 #include "G4PhysListFactoryMessenger.hh"           79 #include "G4PhysListFactoryMessenger.hh"
 80 #include "G4UImessenger.hh"                        80 #include "G4UImessenger.hh"
 81                                                    81 
 82 G4PhysListFactory::G4PhysListFactory(G4int ver     82 G4PhysListFactory::G4PhysListFactory(G4int ver) 
 83   : defName("FTFP_BERT"),verbose(ver),theMesse     83   : defName("FTFP_BERT"),verbose(ver),theMessenger(nullptr)
 84 {                                                  84 {
 85   nlists_hadr = 36;                                85   nlists_hadr = 36;
 86   G4String ss[36] = {                              86   G4String ss[36] = {
 87     "FTFP_BERT","FTFP_BERT_TRV","FTFP_BERT_ATL     87     "FTFP_BERT","FTFP_BERT_TRV","FTFP_BERT_ATL","FTFP_BERT_HP","FTFQGSP_BERT",
 88     "FTFP_INCLXX","FTFP_INCLXX_HP","FTF_BIC","     88     "FTFP_INCLXX","FTFP_INCLXX_HP","FTF_BIC","LBE","QBBC",
 89     "QGSP_BERT","QGSP_BERT_HP","QGSP_BIC","QGS     89     "QGSP_BERT","QGSP_BERT_HP","QGSP_BIC","QGSP_BIC_HP","QGSP_BIC_AllHP",
 90     "QGSP_FTFP_BERT","QGSP_INCLXX","QGSP_INCLX     90     "QGSP_FTFP_BERT","QGSP_INCLXX","QGSP_INCLXX_HP","QGS_BIC",
 91     "Shielding","ShieldingLEND","ShieldingLIQM     91     "Shielding","ShieldingLEND","ShieldingLIQMD","ShieldingM","NuBeam",
 92     "Shielding_HP","ShieldingLIQMD_HP","Shield     92     "Shielding_HP","ShieldingLIQMD_HP","ShieldingM_HP",
 93     "FTFP_BERT_HPT","FTFP_INCLXX_HPT","QGSP_BE     93     "FTFP_BERT_HPT","FTFP_INCLXX_HPT","QGSP_BERT_HPT","QGSP_BIC_HPT",
 94     "QGSP_BIC_AllHPT","QGSP_INCLXX_HPT","Shiel     94     "QGSP_BIC_AllHPT","QGSP_INCLXX_HPT","Shielding_HPT","ShieldingLIQMD_HPT",
 95     "ShieldingM_HPT"};                             95     "ShieldingM_HPT"};
 96   for (std::size_t i=0; i<nlists_hadr; ++i) {  <<  96   for(size_t i=0; i<nlists_hadr; ++i) {
 97     listnames_hadr.push_back(ss[i]);               97     listnames_hadr.push_back(ss[i]);
 98   }                                                98   }
 99                                                    99 
100   nlists_em = 12;                                 100   nlists_em = 12;
101   G4String s1[12] = {"","_EMV","_EMX","_EMY","    101   G4String s1[12] = {"","_EMV","_EMX","_EMY","_EMZ","_LIV","_PEN",
102          "__GS","__SS","_EM0","_WVI","__LE"};     102          "__GS","__SS","_EM0","_WVI","__LE"};
103   for (std::size_t i=0; i<nlists_em; ++i) {    << 103   for(size_t i=0; i<nlists_em; ++i) {
104     listnames_em.push_back(s1[i]);                104     listnames_em.push_back(s1[i]);
105   }                                               105   }
106 }                                                 106 }
107                                                   107 
108 G4PhysListFactory::~G4PhysListFactory()           108 G4PhysListFactory::~G4PhysListFactory()
109 {                                                 109 {
110   delete theMessenger;                            110   delete theMessenger;
111 }                                                 111 }
112                                                   112 
113 G4VModularPhysicsList*                            113 G4VModularPhysicsList* 
114 G4PhysListFactory::ReferencePhysList()            114 G4PhysListFactory::ReferencePhysList()
115 {                                                 115 {
116   // instantiate PhysList by environment varia    116   // instantiate PhysList by environment variable "PHYSLIST"
117   G4String name = "";                             117   G4String name = "";
118   char* path = std::getenv("PHYSLIST");           118   char* path = std::getenv("PHYSLIST");
119   if (path) {                                     119   if (path) {
120     name = G4String(path);                        120     name = G4String(path);
121   } else {                                        121   } else {
122     name = defName;                               122     name = defName;
123     G4cout << "### G4PhysListFactory WARNING:     123     G4cout << "### G4PhysListFactory WARNING: "
124      << " environment variable PHYSLIST is not    124      << " environment variable PHYSLIST is not defined"
125      << G4endl                                    125      << G4endl
126      << "    Default Physics Lists " << name      126      << "    Default Physics Lists " << name 
127      << " is instantiated"                        127      << " is instantiated" 
128      << G4endl;                                   128      << G4endl;
129   }                                               129   }
130   return GetReferencePhysList(name);              130   return GetReferencePhysList(name);
131 }                                                 131 }
132                                                   132 
133 G4VModularPhysicsList*                            133 G4VModularPhysicsList* 
134 G4PhysListFactory::GetReferencePhysList(const     134 G4PhysListFactory::GetReferencePhysList(const G4String& name)
135 {                                                 135 {
136   // analysis on the string                       136   // analysis on the string 
137   std::size_t n = name.size();                 << 137   size_t n = name.size();
138                                                   138 
139   // last characters in the string                139   // last characters in the string
140   size_t em_opt = 0;                              140   size_t em_opt = 0;
141   G4String em_name = "";                          141   G4String em_name = "";
142                                                   142 
143   // check EM options                             143   // check EM options
144   if(n > 4) {                                     144   if(n > 4) {
145     em_name = name.substr(n - 4, 4);              145     em_name = name.substr(n - 4, 4);
146     for (std::size_t i=1; i<nlists_em; ++i) {  << 146     for(size_t i=1; i<nlists_em; ++i) { 
147       if(listnames_em[i] == em_name) {            147       if(listnames_em[i] == em_name) { 
148   em_opt = i;                                     148   em_opt = i;
149         n -= 4;                                   149         n -= 4;
150         break;                                    150         break; 
151       }                                           151       }
152     }                                             152     }
153     if(0 == em_opt) { em_name = ""; }             153     if(0 == em_opt) { em_name = ""; }
154   }                                               154   }
155                                                   155 
156   // hadronic pHysics List                        156   // hadronic pHysics List
157   G4String had_name = name.substr(0, n);          157   G4String had_name = name.substr(0, n);
158                                                   158 
159   if(0 < verbose) {                               159   if(0 < verbose) {
160     G4cout << "G4PhysListFactory::GetReference    160     G4cout << "G4PhysListFactory::GetReferencePhysList <" << had_name
161      << em_name << ">  EMoption= " << em_opt <    161      << em_name << ">  EMoption= " << em_opt << G4endl;
162   }                                               162   }
163   G4VModularPhysicsList* p = nullptr;             163   G4VModularPhysicsList* p = nullptr;
164   if(had_name == "FTFP_BERT")               {p    164   if(had_name == "FTFP_BERT")               {p = new FTFP_BERT(verbose);}
165   else if(had_name == "FTFP_BERT_HP")       {p    165   else if(had_name == "FTFP_BERT_HP")       {p = new FTFP_BERT_HP(verbose);}
166   else if(had_name == "FTFP_BERT_TRV")      {p    166   else if(had_name == "FTFP_BERT_TRV")      {p = new FTFP_BERT_TRV(verbose);}
167   else if(had_name == "FTFP_BERT_ATL")      {p    167   else if(had_name == "FTFP_BERT_ATL")      {p = new FTFP_BERT_ATL(verbose);}
168   else if(had_name == "FTFQGSP_BERT")       {p    168   else if(had_name == "FTFQGSP_BERT")       {p = new FTFQGSP_BERT(verbose);}
169   else if(had_name == "FTFP_INCLXX")        {p    169   else if(had_name == "FTFP_INCLXX")        {p = new FTFP_INCLXX(verbose);}
170   else if(had_name == "FTFP_INCLXX_HP")     {p    170   else if(had_name == "FTFP_INCLXX_HP")     {p = new FTFP_INCLXX_HP(verbose);}
171   else if(had_name == "FTF_BIC")            {p    171   else if(had_name == "FTF_BIC")            {p = new FTF_BIC(verbose);}
172   else if(had_name == "LBE")                {p    172   else if(had_name == "LBE")                {p = new LBE();}
173   else if(had_name == "QBBC")               {p    173   else if(had_name == "QBBC")               {p = new QBBC(verbose);}
174   else if(had_name == "QGSP_BERT")          {p    174   else if(had_name == "QGSP_BERT")          {p = new QGSP_BERT(verbose);}
175   else if(had_name == "QGSP_BERT_HP")       {p    175   else if(had_name == "QGSP_BERT_HP")       {p = new QGSP_BERT_HP(verbose);}
176   else if(had_name == "QGSP_BIC")           {p    176   else if(had_name == "QGSP_BIC")           {p = new QGSP_BIC(verbose);}
177   else if(had_name == "QGSP_BIC_HP")        {p    177   else if(had_name == "QGSP_BIC_HP")        {p = new QGSP_BIC_HP(verbose);}
178   else if(had_name == "QGSP_BIC_AllHP")     {p    178   else if(had_name == "QGSP_BIC_AllHP")     {p = new QGSP_BIC_AllHP(verbose);}
179   else if(had_name == "QGSP_FTFP_BERT")     {p    179   else if(had_name == "QGSP_FTFP_BERT")     {p = new QGSP_FTFP_BERT(verbose);}
180   else if(had_name == "QGSP_INCLXX")        {p    180   else if(had_name == "QGSP_INCLXX")        {p = new QGSP_INCLXX(verbose);}
181   else if(had_name == "QGSP_INCLXX_HP")     {p    181   else if(had_name == "QGSP_INCLXX_HP")     {p = new QGSP_INCLXX_HP(verbose);}
182   else if(had_name == "QGS_BIC")            {p    182   else if(had_name == "QGS_BIC")            {p = new QGS_BIC(verbose);}
183   else if(had_name == "Shielding")          {p    183   else if(had_name == "Shielding")          {p = new Shielding(verbose);}
184   else if(had_name == "ShieldingLEND")      {p    184   else if(had_name == "ShieldingLEND")      {p = new ShieldingLEND(verbose);}
185   else if(had_name == "ShieldingLIQMD")     {p    185   else if(had_name == "ShieldingLIQMD")     {p = new Shielding(verbose,"HP","",true);}  
186   else if(had_name == "ShieldingM")         {p    186   else if(had_name == "ShieldingM")         {p = new Shielding(verbose,"HP","M");}
187   else if(had_name == "NuBeam")             {p    187   else if(had_name == "NuBeam")             {p = new NuBeam(verbose);}
188   else if(had_name == "Shielding_HP")       {p    188   else if(had_name == "Shielding_HP")       {p = new Shielding(verbose);}
189   else if(had_name == "ShieldingLIQMD_HP")  {p    189   else if(had_name == "ShieldingLIQMD_HP")  {p = new Shielding(verbose,"HP","",true);}
190   else if(had_name == "ShieldingM_HP")      {p    190   else if(had_name == "ShieldingM_HP")      {p = new Shielding(verbose,"HP","M");}
191   else if(had_name == "FTFP_BERT_HPT")      {p    191   else if(had_name == "FTFP_BERT_HPT")      {p = new FTFP_BERT_HP(verbose);
192                                              p    192                                              p->RegisterPhysics(new G4ThermalNeutrons);}
193   else if(had_name == "FTFP_INCLXX_HPT")    {p    193   else if(had_name == "FTFP_INCLXX_HPT")    {p = new FTFP_INCLXX_HP(verbose);
194                                              p    194                                              p->RegisterPhysics(new G4ThermalNeutrons);}
195   else if(had_name == "QGSP_BERT_HPT")      {p    195   else if(had_name == "QGSP_BERT_HPT")      {p = new QGSP_BERT_HP(verbose);
196                                              p    196                                              p->RegisterPhysics(new G4ThermalNeutrons);}
197   else if(had_name == "QGSP_BIC_HPT")       {p    197   else if(had_name == "QGSP_BIC_HPT")       {p = new QGSP_BIC_HPT(verbose);}
198   else if(had_name == "QGSP_BIC_AllHPT")    {p    198   else if(had_name == "QGSP_BIC_AllHPT")    {p = new QGSP_BIC_AllHP(verbose);
199                                              p    199                                              p->RegisterPhysics(new G4ThermalNeutrons);}
200   else if(had_name == "QGSP_INCLXX_HPT")    {p    200   else if(had_name == "QGSP_INCLXX_HPT")    {p = new QGSP_INCLXX_HP(verbose);
201                                              p    201                                              p->RegisterPhysics(new G4ThermalNeutrons);}
202   else if(had_name == "Shielding_HPT")      {p    202   else if(had_name == "Shielding_HPT")      {p = new Shielding(verbose);
203                                              p    203                                              p->RegisterPhysics(new G4ThermalNeutrons);}
204   else if(had_name == "ShieldingLIQMD_HPT") {p    204   else if(had_name == "ShieldingLIQMD_HPT") {p = new Shielding(verbose,"HP","",true);
205                                              p    205                                              p->RegisterPhysics(new G4ThermalNeutrons);}
206   else if(had_name == "ShieldingM_HPT")     {p    206   else if(had_name == "ShieldingM_HPT")     {p = new Shielding(verbose,"HP","M");
207                                              p    207                                              p->RegisterPhysics(new G4ThermalNeutrons);}
208   else {                                          208   else {
209     p = new FTFP_BERT(verbose);                   209     p = new FTFP_BERT(verbose);
210     G4ExceptionDescription ed;                    210     G4ExceptionDescription ed;
211     ed << "PhysicsList " << had_name << " is n    211     ed << "PhysicsList " << had_name << " is not known;"
212        << " the default FTFP_BERT is created";    212        << " the default FTFP_BERT is created";
213     G4Exception("G4PhysListFactory: ","pl0003"    213     G4Exception("G4PhysListFactory: ","pl0003",JustWarning,ed,"");
214   }                                               214   }
215   if(nullptr != p) {                              215   if(nullptr != p) {
216     if(0 < em_opt && had_name != "LBE") {         216     if(0 < em_opt && had_name != "LBE") {
217       if(1 == em_opt) {                           217       if(1 == em_opt) { 
218   p->ReplacePhysics(new G4EmStandardPhysics_op    218   p->ReplacePhysics(new G4EmStandardPhysics_option1(verbose)); 
219       } else if(2 == em_opt) {                    219       } else if(2 == em_opt) {
220   p->ReplacePhysics(new G4EmStandardPhysics_op    220   p->ReplacePhysics(new G4EmStandardPhysics_option2(verbose)); 
221       } else if(3 == em_opt) {                    221       } else if(3 == em_opt) {
222   p->ReplacePhysics(new G4EmStandardPhysics_op    222   p->ReplacePhysics(new G4EmStandardPhysics_option3(verbose)); 
223       } else if(4 == em_opt) {                    223       } else if(4 == em_opt) {
224   p->ReplacePhysics(new G4EmStandardPhysics_op    224   p->ReplacePhysics(new G4EmStandardPhysics_option4(verbose)); 
225       } else if(5 == em_opt) {                    225       } else if(5 == em_opt) {
226   p->ReplacePhysics(new G4EmLivermorePhysics(v    226   p->ReplacePhysics(new G4EmLivermorePhysics(verbose)); 
227       } else if(6 == em_opt) {                    227       } else if(6 == em_opt) {
228   p->ReplacePhysics(new G4EmPenelopePhysics(ve    228   p->ReplacePhysics(new G4EmPenelopePhysics(verbose)); 
229       } else if(7 == em_opt) {                    229       } else if(7 == em_opt) {
230   p->ReplacePhysics(new G4EmStandardPhysicsGS(    230   p->ReplacePhysics(new G4EmStandardPhysicsGS(verbose)); 
231       } else if(8 == em_opt) {                    231       } else if(8 == em_opt) {
232   p->ReplacePhysics(new G4EmStandardPhysicsSS(    232   p->ReplacePhysics(new G4EmStandardPhysicsSS(verbose)); 
233       } else if(9 == em_opt) {                    233       } else if(9 == em_opt) {
234   p->ReplacePhysics(new G4EmStandardPhysics(ve    234   p->ReplacePhysics(new G4EmStandardPhysics(verbose)); 
235       } else if(10 == em_opt) {                   235       } else if(10 == em_opt) {
236   p->ReplacePhysics(new G4EmStandardPhysicsWVI    236   p->ReplacePhysics(new G4EmStandardPhysicsWVI(verbose)); 
237       } else if(11 == em_opt) {                   237       } else if(11 == em_opt) {
238   p->ReplacePhysics(new G4EmLowEPPhysics(verbo    238   p->ReplacePhysics(new G4EmLowEPPhysics(verbose)); 
239       }                                           239       }
240     }                                             240     }
241     theMessenger = new G4PhysListFactoryMessen    241     theMessenger = new G4PhysListFactoryMessenger(p);
242   }                                               242   }
243   if(0 < verbose) G4cout << G4endl;               243   if(0 < verbose) G4cout << G4endl;
244   return p;                                       244   return p;
245 }                                                 245 }
246                                                   246   
247 G4bool G4PhysListFactory::IsReferencePhysList(    247 G4bool G4PhysListFactory::IsReferencePhysList(const G4String& name) const
248 {                                                 248 {
249   G4bool res = false;                             249   G4bool res = false;
250   std::size_t n = name.size();                 << 250   size_t n = name.size();
251   if(n > 4) {                                     251   if(n > 4) {
252     G4String em_name = name.substr(n - 4, 4);     252     G4String em_name = name.substr(n - 4, 4);
253     for (std::size_t i=1; i<nlists_em; ++i) {  << 253     for(size_t i=1; i<nlists_em; ++i) { 
254       if(listnames_em[i] == em_name) {            254       if(listnames_em[i] == em_name) { 
255         n -= 4;                                   255         n -= 4;
256         break;                                    256         break; 
257       }                                           257       }
258     }                                             258     }
259   }                                               259   }
260   G4String had_name = name.substr(0, n);          260   G4String had_name = name.substr(0, n);
261   for (std::size_t i=0; i<nlists_hadr; ++i) {  << 261   for(size_t i=0; i<nlists_hadr; ++i) {
262     if(had_name == listnames_hadr[i]) {           262     if(had_name == listnames_hadr[i]) {
263       res = true;                                 263       res = true;
264       break;                                      264       break;
265     }                                             265     }
266   }                                               266   }
267   return res;                                     267   return res;
268 }                                                 268 }
269                                                   269 
270 const std::vector<G4String>&                      270 const std::vector<G4String>& 
271 G4PhysListFactory::AvailablePhysLists() const     271 G4PhysListFactory::AvailablePhysLists() const
272 {                                                 272 {
273   return listnames_hadr;                          273   return listnames_hadr;
274 }                                                 274 }
275                                                   275 
276 const std::vector<G4String>&                      276 const std::vector<G4String>& 
277 G4PhysListFactory::AvailablePhysListsEM() cons    277 G4PhysListFactory::AvailablePhysListsEM() const
278 {                                                 278 {
279   return listnames_em;                            279   return listnames_em;
280 }                                                 280 }
281                                                   281 
282                                                   282