Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/electromagnetic/TestEm9/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/TestEm9/src/PhysicsList.cc (Version 11.3.0) and /examples/extended/electromagnetic/TestEm9/src/PhysicsList.cc (Version 10.0.p3)


  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/TestEm9/src/PhysicsL     26 /// \file electromagnetic/TestEm9/src/PhysicsList.cc
 27 /// \brief Implementation of the PhysicsList c     27 /// \brief Implementation of the PhysicsList class
 28 //                                                 28 //
                                                   >>  29 // $Id: PhysicsList.cc 68585 2013-04-01 23:35:07Z adotti $
 29 //                                                 30 //
 30 //--------------------------------------------     31 //---------------------------------------------------------------------------
 31 //                                                 32 //
 32 // ClassName:   PhysicsList                        33 // ClassName:   PhysicsList
 33 //                                                 34 //
 34 // Author:      V.Ivanchenko 14.10.2002            35 // Author:      V.Ivanchenko 14.10.2002
 35 //                                                 36 //
 36 // Modified:                                       37 // Modified:
 37 // 17.11.06 Use components from physics_lists      38 // 17.11.06 Use components from physics_lists subdirectory (V.Ivanchenko)
 38 // 24.10.12 Migrated to new stopping and ion p     39 // 24.10.12 Migrated to new stopping and ion physics (A.Ribon)
 39 //                                                 40 //
 40 //--------------------------------------------     41 //----------------------------------------------------------------------------
 41 //                                                 42 //
 42                                                    43 
 43 //....oooOO0OOooo........oooOO0OOooo........oo     44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 44 //....oooOO0OOooo........oooOO0OOooo........oo     45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 45                                                    46 
 46 #include "PhysicsList.hh"                          47 #include "PhysicsList.hh"
 47                                                << 
 48 #include "PhysListEmStandard.hh"               << 
 49 #include "PhysicsListMessenger.hh"                 48 #include "PhysicsListMessenger.hh"
 50 #include "StepMax.hh"                          << 
 51                                                    49 
 52 #include "G4DecayPhysics.hh"                   <<  50 #include "PhysListEmStandard.hh"
 53 #include "G4Electron.hh"                       << 
 54 #include "G4EmExtraPhysics.hh"                 << 
 55 #include "G4EmLivermorePhysics.hh"             << 
 56 #include "G4EmLowEPPhysics.hh"                 << 
 57 #include "G4EmPenelopePhysics.hh"              << 
 58 #include "G4EmStandardPhysics.hh"                  51 #include "G4EmStandardPhysics.hh"
 59 #include "G4EmStandardPhysicsGS.hh"            << 
 60 #include "G4EmStandardPhysicsSS.hh"            << 
 61 #include "G4EmStandardPhysicsWVI.hh"           << 
 62 #include "G4EmStandardPhysics_option1.hh"          52 #include "G4EmStandardPhysics_option1.hh"
 63 #include "G4EmStandardPhysics_option2.hh"          53 #include "G4EmStandardPhysics_option2.hh"
 64 #include "G4EmStandardPhysics_option3.hh"          54 #include "G4EmStandardPhysics_option3.hh"
 65 #include "G4EmStandardPhysics_option4.hh"          55 #include "G4EmStandardPhysics_option4.hh"
 66 #include "G4Gamma.hh"                          <<  56 #include "G4EmLivermorePhysics.hh"
                                                   >>  57 #include "G4EmPenelopePhysics.hh"
                                                   >>  58 #include "G4DecayPhysics.hh"
 67 #include "G4HadronElasticPhysics.hh"               59 #include "G4HadronElasticPhysics.hh"
 68 #include "G4HadronInelasticQBBC.hh"                60 #include "G4HadronInelasticQBBC.hh"
 69 #include "G4IonPhysics.hh"                         61 #include "G4IonPhysics.hh"
 70 #include "G4LossTableManager.hh"               <<  62 #include "G4EmExtraPhysics.hh"
 71 #include "G4ParticleTable.hh"                  <<  63 #include "G4StoppingPhysics.hh"
                                                   >>  64 
                                                   >>  65 #include "G4RegionStore.hh"
                                                   >>  66 #include "G4Region.hh"
                                                   >>  67 #include "G4ProductionCuts.hh"
                                                   >>  68 #include "G4ProcessManager.hh"
 72 #include "G4ParticleTypes.hh"                      69 #include "G4ParticleTypes.hh"
                                                   >>  70 #include "G4ParticleTable.hh"
                                                   >>  71 
                                                   >>  72 #include "G4Gamma.hh"
                                                   >>  73 #include "G4Electron.hh"
 73 #include "G4Positron.hh"                           74 #include "G4Positron.hh"
 74 #include "G4ProcessManager.hh"                 << 
 75 #include "G4Proton.hh"                             75 #include "G4Proton.hh"
 76 #include "G4RegionStore.hh"                    <<  76 
 77 #include "G4StoppingPhysics.hh"                << 
 78 #include "G4SystemOfUnits.hh"                  << 
 79 #include "G4UnitsTable.hh"                         77 #include "G4UnitsTable.hh"
                                                   >>  78 #include "G4SystemOfUnits.hh"
                                                   >>  79 #include "G4LossTableManager.hh"
                                                   >>  80 #include "StepMax.hh"
                                                   >>  81 
                                                   >>  82 #include "G4EmProcessOptions.hh"
 80                                                    83 
 81 //....oooOO0OOooo........oooOO0OOooo........oo     84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 82                                                    85 
 83 PhysicsList::PhysicsList()                     <<  86 PhysicsList::PhysicsList() : G4VModularPhysicsList(),
 84   : G4VModularPhysicsList(),                   <<  87   fEmPhysicsList(0),
 85     fEmPhysicsList(nullptr),                   <<  88   fDecayPhysicsList(0),
 86     fDecayPhysicsList(nullptr),                <<  89   fStepMaxProcess(0),
 87     fStepMaxProcess(nullptr),                  <<  90   fMessenger(0),
 88     fMessenger(nullptr)                        <<  91   fVertexDetectorCuts(0),
                                                   >>  92   fMuonDetectorCuts(0)
 89 {                                                  93 {
 90   G4LossTableManager::Instance();                  94   G4LossTableManager::Instance();
 91   SetDefaultCutValue(1 * mm);                  <<  95   defaultCutValue  = 1.*mm;
                                                   >>  96   fCutForGamma     = defaultCutValue;
                                                   >>  97   fCutForElectron  = defaultCutValue;
                                                   >>  98   fCutForPositron  = defaultCutValue;
                                                   >>  99   fCutForVertexDetector = defaultCutValue;
                                                   >> 100   fCutForMuonDetector   = defaultCutValue;
                                                   >> 101 
                                                   >> 102   fVertexDetectorCuts = 0;
                                                   >> 103   fMuonDetectorCuts   = 0;
 92                                                   104 
 93   fMessenger = new PhysicsListMessenger(this);    105   fMessenger = new PhysicsListMessenger(this);
 94   fStepMaxProcess = new StepMax();                106   fStepMaxProcess = new StepMax();
 95                                                   107 
 96   // Initilise flags                              108   // Initilise flags
 97                                                   109 
 98   SetVerboseLevel(1);                             110   SetVerboseLevel(1);
 99                                                   111 
100   fHelIsRegisted = false;                      << 112   fHelIsRegisted  = false;
101   fBicIsRegisted = false;                      << 113   fBicIsRegisted  = false;
102   fGnucIsRegisted = false;                        114   fGnucIsRegisted = false;
103   fStopIsRegisted = false;                        115   fStopIsRegisted = false;
104                                                   116 
105   // EM physics                                   117   // EM physics
106   fEmName = G4String("emstandard");               118   fEmName = G4String("emstandard");
107   fEmPhysicsList = new G4EmStandardPhysics();     119   fEmPhysicsList = new G4EmStandardPhysics();
108                                                   120 
109   // Decay Physics is always defined              121   // Decay Physics is always defined
110   fDecayPhysicsList = new G4DecayPhysics();       122   fDecayPhysicsList = new G4DecayPhysics();
111 }                                                 123 }
112                                                   124 
113 //....oooOO0OOooo........oooOO0OOooo........oo    125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114                                                   126 
115 PhysicsList::~PhysicsList()                       127 PhysicsList::~PhysicsList()
116 {                                                 128 {
117   delete fMessenger;                              129   delete fMessenger;
118   delete fDecayPhysicsList;                       130   delete fDecayPhysicsList;
119   delete fEmPhysicsList;                          131   delete fEmPhysicsList;
120   delete fStepMaxProcess;                         132   delete fStepMaxProcess;
121   for (size_t i = 0; i < fHadronPhys.size(); i << 133   for(size_t i=0; i<fHadronPhys.size(); i++) {
122     delete fHadronPhys[i];                        134     delete fHadronPhys[i];
123   }                                               135   }
124 }                                                 136 }
125                                                   137 
126 //....oooOO0OOooo........oooOO0OOooo........oo    138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127                                                   139 
128 void PhysicsList::ConstructParticle()             140 void PhysicsList::ConstructParticle()
129 {                                                 141 {
130   fDecayPhysicsList->ConstructParticle();         142   fDecayPhysicsList->ConstructParticle();
131 }                                                 143 }
132                                                   144 
133 //....oooOO0OOooo........oooOO0OOooo........oo    145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
134                                                   146 
135 void PhysicsList::ConstructProcess()              147 void PhysicsList::ConstructProcess()
136 {                                                 148 {
137   AddTransportation();                            149   AddTransportation();
138   fEmPhysicsList->ConstructProcess();             150   fEmPhysicsList->ConstructProcess();
139   fDecayPhysicsList->ConstructProcess();          151   fDecayPhysicsList->ConstructProcess();
140   for (size_t i = 0; i < fHadronPhys.size(); + << 152   for(size_t i=0; i<fHadronPhys.size(); ++i) {
141     fHadronPhys[i]->ConstructProcess();           153     fHadronPhys[i]->ConstructProcess();
142   }                                               154   }
143   AddStepMax();                                   155   AddStepMax();
144 }                                                 156 }
145                                                   157 
146 //....oooOO0OOooo........oooOO0OOooo........oo    158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
147                                                   159 
148 void PhysicsList::AddPhysicsList(const G4Strin    160 void PhysicsList::AddPhysicsList(const G4String& name)
149 {                                                 161 {
150   if (verboseLevel > 1) G4cout << "PhysicsList << 162   if (verboseLevel > 1) 
                                                   >> 163     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
151                                                   164 
152   if (name == fEmName) return;                    165   if (name == fEmName) return;
153                                                   166 
154   if (name == "emstandard") {                     167   if (name == "emstandard") {
155     fEmName = name;                               168     fEmName = name;
156     delete fEmPhysicsList;                        169     delete fEmPhysicsList;
157     fEmPhysicsList = new G4EmStandardPhysics(v << 170     fEmPhysicsList = new G4EmStandardPhysics();
158     if (verboseLevel > 0) G4cout << "PhysicsLi << 171     if (verboseLevel > 0) 
159   }                                            << 172       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
160   else if (name == "emstandard_opt1") {        << 173 
161     fEmName = name;                            << 174   } else if (name == "emstandard_opt1") {
162     delete fEmPhysicsList;                     << 
163     fEmPhysicsList = new G4EmStandardPhysics_o << 
164     if (verboseLevel > 0) G4cout << "PhysicsLi << 
165   }                                            << 
166   else if (name == "emstandard_opt2") {        << 
167     fEmName = name;                            << 
168     delete fEmPhysicsList;                     << 
169     fEmPhysicsList = new G4EmStandardPhysics_o << 
170     if (verboseLevel > 0) G4cout << "PhysicsLi << 
171   }                                            << 
172   else if (name == "emstandard_opt3") {        << 
173     fEmName = name;                            << 
174     delete fEmPhysicsList;                     << 
175     fEmPhysicsList = new G4EmStandardPhysics_o << 
176     if (verboseLevel > 0) G4cout << "PhysicsLi << 
177   }                                            << 
178   else if (name == "emstandard_opt4") {        << 
179     fEmName = name;                            << 
180     delete fEmPhysicsList;                     << 
181     fEmPhysicsList = new G4EmStandardPhysics_o << 
182     if (verboseLevel > 0) G4cout << "PhysicsLi << 
183   }                                            << 
184   else if (name == "local") {                  << 
185     fEmName = name;                               175     fEmName = name;
186     delete fEmPhysicsList;                        176     delete fEmPhysicsList;
187     fEmPhysicsList = new PhysListEmStandard(ve << 177     fEmPhysicsList = new G4EmStandardPhysics_option1();
188     if (verboseLevel > 0) G4cout << "PhysicsLi << 178     if (verboseLevel > 0) 
189   }                                            << 179       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
190   else if (name == "emlivermore") {            << 180 
                                                   >> 181   } else if (name == "emstandard_opt2") {
191     fEmName = name;                               182     fEmName = name;
192     delete fEmPhysicsList;                        183     delete fEmPhysicsList;
193     fEmPhysicsList = new G4EmLivermorePhysics( << 184     fEmPhysicsList = new G4EmStandardPhysics_option2();
194   }                                            << 185     if (verboseLevel > 0) 
195   else if (name == "empenelope") {             << 186       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
                                                   >> 187 
                                                   >> 188   } else if (name == "emstandard_opt3") {
196     fEmName = name;                               189     fEmName = name;
197     delete fEmPhysicsList;                        190     delete fEmPhysicsList;
198     fEmPhysicsList = new G4EmPenelopePhysics(v << 191     fEmPhysicsList = new G4EmStandardPhysics_option3();
199   }                                            << 192     if (verboseLevel > 0) 
200   else if (name == "emlowenergy") {            << 193       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
                                                   >> 194 
                                                   >> 195   } else if (name == "emstandard_opt4") {
201     fEmName = name;                               196     fEmName = name;
202     delete fEmPhysicsList;                        197     delete fEmPhysicsList;
203     fEmPhysicsList = new G4EmLowEPPhysics(verb << 198     fEmPhysicsList = new G4EmStandardPhysics_option4();
204   }                                            << 199     if (verboseLevel > 0) 
205   else if (name == "emstandardGS") {           << 200       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
                                                   >> 201 
                                                   >> 202   } else if (name == "emstandard_local") {
206     fEmName = name;                               203     fEmName = name;
207     delete fEmPhysicsList;                        204     delete fEmPhysicsList;
208     fEmPhysicsList = new G4EmStandardPhysicsGS << 205     fEmPhysicsList = new PhysListEmStandard();
209   }                                            << 206     if (verboseLevel > 0) 
210   else if (name == "emstandardSS") {           << 207       G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
                                                   >> 208 
                                                   >> 209   } else if (name == "emlivermore") {
211     fEmName = name;                               210     fEmName = name;
212     delete fEmPhysicsList;                        211     delete fEmPhysicsList;
213     fEmPhysicsList = new G4EmStandardPhysicsSS << 212     fEmPhysicsList = new G4EmLivermorePhysics();
214   }                                            << 213 
215   else if (name == "emstandardWVI") {          << 214   } else if (name == "empenelope") {
216     fEmName = name;                               215     fEmName = name;
217     delete fEmPhysicsList;                        216     delete fEmPhysicsList;
218     fEmPhysicsList = new G4EmStandardPhysicsWV << 217     fEmPhysicsList = new G4EmPenelopePhysics();
219   }                                            << 218 
220   else if (name == "elastic" && !fHelIsRegiste << 219   } else if (name == "elastic" && !fHelIsRegisted) {
221     fHadronPhys.push_back(new G4HadronElasticP << 220     fHadronPhys.push_back( new G4HadronElasticPhysics());
222     fHelIsRegisted = true;                        221     fHelIsRegisted = true;
223     if (verboseLevel > 0) G4cout << "PhysicsLi << 222     if (verboseLevel > 0) 
224   }                                            << 223       G4cout << "PhysicsList::Add hadron elastic physics" << G4endl;
225   else if (name == "binary" && !fBicIsRegisted << 224 
                                                   >> 225   } else if (name == "binary" && !fBicIsRegisted) {
226     fHadronPhys.push_back(new G4HadronInelasti    226     fHadronPhys.push_back(new G4HadronInelasticQBBC());
227     fHadronPhys.push_back(new G4IonPhysics());    227     fHadronPhys.push_back(new G4IonPhysics());
228     fBicIsRegisted = true;                        228     fBicIsRegisted = true;
229     if (verboseLevel > 0)                      << 229     if (verboseLevel > 0) 
230       G4cout << "PhysicsList::Add hadron inela    230       G4cout << "PhysicsList::Add hadron inelastic physics from <QBBC>" << G4endl;
231   }                                            << 231 
232   else if (name == "gamma_nuc" && !fGnucIsRegi << 232   } else if (name == "gamma_nuc" && !fGnucIsRegisted) {
233     fHadronPhys.push_back(new G4EmExtraPhysics    233     fHadronPhys.push_back(new G4EmExtraPhysics());
234     fGnucIsRegisted = true;                       234     fGnucIsRegisted = true;
235     if (verboseLevel > 0) G4cout << "PhysicsLi << 235     if (verboseLevel > 0) 
236   }                                            << 236       G4cout << "PhysicsList::Add gamma- and electro-nuclear physics" << G4endl;
237   else if (name == "stopping" && !fStopIsRegis << 237 
                                                   >> 238   } else if (name == "stopping" && !fStopIsRegisted) {
238     fHadronPhys.push_back(new G4StoppingPhysic    239     fHadronPhys.push_back(new G4StoppingPhysics());
239     fStopIsRegisted = true;                       240     fStopIsRegisted = true;
240     if (verboseLevel > 0) G4cout << "PhysicsLi << 241     if (verboseLevel > 0) 
241   }                                            << 242       G4cout << "PhysicsList::Add stopping physics" << G4endl;
242   else {                                       << 243 
                                                   >> 244   } else {
243     G4cout << "PhysicsList::AddPhysicsList: <"    245     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
244            << " is not defined" << G4endl;     << 246            << " is not defined"
                                                   >> 247            << G4endl;
245   }                                               248   }
246 }                                                 249 }
247                                                   250 
248 //....oooOO0OOooo........oooOO0OOooo........oo    251 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
249                                                   252 
250 void PhysicsList::AddStepMax()                    253 void PhysicsList::AddStepMax()
251 {                                                 254 {
252   // Step limitation seen as a process            255   // Step limitation seen as a process
253                                                   256 
254   auto particleIterator = GetParticleIterator( << 257   theParticleIterator->reset();
255   particleIterator->reset();                   << 258   while ((*theParticleIterator)()){
256   while ((*particleIterator)()) {              << 259     G4ParticleDefinition* particle = theParticleIterator->value();
257     G4ParticleDefinition* particle = particleI << 
258     G4ProcessManager* pmanager = particle->Get    260     G4ProcessManager* pmanager = particle->GetProcessManager();
259                                                   261 
260     if (fStepMaxProcess->IsApplicable(*particl << 262     if (fStepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
261       pmanager->AddDiscreteProcess(fStepMaxPro << 263       {
262     }                                          << 264         pmanager ->AddDiscreteProcess(fStepMaxProcess);
                                                   >> 265       }
263   }                                               266   }
264 }                                                 267 }
265                                                   268 
266 //....oooOO0OOooo........oooOO0OOooo........oo    269 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 270 
                                                   >> 271 void PhysicsList::SetCuts()
                                                   >> 272 {
                                                   >> 273   SetCutValue(fCutForGamma, "gamma", "DefaultRegionForTheWorld");
                                                   >> 274   SetCutValue(fCutForElectron, "e-", "DefaultRegionForTheWorld");
                                                   >> 275   SetCutValue(fCutForElectron, "e+", "DefaultRegionForTheWorld");
                                                   >> 276   SetCutValue(fCutForProton, "proton", "DefaultRegionForTheWorld");
                                                   >> 277   //  G4cout << "PhysicsList: world cuts are set cutG= " << cutForGamma/mm 
                                                   >> 278   //         << " mm    cutE= " << fCutForElectron/mm << " mm " << G4endl;
                                                   >> 279 
                                                   >> 280   //G4cout << " cutV= " << fCutForVertexDetector 
                                                   >> 281   //     << " cutM= " << fCutForMuonDetector<<G4endl;
                                                   >> 282 
                                                   >> 283   G4Region* region = (G4RegionStore::GetInstance())->GetRegion("VertexDetector");
                                                   >> 284   fVertexDetectorCuts = region->GetProductionCuts();
                                                   >> 285   SetVertexCut(fCutForVertexDetector);
                                                   >> 286   //  G4cout << "Vertex cuts are set" << G4endl;
                                                   >> 287  
                                                   >> 288   region = (G4RegionStore::GetInstance())->GetRegion("MuonDetector");
                                                   >> 289   fMuonDetectorCuts = region->GetProductionCuts();
                                                   >> 290   SetMuonCut(fCutForMuonDetector);
                                                   >> 291   //G4cout << "Muon cuts are set " <<muonRegion << " " << muonDetectorCuts << G4endl;
                                                   >> 292   
                                                   >> 293   if (verboseLevel>0) DumpCutValuesTable();
                                                   >> 294 }
                                                   >> 295 
                                                   >> 296 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 297 
                                                   >> 298 void PhysicsList::SetCutForGamma(G4double cut)
                                                   >> 299 {
                                                   >> 300   fCutForGamma = cut;
                                                   >> 301   SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
                                                   >> 302 }
                                                   >> 303 
                                                   >> 304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 305 
                                                   >> 306 void PhysicsList::SetCutForElectron(G4double cut)
                                                   >> 307 {
                                                   >> 308   fCutForElectron = cut;
                                                   >> 309   SetParticleCuts(fCutForElectron, G4Electron::Electron());
                                                   >> 310   SetParticleCuts(fCutForElectron, G4Positron::Positron());
                                                   >> 311 }
                                                   >> 312 
                                                   >> 313 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 314 
                                                   >> 315 void PhysicsList::SetCutForProton(G4double cut)
                                                   >> 316 {
                                                   >> 317   fCutForProton = cut;
                                                   >> 318   SetParticleCuts(fCutForProton, G4Proton::Proton());
                                                   >> 319 }
                                                   >> 320 
                                                   >> 321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 322 
                                                   >> 323 void PhysicsList::SetVertexCut(G4double cut)
                                                   >> 324 {
                                                   >> 325   fCutForVertexDetector = cut;
                                                   >> 326   
                                                   >> 327   if( fVertexDetectorCuts ) {
                                                   >> 328     fVertexDetectorCuts->SetProductionCut(cut, idxG4GammaCut);
                                                   >> 329     fVertexDetectorCuts->SetProductionCut(cut, idxG4ElectronCut);
                                                   >> 330     fVertexDetectorCuts->SetProductionCut(cut, idxG4PositronCut);
                                                   >> 331     fVertexDetectorCuts->SetProductionCut(cut, idxG4ProtonCut);
                                                   >> 332   } 
                                                   >> 333 }
                                                   >> 334 
                                                   >> 335 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 336 
                                                   >> 337 void PhysicsList::SetMuonCut(G4double cut)
                                                   >> 338 {
                                                   >> 339   fCutForMuonDetector = cut;
                                                   >> 340 
                                                   >> 341   if( fMuonDetectorCuts ) {
                                                   >> 342     fMuonDetectorCuts->SetProductionCut(cut, idxG4GammaCut);
                                                   >> 343     fMuonDetectorCuts->SetProductionCut(cut, idxG4ElectronCut);
                                                   >> 344     fMuonDetectorCuts->SetProductionCut(cut, idxG4PositronCut);
                                                   >> 345     fMuonDetectorCuts->SetProductionCut(cut, idxG4ProtonCut);
                                                   >> 346   }
                                                   >> 347 }
                                                   >> 348 
                                                   >> 349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 350 
267                                                   351