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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/advanced/STCyclotron/src/STCyclotronPhysicsList.cc (Version 11.3.0) and /examples/advanced/STCyclotron/src/STCyclotronPhysicsList.cc (Version 9.2.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 // Author: F. Poignant, floriane.poignant@gmai    
 27 //                                                
 28                                                   
 29 #include "STCyclotronPhysicsList.hh"              
 30 #include "G4Proton.hh"                            
 31 #include "G4Neutron.hh"                           
 32 #include "G4Electron.hh"                          
 33 #include "G4Positron.hh"                          
 34 #include "G4Gamma.hh"                             
 35 #include "G4Deuteron.hh"                          
 36                                                   
 37 //Physic Lists (contained inside the Geant 4 d    
 38 #include "G4EmStandardPhysics_option3.hh"         
 39 #include "G4DecayPhysics.hh"                      
 40 #include "G4Decay.hh"                             
 41 #include "G4StepLimiter.hh"                       
 42 #include "G4LossTableManager.hh"                  
 43 #include "G4UnitsTable.hh"                        
 44 #include "G4SystemOfUnits.hh"                     
 45 #include "G4ProcessManager.hh"                    
 46 #include "G4Region.hh"                            
 47 #include "G4RegionStore.hh"                       
 48                                                   
 49 #include "G4EmExtraPhysics.hh"                    
 50 #include "G4EmParameters.hh"                      
 51 #include "G4NuclideTable.hh"                      
 52                                                   
 53 #include "G4HadronPhysicsQGSP_BERT.hh"            
 54 #include "G4HadronPhysicsQGSP_BIC.hh"             
 55 #include "G4HadronPhysicsQGSP_BIC_HP.hh"          
 56 #include "G4HadronPhysicsQGSP_BIC_AllHP.hh"       
 57 #include "G4RadioactiveDecayPhysics.hh"           
 58 //#include "QGSP_BIC_HP.hh"                       
 59 #include "G4PhysListFactory.hh"                   
 60 #include "G4DeexPrecoParameters.hh"               
 61 #include "G4NuclideTable.hh"                      
 62                                                   
 63 STCyclotronPhysicsList::STCyclotronPhysicsList    
 64   : G4VModularPhysicsList()                       
 65 {                                                 
 66   // Mandatory for G4NuclideTable                 
 67   // Half-life threshold must be set small or     
 68   // will not be assigned life times (default     
 69   G4NuclideTable::GetInstance()->SetThresholdO    
 70   G4NuclideTable::GetInstance()->SetLevelToler    
 71                                                   
 72   //---                                           
 73   fDetector = det;                                
 74                                                   
 75   G4LossTableManager::Instance();                 
 76                                                   
 77   defaultCutValue = 0.1*mm;                       
 78   fCutForGamma     = defaultCutValue;             
 79   fCutForElectron  = defaultCutValue;             
 80   fCutForPositron  = defaultCutValue;             
 81                                                   
 82   fThickness_foil = defaultCutValue;              
 83   fThickness_target = defaultCutValue;            
 84                                                   
 85   fCutTargetProton  = fThickness_target;          
 86   fCutTargetElectron = fThickness_target;         
 87   fCutTargetPositron = fThickness_target;         
 88   fCutTargetGamma = fThickness_target;            
 89                                                   
 90   fCutFoilProton = fThickness_foil;               
 91   fCutFoilElectron = fThickness_foil;             
 92   fCutFoilPositron = fThickness_foil;             
 93   fCutFoilGamma = fThickness_foil;                
 94                                                   
 95   //EM physics                                    
 96   fEmPhysicsList = new G4EmStandardPhysics_opt    
 97   fEmName = G4String("emstandard_opt3");          
 98                                                   
 99   //Decay physics and all particles               
100   fDecPhysicsList = new G4DecayPhysics(0);        
101   fRaddecayList = new G4RadioactiveDecayPhysic    
102                                                   
103   //Hadron physics                                
104   fHadPhysicsList = new G4HadronPhysicsQGSP_BI    
105   //fHadPhysicsList = new G4HadronPhysicsQGSP_    
106                                                   
107                                                   
108                                                   
109                                                   
110                                                   
111 }                                                 
112                                                   
113 STCyclotronPhysicsList::~STCyclotronPhysicsLis    
114 {                                                 
115                                                   
116   delete fEmPhysicsList ;                         
117   delete fDecPhysicsList;                         
118   delete fRaddecayList;                           
119   delete fHadPhysicsList;                         
120                                                   
121                                                   
122 }                                                 
123                                                   
124 void STCyclotronPhysicsList::ConstructParticle    
125 {                                                 
126                                                   
127   G4Proton::ProtonDefinition();                   
128   G4Gamma::GammaDefinition();                     
129   G4Electron::ElectronDefinition();               
130   G4Positron::PositronDefinition();               
131   G4Neutron::NeutronDefinition();                 
132   G4Deuteron::DeuteronDefinition();               
133                                                   
134   fDecPhysicsList->ConstructParticle();           
135                                                   
136                                                   
137 }                                                 
138                                                   
139 void STCyclotronPhysicsList::ConstructProcess(    
140 {                                                 
141   // Define transportation process                
142                                                   
143                                                   
144   AddTransportation();                            
145                                                   
146   //electromagnetic physics list                  
147   fEmPhysicsList->ConstructProcess();             
148   //em_config.AddModels();                        
149                                                   
150   //decay physics list                            
151   fDecPhysicsList->ConstructProcess();            
152   fRaddecayList->ConstructProcess();              
153                                                   
154   //hadronic physics lists                        
155   fHadPhysicsList->ConstructProcess();            
156                                                   
157   //Get the value of the fThickness of foil an    
158   fThickness_foil = fDetector->GetFoilThicknes    
159   fThickness_target = fDetector->GetTargetThic    
160                                                   
161   //Update the cuts with the 1/2 of the thickn    
162   //SetCuts();                                    
163                                                   
164   SetCutTarget(0.01,fThickness_target/2.,fThic    
165                                                   
166                                                   
167                                                   
168 }                                                 
169                                                   
170 void STCyclotronPhysicsList::SetCuts()            
171 {                                                 
172                                                   
173   if (verboseLevel >0){                           
174     G4cout << "PhysicsList::SetCuts:";            
175     G4cout << "CutLength : " << G4BestUnit(def    
176   }                                               
177                                                   
178   // set cut values for gamma at first and for    
179   // because some processes for e+/e- need cut    
180   SetCutValue(fCutForGamma, "gamma");             
181   SetCutValue(fCutForElectron, "e-");             
182   SetCutValue(fCutForPositron, "e+");             
183                                                   
184   // Set cuts for detector                        
185   SetCutFoil(0.1,fThickness_foil/2.,fThickness    
186   SetCutTarget(0.01,fThickness_target/2.,fThic    
187   if (verboseLevel>0) DumpCutValuesTable();       
188 }                                                 
189                                                   
190 void STCyclotronPhysicsList::SetCutForGamma(G4    
191 {                                                 
192   fCutForGamma = cut;                             
193   SetParticleCuts(fCutForGamma, G4Gamma::Gamma    
194 }                                                 
195                                                   
196 void STCyclotronPhysicsList::SetCutForElectron    
197 {                                                 
198   fCutForElectron = cut;                          
199   SetParticleCuts(fCutForElectron, G4Electron:    
200 }                                                 
201                                                   
202 void STCyclotronPhysicsList::SetCutForPositron    
203 {                                                 
204   fCutForPositron = cut;                          
205   SetParticleCuts(fCutForPositron, G4Positron:    
206 }                                                 
207                                                   
208 void STCyclotronPhysicsList::SetCutTarget(G4do    
209                                                   
210   fCutTargetProton = cutProton*mm;                
211   fCutTargetElectron = cutElectron*mm;            
212   fCutTargetPositron = cutPositron*mm;            
213   fCutTargetGamma = cutGamma*mm;                  
214                                                   
215   G4String regionNameTarget = "Target";           
216   G4Region* regionTarget = G4RegionStore::GetI    
217                                                   
218   G4ProductionCuts* cutsTarget = new G4Product    
219   cutsTarget -> SetProductionCut(fCutTargetGam    
220   cutsTarget -> SetProductionCut(fCutTargetEle    
221   cutsTarget -> SetProductionCut(fCutTargetPos    
222   cutsTarget -> SetProductionCut(fCutTargetPro    
223                                                   
224   regionTarget -> SetProductionCuts(cutsTarget    
225                                                   
226 }                                                 
227                                                   
228 void STCyclotronPhysicsList::SetCutFoil(G4doub    
229                                                   
230   fCutFoilProton = cutProton*mm;                  
231   fCutFoilElectron = cutElectron*mm;              
232   fCutFoilPositron = cutPositron*mm;              
233   fCutFoilGamma = cutGamma*mm;                    
234                                                   
235   G4RegionStore::GetInstance()->GetRegion("Foi    
236   G4String regionNameFoil = "Foil";               
237   G4Region* regionFoil = G4RegionStore::GetIns    
238                                                   
239   G4ProductionCuts* cutsFoil = new G4Productio    
240   cutsFoil -> SetProductionCut(fCutFoilGamma,"    
241   cutsFoil -> SetProductionCut(fCutFoilElectro    
242   cutsFoil -> SetProductionCut(fCutFoilPositro    
243   cutsFoil -> SetProductionCut(fCutFoilProton,    
244                                                   
245   regionFoil -> SetProductionCuts(cutsFoil);      
246                                                   
247 }                                                 
248                                                   
249