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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/purging_magnet/src/PurgMagPhysicsList.cc (Version 11.3.0) and /examples/advanced/purging_magnet/src/PurgMagPhysicsList.cc (Version 1.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 // Code developed by:                             
 27 //  S.Larsson                                     
 28 //                                                
 29 //    ********************************            
 30 //    *                              *            
 31 //    *    PurgMagPhysicsList.cc     *            
 32 //    *                              *            
 33 //    ********************************            
 34 //                                                
 35                                                   
 36 #include "PurgMagPhysicsList.hh"                  
 37 #include "G4SystemOfUnits.hh"                     
 38 #include "G4ParticleDefinition.hh"                
 39 #include "G4ParticleWithCuts.hh"                  
 40 #include "G4ProcessManager.hh"                    
 41 #include "G4ParticleTypes.hh"                     
 42 #include "G4ParticleTable.hh"                     
 43 #include "G4Material.hh"                          
 44 #include "G4UnitsTable.hh"                        
 45 #include "G4ios.hh"                               
 46 #include "G4EmStandardPhysics_option4.hh"         
 47 #include "G4VPhysicsConstructor.hh"               
 48 #include "G4DecayPhysics.hh"                      
 49                                                   
 50 PurgMagPhysicsList::PurgMagPhysicsList():  G4V    
 51 {                                                 
 52   defaultCutValue = 1*micrometer;                 
 53   cutForGamma     = defaultCutValue;              
 54   cutForElectron  = defaultCutValue;              
 55   cutForPositron  = defaultCutValue;              
 56   cutForProton    = defaultCutValue;              
 57                                                   
 58   fEmPhysicsList = new G4EmStandardPhysics_opt    
 59   fDecPhysicsList = new G4DecayPhysics();         
 60   SetVerboseLevel(1);                             
 61 }                                                 
 62                                                   
 63 PurgMagPhysicsList::~PurgMagPhysicsList()         
 64 {                                                 
 65  delete fDecPhysicsList;                          
 66  delete fEmPhysicsList;                           
 67 }                                                 
 68                                                   
 69 void PurgMagPhysicsList::ConstructParticle()      
 70 {                                                 
 71  fDecPhysicsList -> ConstructParticle();          
 72 }                                                 
 73                                                   
 74 void PurgMagPhysicsList::ConstructProcess()       
 75 {                                                 
 76   AddTransportation();                            
 77   fEmPhysicsList -> ConstructProcess();           
 78                                                   
 79 // Deexcitation                                   
 80 // Both Fluorescence and Auger e- emission act    
 81 //G4VAtomDeexcitation* de = new G4UAtomicDeexc    
 82 //G4LossTableManager::Instance()->SetAtomDeexc    
 83 //de -> SetFluo(true);                            
 84 //de -> SetAuger(true);                           
 85 }                                                 
 86                                                   
 87 void PurgMagPhysicsList::SetCuts()                
 88 {                                                 
 89   if (verboseLevel >0){                           
 90     G4cout << "PurgMagPhysicsList::SetCuts:";     
 91     G4cout << "CutLength : " << G4BestUnit(def    
 92   }                                               
 93                                                   
 94   // set cut values for gamma at first and for    
 95   // because some processes for e+/e- need cut    
 96   SetCutValue(cutForGamma, "gamma");              
 97   SetCutValue(cutForElectron, "e-");              
 98   SetCutValue(cutForPositron, "e+");              
 99                                                   
100   // set cut values for proton and anti_proton    
101   // because some processes for hadrons need c    
102   SetCutValue(cutForProton, "proton");            
103   SetCutValue(cutForProton, "anti_proton");       
104                                                   
105   //  SetCutValueForOthers(defaultCutValue);      
106                                                   
107   if (verboseLevel>0) DumpCutValuesTable();       
108 }                                                 
109                                                   
110 void PurgMagPhysicsList::SetGammaLowLimit(G4do    
111 {                                                 
112   if (verboseLevel >0){                           
113     G4cout << "PurgMagPhysicsList::SetCuts:";     
114     G4cout << "Gamma cut in energy: " << lowcu    
115   }                                               
116                                                   
117   // G4Gamma::SetEnergyRange(lowcut,1e5);         
118   SetGELowLimit(lowcut);                          
119 }                                                 
120                                                   
121 void PurgMagPhysicsList::SetElectronLowLimit(G    
122 {                                                 
123   if (verboseLevel >0){                           
124                                                   
125     G4cout << "PurgMagPhysicsList::SetCuts:";     
126     G4cout << "Electron cut in energy: " << lo    
127   }                                               
128                                                   
129   // G4Electron::SetEnergyRange(lowcut,1e5);      
130   SetGELowLimit(lowcut);                          
131 }                                                 
132                                                   
133 void PurgMagPhysicsList::SetPositronLowLimit(G    
134 {                                                 
135   if (verboseLevel >0){                           
136                                                   
137     G4cout << "PurgMagPhysicsList::SetCuts:";     
138     G4cout << "Positron cut in energy: " << lo    
139   }                                               
140                                                   
141   G4cerr << "PurgMagPhysicsList::SetPositronLo    
142   G4Exception("PurgMagPhysicsList::SetPositron    
143         FatalException,"Positron Low Limit: no    
144   //                                              
145   // G4Positron::SetEnergyRange(lowcut,1e5);      
146 }                                                 
147                                                   
148                                                   
149 void PurgMagPhysicsList::SetProtonLowLimit(G4d    
150 {                                                 
151   if (verboseLevel >0){                           
152                                                   
153     G4cout << "PurgMagPhysicsList::SetCuts:";     
154     G4cout << "Proton cut in energy: " << lowc    
155   }                                               
156                                                   
157   G4cerr << "PurgMagPhysicsList::SetProtonLowL    
158   G4Exception("PurgMagPhysicsList::SetProtonLo    
159         FatalException,"Proton Low Limit: not     
160   //                                              
161   // G4Proton::SetEnergyRange(lowcut,1e5);        
162   // G4AntiProton::SetEnergyRange(lowcut,1e5);    
163 }                                                 
164                                                   
165 void PurgMagPhysicsList::SetGEPLowLimit(G4doub    
166 {                                                 
167   if (verboseLevel >0){                           
168     G4cout << "PurgMagPhysicsList::SetGEPLowLi    
169     G4cout << "Gamma and Electron cut in energ    
170   }                                               
171                                                   
172   // G4Gamma::SetEnergyRange(lowcut,1e5);         
173   // G4Electron::SetEnergyRange(lowcut,1e5);      
174   // G4Positron::SetEnergyRange(lowcut,1e5);      
175   this->SetGELowLimit(lowcut);                    
176                                                   
177   G4cerr << " SetGEPLowLimit : Uncertain wheth    
178 }                                                 
179                                                   
180 void PurgMagPhysicsList::SetGELowLimit(G4doubl    
181 {                                                 
182   if (verboseLevel >0){                           
183     G4cout << "PurgMagPhysicsList::SetGELowLim    
184     G4cout << "Gamma and Electron cut in energ    
185   }                                               
186                                                   
187   G4ProductionCutsTable::GetProductionCutsTabl    
188 }                                                 
189 void PurgMagPhysicsList::SetGammaCut(G4double     
190 {                                                 
191   cutForGamma = val;                              
192 }                                                 
193                                                   
194 void PurgMagPhysicsList::SetElectronCut(G4doub    
195 {                                                 
196   cutForElectron = val;                           
197 }                                                 
198                                                   
199 void PurgMagPhysicsList::SetPositronCut(G4doub    
200 {                                                 
201   cutForPositron = val;                           
202 }                                                 
203                                                   
204 void PurgMagPhysicsList::SetProtonCut(G4double    
205 {                                                 
206   cutForProton = val;                             
207 }                                                 
208                                                   
209                                                   
210                                                   
211                                                   
212                                                   
213                                                   
214