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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/G4ASTARStopping.cc (Version 11.3.0) and /processes/electromagnetic/standard/src/G4ASTARStopping.cc (Version 5.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 //                                                
 27 //--------------------------------------------    
 28 //                                                
 29 // GEANT4 Class file                              
 30 //                                                
 31 // Description: Data on stopping power            
 32 //                                                
 33 // Author:      Anton Ivantchenko 21.04.2006      
 34 //                                                
 35 // Organisation:        QinetiQ Ltd, UK           
 36 // Customer:            ESA/ESTEC, NOORDWIJK      
 37 // Contract:            CSMAN-5288                
 38 //                                                
 39 // Modifications:                                 
 40 // 19.04.2010 A.Ivanchenko fixed data for G4_O    
 41 //                         checked all data       
 42 // 25.04.2010 V.Ivanchenko introduce G4LPhysic    
 43 //                                                
 44 //--------------------------------------------    
 45 //                                                
 46                                                   
 47 //....oooOO0OOooo........oooOO0OOooo........oo    
 48                                                   
 49 #include "G4ASTARStopping.hh"                     
 50 #include "G4NISTStoppingData.hh"                  
 51 #include "G4EmParameters.hh"                      
 52                                                   
 53 //....oooOO0OOooo........oooOO0OOooo........oo    
 54                                                   
 55 G4ASTARStopping::G4ASTARStopping() : nvectors(    
 56 {                                                 
 57   // 1st initialisation                           
 58   Initialise();                                   
 59 }                                                 
 60                                                   
 61 //....oooOO0OOooo........oooOO0OOooo........oo    
 62                                                   
 63 G4ASTARStopping::~G4ASTARStopping()               
 64 {                                                 
 65   if(0 < nvectors) {                              
 66     for(G4int i=0; i<nvectors; ++i) { delete s    
 67   }                                               
 68 }                                                 
 69                                                   
 70 //....oooOO0OOooo........oooOO0OOooo........oo    
 71                                                   
 72 void G4ASTARStopping::PrintWarning(G4int i) co    
 73 {                                                 
 74   G4ExceptionDescription ed;                      
 75   ed << "index of data " << i << " is <0 or >=    
 76      << " request ignored!";                      
 77   G4Exception("G4ASTARStopping::PrintWarning()    
 78 }                                                 
 79                                                   
 80 //....oooOO0OOooo........oooOO0OOooo........oo    
 81                                                   
 82 void G4ASTARStopping::Initialise()                
 83 {                                                 
 84   // this method may be called several times d    
 85   G4int nmat = (G4int)G4Material::GetNumberOfM    
 86   if(nmat == nvectors) { return; }                
 87                                                   
 88   // loop via material list to add extra data     
 89   G4int j;                                        
 90   for(G4int i=0; i<nmat; ++i) {                   
 91     const G4Material* mat = (*(G4Material::Get    
 92                                                   
 93     G4bool isThere = false;                       
 94     for(j=0; j<nvectors; ++j) {                   
 95       if(mat == materials[j]) {                   
 96   isThere = true;                                 
 97   break;                                          
 98       }                                           
 99     }                                             
100     if(!isThere) {                                
101       // check list of NIST materials             
102       G4String mname = mat->GetName();            
103       for(j=0; j<74; ++j) {                       
104         if(mname == nameNIST[j]) {                
105           FindData(j, mat);                       
106           isThere = true;                         
107           break;                                  
108   }                                               
109       }                                           
110       if(!isThere) {                              
111   G4String form = mat->GetChemicalFormula();      
112   for(j=0; j<numberOfMolecula; ++j) {             
113     if(form == molecularName[j]) {                
114       FindData(molecularIndex[j], mat);           
115       break;                                      
116     }                                             
117   }                                               
118       }                                           
119     }                                             
120   }                                               
121 }                                                 
122                                                   
123 //....oooOO0OOooo........oooOO0OOooo........oo    
124                                                   
125 void G4ASTARStopping::FindData(G4int j, const     
126 {                                                 
127 static const G4float e0[78] = { 168.8f, 204.2f    
128                                                   
129 static const G4float e1[78] = { 192.2f, 229.4f    
130                                                   
131 static const G4float e2[78] = { 169.4f, 204.2f    
132                                                   
133 static const G4float e3[78] = { 31.26f, 38.13f    
134                                                   
135 static const G4float e4[78] = { 87.5f, 108.6f,    
136                                                   
137 static const G4float e5[78] = { 55.8f, 71.89f,    
138                                                   
139 static const G4float e6[78] = { 71.39f, 88.59f    
140                                                   
141 static const G4float e7[78] = { 34.54f, 44.56f    
142                                                   
143 static const G4float e8[78] = { 11.5f, 14.55f,    
144                                                   
145 static const G4float e9[78] = { 138.6f, 167.7f    
146                                                   
147 static const G4float e10[78] = { 146.3f, 177.1    
148                                                   
149 static const G4float e11[78] = { 125.9f, 152.6    
150                                                   
151 static const G4float e12[78] = { 190.6f, 225.6    
152                                                   
153 static const G4float e13[78] = { 192.3f, 228.9    
154                                                   
155 static const G4float e14[78] = { 159.8f, 195.8    
156                                                   
157 static const G4float e15[78] = { 124.1f, 148.8    
158                                                   
159 static const G4float e16[78] = { 93.28f, 114.2    
160                                                   
161 static const G4float e17[78] = { 72.78f, 90.74    
162                                                   
163 static const G4float e18[78] = { 99.73f, 123.7    
164                                                   
165 static const G4float e19[78] = { 157.6f, 186.4    
166                                                   
167 static const G4float e20[78] = { 109.1f, 132.8    
168                                                   
169 static const G4float e21[78] = { 40.6f, 48.54f    
170                                                   
171 static const G4float e22[78] = { 29.51f, 36.49    
172                                                   
173 static const G4float e23[78] = { 54.06f, 65.42    
174                                                   
175 static const G4float e24[78] = { 99.58f, 123.5    
176                                                   
177 static const G4float e25[78] = { 38.11f, 45.4f    
178                                                   
179 static const G4float e26[78] = { 47.65f, 57.57    
180                                                   
181 static const G4float e27[78] = { 83.85f, 102.1    
182                                                   
183 static const G4float e28[78] = { 212.f, 275.4f    
184                                                   
185 static const G4float e29[78] = { 87.26f, 110.8    
186                                                   
187 static const G4float e30[78] = { 165.5f, 197.6    
188                                                   
189 static const G4float e31[78] = { 10.15f, 13.69    
190                                                   
191 static const G4float e32[78] = { 132.7f, 159.4    
192                                                   
193 static const G4float e33[78] = { 118.7f, 142.6    
194                                                   
195 static const G4float e34[78] = { 173.6f, 209.f    
196                                                   
197 static const G4float e35[78] = { 163.5f, 196.6    
198                                                   
199 static const G4float e36[78] = { 197.5f, 241.8    
200                                                   
201 static const G4float e37[78] = { 58.22f, 68.98    
202                                                   
203 static const G4float e38[78] = { 111.7f, 137.5    
204                                                   
205 static const G4float e39[78] = { 108.2f, 133.5    
206                                                   
207 static const G4float e40[78] = { 104.5f, 129.2    
208                                                   
209 static const G4float e41[78] = { 104.7f, 129.4    
210                                                   
211 static const G4float e42[78] = { 82.8f, 103.7f    
212                                                   
213 static const G4float e43[78] = { 35.86f, 44.19    
214                                                   
215 static const G4float e44[78] = { 68.73f, 83.7f    
216                                                   
217 static const G4float e45[78] = { 167.4f, 201.6    
218                                                   
219 static const G4float e46[78] = { 1.058E+02f, 1    
220                                                   
221 static const G4float e47[78] = { 193.8f, 233.f    
222                                                   
223 static const G4float e48[78] = { 17.96f, 22.18    
224                                                   
225 static const G4float e49[78] = { 46.69f, 57.18    
226                                                   
227 static const G4float e50[78] = { 192.4f, 229.8    
228                                                   
229 static const G4float e51[78] = { 146.3f, 178.1    
230                                                   
231 static const G4float e52[78] = { 168.2f, 205.8    
232                                                   
233 static const G4float e53[78] = { 163.2f, 195.3    
234                                                   
235 static const G4float e54[78] = { 118.7f, 146.6    
236                                                   
237 static const G4float e55[78] = { 193.7f, 232.8    
238                                                   
239 static const G4float e56[78] = { 153.f, 187.5f    
240                                                   
241 static const G4float e57[78] = { 82.7f, 99.97f    
242                                                   
243 static const G4float e58[78] = { 94.27f, 114.4    
244                                                   
245 static const G4float e59[78] = { 194.5f, 234.7    
246                                                   
247 static const G4float e60[78] = { 14.45f, 17.87    
248                                                   
249 static const G4float e61[78] = { 47.32f, 61.63    
250                                                   
251 static const G4float e62[78] = { 68.9f, 85.1f,    
252                                                   
253 static const G4float e63[78] = { 192.f, 228.9f    
254                                                   
255 static const G4float e64[78] = { 59.24f, 72.81    
256                                                   
257 static const G4float e65[78] = { 27.39f, 33.96    
258                                                   
259 static const G4float e66[78] = { 135.1f, 165.6    
260                                                   
261 static const G4float e67[78] = { 149.7f, 181.5    
262                                                   
263 static const G4float e68[78] = { 192.5f, 230.f    
264                                                   
265 static const G4float e69[78] = { 13.2f, 16.72f    
266                                                   
267 static const G4float e70[78] = { 20.75f, 25.23    
268                                                   
269 static const G4float e71[78] = { 98.91f, 122.7    
270                                                   
271 static const G4float e72[78] = { 126.3f, 154.7    
272                                                   
273 static const G4float e73[78] = { 18.11f, 23.3f    
274                                                   
275   if(0 == j)      { AddData(e0, mat); }           
276   else if(1 == j) { AddData(e1, mat); }           
277   else if(2 == j) { AddData(e2, mat); }           
278   else if(3 == j) { AddData(e3, mat); }           
279   else if(4 == j) { AddData(e4, mat); }           
280   else if(5 == j) { AddData(e5, mat); }           
281   else if(6 == j) { AddData(e6, mat); }           
282   else if(7 == j) { AddData(e7, mat); }           
283   else if(8 == j) { AddData(e8, mat); }           
284   else if(9 == j) { AddData(e9, mat); }           
285   else if(10 == j) { AddData(e10, mat); }         
286   else if(11 == j) { AddData(e11, mat); }         
287   else if(12 == j) { AddData(e12, mat); }         
288   else if(13 == j) { AddData(e13, mat); }         
289   else if(14 == j) { AddData(e14, mat); }         
290   else if(15 == j) { AddData(e15, mat); }         
291   else if(16 == j) { AddData(e16, mat); }         
292   else if(17 == j) { AddData(e17, mat); }         
293   else if(18 == j) { AddData(e18, mat); }         
294   else if(19 == j) { AddData(e19, mat); }         
295   else if(20 == j) { AddData(e20, mat); }         
296   else if(21 == j) { AddData(e21, mat); }         
297   else if(22 == j) { AddData(e22, mat); }         
298   else if(23 == j) { AddData(e23, mat); }         
299   else if(24 == j) { AddData(e24, mat); }         
300   else if(25 == j) { AddData(e25, mat); }         
301   else if(26 == j) { AddData(e26, mat); }         
302   else if(27 == j) { AddData(e27, mat); }         
303   else if(28 == j) { AddData(e28, mat); }         
304   else if(29 == j) { AddData(e29, mat); }         
305   else if(30 == j) { AddData(e30, mat); }         
306   else if(31 == j) { AddData(e31, mat); }         
307   else if(32 == j) { AddData(e32, mat); }         
308   else if(33 == j) { AddData(e33, mat); }         
309   else if(34 == j) { AddData(e34, mat); }         
310   else if(35 == j) { AddData(e35, mat); }         
311   else if(36 == j) { AddData(e36, mat); }         
312   else if(37 == j) { AddData(e37, mat); }         
313   else if(38 == j) { AddData(e38, mat); }         
314   else if(39 == j) { AddData(e39, mat); }         
315   else if(40 == j) { AddData(e40, mat); }         
316   else if(41 == j) { AddData(e41, mat); }         
317   else if(42 == j) { AddData(e42, mat); }         
318   else if(43 == j) { AddData(e43, mat); }         
319   else if(44 == j) { AddData(e44, mat); }         
320   else if(45 == j) { AddData(e45, mat); }         
321   else if(46 == j) { AddData(e46, mat); }         
322   else if(47 == j) { AddData(e47, mat); }         
323   else if(48 == j) { AddData(e48, mat); }         
324   else if(49 == j) { AddData(e49, mat); }         
325   else if(50 == j) { AddData(e50, mat); }         
326   else if(51 == j) { AddData(e51, mat); }         
327   else if(52 == j) { AddData(e52, mat); }         
328   else if(53 == j) { AddData(e53, mat); }         
329   else if(54 == j) { AddData(e54, mat); }         
330   else if(55 == j) { AddData(e55, mat); }         
331   else if(56 == j) { AddData(e56, mat); }         
332   else if(57 == j) { AddData(e57, mat); }         
333   else if(58 == j) { AddData(e58, mat); }         
334   else if(59 == j) { AddData(e59, mat); }         
335   else if(60 == j) { AddData(e60, mat); }         
336   else if(61 == j) { AddData(e61, mat); }         
337   else if(62 == j) { AddData(e62, mat); }         
338   else if(63 == j) { AddData(e63, mat); }         
339   else if(64 == j) { AddData(e64, mat); }         
340   else if(65 == j) { AddData(e65, mat); }         
341   else if(66 == j) { AddData(e66, mat); }         
342   else if(67 == j) { AddData(e67, mat); }         
343   else if(68 == j) { AddData(e68, mat); }         
344   else if(69 == j) { AddData(e69, mat); }         
345   else if(70 == j) { AddData(e70, mat); }         
346   else if(71 == j) { AddData(e71, mat); }         
347   else if(72 == j) { AddData(e72, mat); }         
348   else if(73 == j) { AddData(e73, mat); }         
349 }                                                 
350                                                   
351 //....oooOO0OOooo........oooOO0OOooo........oo    
352                                                   
353 void G4ASTARStopping::AddData(const G4float* s    
354 {                                                 
355   auto v = new G4PhysicsFreeVector(78, true);     
356   for(size_t i=0; i<78; ++i) {                    
357     v->PutValues(i, T0[i], stop[i]*fac);          
358   }                                               
359   v->FillSecondDerivatives();                     
360   v->EnableLogBinSearch(G4EmParameters::Instan    
361   materials.push_back(mat);                       
362   sdata.push_back(v);                             
363   ++nvectors;                                     
364 }                                                 
365                                                   
366 //....oooOO0OOooo........oooOO0OOooo........oo    
367