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 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 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // ********************************************************************
 25 //
 26 // This example is provided by the Geant4-DNA collaboration
 27 // Any report or published results obtained using the Geant4-DNA software
 28 // shall cite the following Geant4-DNA collaboration publications:
 29 // Med. Phys. 45 (2018) e722-e739
 30 // Phys. Med. 31 (2015) 861-874
 31 // Med. Phys. 37 (2010) 4692-4708
 32 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
 33 //
 34 // The Geant4-DNA web site is available at http://geant4-dna.org
 35 //
 36 /// \file medical/dna/svalue/src/PhysicsList.cc
 37 /// \brief Implementation of the PhysicsList class
 38 
 39 #include "PhysicsList.hh"
 40 
 41 #include "PhysicsListMessenger.hh"
 42 
 43 #include "G4EmDNAPhysics.hh"
 44 #include "G4EmDNAPhysics_option1.hh"
 45 #include "G4EmDNAPhysics_option2.hh"
 46 #include "G4EmDNAPhysics_option3.hh"
 47 #include "G4EmDNAPhysics_option4.hh"
 48 #include "G4EmDNAPhysics_option5.hh"
 49 #include "G4EmDNAPhysics_option6.hh"
 50 #include "G4EmDNAPhysics_option7.hh"
 51 #include "G4EmDNAPhysics_option8.hh"
 52 #include "G4EmStandardPhysics_option3.hh"
 53 #include "G4EmStandardPhysics_option4.hh"
 54 #include "G4UserSpecialCuts.hh"
 55 
 56 // Particles
 57 
 58 #include "G4BaryonConstructor.hh"
 59 #include "G4BosonConstructor.hh"
 60 #include "G4DNAGenericIonsManager.hh"
 61 #include "G4IonConstructor.hh"
 62 #include "G4LeptonConstructor.hh"
 63 #include "G4MesonConstructor.hh"
 64 
 65 // Decay
 66 
 67 #include "G4Electron.hh"
 68 #include "G4NuclideTable.hh"
 69 #include "G4RadioactiveDecayPhysics.hh"
 70 #include "G4SystemOfUnits.hh"
 71 
 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 73 
 74 PhysicsList::PhysicsList() : G4VModularPhysicsList(), fEmPhysicsList(0), fMessenger(0)
 75 {
 76   fMessenger = new PhysicsListMessenger(this);
 77 
 78   SetVerboseLevel(1);
 79 
 80   // Physics
 81 
 82   fEmPhysicsList = new G4EmDNAPhysics();
 83   defaultCutValue = 1. * CLHEP::nm;
 84 
 85   G4double lowLimit = 10. * CLHEP::eV;
 86   G4double highLimit = 100. * CLHEP::GeV;
 87 
 88   G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowLimit, highLimit);
 89   // Change time and other limits in G4NuclideTable
 90 
 91   G4NuclideTable::GetInstance()->SetThresholdOfHalfLife(0.1 * picosecond);
 92   G4NuclideTable::GetInstance()->SetLevelTolerance(1.0 * eV);
 93 
 94   fRadDecay = new G4RadioactiveDecayPhysics();
 95 }
 96 
 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 98 
 99 PhysicsList::~PhysicsList()
100 {
101   delete fMessenger;
102   delete fEmPhysicsList;
103   delete fRadDecay;
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
108 void PhysicsList::ConstructParticle()
109 {
110   G4BosonConstructor pBosonConstructor;
111   pBosonConstructor.ConstructParticle();
112 
113   G4LeptonConstructor pLeptonConstructor;
114   pLeptonConstructor.ConstructParticle();
115 
116   G4MesonConstructor pMesonConstructor;
117   pMesonConstructor.ConstructParticle();
118 
119   G4BaryonConstructor pBaryonConstructor;
120   pBaryonConstructor.ConstructParticle();
121 
122   G4IonConstructor pIonConstructor;
123   pIonConstructor.ConstructParticle();
124 
125   G4DNAGenericIonsManager* genericIonsManager;
126   genericIonsManager = G4DNAGenericIonsManager::Instance();
127   genericIonsManager->GetIon("alpha++");
128   genericIonsManager->GetIon("alpha+");
129   genericIonsManager->GetIon("helium");
130   genericIonsManager->GetIon("hydrogen");
131 }
132 
133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
134 
135 void PhysicsList::ConstructProcess()
136 {
137   // Transportation
138 
139   AddTransportation();
140 
141   // Electromagnetic physics list
142 
143   fEmPhysicsList->ConstructProcess();
144 
145   // Tracking cut
146 
147   AddTrackingCut();
148 
149   // Radioactive decay
150 
151   fRadDecay->ConstructProcess();
152 }
153 
154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
155 
156 void PhysicsList::AddPhysicsList(const G4String& name)
157 {
158   if (verboseLevel > 0) {
159     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
160   }
161 
162   if (name == fEmName) return;
163 
164   if (name == "dna") {
165     fEmName = name;
166     delete fEmPhysicsList;
167     fEmPhysicsList = new G4EmDNAPhysics();
168   }
169   else if (name == "dna_opt1") {
170     fEmName = name;
171     delete fEmPhysicsList;
172     fEmPhysicsList = new G4EmDNAPhysics_option1();
173   }
174   else if (name == "dna_opt2") {
175     fEmName = name;
176     delete fEmPhysicsList;
177     fEmPhysicsList = new G4EmDNAPhysics_option2();
178   }
179   else if (name == "dna_opt3") {
180     fEmName = name;
181     delete fEmPhysicsList;
182     fEmPhysicsList = new G4EmDNAPhysics_option3();
183   }
184   else if (name == "dna_opt4") {
185     fEmName = name;
186     delete fEmPhysicsList;
187     fEmPhysicsList = new G4EmDNAPhysics_option4();
188   }
189   else if (name == "dna_opt5") {
190     fEmName = name;
191     delete fEmPhysicsList;
192     fEmPhysicsList = new G4EmDNAPhysics_option5();
193   }
194   else if (name == "dna_opt6") {
195     fEmName = name;
196     delete fEmPhysicsList;
197     fEmPhysicsList = new G4EmDNAPhysics_option6();
198   }
199   else if (name == "dna_opt7") {
200     fEmName = name;
201     delete fEmPhysicsList;
202     fEmPhysicsList = new G4EmDNAPhysics_option7();
203   }
204   else if (name == "dna_opt8") {
205     fEmName = name;
206     delete fEmPhysicsList;
207     fEmPhysicsList = new G4EmDNAPhysics_option8();
208   }
209   else if (name == "std_opt3") {
210     fEmName = name;
211     delete fEmPhysicsList;
212     fEmPhysicsList = new G4EmStandardPhysics_option3();
213   }
214   else if (name == "std_opt4") {
215     fEmName = name;
216     delete fEmPhysicsList;
217     fEmPhysicsList = new G4EmStandardPhysics_option4();
218   }
219   else {
220     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
221            << " is not defined" << G4endl;
222   }
223 }
224 
225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226 
227 void PhysicsList::AddTrackingCut()
228 {
229   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
230   ph->RegisterProcess(new G4UserSpecialCuts(), G4Electron::Electron());
231 }
232