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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/G4PSTARStopping.cc (Version 11.3.0) and /processes/electromagnetic/standard/src/G4PSTARStopping.cc (Version 7.1.p1)


  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 //                                                
 29 // GEANT4 Class file                              
 30 //                                                
 31 // Description: Data on stopping power            
 32 //                                                
 33 // Author:      Anton Ivantchenko 18.04.2006      
 34 //                                                
 35 // Organisation:        QinetiQ Ltd, UK           
 36 // Customer:            ESA/ESTEC, NOORDWIJK      
 37 // Contract:            CSMAN-5288                
 38 //                                                
 39 // Modifications:                                 
 40 // 25.04.2010 V.Ivanchenko introduce G4LPhysic    
 41 // 26.04.2010 A.Ivanchenko fixed data for G4_P    
 42 //                         checked all data       
 43 //                                                
 44 //--------------------------------------------    
 45 //                                                
 46                                                   
 47 //....oooOO0OOooo........oooOO0OOooo........oo    
 48                                                   
 49 #include "G4PSTARStopping.hh"                     
 50 #include "G4NISTStoppingData.hh"                  
 51 #include "G4EmParameters.hh"                      
 52                                                   
 53 //....oooOO0OOooo........oooOO0OOooo........oo    
 54                                                   
 55                                                   
 56 G4PSTARStopping::G4PSTARStopping() : nvectors(    
 57 {                                                 
 58   // 1st initialisation                           
 59   Initialise();                                   
 60 }                                                 
 61                                                   
 62 //....oooOO0OOooo........oooOO0OOooo........oo    
 63                                                   
 64 G4PSTARStopping::~G4PSTARStopping()               
 65 {                                                 
 66   if(0 < nvectors) {                              
 67     for(G4int i=0; i<nvectors; ++i) { delete s    
 68   }                                               
 69 }                                                 
 70                                                   
 71 //....oooOO0OOooo........oooOO0OOooo........oo    
 72                                                   
 73 void G4PSTARStopping::PrintWarning(G4int i) co    
 74 {                                                 
 75   G4ExceptionDescription ed;                      
 76   ed << "index of data " << i << " is <0 or >=    
 77      << " request ignored!";                      
 78   G4Exception("G4PSTARStopping::PrintWarning()    
 79 }                                                 
 80                                                   
 81 //....oooOO0OOooo........oooOO0OOooo........oo    
 82                                                   
 83 void G4PSTARStopping::Initialise()                
 84 {                                                 
 85   // this method may be called several times d    
 86   G4int nmat = (G4int)G4Material::GetNumberOfM    
 87   if(nmat == nvectors) { return; }                
 88                                                   
 89   // loop via material list to add extra data     
 90   G4int j;                                        
 91   for(G4int i=0; i<nmat; ++i) {                   
 92     const G4Material* mat = (*(G4Material::Get    
 93                                                   
 94     G4bool isThere = false;                       
 95     for(j=0; j<nvectors; ++j) {                   
 96       if(mat == materials[j]) {                   
 97   isThere = true;                                 
 98   break;                                          
 99       }                                           
100     }                                             
101     if(!isThere) {                                
102       // check list of NIST materials             
103       G4String mname = mat->GetName();            
104       for(j=0; j<74; ++j) {                       
105         if(mname == nameNIST[j]) {                
106           FindData(j, mat);                       
107           isThere = true;                         
108           break;                                  
109   }                                               
110       }                                           
111       if(!isThere) {                              
112   G4String form = mat->GetChemicalFormula();      
113   for(j=0; j<numberOfMolecula; ++j) {             
114     if(form == molecularName[j]) {                
115       FindData(molecularIndex[j], mat);           
116       break;                                      
117     }                                             
118   }                                               
119       }                                           
120     }                                             
121   }                                               
122 }                                                 
123                                                   
124 //....oooOO0OOooo........oooOO0OOooo........oo    
125                                                   
126 void G4PSTARStopping::FindData(G4int j, const     
127 {                                                 
128   static const G4float e0[60] = { 176.8f, 216.    
129                                                   
130   static const G4float e1[60] = { 185.5f, 227.    
131                                                   
132   static const G4float e2[60] = { 195.9f, 239.    
133                                                   
134   static const G4float e3[60] = { 29.73f, 36.4    
135                                                   
136   static const G4float e4[60] = { 119.7f, 146.    
137                                                   
138   static const G4float e5[60] = { 92.38f, 113.    
139                                                   
140   static const G4float e6[60] = { 73.51f, 90.0    
141                                                   
142   static const G4float e7[60] = { 86.08f, 105.    
143                                                   
144   static const G4float e8[60] = { 14.76f, 18.0    
145                                                   
146   static const G4float e9[60] = { 142.5f, 174.    
147                                                   
148   static const G4float e10[60] = { 149.7f, 183    
149                                                   
150   static const G4float e11[60] = { 141.6f, 173    
151                                                   
152   static const G4float e12[60] = { 138.4f, 169    
153                                                   
154   static const G4float e13[60] = { 142.6f, 175    
155                                                   
156   static const G4float e14[60] = { 225.8f, 276    
157                                                   
158   static const G4float e15[60] = { 119.2f, 146    
159                                                   
160   static const G4float e16[60] = { 106.4f, 130    
161                                                   
162   static const G4float e17[60] = { 74.48f, 91.    
163                                                   
164   static const G4float e18[60] = { 135.4f, 165    
165                                                   
166   static const G4float e19[60] = { 132.2f, 161    
167                                                   
168   static const G4float e20[60] = { 123.5f, 151    
169                                                   
170   static const G4float e21[60] = { 34.67f, 42.    
171                                                   
172   static const G4float e22[60] = { 34.9f, 42.7    
173                                                   
174   static const G4float e23[60] = { 37.81f, 46.    
175                                                   
176   static const G4float e24[60] = { 135.1f, 165    
177                                                   
178   static const G4float e25[60] = { 25.71f, 31.    
179                                                   
180   static const G4float e26[60] = { 45.91f, 56.    
181                                                   
182   static const G4float e27[60] = { 88.74f, 108    
183                                                   
184   static const G4float e28[60] = { 746.5f, 914    
185                                                   
186   static const G4float e29[60] = { 184.2f, 225    
187                                                   
188   static const G4float e30[60] = { 145.4f, 178    
189                                                   
190   static const G4float e31[60] = { 45.92f, 56.    
191                                                   
192   static const G4float e32[60] = { 111.f, 135.    
193                                                   
194   static const G4float e33[60] = { 80.87f, 99.    
195                                                   
196   static const G4float e34[60] = { 198.1f, 242    
197                                                   
198   static const G4float e35[60] = { 174.4f, 213    
199                                                   
200   static const G4float e36[60] = { 272.8f, 334    
201                                                   
202   static const G4float e37[60] = { 40.18f, 49.    
203                                                   
204   static const G4float e38[60] = { 149.4f, 183    
205                                                   
206   static const G4float e39[60] = { 146.6f, 179    
207                                                   
208   static const G4float e40[60] = { 141.3f, 173    
209                                                   
210   static const G4float e41[60] = { 141.7f, 173    
211                                                   
212   static const G4float e42[60] = { 126.5f, 155    
213                                                   
214   static const G4float e43[60] = { 41.1f, 50.3    
215                                                   
216   static const G4float e44[60] = { 58.01f, 71.    
217                                                   
218   static const G4float e45[60] = { 191.f, 233.    
219                                                   
220   static const G4float e46[60] = { 99.46f, 121    
221                                                   
222   static const G4float e47[60] = { 228.8f, 280    
223                                                   
224   static const G4float e48[60] = { 15.4f, 18.8    
225                                                   
226   static const G4float e49[60] = { 61.33f, 75.    
227                                                   
228   static const G4float e50[60] = { 190.1f, 232    
229                                                   
230   static const G4float e51[60] = { 164.8f, 201    
231                                                   
232   static const G4float e52[60] = { 184.9f, 226    
233                                                   
234   static const G4float e53[60] = { 150.9f, 184    
235                                                   
236   static const G4float e54[60] = { 174.9f, 214    
237                                                   
238   static const G4float e55[60] = { 197.6f, 242    
239                                                   
240   static const G4float e56[60] = { 186.f, 227.    
241                                                   
242   static const G4float e57[60] = { 83.27f, 102    
243                                                   
244   static const G4float e58[60] = { 140.2f, 171    
245                                                   
246   static const G4float e59[60] = { 2.183E+02f,    
247                                                   
248   static const G4float e60[60] =  { 1.377E+01f    
249                                                   
250   static const G4float e61[60] = { 105.f, 128.    
251                                                   
252   static const G4float e62[60] = { 85.64f, 104    
253                                                   
254   static const G4float e63[60] = { 179.2f, 219    
255                                                   
256   static const G4float e64[60] = { 60.88f, 74.    
257                                                   
258   static const G4float e65[60] = { 32.4f, 39.6    
259                                                   
260   static const G4float e66[60] = { 174.5f, 213    
261                                                   
262   static const G4float e67[60] = { 169.9f, 208    
263                                                   
264   static const G4float e68[60] = { 191.6f, 234    
265                                                   
266   static const G4float e69[60] = { 18.38f, 22.    
267                                                   
268   static const G4float e70[60] = { 14.97f, 18.    
269                                                   
270   static const G4float e71[60] = { 133.7f, 163    
271                                                   
272   static const G4float e72[60] = { 152.2f, 186    
273                                                   
274   static const G4float e73[60] = { 38.1f, 46.6    
275                                                   
276   if(0 == j)      { AddData(e0, mat); }           
277   else if(1 == j) { AddData(e1, mat); }           
278   else if(2 == j) { AddData(e2, mat); }           
279   else if(3 == j) { AddData(e3, mat); }           
280   else if(4 == j) { AddData(e4, mat); }           
281   else if(5 == j) { AddData(e5, mat); }           
282   else if(6 == j) { AddData(e6, mat); }           
283   else if(7 == j) { AddData(e7, mat); }           
284   else if(8 == j) { AddData(e8, mat); }           
285   else if(9 == j) { AddData(e9, mat); }           
286   else if(10 == j) { AddData(e10, mat); }         
287   else if(11 == j) { AddData(e11, mat); }         
288   else if(12 == j) { AddData(e12, mat); }         
289   else if(13 == j) { AddData(e13, mat); }         
290   else if(14 == j) { AddData(e14, mat); }         
291   else if(15 == j) { AddData(e15, mat); }         
292   else if(16 == j) { AddData(e16, mat); }         
293   else if(17 == j) { AddData(e17, mat); }         
294   else if(18 == j) { AddData(e18, mat); }         
295   else if(19 == j) { AddData(e19, mat); }         
296   else if(20 == j) { AddData(e20, mat); }         
297   else if(21 == j) { AddData(e21, mat); }         
298   else if(22 == j) { AddData(e22, mat); }         
299   else if(23 == j) { AddData(e23, mat); }         
300   else if(24 == j) { AddData(e24, mat); }         
301   else if(25 == j) { AddData(e25, mat); }         
302   else if(26 == j) { AddData(e26, mat); }         
303   else if(27 == j) { AddData(e27, mat); }         
304   else if(28 == j) { AddData(e28, mat); }         
305   else if(29 == j) { AddData(e29, mat); }         
306   else if(30 == j) { AddData(e30, mat); }         
307   else if(31 == j) { AddData(e31, mat); }         
308   else if(32 == j) { AddData(e32, mat); }         
309   else if(33 == j) { AddData(e33, mat); }         
310   else if(34 == j) { AddData(e34, mat); }         
311   else if(35 == j) { AddData(e35, mat); }         
312   else if(36 == j) { AddData(e36, mat); }         
313   else if(37 == j) { AddData(e37, mat); }         
314   else if(38 == j) { AddData(e38, mat); }         
315   else if(39 == j) { AddData(e39, mat); }         
316   else if(40 == j) { AddData(e40, mat); }         
317   else if(41 == j) { AddData(e41, mat); }         
318   else if(42 == j) { AddData(e42, mat); }         
319   else if(43 == j) { AddData(e43, mat); }         
320   else if(44 == j) { AddData(e44, mat); }         
321   else if(45 == j) { AddData(e45, mat); }         
322   else if(46 == j) { AddData(e46, mat); }         
323   else if(47 == j) { AddData(e47, mat); }         
324   else if(48 == j) { AddData(e48, mat); }         
325   else if(49 == j) { AddData(e49, mat); }         
326   else if(50 == j) { AddData(e50, mat); }         
327   else if(51 == j) { AddData(e51, mat); }         
328   else if(52 == j) { AddData(e52, mat); }         
329   else if(53 == j) { AddData(e53, mat); }         
330   else if(54 == j) { AddData(e54, mat); }         
331   else if(55 == j) { AddData(e55, mat); }         
332   else if(56 == j) { AddData(e56, mat); }         
333   else if(57 == j) { AddData(e57, mat); }         
334   else if(58 == j) { AddData(e58, mat); }         
335   else if(59 == j) { AddData(e59, mat); }         
336   else if(60 == j) { AddData(e60, mat); }         
337   else if(61 == j) { AddData(e61, mat); }         
338   else if(62 == j) { AddData(e62, mat); }         
339   else if(63 == j) { AddData(e63, mat); }         
340   else if(64 == j) { AddData(e64, mat); }         
341   else if(65 == j) { AddData(e65, mat); }         
342   else if(66 == j) { AddData(e66, mat); }         
343   else if(67 == j) { AddData(e67, mat); }         
344   else if(68 == j) { AddData(e68, mat); }         
345   else if(69 == j) { AddData(e69, mat); }         
346   else if(70 == j) { AddData(e70, mat); }         
347   else if(71 == j) { AddData(e71, mat); }         
348   else if(72 == j) { AddData(e72, mat); }         
349   else if(73 == j) { AddData(e73, mat); }         
350 }                                                 
351                                                   
352 //....oooOO0OOooo........oooOO0OOooo........oo    
353                                                   
354 void G4PSTARStopping::AddData(const G4float* s    
355 {                                                 
356   auto v = new G4PhysicsFreeVector(60, T0[0],     
357   for(size_t i=0; i<60; ++i) {                    
358     v->PutValues(i, T0[i], ((G4double)stop[i])    
359   }                                               
360   v->FillSecondDerivatives();                     
361   v->EnableLogBinSearch(G4EmParameters::Instan    
362   materials.push_back(mat);                       
363   sdata.push_back(v);                             
364   ++nvectors;                                     
365 }                                                 
366                                                   
367 //....oooOO0OOooo........oooOO0OOooo........oo    
368