Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/electromagnetic/TestEm7/src/PhysicsList.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 /examples/extended/electromagnetic/TestEm7/src/PhysicsList.cc (Version 11.3.0) and /examples/extended/electromagnetic/TestEm7/src/PhysicsList.cc (Version 10.2.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 /// \file electromagnetic/TestEm7/src/PhysicsL     26 /// \file electromagnetic/TestEm7/src/PhysicsList.cc
 27 /// \brief Implementation of the PhysicsList c     27 /// \brief Implementation of the PhysicsList class
 28 //                                                 28 //
                                                   >>  29 // $Id: PhysicsList.cc 93675 2015-10-28 09:59:23Z gcosmo $
 29 //                                                 30 //
 30 //....oooOO0OOooo........oooOO0OOooo........oo     31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 31 //....oooOO0OOooo........oooOO0OOooo........oo     32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 32                                                    33 
 33 #include "PhysicsList.hh"                          34 #include "PhysicsList.hh"
                                                   >>  35 #include "PhysicsListMessenger.hh"
 34                                                    36 
 35 #include "PhysListEmStandard.hh"                   37 #include "PhysListEmStandard.hh"
                                                   >>  38 #include "PhysListEmStandardSS.hh"
 36 #include "PhysListEmStandardNR.hh"                 39 #include "PhysListEmStandardNR.hh"
 37 #include "PhysicsListMessenger.hh"             << 
 38 #include "StepMax.hh"                          << 
 39                                                << 
 40 #include "G4BetheBlochIonGasModel.hh"          << 
 41 #include "G4BraggIonGasModel.hh"               << 
 42 #include "G4Decay.hh"                          << 
 43 #include "G4DecayPhysics.hh"                   << 
 44 #include "G4EmConfigurator.hh"                 << 
 45 #include "G4EmLivermorePhysics.hh"             << 
 46 #include "G4EmLowEPPhysics.hh"                 << 
 47 #include "G4EmPenelopePhysics.hh"              << 
 48 #include "G4EmStandardPhysics.hh"                  40 #include "G4EmStandardPhysics.hh"
 49 #include "G4EmStandardPhysicsGS.hh"            << 
 50 #include "G4EmStandardPhysicsSS.hh"            << 
 51 #include "G4EmStandardPhysicsWVI.hh"           << 
 52 #include "G4EmStandardPhysics_option1.hh"          41 #include "G4EmStandardPhysics_option1.hh"
 53 #include "G4EmStandardPhysics_option2.hh"          42 #include "G4EmStandardPhysics_option2.hh"
 54 #include "G4EmStandardPhysics_option3.hh"          43 #include "G4EmStandardPhysics_option3.hh"
 55 #include "G4EmStandardPhysics_option4.hh"          44 #include "G4EmStandardPhysics_option4.hh"
 56 #include "G4HadronDElasticPhysics.hh"          <<  45 #include "G4EmStandardPhysicsWVI.hh"
                                                   >>  46 #include "G4EmStandardPhysicsGS.hh"
                                                   >>  47 #include "G4EmStandardPhysicsSS.hh"
                                                   >>  48 
                                                   >>  49 #include "G4EmLivermorePhysics.hh"
                                                   >>  50 #include "G4EmPenelopePhysics.hh"
                                                   >>  51 #include "G4EmLowEPPhysics.hh"
                                                   >>  52 
                                                   >>  53 #include "G4DecayPhysics.hh"
                                                   >>  54 
 57 #include "G4HadronElasticPhysics.hh"               55 #include "G4HadronElasticPhysics.hh"
                                                   >>  56 #include "G4HadronDElasticPhysics.hh"
 58 #include "G4HadronHElasticPhysics.hh"              57 #include "G4HadronHElasticPhysics.hh"
 59 #include "G4HadronInelasticQBBC.hh"                58 #include "G4HadronInelasticQBBC.hh"
 60 #include "G4IonFluctuations.hh"                << 
 61 #include "G4IonParametrisedLossModel.hh"       << 
 62 #include "G4IonPhysics.hh"                         59 #include "G4IonPhysics.hh"
                                                   >>  60 
 63 #include "G4LossTableManager.hh"                   61 #include "G4LossTableManager.hh"
 64 #include "G4PhysicalConstants.hh"              <<  62 #include "G4EmConfigurator.hh"
 65 #include "G4ProcessManager.hh"                 << 
 66 #include "G4SystemOfUnits.hh"                  << 
 67 #include "G4UnitsTable.hh"                         63 #include "G4UnitsTable.hh"
                                                   >>  64 
                                                   >>  65 #include "G4ProcessManager.hh"
                                                   >>  66 #include "G4Decay.hh"
                                                   >>  67 
                                                   >>  68 #include "StepMax.hh"
                                                   >>  69 
                                                   >>  70 #include "G4IonFluctuations.hh"
                                                   >>  71 #include "G4IonParametrisedLossModel.hh"
 68 #include "G4UniversalFluctuation.hh"               72 #include "G4UniversalFluctuation.hh"
 69                                                    73 
                                                   >>  74 #include "G4BraggIonGasModel.hh"
                                                   >>  75 #include "G4BetheBlochIonGasModel.hh"
                                                   >>  76 
                                                   >>  77 #include "G4PhysicalConstants.hh"
                                                   >>  78 #include "G4SystemOfUnits.hh"
                                                   >>  79 
 70 //....oooOO0OOooo........oooOO0OOooo........oo     80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 71                                                    81 
 72 PhysicsList::PhysicsList() : G4VModularPhysics <<  82 PhysicsList::PhysicsList() : G4VModularPhysicsList(),
                                                   >>  83   fEmPhysicsList(0),
                                                   >>  84   fDecPhysicsList(0),
                                                   >>  85   fHadronPhys(),    
                                                   >>  86   fStepMaxProcess(0),
                                                   >>  87   fMessenger(0)
 73 {                                                  88 {
 74   fHelIsRegisted = false;                      <<  89   G4LossTableManager::Instance();
 75   fBicIsRegisted = false;                      <<  90 
                                                   >>  91   fHelIsRegisted  = false;
                                                   >>  92   fBicIsRegisted  = false;
 76   fBiciIsRegisted = false;                         93   fBiciIsRegisted = false;
 77                                                    94 
 78   // protected member of the base class        <<  95   fStepMaxProcess  = 0;
 79   verboseLevel = 1;                            << 
 80                                                    96 
 81   fMessenger = new PhysicsListMessenger(this);     97   fMessenger = new PhysicsListMessenger(this);
 82                                                    98 
                                                   >>  99   SetVerboseLevel(1);
                                                   >> 100 
 83   // EM physics                                   101   // EM physics
 84   fEmName = G4String("emstandard_opt0");       << 102   fEmName = G4String("emstandard_opt0");  
 85   fEmPhysicsList = new G4EmStandardPhysics(ver << 103   fEmPhysicsList = new G4EmStandardPhysics(1);
 86                                                   104 
 87   // Deacy physics and all particles              105   // Deacy physics and all particles
 88   fDecPhysicsList = new G4DecayPhysics(verbose << 106   fDecPhysicsList = new G4DecayPhysics();
 89 }                                                 107 }
 90                                                   108 
 91 //....oooOO0OOooo........oooOO0OOooo........oo    109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 92                                                   110 
 93 PhysicsList::~PhysicsList()                       111 PhysicsList::~PhysicsList()
 94 {                                                 112 {
 95   delete fMessenger;                              113   delete fMessenger;
 96   delete fEmPhysicsList;                          114   delete fEmPhysicsList;
 97   delete fDecPhysicsList;                         115   delete fDecPhysicsList;
 98   for (size_t i = 0; i < fHadronPhys.size(); i << 116   for(size_t i=0; i<fHadronPhys.size(); i++) {delete fHadronPhys[i];}
 99     delete fHadronPhys[i];                     << 
100   }                                            << 
101 }                                                 117 }
102                                                   118 
103 //....oooOO0OOooo........oooOO0OOooo........oo    119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
104                                                   120 
105 void PhysicsList::ConstructParticle()             121 void PhysicsList::ConstructParticle()
106 {                                                 122 {
107   fDecPhysicsList->ConstructParticle();           123   fDecPhysicsList->ConstructParticle();
108 }                                                 124 }
109                                                   125 
110 //....oooOO0OOooo........oooOO0OOooo........oo    126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111                                                   127 
112 void PhysicsList::ConstructProcess()              128 void PhysicsList::ConstructProcess()
113 {                                                 129 {
114   // transportation                               130   // transportation
115   //                                              131   //
116   AddTransportation();                            132   AddTransportation();
117                                                << 133   
118   // electromagnetic physics list                 134   // electromagnetic physics list
119   //                                              135   //
120   fEmPhysicsList->ConstructProcess();             136   fEmPhysicsList->ConstructProcess();
121                                                   137 
122   // decay physics list                           138   // decay physics list
123   //                                              139   //
124   fDecPhysicsList->ConstructProcess();            140   fDecPhysicsList->ConstructProcess();
125                                                << 141   
126   // hadronic physics lists                       142   // hadronic physics lists
127   for (size_t i = 0; i < fHadronPhys.size(); i << 143   for(size_t i=0; i<fHadronPhys.size(); i++) {
128     fHadronPhys[i]->ConstructProcess();           144     fHadronPhys[i]->ConstructProcess();
129   }                                               145   }
130                                                << 146   
131   // step limitation (as a full process)          147   // step limitation (as a full process)
132   //                                           << 148   //  
133   AddStepMax();                                << 149   AddStepMax();  
134 }                                                 150 }
135                                                   151 
136 //....oooOO0OOooo........oooOO0OOooo........oo    152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
137                                                   153 
138 void PhysicsList::AddPhysicsList(const G4Strin    154 void PhysicsList::AddPhysicsList(const G4String& name)
139 {                                                 155 {
140   if (verboseLevel > 1) {                      << 156   if (verboseLevel>1) {
141     G4cout << "PhysicsList::AddPhysicsList: <"    157     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
142   }                                               158   }
143                                                   159 
144   if (name == fEmName) return;                    160   if (name == fEmName) return;
145                                                   161 
146   if (name == "local") {                          162   if (name == "local") {
                                                   >> 163 
147     fEmName = name;                               164     fEmName = name;
148     delete fEmPhysicsList;                        165     delete fEmPhysicsList;
149     fEmPhysicsList = new PhysListEmStandard(na    166     fEmPhysicsList = new PhysListEmStandard(name);
150   }                                            << 167 
151   else if (name == "emstandard_opt0") {        << 168   } else if (name == "emstandard_opt0") {
                                                   >> 169 
152     fEmName = name;                               170     fEmName = name;
153     delete fEmPhysicsList;                        171     delete fEmPhysicsList;
154     fEmPhysicsList = new G4EmStandardPhysics(v << 172     fEmPhysicsList = new G4EmStandardPhysics(1);
155   }                                            << 173 
156   else if (name == "emstandard_opt1") {        << 174   } else if (name == "emstandard_opt1") {
                                                   >> 175 
157     fEmName = name;                               176     fEmName = name;
158     delete fEmPhysicsList;                        177     delete fEmPhysicsList;
159     fEmPhysicsList = new G4EmStandardPhysics_o << 178     fEmPhysicsList = new G4EmStandardPhysics_option1();
160   }                                            << 179 
161   else if (name == "emstandard_opt2") {        << 180   } else if (name == "emstandard_opt2") {
                                                   >> 181 
162     fEmName = name;                               182     fEmName = name;
163     delete fEmPhysicsList;                        183     delete fEmPhysicsList;
164     fEmPhysicsList = new G4EmStandardPhysics_o << 184     fEmPhysicsList = new G4EmStandardPhysics_option2();
165   }                                            << 185     
166   else if (name == "emstandard_opt3") {        << 186   } else if (name == "emstandard_opt3") {
                                                   >> 187 
167     fEmName = name;                               188     fEmName = name;
168     delete fEmPhysicsList;                        189     delete fEmPhysicsList;
169     fEmPhysicsList = new G4EmStandardPhysics_o << 190     fEmPhysicsList = new G4EmStandardPhysics_option3();    
170   }                                            << 191     
171   else if (name == "emstandard_opt4") {        << 192   } else if (name == "emstandard_opt4") {
                                                   >> 193 
172     fEmName = name;                               194     fEmName = name;
173     delete fEmPhysicsList;                        195     delete fEmPhysicsList;
174     fEmPhysicsList = new G4EmStandardPhysics_o << 196     fEmPhysicsList = new G4EmStandardPhysics_option4();    
175   }                                            << 197 
176   else if (name == "ionGasModels") {           << 198   } else if (name == "standardSS") {
                                                   >> 199 
                                                   >> 200     fEmName = name;
                                                   >> 201     delete fEmPhysicsList;
                                                   >> 202     fEmPhysicsList = new PhysListEmStandardSS(name);
                                                   >> 203 
                                                   >> 204   } else if (name == "ionGasModels") {
                                                   >> 205 
177     AddPhysicsList("emstandard_opt0");            206     AddPhysicsList("emstandard_opt0");
178     fEmName = name;                               207     fEmName = name;
179     AddIonGasModels();                            208     AddIonGasModels();
180   }                                            << 209 
181   else if (name == "standardNR") {             << 210   } else if (name == "standardNR") {
                                                   >> 211 
182     fEmName = name;                               212     fEmName = name;
183     delete fEmPhysicsList;                        213     delete fEmPhysicsList;
184     fEmPhysicsList = new PhysListEmStandardNR(    214     fEmPhysicsList = new PhysListEmStandardNR(name);
185   }                                            << 215 
186   else if (name == "emlivermore") {            << 216   } else if (name == "emlivermore") {
187     fEmName = name;                               217     fEmName = name;
188     delete fEmPhysicsList;                        218     delete fEmPhysicsList;
189     fEmPhysicsList = new G4EmLivermorePhysics( << 219     fEmPhysicsList = new G4EmLivermorePhysics();
190   }                                            << 220 
191   else if (name == "empenelope") {             << 221   } else if (name == "empenelope") {
192     fEmName = name;                               222     fEmName = name;
193     delete fEmPhysicsList;                        223     delete fEmPhysicsList;
194     fEmPhysicsList = new G4EmPenelopePhysics(v << 224     fEmPhysicsList = new G4EmPenelopePhysics();
195   }                                            << 225 
196   else if (name == "emlowenergy") {            << 226   } else if (name == "emlowenergy") {
197     fEmName = name;                               227     fEmName = name;
198     delete fEmPhysicsList;                        228     delete fEmPhysicsList;
199     fEmPhysicsList = new G4EmLowEPPhysics(verb << 229     fEmPhysicsList = new G4EmLowEPPhysics();
200   }                                            << 230 
201   else if (name == "emstandardSS") {           << 231   } else if (name == "emstandardSS") {
                                                   >> 232 
202     fEmName = name;                               233     fEmName = name;
203     delete fEmPhysicsList;                        234     delete fEmPhysicsList;
204     fEmPhysicsList = new G4EmStandardPhysicsSS << 235     fEmPhysicsList = new G4EmStandardPhysicsSS();
205   }                                            << 236 
206   else if (name == "emstandardWVI") {          << 237   } else if (name == "emstandardWVI") {
                                                   >> 238 
207     fEmName = name;                               239     fEmName = name;
208     delete fEmPhysicsList;                        240     delete fEmPhysicsList;
209     fEmPhysicsList = new G4EmStandardPhysicsWV << 241     fEmPhysicsList = new G4EmStandardPhysicsWVI();
210   }                                            << 242 
211   else if (name == "emstandardGS") {           << 243   } else if (name == "emstandardGS") {
                                                   >> 244 
212     fEmName = name;                               245     fEmName = name;
213     delete fEmPhysicsList;                        246     delete fEmPhysicsList;
214     fEmPhysicsList = new G4EmStandardPhysicsGS << 247     fEmPhysicsList = new G4EmStandardPhysicsGS();
215   }                                            << 248 
216   else if (name == "elastic" && !fHelIsRegiste << 249 
217     fHadronPhys.push_back(new G4HadronElasticP << 250   } else if (name == "elastic" && !fHelIsRegisted) {
                                                   >> 251     fHadronPhys.push_back( new G4HadronElasticPhysics());
218     fHelIsRegisted = true;                        252     fHelIsRegisted = true;
219   }                                            << 253 
220   else if (name == "DElastic" && !fHelIsRegist << 254   } else if (name == "DElastic" && !fHelIsRegisted) {
221     fHadronPhys.push_back(new G4HadronDElastic << 255     fHadronPhys.push_back( new G4HadronDElasticPhysics());
222     fHelIsRegisted = true;                        256     fHelIsRegisted = true;
223   }                                            << 257 
224   else if (name == "HElastic" && !fHelIsRegist << 258   } else if (name == "HElastic" && !fHelIsRegisted) {
225     fHadronPhys.push_back(new G4HadronHElastic << 259     fHadronPhys.push_back( new G4HadronHElasticPhysics());
226     fHelIsRegisted = true;                        260     fHelIsRegisted = true;
227   }                                            << 261 
228   else if (name == "binary" && !fBicIsRegisted << 262   } else if (name == "binary" && !fBicIsRegisted) {
229     fHadronPhys.push_back(new G4HadronInelasti << 263     fHadronPhys.push_back(new G4HadronInelasticQBBC());
230     fBicIsRegisted = true;                        264     fBicIsRegisted = true;
231   }                                            << 265 
232   else if (name == "binary_ion" && !fBiciIsReg << 266   } else if (name == "binary_ion" && !fBiciIsRegisted) {
233     fHadronPhys.push_back(new G4IonPhysics(ver << 267     fHadronPhys.push_back(new G4IonPhysics());
234     fBiciIsRegisted = true;                       268     fBiciIsRegisted = true;
235   }                                            << 269 
236   else {                                       << 270   } else {
                                                   >> 271 
237     G4cout << "PhysicsList::AddPhysicsList: <"    272     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
238            << " is not defined" << G4endl;     << 273            << " is not defined"
                                                   >> 274            << G4endl;
239   }                                               275   }
240 }                                                 276 }
241                                                   277 
242 //....oooOO0OOooo........oooOO0OOooo........oo    278 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
243                                                   279 
244 void PhysicsList::AddStepMax()                    280 void PhysicsList::AddStepMax()
245 {                                                 281 {
246   // Step limitation seen as a process            282   // Step limitation seen as a process
247   fStepMaxProcess = new StepMax();                283   fStepMaxProcess = new StepMax();
248                                                   284 
249   auto particleIterator = GetParticleIterator( << 285   theParticleIterator->reset();
250   particleIterator->reset();                   << 286   while ((*theParticleIterator)()){
251   while ((*particleIterator)()) {              << 287     G4ParticleDefinition* particle = theParticleIterator->value();
252     G4ParticleDefinition* particle = particleI << 
253     G4ProcessManager* pmanager = particle->Get    288     G4ProcessManager* pmanager = particle->GetProcessManager();
254                                                   289 
255     if (fStepMaxProcess->IsApplicable(*particl << 290     if (fStepMaxProcess->IsApplicable(*particle) && pmanager)
256       pmanager->AddDiscreteProcess(fStepMaxPro << 291       {
257     }                                          << 292         pmanager ->AddDiscreteProcess(fStepMaxProcess);
                                                   >> 293       }
258   }                                               294   }
259 }                                                 295 }
260                                                   296 
261 //....oooOO0OOooo........oooOO0OOooo........oo    297 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
262                                                   298 
263 void PhysicsList::AddIonGasModels()               299 void PhysicsList::AddIonGasModels()
264 {                                                 300 {
265   G4EmConfigurator* em_config = G4LossTableMan << 301   G4EmConfigurator* em_config = 
266   auto particleIterator = GetParticleIterator( << 302     G4LossTableManager::Instance()->EmConfigurator();
267   particleIterator->reset();                   << 303   theParticleIterator->reset();
268   while ((*particleIterator)()) {              << 304   while ((*theParticleIterator)())
269     G4ParticleDefinition* particle = particleI << 305   {
                                                   >> 306     G4ParticleDefinition* particle = theParticleIterator->value();
270     G4String partname = particle->GetParticleN    307     G4String partname = particle->GetParticleName();
271     if (partname == "alpha" || partname == "He << 308     if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
272       G4BraggIonGasModel* mod1 = new G4BraggIo    309       G4BraggIonGasModel* mod1 = new G4BraggIonGasModel();
273       G4BetheBlochIonGasModel* mod2 = new G4Be    310       G4BetheBlochIonGasModel* mod2 = new G4BetheBlochIonGasModel();
274       G4double eth = 2. * MeV * particle->GetP << 311       G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
275       em_config->SetExtraEmModel(partname, "io << 312       em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
276       em_config->SetExtraEmModel(partname, "io << 313                                  new G4IonFluctuations());
                                                   >> 314       em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
277                                  new G4Univers    315                                  new G4UniversalFluctuation());
                                                   >> 316 
278     }                                             317     }
279   }                                               318   }
280 }                                                 319 }
281                                                   320 
282 //....oooOO0OOooo........oooOO0OOooo........oo    321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 322 
283                                                   323