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

Diff markup

Differences between /examples/extended/hadronic/Hadr01/src/PhysicsList.cc (Version 11.3.0) and /examples/extended/hadronic/Hadr01/src/PhysicsList.cc (Version 7.1)


  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 /// \file hadronic/Hadr01/src/PhysicsList.cc      
 27 /// \brief Implementation of the PhysicsList c    
 28 //                                                
 29 //                                                
 30 //                                                
 31 //////////////////////////////////////////////    
 32 //                                                
 33 // PhysicsList                                    
 34 //                                                
 35 // Created: 31.04.2006 V.Ivanchenko               
 36 //                                                
 37 // Modified:                                      
 38 // 04.06.2006 Adoptation of Hadr01 (V.Ivanchen    
 39 // 26.04.2007 Physics according to 8.3 Physics    
 40 // 16.10.2012 Renamed used classes (A.Ribon)      
 41 //                                                
 42 //////////////////////////////////////////////    
 43 //                                                
 44                                                   
 45 #include "PhysicsList.hh"                         
 46                                                   
 47 #include "PhysicsListMessenger.hh"                
 48                                                   
 49 #include "G4DecayPhysics.hh"                      
 50 #include "G4Electron.hh"                          
 51 #include "G4EmExtraPhysics.hh"                    
 52 #include "G4EmLivermorePhysics.hh"                
 53 #include "G4EmParameters.hh"                      
 54 #include "G4EmPenelopePhysics.hh"                 
 55 #include "G4EmStandardPhysics.hh"                 
 56 #include "G4EmStandardPhysicsGS.hh"               
 57 #include "G4EmStandardPhysics_option1.hh"         
 58 #include "G4EmStandardPhysics_option2.hh"         
 59 #include "G4EmStandardPhysics_option3.hh"         
 60 #include "G4EmStandardPhysics_option4.hh"         
 61 #include "G4Gamma.hh"                             
 62 #include "G4HadronElasticPhysics.hh"              
 63 #include "G4HadronElasticPhysicsHP.hh"            
 64 #include "G4HadronElasticPhysicsXS.hh"            
 65 #include "G4HadronHElasticPhysics.hh"             
 66 #include "G4HadronInelasticQBBC.hh"               
 67 #include "G4HadronPhysicsFTFP_BERT.hh"            
 68 #include "G4HadronPhysicsFTFP_BERT_HP.hh"         
 69 #include "G4HadronPhysicsFTFP_BERT_TRV.hh"        
 70 #include "G4HadronPhysicsFTF_BIC.hh"              
 71 #include "G4HadronPhysicsQGSP_BERT.hh"            
 72 #include "G4HadronPhysicsQGSP_BERT_HP.hh"         
 73 #include "G4HadronPhysicsQGSP_BIC.hh"             
 74 #include "G4HadronPhysicsQGSP_BIC_HP.hh"          
 75 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"       
 76 #include "G4HadronPhysicsQGS_BIC.hh"              
 77 #include "G4IonBinaryCascadePhysics.hh"           
 78 #include "G4IonElasticPhysics.hh"                 
 79 #include "G4IonPhysics.hh"                        
 80 #include "G4IonPhysicsXS.hh"                      
 81 #include "G4NeutronCrossSectionXS.hh"             
 82 #include "G4NeutronTrackingCut.hh"                
 83 #include "G4ParticleTable.hh"                     
 84 #include "G4ParticleTypes.hh"                     
 85 #include "G4PhysListFactoryMessenger.hh"          
 86 #include "G4Positron.hh"                          
 87 #include "G4ProcessManager.hh"                    
 88 #include "G4Proton.hh"                            
 89 #include "G4RadioactiveDecayPhysics.hh"           
 90 #include "G4StoppingPhysics.hh"                   
 91 #include "G4SystemOfUnits.hh"                     
 92                                                   
 93 //....oooOO0OOooo........oooOO0OOooo........oo    
 94                                                   
 95 PhysicsList::PhysicsList() : G4VModularPhysics    
 96 {                                                 
 97   SetDefaultCutValue(0.7 * CLHEP::mm);            
 98   verboseLevel = 1;                               
 99                                                   
100   // Messengers                                   
101   fMessenger = new PhysicsListMessenger(this);    
102   fFactMessenger = new G4PhysListFactoryMessen    
103                                                   
104   // Particles                                    
105   fParticleList = new G4DecayPhysics(verboseLe    
106                                                   
107   // EM physics                                   
108   fEmPhysicsList = new G4EmStandardPhysics(ver    
109 }                                                 
110                                                   
111 //....oooOO0OOooo........oooOO0OOooo........oo    
112                                                   
113 PhysicsList::~PhysicsList()                       
114 {                                                 
115   delete fMessenger;                              
116   delete fParticleList;                           
117   delete fEmPhysicsList;                          
118   for (std::size_t i = 0; i < fHadronPhys.size    
119     delete fHadronPhys[i];                        
120   }                                               
121 }                                                 
122                                                   
123 //....oooOO0OOooo........oooOO0OOooo........oo    
124                                                   
125 void PhysicsList::ConstructParticle()             
126 {                                                 
127   fParticleList->ConstructParticle();             
128 }                                                 
129                                                   
130 //....oooOO0OOooo........oooOO0OOooo........oo    
131                                                   
132 void PhysicsList::ConstructProcess()              
133 {                                                 
134   AddTransportation();                            
135   fEmPhysicsList->ConstructProcess();             
136   fParticleList->ConstructProcess();              
137   for (std::size_t i = 0; i < fHadronPhys.size    
138     fHadronPhys[i]->ConstructProcess();           
139   }                                               
140 }                                                 
141                                                   
142 //....oooOO0OOooo........oooOO0OOooo........oo    
143                                                   
144 void PhysicsList::AddPhysicsList(const G4Strin    
145 {                                                 
146   if (verboseLevel > 0) {                         
147     G4cout << "PhysicsList::AddPhysicsList: <"    
148   }                                               
149   if (name == "emstandard_opt0") {                
150     delete fEmPhysicsList;                        
151     fEmPhysicsList = new G4EmStandardPhysics(v    
152   }                                               
153   else if (name == "emstandard_opt1") {           
154     delete fEmPhysicsList;                        
155     fEmPhysicsList = new G4EmStandardPhysics_o    
156   }                                               
157   else if (name == "emstandard_opt2") {           
158     delete fEmPhysicsList;                        
159     fEmPhysicsList = new G4EmStandardPhysics_o    
160   }                                               
161   else if (name == "emstandard_opt3") {           
162     delete fEmPhysicsList;                        
163     fEmPhysicsList = new G4EmStandardPhysics_o    
164   }                                               
165   else if (name == "emstandard_opt4") {           
166     delete fEmPhysicsList;                        
167     fEmPhysicsList = new G4EmStandardPhysics_o    
168   }                                               
169   else if (name == "emstandardGS") {              
170     delete fEmPhysicsList;                        
171     fEmPhysicsList = new G4EmStandardPhysicsGS    
172   }                                               
173   else if (name == "FTFP_BERT_EMV") {             
174     AddPhysicsList("FTFP_BERT");                  
175     AddPhysicsList("emstandard_opt1");            
176   }                                               
177   else if (name == "FTFP_BERT_EMX") {             
178     AddPhysicsList("FTFP_BERT");                  
179     AddPhysicsList("emstandard_opt2");            
180   }                                               
181   else if (name == "FTFP_BERT_EMY") {             
182     AddPhysicsList("FTFP_BERT");                  
183     AddPhysicsList("emstandard_opt3");            
184   }                                               
185   else if (name == "FTFP_BERT_EMZ") {             
186     AddPhysicsList("FTFP_BERT");                  
187     AddPhysicsList("emstandard_opt4");            
188   }                                               
189   else if (name == "FTFP_BERT") {                 
190     SetBuilderList0(false);                       
191     fHadronPhys.push_back(new G4HadronPhysicsF    
192   }                                               
193   else if (name == "FTFP_BERT_TRV") {             
194     AddPhysicsList("emstandardGS");               
195     SetBuilderList1(false);                       
196     fHadronPhys.push_back(new G4HadronPhysicsF    
197   }                                               
198   else if (name == "FTF_BIC") {                   
199     SetBuilderList0(false);                       
200     fHadronPhys.push_back(new G4HadronPhysicsF    
201   }                                               
202   else if (name == "QBBC") {                      
203     AddPhysicsList("emstandard_opt0");            
204     SetBuilderList2();                            
205     fHadronPhys.push_back(new G4HadronInelasti    
206   }                                               
207   else if (name == "QGSP_BERT") {                 
208     SetBuilderList0(false);                       
209     fHadronPhys.push_back(new G4HadronPhysicsQ    
210   }                                               
211   else if (name == "QGSP_FTFP_BERT") {            
212     SetBuilderList0(false);                       
213     fHadronPhys.push_back(new G4HadronPhysicsQ    
214   }                                               
215   else if (name == "QGSP_FTFP_BERT_EMV") {        
216     AddPhysicsList("QGSP_FTFP_BERT");             
217     AddPhysicsList("emstandard_opt1");            
218   }                                               
219   else if (name == "QGSP_BERT_EMV") {             
220     AddPhysicsList("QGSP_BERT");                  
221     AddPhysicsList("emstandard_opt1");            
222   }                                               
223   else if (name == "QGSP_BERT_EMX") {             
224     AddPhysicsList("QGSP_BERT");                  
225     AddPhysicsList("emstandard_opt2");            
226   }                                               
227   else if (name == "QGSP_BERT_HP") {              
228     SetBuilderList0(true);                        
229     fHadronPhys.push_back(new G4HadronPhysicsQ    
230     AddPhysicsList("RadioactiveDecay");           
231   }                                               
232   else if (name == "QGSP_BIC") {                  
233     SetBuilderList0(false);                       
234     fHadronPhys.push_back(new G4HadronPhysicsQ    
235     fHadronPhys.push_back(new G4IonElasticPhys    
236   }                                               
237   else if (name == "QGSP_BIC_EMY") {              
238     AddPhysicsList("QGSP_BIC");                   
239     AddPhysicsList("emstandard_opt3");            
240   }                                               
241   else if (name == "QGS_BIC") {                   
242     SetBuilderList0(false);                       
243     fHadronPhys.push_back(new G4HadronPhysicsQ    
244   }                                               
245   else if (name == "QGSP_BIC_HP") {               
246     SetBuilderList0(true);                        
247     fHadronPhys.push_back(new G4HadronPhysicsQ    
248     AddPhysicsList("RadioactiveDecay");           
249   }                                               
250   else if (name == "RadioactiveDecay") {          
251     fHadronPhys.push_back(new G4RadioactiveDec    
252   }                                               
253   else {                                          
254     G4cout << "PhysicsList::AddPhysicsList: <"    
255            << " is not defined" << G4endl;        
256   }                                               
257 }                                                 
258                                                   
259 //....oooOO0OOooo........oooOO0OOooo........oo    
260                                                   
261 void PhysicsList::SetBuilderList0(G4bool flagH    
262 {                                                 
263   fHadronPhys.push_back(new G4EmExtraPhysics(v    
264   if (flagHP) {                                   
265     fHadronPhys.push_back(new G4HadronElasticP    
266   }                                               
267   else {                                          
268     fHadronPhys.push_back(new G4HadronElasticP    
269   }                                               
270   fHadronPhys.push_back(new G4StoppingPhysics(    
271   fHadronPhys.push_back(new G4IonPhysics(verbo    
272   if (!flagHP) {                                  
273     fHadronPhys.push_back(new G4NeutronTrackin    
274   }                                               
275 }                                                 
276                                                   
277 //....oooOO0OOooo........oooOO0OOooo........oo    
278                                                   
279 void PhysicsList::SetBuilderList1(G4bool flagH    
280 {                                                 
281   fHadronPhys.push_back(new G4EmExtraPhysics(v    
282   if (flagHP) {                                   
283     fHadronPhys.push_back(new G4HadronElasticP    
284   }                                               
285   else {                                          
286     fHadronPhys.push_back(new G4HadronHElastic    
287   }                                               
288   fHadronPhys.push_back(new G4StoppingPhysics(    
289   fHadronPhys.push_back(new G4IonPhysics(verbo    
290   if (!flagHP) {                                  
291     fHadronPhys.push_back(new G4NeutronTrackin    
292   }                                               
293 }                                                 
294                                                   
295 //....oooOO0OOooo........oooOO0OOooo........oo    
296                                                   
297 void PhysicsList::SetBuilderList2()               
298 {                                                 
299   fHadronPhys.push_back(new G4EmExtraPhysics(v    
300   fHadronPhys.push_back(new G4HadronElasticPhy    
301   fHadronPhys.push_back(new G4StoppingPhysics(    
302   fHadronPhys.push_back(new G4IonPhysicsXS(ver    
303   fHadronPhys.push_back(new G4IonElasticPhysic    
304   fHadronPhys.push_back(new G4NeutronTrackingC    
305 }                                                 
306                                                   
307 //....oooOO0OOooo........oooOO0OOooo........oo    
308                                                   
309 void PhysicsList::List()                          
310 {                                                 
311   G4cout << "### PhysicsLists available: FTFP_    
312          << "FTFP_BERT_EMX FTFP_BERT_EMZ FTFP_    
313   G4cout << "                            FTF_B    
314          << "QGSP_BERT_EMV QGSP_BERT_EMX" << G    
315   G4cout << "                            QGSP_    
316          << "QGSP_FTFP_BERT_EMV" << G4endl;       
317   G4cout << "                            QGS_B    
318          << "QGSP_BIC_HP" << G4endl;              
319 }                                                 
320                                                   
321 //....oooOO0OOooo........oooOO0OOooo........oo    
322