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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/hadronic/Hadr02/src/HadronPhysicsHIJING.cc (Version 11.3.0) and /examples/extended/hadronic/Hadr02/src/HadronPhysicsHIJING.cc (Version 8.0)


  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/Hadr02/src/HadronPhysicsHIJ    
 27 /// \brief Implementation of the HadronPhysics    
 28 //                                                
 29 //                                                
 30 //--------------------------------------------    
 31 //                                                
 32 // ClassName:                                     
 33 //                                                
 34 // Author: 2012 A. Dotti                          
 35 //   created from HadronPhysicsHIJING             
 36 //                                                
 37 // Modified:                                      
 38 //                                                
 39 //--------------------------------------------    
 40 //                                                
 41 #ifdef G4_USE_HIJING                              
 42 #  include "HadronPhysicsHIJING.hh"               
 43                                                   
 44 #  include "G4AntiBarionBuilder.hh"               
 45 #  include "G4BaryonConstructor.hh"               
 46 #  include "G4BertiniNeutronBuilder.hh"           
 47 #  include "G4BertiniPiKBuilder.hh"               
 48 #  include "G4BertiniProtonBuilder.hh"            
 49 #  include "G4ChipsKaonMinusInelasticXS.hh"       
 50 #  include "G4ChipsKaonPlusInelasticXS.hh"        
 51 #  include "G4ChipsKaonZeroInelasticXS.hh"        
 52 #  include "G4CrossSectionDataSetRegistry.hh"     
 53 #  include "G4FTFPAntiBarionBuilder.hh"           
 54 #  include "G4FTFPNeutronBuilder.hh"              
 55 #  include "G4FTFPPiKBuilder.hh"                  
 56 #  include "G4FTFPProtonBuilder.hh"               
 57 #  include "G4HyperonFTFPBuilder.hh"              
 58 #  include "G4MesonConstructor.hh"                
 59 #  include "G4NeutronBuilder.hh"                  
 60 #  include "G4ParticleDefinition.hh"              
 61 #  include "G4ParticleTable.hh"                   
 62 #  include "G4PhysListUtil.hh"                    
 63 #  include "G4PiKBuilder.hh"                      
 64 #  include "G4ProcessManager.hh"                  
 65 #  include "G4ProtonBuilder.hh"                   
 66 #  include "G4QGSPNeutronBuilder.hh"              
 67 #  include "G4QGSPPiKBuilder.hh"                  
 68 #  include "G4QGSPProtonBuilder.hh"               
 69 #  include "G4ShortLivedConstructor.hh"           
 70 #  include "G4ios.hh"                             
 71 #  include "globals.hh"                           
 72                                                   
 73 #  include <iomanip>                              
 74                                                   
 75 HadronPhysicsHIJING::HadronPhysicsHIJING(G4int    
 76 {                                                 
 77   fNeutrons = 0;                                  
 78   fHIJINGNeutron = 0;                             
 79   fPiK = 0;                                       
 80   fHIJINGPiK = 0;                                 
 81   fPro = 0;                                       
 82   fHIJINGPro = 0;                                 
 83   fHyperon = 0;                                   
 84   fFTFPHyperon = 0;                               
 85   fAntiBaryon = 0;                                
 86   fHIJINGAntiBaryon = 0;                          
 87   fCHIPSInelastic = 0;                            
 88 }                                                 
 89                                                   
 90 //....oooOO0OOooo........oooOO0OOooo........oo    
 91                                                   
 92 void HadronPhysicsHIJING::CreateModels()          
 93 {                                                 
 94   G4bool quasiElasFTF = false;                    
 95   G4bool quasiElasQGS = true;                     
 96   G4double minFTFP = 6 * GeV;                     
 97   G4double maxBERT = 8 * GeV;                     
 98   G4double minHIJING = 12 * GeV;                  
 99   G4double minQGSP = 12 * GeV;                    
100   G4double maxFTFP = 25 * GeV;                    
101                                                   
102   // Proton                                       
103   fPro = new G4ProtonBuilder;                     
104   fHIJINGPro = new HIJINGProtonBuilder();         
105   fHIJINGPro->SetMinEnergy(minHIJING);            
106   fPro->RegisterMe(fHIJINGPro);                   
107   G4FTFPProtonBuilder* FTFPPro = new G4FTFPPro    
108   FTFPPro->SetMinEnergy(minFTFP);                 
109   FTFPPro->SetMaxEnergy(maxFTFP);                 
110   fPro->RegisterMe(FTFPPro);                      
111   G4BertiniProtonBuilder* BertPro = new G4Bert    
112   BertPro->SetMaxEnergy(maxBERT);                 
113                                                   
114   fNeutrons = new G4NeutronBuilder;               
115   fHIJINGNeutron = new HIJINGNeutronBuilder();    
116   fHIJINGNeutron->SetMinEnergy(minHIJING);        
117   fNeutrons->RegisterMe(fHIJINGNeutron);          
118   // G4QGSPNeutronBuilder* QGSPNeu = new G4QGS    
119   // QGSPNeu->SetMinEnergy(minQGSP);              
120   // fNeutrons->RegisterMe(QGSPNeu);              
121   G4FTFPNeutronBuilder* FTFPNeu = new G4FTFPNe    
122   FTFPNeu->SetMinEnergy(minFTFP);                 
123   FTFPNeu->SetMaxEnergy(maxFTFP);                 
124   fNeutrons->RegisterMe(FTFPNeu);                 
125   G4BertiniNeutronBuilder* BertNeu = new G4Ber    
126   BertNeu->SetMaxEnergy(maxBERT);                 
127                                                   
128   fPiK = new G4PiKBuilder;                        
129   G4QGSPPiKBuilder* QGSPPiK = new G4QGSPPiKBui    
130   fPiK->RegisterMe(QGSPPiK);                      
131   QGSPPiK->SetMinEnergy(minQGSP);                 
132   G4FTFPPiKBuilder* FTFPPiK = new G4FTFPPiKBui    
133   fPiK->RegisterMe(FTFPPiK);                      
134   FTFPPiK->SetMaxEnergy(maxFTFP);                 
135   FTFPPiK->SetMinEnergy(minFTFP);                 
136   G4BertiniPiKBuilder* BertiniPiK = new G4Bert    
137   fPiK->RegisterMe(BertiniPiK);                   
138   BertiniPiK->SetMaxEnergy(maxBERT);              
139                                                   
140   // For Hyperons use FTF model                   
141   fHyperon = new G4HyperonBuilder;                
142   fFTFPHyperon = new G4HyperonFTFPBuilder;        
143   fHyperon->RegisterMe(fFTFPHyperon);             
144                                                   
145   fAntiBaryon = new G4AntiBarionBuilder;          
146   // FTFPAntiBaryon=new G4FTFPAntiBarionBuilde    
147   G4FTFPAntiBarionBuilder* FTFPAB = new G4FTFP    
148   fAntiBaryon->RegisterMe(FTFPAB);                
149 }                                                 
150                                                   
151 //....oooOO0OOooo........oooOO0OOooo........oo    
152                                                   
153 HadronPhysicsHIJING::~HadronPhysicsHIJING()       
154 {                                                 
155   delete fNeutrons;                               
156   delete fHIJINGNeutron;                          
157                                                   
158   delete fPiK;                                    
159   delete fHIJINGPiK;                              
160                                                   
161   delete fPro;                                    
162   delete fHIJINGPro;                              
163                                                   
164   delete fHyperon;                                
165   delete fFTFPHyperon;                            
166   delete fAntiBaryon;                             
167   delete fHIJINGAntiBaryon;                       
168                                                   
169   delete fCHIPSInelastic;                         
170 }                                                 
171                                                   
172 //....oooOO0OOooo........oooOO0OOooo........oo    
173                                                   
174 void HadronPhysicsHIJING::ConstructParticle()     
175 {                                                 
176   G4MesonConstructor pMesonConstructor;           
177   pMesonConstructor.ConstructParticle();          
178                                                   
179   G4BaryonConstructor pBaryonConstructor;         
180   pBaryonConstructor.ConstructParticle();         
181                                                   
182   G4ShortLivedConstructor pShortLivedConstruct    
183   pShortLivedConstructor.ConstructParticle();     
184 }                                                 
185                                                   
186 //....oooOO0OOooo........oooOO0OOooo........oo    
187                                                   
188 void HadronPhysicsHIJING::ConstructProcess()      
189 {                                                 
190   CreateModels();                                 
191   fNeutrons->Build();                             
192   fPro->Build();                                  
193   fPiK->Build();                                  
194                                                   
195   // use CHIPS cross sections also for Kaons      
196   G4VCrossSectionDataSet* ChipsKaonMinus =        
197     G4CrossSectionDataSetRegistry::Instance()-    
198       G4ChipsKaonMinusInelasticXS::Default_Nam    
199   G4VCrossSectionDataSet* ChipsKaonPlus =         
200     G4CrossSectionDataSetRegistry::Instance()-    
201       G4ChipsKaonPlusInelasticXS::Default_Name    
202   G4VCrossSectionDataSet* ChipsKaonZero =         
203     G4CrossSectionDataSetRegistry::Instance()-    
204       G4ChipsKaonZeroInelasticXS::Default_Name    
205   //                                              
206                                                   
207   G4PhysListUtil::FindInelasticProcess(G4KaonM    
208   G4PhysListUtil::FindInelasticProcess(G4KaonP    
209   G4PhysListUtil::FindInelasticProcess(G4KaonZ    
210   G4PhysListUtil::FindInelasticProcess(G4KaonZ    
211                                                   
212   fHyperon->Build();                              
213   fAntiBaryon->Build();                           
214 }                                                 
215                                                   
216 //....oooOO0OOooo........oooOO0OOooo........oo    
217                                                   
218 G4HadronicProcess* HadronPhysicsHIJING::FindIn    
219 {                                                 
220   G4HadronicProcess* had = 0;                     
221   if (p) {                                        
222     G4ProcessVector* pvec = p->GetProcessManag    
223     size_t n = pvec->size();                      
224     if (0 < n) {                                  
225       for (size_t i = 0; i < n; ++i) {            
226         if (fHadronInelastic == ((*pvec)[i])->    
227           had = static_cast<G4HadronicProcess*    
228                                                   
229           break;                                  
230         }                                         
231       }                                           
232     }                                             
233   }                                               
234   return had;                                     
235 }                                                 
236                                                   
237 #endif  // G4_USE_HIJING                          
238