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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/advanced/nanobeam/src/PhysicsList.cc (Version 11.3.0) and /examples/advanced/nanobeam/src/PhysicsList.cc (Version 8.3.p2)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // Please cite the following paper if you use     
 27 // Nucl.Instrum.Meth.B260:20-27, 2007             
 28                                                   
 29 #include "PhysicsList.hh"                         
 30 #include "G4SystemOfUnits.hh"                     
 31                                                   
 32 //....oooOO0OOooo........oooOO0OOooo........oo    
 33                                                   
 34 PhysicsList::PhysicsList():  G4VUserPhysicsLis    
 35 {                                                 
 36   defaultCutValue = 1*micrometer;                 
 37   fCutForGamma     = defaultCutValue;             
 38   fCutForElectron  = defaultCutValue;             
 39   fCutForPositron  = defaultCutValue;             
 40   fCutForProton    = defaultCutValue;             
 41                                                   
 42   SetVerboseLevel(1);                             
 43 }                                                 
 44                                                   
 45 //....oooOO0OOooo........oooOO0OOooo........oo    
 46                                                   
 47 PhysicsList::~PhysicsList()                       
 48 {}                                                
 49                                                   
 50 //....oooOO0OOooo........oooOO0OOooo........oo    
 51                                                   
 52 void PhysicsList::ConstructParticle()             
 53 {                                                 
 54   ConstructBosons();                              
 55   ConstructLeptons();                             
 56   ConstructBarions();                             
 57 }                                                 
 58                                                   
 59 //....oooOO0OOooo........oooOO0OOooo........oo    
 60                                                   
 61 void PhysicsList::ConstructBosons()               
 62 {                                                 
 63   // gamma                                        
 64   G4Gamma::GammaDefinition();                     
 65                                                   
 66   // optical photon                               
 67   G4OpticalPhoton::OpticalPhotonDefinition();     
 68 }                                                 
 69  //....oooOO0OOooo........oooOO0OOooo........o    
 70                                                   
 71 void PhysicsList::ConstructLeptons()              
 72 {                                                 
 73   // leptons                                      
 74   G4Electron::ElectronDefinition();               
 75   G4Positron::PositronDefinition();               
 76 }                                                 
 77                                                   
 78 //....oooOO0OOooo........oooOO0OOooo........oo    
 79                                                   
 80 void PhysicsList::ConstructBarions()              
 81 {                                                 
 82   //  barions                                     
 83   G4Proton::ProtonDefinition();                   
 84   G4AntiProton::AntiProtonDefinition();           
 85   G4GenericIon::GenericIonDefinition();           
 86 }                                                 
 87                                                   
 88 //....oooOO0OOooo........oooOO0OOooo........oo    
 89                                                   
 90 void PhysicsList::ConstructProcess()              
 91 {                                                 
 92   AddTransportation();                            
 93   ConstructEM();                                  
 94   ConstructGeneral();                             
 95 }                                                 
 96                                                   
 97 //....oooOO0OOooo........oooOO0OOooo........oo    
 98                                                   
 99 #include "G4PhotoElectricEffect.hh"               
100 #include "G4ComptonScattering.hh"                 
101 #include "G4GammaConversion.hh"                   
102                                                   
103 #include "G4eMultipleScattering.hh"               
104 #include "G4eIonisation.hh"                       
105 #include "G4eBremsstrahlung.hh"                   
106 #include "G4eplusAnnihilation.hh"                 
107                                                   
108 #include "G4MuMultipleScattering.hh"              
109 #include "G4WentzelVIModel.hh"                    
110                                                   
111 #include "G4MuIonisation.hh"                      
112 #include "G4MuBremsstrahlung.hh"                  
113 #include "G4MuPairProduction.hh"                  
114 #include "G4CoulombScattering.hh"                 
115                                                   
116 #include "G4hMultipleScattering.hh"               
117 #include "G4ionIonisation.hh"                     
118 #include "G4hIonisation.hh"                       
119 #include "G4hBremsstrahlung.hh"                   
120 #include "G4hPairProduction.hh"                   
121                                                   
122 #include "G4StepLimiter.hh"                       
123                                                   
124 //....oooOO0OOooo........oooOO0OOooo........oo    
125                                                   
126 void PhysicsList::ConstructEM()                   
127 {                                                 
128                                                   
129   G4PhysicsListHelper* ph = G4PhysicsListHelpe    
130                                                   
131 // *******************************************    
132 // Identical to G4EmStandardPhysics but added     
133 // *******************************************    
134                                                   
135                                                   
136   auto particleIterator=GetParticleIterator();    
137   particleIterator->reset();                      
138                                                   
139   while( (*particleIterator)() ){                 
140                                                   
141     G4ParticleDefinition* particle = particleI    
142                                                   
143     G4String particleName = particle->GetParti    
144                                                   
145     if (particleName == "gamma") {                
146                                                   
147       ph->RegisterProcess(new G4PhotoElectricE    
148       ph->RegisterProcess(new G4ComptonScatter    
149       ph->RegisterProcess(new G4GammaConversio    
150                                                   
151     } else if (particleName == "e-") {            
152                                                   
153       ph->RegisterProcess(new G4eMultipleScatt    
154       ph->RegisterProcess(new G4eIonisation(),    
155       ph->RegisterProcess(new G4eBremsstrahlun    
156                                                   
157     } else if (particleName == "e+") {            
158                                                   
159       ph->RegisterProcess(new G4eMultipleScatt    
160       ph->RegisterProcess(new G4eIonisation(),    
161       ph->RegisterProcess(new G4eBremsstrahlun    
162       ph->RegisterProcess(new G4eplusAnnihilat    
163                                                   
164     } else if( particleName == "mu+" ||           
165                particleName == "mu-"    ) {       
166                                                   
167       G4MuMultipleScattering* msc = new G4MuMu    
168       msc->AddEmModel(0, new G4WentzelVIModel(    
169                                                   
170       ph->RegisterProcess(msc, particle);         
171       ph->RegisterProcess(new G4MuIonisation()    
172       ph->RegisterProcess(new G4MuBremsstrahlu    
173       ph->RegisterProcess(new G4MuPairProducti    
174       ph->RegisterProcess(new G4CoulombScatter    
175                                                   
176     } else if (particleName == "alpha" ||         
177                particleName == "He3") {           
178                                                   
179       ph->RegisterProcess(new G4hMultipleScatt    
180       ph->RegisterProcess(new G4ionIonisation(    
181                                                   
182     } else if (particleName == "GenericIon") {    
183                                                   
184       ph->RegisterProcess(new G4hMultipleScatt    
185       ph->RegisterProcess(new G4ionIonisation(    
186                                                   
187     } else if (particleName == "proton") {        
188       ph->RegisterProcess(new G4hMultipleScatt    
189       ph->RegisterProcess(new G4hIonisation(),    
190       ph->RegisterProcess(new G4hBremsstrahlun    
191       ph->RegisterProcess(new G4hPairProductio    
192                                                   
193       ph->RegisterProcess(new G4StepLimiter(),    
194                                                   
195     }                                             
196   }                                               
197 }                                                 
198                                                   
199 //....oooOO0OOooo........oooOO0OOooo........oo    
200                                                   
201 void PhysicsList::ConstructGeneral()              
202 { }                                               
203                                                   
204 //....oooOO0OOooo........oooOO0OOooo........oo    
205                                                   
206 void PhysicsList::SetCuts()                       
207 {                                                 
208   if (verboseLevel >0){                           
209     G4cout << "PhysicsList::SetCuts:";            
210     G4cout << "CutLength : " << G4BestUnit(def    
211   }                                               
212                                                   
213   SetCutValue(fCutForGamma, "gamma");             
214   SetCutValue(fCutForElectron, "e-");             
215   SetCutValue(fCutForPositron, "e+");             
216   SetCutValue(fCutForProton, "proton");           
217   SetCutValue(fCutForProton, "anti_proton");      
218                                                   
219   if (verboseLevel>0) DumpCutValuesTable();       
220 }                                                 
221                                                   
222 //....oooOO0OOooo........oooOO0OOooo........oo    
223                                                   
224 void PhysicsList::SetGammaCut(G4double val)       
225 {                                                 
226   fCutForGamma = val;                             
227 }                                                 
228                                                   
229 //....oooOO0OOooo........oooOO0OOooo........oo    
230                                                   
231 void PhysicsList::SetElectronCut(G4double val)    
232 {                                                 
233   fCutForElectron = val;                          
234 }                                                 
235                                                   
236 //....oooOO0OOooo........oooOO0OOooo........oo    
237                                                   
238 void PhysicsList::SetPositronCut(G4double val)    
239 {                                                 
240   fCutForPositron = val;                          
241 }                                                 
242                                                   
243 //....oooOO0OOooo........oooOO0OOooo........oo    
244                                                   
245 void PhysicsList::SetProtonCut(G4double val)      
246 {                                                 
247   fCutForProton = val;                            
248 }                                                 
249