Geant4 Cross Reference

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


  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/TestEm12/src/Physics <<  26 // $Id: PhysicsList.cc,v 1.9 2010/05/20 13:13:33 maire Exp $
 27 /// \brief Implementation of the PhysicsList c <<  27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
 28 //                                             << 
 29 //                                                 28 //
 30 //....oooOO0OOooo........oooOO0OOooo........oo     29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 31 //....oooOO0OOooo........oooOO0OOooo........oo     30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 32                                                    31 
 33 #include "PhysicsList.hh"                          32 #include "PhysicsList.hh"
                                                   >>  33 #include "PhysicsListMessenger.hh"
 34                                                    34 
 35 #include "PhysListEmStandard.hh"                   35 #include "PhysListEmStandard.hh"
 36 #include "PhysListEmStandardSSM.hh"            <<  36 #include "PhysListEmStandardSS.hh"
 37 #include "PhysicsListMessenger.hh"             <<  37 #include "PhysListEmStandardGS.hh"
                                                   >>  38 #include "PhysListEmStandardWVI.hh"
 38                                                    39 
 39 #include "G4EmDNAPhysics.hh"                   << 
 40 #include "G4EmDNAPhysics_option1.hh"           << 
 41 #include "G4EmDNAPhysics_option2.hh"           << 
 42 #include "G4EmDNAPhysics_option3.hh"           << 
 43 #include "G4EmDNAPhysics_option4.hh"           << 
 44 #include "G4EmDNAPhysics_option5.hh"           << 
 45 #include "G4EmDNAPhysics_option6.hh"           << 
 46 #include "G4EmDNAPhysics_option7.hh"           << 
 47 #include "G4EmLivermorePhysics.hh"             << 
 48 #include "G4EmLowEPPhysics.hh"                 << 
 49 #include "G4EmPenelopePhysics.hh"              << 
 50 #include "G4EmStandardPhysics.hh"                  40 #include "G4EmStandardPhysics.hh"
 51 #include "G4EmStandardPhysicsGS.hh"            << 
 52 #include "G4EmStandardPhysicsSS.hh"            << 
 53 #include "G4EmStandardPhysicsWVI.hh"           << 
 54 #include "G4EmStandardPhysics_option1.hh"          41 #include "G4EmStandardPhysics_option1.hh"
 55 #include "G4EmStandardPhysics_option2.hh"          42 #include "G4EmStandardPhysics_option2.hh"
 56 #include "G4EmStandardPhysics_option3.hh"          43 #include "G4EmStandardPhysics_option3.hh"
 57 #include "G4EmStandardPhysics_option4.hh"      <<  44 #include "G4EmLivermorePhysics.hh"
                                                   >>  45 #include "G4EmPenelopePhysics.hh"
                                                   >>  46 
 58 #include "G4LossTableManager.hh"                   47 #include "G4LossTableManager.hh"
 59 #include "G4SystemOfUnits.hh"                  << 
 60 #include "G4UnitsTable.hh"                         48 #include "G4UnitsTable.hh"
 61                                                    49 
 62 // particles                                   << 
 63                                                << 
 64 #include "G4BaryonConstructor.hh"              << 
 65 #include "G4BosonConstructor.hh"               << 
 66 #include "G4DNAGenericIonsManager.hh"          << 
 67 #include "G4IonConstructor.hh"                 << 
 68 #include "G4LeptonConstructor.hh"              << 
 69 #include "G4MesonConstructor.hh"               << 
 70 #include "G4ShortLivedConstructor.hh"          << 
 71                                                << 
 72 G4ThreadLocal StepMax* PhysicsList::fStepMaxPr << 
 73                                                << 
 74 //....oooOO0OOooo........oooOO0OOooo........oo     50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 75                                                    51 
 76 PhysicsList::PhysicsList()                     <<  52 PhysicsList::PhysicsList() : G4VModularPhysicsList()
 77 {                                                  53 {
 78   fMessenger = new PhysicsListMessenger(this); <<  54   G4LossTableManager::Instance();
                                                   >>  55   defaultCutValue = 1.*mm;
                                                   >>  56   cutForGamma     = defaultCutValue;
                                                   >>  57   cutForElectron  = defaultCutValue;
                                                   >>  58   cutForPositron  = defaultCutValue;
                                                   >>  59 
                                                   >>  60   stepMaxProcess  = 0;
                                                   >>  61 
                                                   >>  62   pMessenger = new PhysicsListMessenger(this);
 79                                                    63 
 80   SetVerboseLevel(1);                              64   SetVerboseLevel(1);
 81                                                    65 
 82   // EM physics                                    66   // EM physics
 83   fEmPhysicsList = new PhysListEmStandard(fEmN <<  67   emPhysicsList = new PhysListEmStandard(emName = "local");
 84                                                << 
 85   // Em options                                << 
 86   //                                           << 
 87   G4EmParameters::Instance()->SetBuildCSDARang << 
 88                                                    68 
 89   SetDefaultCutValue(1. * mm);                 << 
 90 }                                                  69 }
 91                                                    70 
 92 //....oooOO0OOooo........oooOO0OOooo........oo     71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 93                                                    72 
 94 PhysicsList::~PhysicsList()                        73 PhysicsList::~PhysicsList()
 95 {                                                  74 {
 96   delete fMessenger;                           <<  75   delete pMessenger;
 97   delete fEmPhysicsList;                       <<  76   delete emPhysicsList;
 98 }                                                  77 }
 99                                                    78 
100 //....oooOO0OOooo........oooOO0OOooo........oo     79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101                                                    80 
102 void PhysicsList::ConstructParticle()          <<  81 // Bosons
103 {                                              <<  82 #include "G4ChargedGeantino.hh"
104   G4BosonConstructor pBosonConstructor;        <<  83 #include "G4Geantino.hh"
105   pBosonConstructor.ConstructParticle();       <<  84 #include "G4Gamma.hh"
106                                                <<  85 #include "G4OpticalPhoton.hh"
107   G4LeptonConstructor pLeptonConstructor;      <<  86 
108   pLeptonConstructor.ConstructParticle();      <<  87 // leptons
                                                   >>  88 #include "G4MuonPlus.hh"
                                                   >>  89 #include "G4MuonMinus.hh"
                                                   >>  90 #include "G4NeutrinoMu.hh"
                                                   >>  91 #include "G4AntiNeutrinoMu.hh"
                                                   >>  92 
                                                   >>  93 #include "G4Electron.hh"
                                                   >>  94 #include "G4Positron.hh"
                                                   >>  95 #include "G4NeutrinoE.hh"
                                                   >>  96 #include "G4AntiNeutrinoE.hh"
                                                   >>  97 
                                                   >>  98 // Mesons
                                                   >>  99 #include "G4PionPlus.hh"
                                                   >> 100 #include "G4PionMinus.hh"
                                                   >> 101 #include "G4PionZero.hh"
                                                   >> 102 #include "G4Eta.hh"
                                                   >> 103 #include "G4EtaPrime.hh"
                                                   >> 104 
                                                   >> 105 #include "G4KaonPlus.hh"
                                                   >> 106 #include "G4KaonMinus.hh"
                                                   >> 107 #include "G4KaonZero.hh"
                                                   >> 108 #include "G4AntiKaonZero.hh"
                                                   >> 109 #include "G4KaonZeroLong.hh"
                                                   >> 110 #include "G4KaonZeroShort.hh"
                                                   >> 111 
                                                   >> 112 // Baryons
                                                   >> 113 #include "G4Proton.hh"
                                                   >> 114 #include "G4AntiProton.hh"
                                                   >> 115 #include "G4Neutron.hh"
                                                   >> 116 #include "G4AntiNeutron.hh"
                                                   >> 117 
                                                   >> 118 // Nuclei
                                                   >> 119 #include "G4Alpha.hh"
                                                   >> 120 #include "G4Deuteron.hh"
                                                   >> 121 #include "G4Triton.hh"
                                                   >> 122 #include "G4He3.hh"
                                                   >> 123 #include "G4GenericIon.hh"
109                                                   124 
110   G4MesonConstructor pMesonConstructor;        << 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111   pMesonConstructor.ConstructParticle();       << 
112                                                   126 
113   G4BaryonConstructor pBaryonConstructor;      << 127 void PhysicsList::ConstructParticle()
114   pBaryonConstructor.ConstructParticle();      << 128 {
115                                                << 129 // pseudo-particles
116   G4IonConstructor pIonConstructor;            << 130   G4Geantino::GeantinoDefinition();
117   pIonConstructor.ConstructParticle();         << 131   G4ChargedGeantino::ChargedGeantinoDefinition();
118                                                << 132   
119   G4ShortLivedConstructor pShortLivedConstruct << 133 // gamma
120   pShortLivedConstructor.ConstructParticle();  << 134   G4Gamma::GammaDefinition();
121                                                << 135   
122   // DNA                                       << 136 // optical photon
123   G4DNAGenericIonsManager* genericIonsManager; << 137   G4OpticalPhoton::OpticalPhotonDefinition();
124   genericIonsManager = G4DNAGenericIonsManager << 138 
125   genericIonsManager->GetIon("alpha++");       << 139 // leptons
126   genericIonsManager->GetIon("alpha+");        << 140   G4Electron::ElectronDefinition();
127   genericIonsManager->GetIon("helium");        << 141   G4Positron::PositronDefinition();
128   genericIonsManager->GetIon("hydrogen");      << 142   G4MuonPlus::MuonPlusDefinition();
                                                   >> 143   G4MuonMinus::MuonMinusDefinition();
                                                   >> 144 
                                                   >> 145   G4NeutrinoE::NeutrinoEDefinition();
                                                   >> 146   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
                                                   >> 147   G4NeutrinoMu::NeutrinoMuDefinition();
                                                   >> 148   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();  
                                                   >> 149 
                                                   >> 150 // mesons
                                                   >> 151   G4PionPlus::PionPlusDefinition();
                                                   >> 152   G4PionMinus::PionMinusDefinition();
                                                   >> 153   G4PionZero::PionZeroDefinition();
                                                   >> 154   G4Eta::EtaDefinition();
                                                   >> 155   G4EtaPrime::EtaPrimeDefinition();
                                                   >> 156   G4KaonPlus::KaonPlusDefinition();
                                                   >> 157   G4KaonMinus::KaonMinusDefinition();
                                                   >> 158   G4KaonZero::KaonZeroDefinition();
                                                   >> 159   G4AntiKaonZero::AntiKaonZeroDefinition();
                                                   >> 160   G4KaonZeroLong::KaonZeroLongDefinition();
                                                   >> 161   G4KaonZeroShort::KaonZeroShortDefinition();
                                                   >> 162 
                                                   >> 163 // barions
                                                   >> 164   G4Proton::ProtonDefinition();
                                                   >> 165   G4AntiProton::AntiProtonDefinition();
                                                   >> 166   G4Neutron::NeutronDefinition();
                                                   >> 167   G4AntiNeutron::AntiNeutronDefinition();
                                                   >> 168 
                                                   >> 169 // ions
                                                   >> 170   G4Deuteron::DeuteronDefinition();
                                                   >> 171   G4Triton::TritonDefinition();
                                                   >> 172   G4He3::He3Definition();
                                                   >> 173   G4Alpha::AlphaDefinition();
                                                   >> 174   G4GenericIon::GenericIonDefinition();
129 }                                                 175 }
130                                                   176 
131 //....oooOO0OOooo........oooOO0OOooo........oo    177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132                                                   178 
133 #include "G4ProcessManager.hh"                    179 #include "G4ProcessManager.hh"
                                                   >> 180 #include "G4EmProcessOptions.hh"
134                                                   181 
135 void PhysicsList::ConstructProcess()              182 void PhysicsList::ConstructProcess()
136 {                                                 183 {
137   // transportation                               184   // transportation
138   //                                              185   //
139   AddTransportation();                            186   AddTransportation();
140                                                << 187   
141   // electromagnetic physics list                 188   // electromagnetic physics list
142   //                                              189   //
143   fEmPhysicsList->ConstructProcess();          << 190   emPhysicsList->ConstructProcess();
144                                                << 191   
                                                   >> 192   // Em options
                                                   >> 193   //
                                                   >> 194   G4EmProcessOptions emOptions;
                                                   >> 195   emOptions.SetBuildCSDARange(true);
                                                   >> 196   emOptions.SetDEDXBinningForCSDARange(8*20);
                                                   >> 197     
145   // decay process                                198   // decay process
146   //                                              199   //
147   AddDecay();                                     200   AddDecay();
148                                                << 201   
149   // step limitation (as a full process)          202   // step limitation (as a full process)
150   //                                           << 203   //  
151   AddStepMax();                                   204   AddStepMax();
152 }                                                 205 }
153                                                   206 
154 //....oooOO0OOooo........oooOO0OOooo........oo    207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
155                                                   208 
156 void PhysicsList::AddPhysicsList(const G4Strin    209 void PhysicsList::AddPhysicsList(const G4String& name)
157 {                                                 210 {
158   if (verboseLevel > -1) {                     << 211   if (verboseLevel>-1) {
159     G4cout << "PhysicsList::AddPhysicsList: <"    212     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
160   }                                               213   }
161                                                   214 
162   if (name == fEmName) return;                 << 215   if (name == emName) return;
163                                                   216 
164   if (name == "local") {                          217   if (name == "local") {
165     fEmName = name;                            << 218 
166     delete fEmPhysicsList;                     << 219     emName = name;
167     fEmPhysicsList = new PhysListEmStandard(na << 220     delete emPhysicsList;
168   }                                            << 221     emPhysicsList = new PhysListEmStandard(name);
169   else if (name == "emstandard_opt0") {        << 222     
170     fEmName = name;                            << 223   } else if (name == "emstandard_opt0") {
171     delete fEmPhysicsList;                     << 224 
172     fEmPhysicsList = new G4EmStandardPhysics() << 225     emName = name;
173   }                                            << 226     delete emPhysicsList;
174   else if (name == "emstandard_opt1") {        << 227     emPhysicsList = new G4EmStandardPhysics();
175     fEmName = name;                            << 228     
176     delete fEmPhysicsList;                     << 229   } else if (name == "emstandard_opt1") {
177     fEmPhysicsList = new G4EmStandardPhysics_o << 230 
178   }                                            << 231     emName = name;
179   else if (name == "emstandard_opt2") {        << 232     delete emPhysicsList;
180     fEmName = name;                            << 233     emPhysicsList = new G4EmStandardPhysics_option1();
181     delete fEmPhysicsList;                     << 234 
182     fEmPhysicsList = new G4EmStandardPhysics_o << 235   } else if (name == "emstandard_opt2") {
183   }                                            << 236 
184   else if (name == "emstandard_opt3") {        << 237     emName = name;
185     fEmName = name;                            << 238     delete emPhysicsList;
186     delete fEmPhysicsList;                     << 239     emPhysicsList = new G4EmStandardPhysics_option2();
187     fEmPhysicsList = new G4EmStandardPhysics_o << 240         
188   }                                            << 241   } else if (name == "emstandard_opt3") {
189   else if (name == "emstandard_opt4") {        << 242 
190     fEmName = name;                            << 243     emName = name;
191     delete fEmPhysicsList;                     << 244     delete emPhysicsList;
192     fEmPhysicsList = new G4EmStandardPhysics_o << 245     emPhysicsList = new G4EmStandardPhysics_option3();
193   }                                            << 246     
194   else if (name == "emstandardSS") {           << 247   } else if (name == "standardSS") {
195     fEmName = name;                            << 248 
196     delete fEmPhysicsList;                     << 249     emName = name;
197     fEmPhysicsList = new G4EmStandardPhysicsSS << 250     delete emPhysicsList;
198   }                                            << 251     emPhysicsList = new PhysListEmStandardSS(name);
199   else if (name == "standardSSM") {            << 252 
200     fEmName = name;                            << 253   } else if (name == "standardGS") {
201     delete fEmPhysicsList;                     << 254 
202     fEmPhysicsList = new PhysListEmStandardSSM << 255     emName = name;
203   }                                            << 256     delete emPhysicsList;
204   else if (name == "emstandardWVI") {          << 257     emPhysicsList = new PhysListEmStandardGS(name);
205     fEmName = name;                            << 258 
206     delete fEmPhysicsList;                     << 259   } else if (name == "standardWVI") {
207     fEmPhysicsList = new G4EmStandardPhysicsWV << 260 
208   }                                            << 261     emName = name;
209   else if (name == "standardGS") {             << 262     delete emPhysicsList;
210     fEmName = name;                            << 263     emPhysicsList = new PhysListEmStandardWVI(name);
211     delete fEmPhysicsList;                     << 264                 
212     fEmPhysicsList = new G4EmStandardPhysicsGS << 265   } else if (name == "emlivermore") {
213   }                                            << 266     emName = name;
214   else if (name == "emlivermore") {            << 267     delete emPhysicsList;
215     fEmName = name;                            << 268     emPhysicsList = new G4EmLivermorePhysics();
216     delete fEmPhysicsList;                     << 269     
217     fEmPhysicsList = new G4EmLivermorePhysics( << 270   } else if (name == "empenelope") {
218   }                                            << 271     emName = name;
219   else if (name == "empenelope") {             << 272     delete emPhysicsList;
220     fEmName = name;                            << 273     emPhysicsList = new G4EmPenelopePhysics();
221     delete fEmPhysicsList;                     << 274 
222     fEmPhysicsList = new G4EmPenelopePhysics() << 275      
223   }                                            << 276   } else {
224   else if (name == "emlowenergy") {            << 277 
225     fEmName = name;                            << 
226     delete fEmPhysicsList;                     << 
227     fEmPhysicsList = new G4EmLowEPPhysics();   << 
228   }                                            << 
229   else if (name == "dna") {                    << 
230     fEmName = name;                            << 
231     delete fEmPhysicsList;                     << 
232     fEmPhysicsList = new G4EmDNAPhysics();     << 
233   }                                            << 
234   else if (name == "dna_opt1") {               << 
235     fEmName = name;                            << 
236     delete fEmPhysicsList;                     << 
237     fEmPhysicsList = new G4EmDNAPhysics_option << 
238   }                                            << 
239   else if (name == "dna_opt2") {               << 
240     fEmName = name;                            << 
241     delete fEmPhysicsList;                     << 
242     fEmPhysicsList = new G4EmDNAPhysics_option << 
243   }                                            << 
244   else if (name == "dna_opt3") {               << 
245     fEmName = name;                            << 
246     delete fEmPhysicsList;                     << 
247     fEmPhysicsList = new G4EmDNAPhysics_option << 
248   }                                            << 
249   else if (name == "dna_opt4") {               << 
250     fEmName = name;                            << 
251     delete fEmPhysicsList;                     << 
252     fEmPhysicsList = new G4EmDNAPhysics_option << 
253   }                                            << 
254   else if (name == "dna_opt5") {               << 
255     fEmName = name;                            << 
256     delete fEmPhysicsList;                     << 
257     fEmPhysicsList = new G4EmDNAPhysics_option << 
258   }                                            << 
259   else if (name == "dna_opt6") {               << 
260     fEmName = name;                            << 
261     delete fEmPhysicsList;                     << 
262     fEmPhysicsList = new G4EmDNAPhysics_option << 
263   }                                            << 
264   else if (name == "dna_opt7") {               << 
265     fEmName = name;                            << 
266     delete fEmPhysicsList;                     << 
267     fEmPhysicsList = new G4EmDNAPhysics_option << 
268   }                                            << 
269   else {                                       << 
270     G4cout << "PhysicsList::AddPhysicsList: <"    278     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
271            << " is not defined" << G4endl;     << 279            << " is not defined"
                                                   >> 280            << G4endl;
272   }                                               281   }
273   G4EmParameters::Instance()->SetBuildCSDARang << 
274 }                                                 282 }
275                                                   283 
276 //....oooOO0OOooo........oooOO0OOooo........oo    284 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
277                                                   285 
278 #include "G4Decay.hh"                             286 #include "G4Decay.hh"
279                                                   287 
280 void PhysicsList::AddDecay()                      288 void PhysicsList::AddDecay()
281 {                                                 289 {
282   // decay process                                290   // decay process
283   //                                              291   //
284   G4Decay* fDecayProcess = new G4Decay();         292   G4Decay* fDecayProcess = new G4Decay();
285                                                   293 
286   auto particleIterator = GetParticleIterator( << 294   theParticleIterator->reset();
287   particleIterator->reset();                   << 295   while( (*theParticleIterator)() ){
288   while ((*particleIterator)()) {              << 296     G4ParticleDefinition* particle = theParticleIterator->value();
289     G4ParticleDefinition* particle = particleI << 
290     G4ProcessManager* pmanager = particle->Get    297     G4ProcessManager* pmanager = particle->GetProcessManager();
291                                                   298 
292     if (fDecayProcess->IsApplicable(*particle) << 299     if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) { 
293       pmanager->AddProcess(fDecayProcess);     << 300 
                                                   >> 301       pmanager ->AddProcess(fDecayProcess);
294                                                   302 
295       // set ordering for PostStepDoIt and AtR    303       // set ordering for PostStepDoIt and AtRestDoIt
296       pmanager->SetProcessOrdering(fDecayProce << 304       pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
297       pmanager->SetProcessOrdering(fDecayProce << 305       pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
                                                   >> 306 
298     }                                             307     }
299   }                                               308   }
300 }                                                 309 }
301                                                   310 
302 //....oooOO0OOooo........oooOO0OOooo........oo    311 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
303                                                   312 
304 #include "StepMax.hh"                             313 #include "StepMax.hh"
305                                                   314 
306 void PhysicsList::AddStepMax()                    315 void PhysicsList::AddStepMax()
307 {                                                 316 {
308   // Step limitation seen as a process            317   // Step limitation seen as a process
309   fStepMaxProcess = new StepMax();             << 318   stepMaxProcess = new StepMax();
310                                                << 
311   auto particleIterator = GetParticleIterator( << 
312   particleIterator->reset();                   << 
313   while ((*particleIterator)()) {              << 
314     G4ParticleDefinition* particle = particleI << 
315     G4ProcessManager* pmanager = particle->Get << 
316                                                   319 
317     if (fStepMaxProcess->IsApplicable(*particl << 320   theParticleIterator->reset();
318       pmanager->AddDiscreteProcess(fStepMaxPro << 321   while ((*theParticleIterator)()){
319     }                                          << 322       G4ParticleDefinition* particle = theParticleIterator->value();
                                                   >> 323       G4ProcessManager* pmanager = particle->GetProcessManager();
                                                   >> 324 
                                                   >> 325       if (stepMaxProcess->IsApplicable(*particle))
                                                   >> 326         {
                                                   >> 327     pmanager ->AddDiscreteProcess(stepMaxProcess);
                                                   >> 328         }
320   }                                               329   }
321 }                                                 330 }
322                                                   331 
323 //....oooOO0OOooo........oooOO0OOooo........oo    332 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 333 
                                                   >> 334 #include "G4Gamma.hh"
                                                   >> 335 #include "G4Electron.hh"
                                                   >> 336 #include "G4Positron.hh"
                                                   >> 337 
                                                   >> 338 void PhysicsList::SetCuts()
                                                   >> 339 {
                                                   >> 340 
                                                   >> 341   if (verboseLevel >0){
                                                   >> 342     G4cout << "PhysicsList::SetCuts:";
                                                   >> 343     G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
                                                   >> 344   }
                                                   >> 345   
                                                   >> 346   // set cut values for gamma at first and for e- second and next for e+,
                                                   >> 347   // because some processes for e+/e- need cut values for gamma
                                                   >> 348   SetCutValue(cutForGamma, "gamma");
                                                   >> 349   SetCutValue(cutForElectron, "e-");
                                                   >> 350   SetCutValue(cutForPositron, "e+");
                                                   >> 351 
                                                   >> 352   if (verboseLevel>0) DumpCutValuesTable();
                                                   >> 353 }
                                                   >> 354 
                                                   >> 355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 356 
                                                   >> 357 void PhysicsList::SetCutForGamma(G4double cut)
                                                   >> 358 {
                                                   >> 359   cutForGamma = cut;
                                                   >> 360   SetParticleCuts(cutForGamma, G4Gamma::Gamma());
                                                   >> 361 }
                                                   >> 362 
                                                   >> 363 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 364 
                                                   >> 365 void PhysicsList::SetCutForElectron(G4double cut)
                                                   >> 366 {
                                                   >> 367   cutForElectron = cut;
                                                   >> 368   SetParticleCuts(cutForElectron, G4Electron::Electron());
                                                   >> 369 }
                                                   >> 370 
                                                   >> 371 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 372 
                                                   >> 373 void PhysicsList::SetCutForPositron(G4double cut)
                                                   >> 374 {
                                                   >> 375   cutForPositron = cut;
                                                   >> 376   SetParticleCuts(cutForPositron, G4Positron::Positron());
                                                   >> 377 }
                                                   >> 378 
                                                   >> 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 380 
324                                                   381