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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 /processes/electromagnetic/standard/src/G4WaterStopping.cc (Version 11.3.0) and /processes/electromagnetic/standard/src/G4WaterStopping.cc (Version 4.0.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 //--------------------------------------------    
 27 //                                                
 28 // GEANT4 Class file                              
 29 //                                                
 30 // Description: Data on stopping power            
 31 //                                                
 32 // Author:      V.Ivanchenko 12.05.2006           
 33 //                                                
 34 // Modifications:                                 
 35 // 29.04.2009 A.Ivantchenko added revised data    
 36 //            Prof.P.Sigmund Univ. Southern De    
 37 //            the ESA Technology Research Prog    
 38 //                                                
 39 //--------------------------------------------    
 40 //                                                
 41                                                   
 42 //....oooOO0OOooo........oooOO0OOooo........oo    
 43                                                   
 44 #include "G4WaterStopping.hh"                     
 45 #include "G4SystemOfUnits.hh"                     
 46 #include "G4EmCorrections.hh"                     
 47 #include "G4PhysicsFreeVector.hh"                 
 48                                                   
 49 //....oooOO0OOooo........oooOO0OOooo........oo    
 50                                                   
 51 //const G4int Z[17] = {                           
 52 //  3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1    
 53 const G4double A[17] = {                          
 54   7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28    
 55                                                   
 56 G4WaterStopping::G4WaterStopping()                
 57 {                                                 
 58   dedx.reserve(17);                               
 59   Initialise();                                   
 60 }                                                 
 61                                                   
 62 //....oooOO0OOooo........oooOO0OOooo........oo    
 63                                                   
 64 G4double G4WaterStopping::GetElectronicDEDX(G4    
 65 {                                                 
 66   G4double res = 0.0;                             
 67   G4int idx = iz - 3;                             
 68                                                   
 69   if(iz == 26) { idx = 16; }                      
 70   else if (iz < 3 || iz > 18) { return res; }     
 71                                                   
 72   G4double scaledEnergy = energy/A[idx];          
 73   if(scaledEnergy < emin) {                       
 74     res = (*(dedx[idx]))[0]*std::sqrt(scaledEn    
 75   } else {                                        
 76     res = (dedx[idx])->Value(scaledEnergy);       
 77   }                                               
 78   return res;                                     
 79 }                                                 
 80                                                   
 81 //....oooOO0OOooo........oooOO0OOooo........oo    
 82                                                   
 83 void G4WaterStopping::AddData(const G4double*     
 84             const G4double* stoppower,            
 85             G4double factor)                      
 86 {                                                 
 87   auto pv =                                       
 88     new G4PhysicsFreeVector(53,energy[0]*CLHEP    
 89   dedx.push_back(pv);                             
 90   for(G4int i=0; i<53; ++i) {                     
 91     pv->PutValues(i,energy[i]*CLHEP::MeV,stopp    
 92   }                                               
 93   if(spline) { pv->FillSecondDerivatives(); }     
 94 }                                                 
 95                                                   
 96 //....oooOO0OOooo........oooOO0OOooo........oo    
 97                                                   
 98 void G4WaterStopping::Initialise()                
 99 {                                                 
100   //..Reduced energies                            
101   static const G4double E[53] = {0.025,0.03,0.    
102   emin = E[0]*CLHEP::MeV;                         
103   static const G4double factor = 1000.*CLHEP::    
104                                                   
105   static const G4double G4_WATER_Li[53]={2.319    
106   AddData(E,G4_WATER_Li,factor);                  
107   static const G4double G4_WATER_Be[53]={2.872    
108   AddData(E,G4_WATER_Be,factor);                  
109   static const G4double G4_WATER_B[53]={3.2922    
110   AddData(E,G4_WATER_B,factor);                   
111   static const G4double G4_WATER_C[53]={3.6037    
112   AddData(E,G4_WATER_C,factor);                   
113   static const G4double G4_WATER_N[53]={3.8821    
114   AddData(E,G4_WATER_N,factor);                   
115   static const G4double G4_WATER_O[53]={4.1215    
116   AddData(E,G4_WATER_O,factor);                   
117   static const G4double G4_WATER_F[53]={4.2951    
118   AddData(E,G4_WATER_F,factor);                   
119   static const G4double G4_WATER_Ne[53]={4.451    
120   AddData(E,G4_WATER_Ne,factor);                  
121   static const G4double G4_WATER_Na[53]={4.591    
122   AddData(E,G4_WATER_Na,factor);                  
123   static const G4double G4_WATER_Mg[53]={4.753    
124   AddData(E,G4_WATER_Mg,factor);                  
125   static const G4double G4_WATER_Al[53]={4.911    
126   AddData(E,G4_WATER_Al,factor);                  
127   static const G4double G4_WATER_Si[53]={5.069    
128   AddData(E,G4_WATER_Si,factor);                  
129   static const G4double G4_WATER_P[53]={5.2616    
130   AddData(E,G4_WATER_P,factor);                   
131   static const G4double G4_WATER_S[53]={5.4129    
132   AddData(E,G4_WATER_S,factor);                   
133   static const G4double G4_WATER_Cl[53]={5.617    
134   AddData(E,G4_WATER_Cl,factor);                  
135   static const G4double G4_WATER_Ar[53]={5.715    
136   AddData(E,G4_WATER_Ar,factor);                  
137                                                   
138   static const G4double G4_WATER_Fe [53]={6.53    
139   AddData(E,G4_WATER_Fe,factor);                  
140 }                                                 
141