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.p3 ] [ 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/hadronic/models/abrasion/src/G4NuclearAbrasionGeometry.cc (Version 11.3.0) and /processes/hadronic/models/abrasion/src/G4NuclearAbrasionGeometry.cc (Version 5.2)


  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 // *                                              
 21 // * Parts of this code which have been  devel    
 22 // * under contract to the European Space Agen    
 23 // * intellectual property of ESA. Rights to u    
 24 // * redistribute this software for general pu    
 25 // * in compliance with any licensing, distrib    
 26 // * policy adopted by the Geant4 Collaboratio    
 27 // * written by QinetiQ Ltd for the European S    
 28 // * contract 17191/03/NL/LvH (Aurora Programm    
 29 // *                                              
 30 // * By using,  copying,  modifying or  distri    
 31 // * any work based  on the software)  you  ag    
 32 // * use  in  resulting  scientific  publicati    
 33 // * acceptance of all terms of the Geant4 Sof    
 34 // *******************************************    
 35 //                                                
 36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
 37 //                                                
 38 // MODULE:    G4NuclearAbrasionGeometry.cc        
 39 //                                                
 40 // Version:   B.1                                 
 41 // Date:    15/04/04                              
 42 // Author:    P R Truscott                        
 43 // Organisation:  QinetiQ Ltd, UK                 
 44 // Customer:    ESA/ESTEC, NOORDWIJK              
 45 // Contract:    17191/03/NL/LvH                   
 46 //                                                
 47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
 48 //                                                
 49 // CHANGE HISTORY                                 
 50 // --------------                                 
 51 //                                                
 52 // 18 November 2003, P R Truscott, QinetiQ Ltd    
 53 // Created.                                       
 54 //                                                
 55 // 15 March 2004, P R Truscott, QinetiQ Ltd, U    
 56 // Beta release                                   
 57 //                                                
 58 // 4 June 2004, J.P. Wellisch, CERN, Switzerla    
 59 // resolving technical portability issues.        
 60 //                                                
 61 // 12 June 2012, A. Ribon, CERN, Switzerland      
 62 // Fixing trivial warning errors of shadowed v    
 63 //                                                
 64 // 4 August 2015, A. Ribon, CERN, Switzerland     
 65 // Replacing std::pow with the faster G4Pow.      
 66 //                                                
 67 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
 68 //////////////////////////////////////////////    
 69 //                                                
 70 #include "G4NuclearAbrasionGeometry.hh"           
 71 #include "G4WilsonRadius.hh"                      
 72 #include "G4PhysicalConstants.hh"                 
 73 #include "G4SystemOfUnits.hh"                     
 74 #include "G4Pow.hh"                               
 75 //////////////////////////////////////////////    
 76 //                                                
 77 G4NuclearAbrasionGeometry::G4NuclearAbrasionGe    
 78   G4double AT1, G4double r1)                      
 79 {                                                 
 80 //                                                
 81 //                                                
 82 // Initialise variables for interaction geomet    
 83 //                                                
 84   G4WilsonRadius aR;                              
 85   AP = AP1;                                       
 86   AT = AT1;                                       
 87   rP = aR.GetWilsonRadius(AP);                    
 88   rT = aR.GetWilsonRadius(AT);                    
 89   r  = r1;                                        
 90   n  = rP / (rP + rT);                            
 91   b  = r / (rP + rT);                             
 92   m  = rT / rP;                                   
 93   Q  = (1.0 - b)/n;                               
 94   S  = Q * Q;                                     
 95   T  = S * Q;                                     
 96   R  = std::sqrt(m*n);                            
 97   U  = 1.0/m - 2.0;                               
 98 //                                                
 99 //                                                
100 // Initialise the threshold radius-ratio at wh    
101 // peripheral or central.                         
102 //                                                
103   rth = 2.0/3.0;                                  
104   B   = 10.0 * MeV;                               
105 }                                                 
106 //////////////////////////////////////////////    
107 //                                                
108 G4NuclearAbrasionGeometry::~G4NuclearAbrasionG    
109 {;}                                               
110 //////////////////////////////////////////////    
111 //                                                
112 void G4NuclearAbrasionGeometry::SetPeripheralT    
113   {if (rth1 > 0.0 && rth1 <= 1.0) rth = rth1;}    
114 //////////////////////////////////////////////    
115 //                                                
116 G4double G4NuclearAbrasionGeometry::GetPeriphe    
117   {return rth;}                                   
118 //////////////////////////////////////////////    
119 //                                                
120 G4double G4NuclearAbrasionGeometry::P ()          
121 {                                                 
122 //                                                
123 //                                                
124 // Initialise the value for P, then determine     
125 // whether the projectile is larger or smaller    
126 // in relation to the impact parameter.           
127 //                                                
128   G4double valueP = 0.0;                          
129                                                   
130   if (rT > rP)                                    
131   {                                               
132     if (rT-rP<=r && r<=rT+rP) valueP = 0.125*R    
133     else                      valueP = -1.0;      
134   }                                               
135   else                                            
136   {                                               
137     if (rP-rT<=r && r<=rP+rT) valueP = 0.125*R    
138       (std::sqrt(1.0-m*m)/n - 1.0)*std::sqrt((    
139     else                      valueP = (std::s    
140   }                                               
141                                                   
142   if (!(valueP <= 1.0 && valueP>= -1.0))          
143   {                                               
144     if (valueP > 1.0) valueP =  1.0;              
145     else         valueP = -1.0;                   
146   }                                               
147   return valueP;                                  
148 }                                                 
149 //////////////////////////////////////////////    
150 //                                                
151 G4double G4NuclearAbrasionGeometry::F ()          
152 {                                                 
153 //                                                
154 //                                                
155 // Initialise the value for F, then determine     
156 // whether the projectile is larger or smaller    
157 // in relation to the impact parameter.           
158 //                                                
159   G4double valueF = 0.0;                          
160                                                   
161   if (rT > rP)                                    
162   {                                               
163     if (rT-rP<=r && r<=rT+rP) valueF = 0.75*R*    
164     else                      valueF = 1.0;       
165   }                                               
166   else                                            
167   {                                               
168     if (rP-rT<=r && r<=rP+rT) valueF = 0.75*R*    
169       (1.0-G4Pow::GetInstance()->powA(1.0-m*m,    
170     else                      valueF = (1.0-G4    
171   }                                               
172                                                   
173   if (!(valueF <= 1.0 && valueF>= 0.0))           
174   {                                               
175     if (valueF > 1.0) valueF = 1.0;               
176     else         valueF = 0.0;                    
177   }                                               
178   return valueF;                                  
179 }                                                 
180 //////////////////////////////////////////////    
181 //                                                
182 G4double G4NuclearAbrasionGeometry::GetExcitat    
183 {                                                 
184   G4double F1 = F();                              
185   G4double P1 = P();                              
186   G4double Es = 0.0;                              
187                                                   
188   Es = 0.95 * MeV * 4.0 * pi * rP*rP/fermi/fer    
189        (1.0+P1-G4Pow::GetInstance()->A23(1.0-F    
190 //  if (rT < rP && r < rP-rT)                     
191   if ((r-rP)/rT < rth)                            
192   {                                               
193     G4double omega = 0.0;                         
194     if      (AP < 12.0)  omega = 1500.0;          
195     else if (AP <= 16.0) omega = 1500.0 - 320.    
196     Es *= 1.0 + F1*(5.0+omega*F1*F1);             
197   }                                               
198                                                   
199   if (Es < 0.0)                                   
200     Es = 0.0;                                     
201   else if (Es > B * AP)                           
202     Es = B * AP;                                  
203   return Es;                                      
204 }                                                 
205                                                   
206                                                   
207 G4double G4NuclearAbrasionGeometry::GetExcitat    
208 {                                                 
209   // This member function declares a new G4Nuc    
210   // but with the projectile and target exchan    
211   // for F and P.  Determination of the excess    
212   // energy is as above.                          
213                                                   
214   G4NuclearAbrasionGeometry* revAbrasionGeomet    
215     new G4NuclearAbrasionGeometry(AT, AP, r);     
216   G4double F1 = revAbrasionGeometry->F();         
217   G4double P1 = revAbrasionGeometry->P();         
218   G4double Es = 0.0;                              
219                                                   
220   Es = 0.95 * MeV * 4.0 * pi * rT*rT/fermi/fer    
221        (1.0+P1-G4Pow::GetInstance()->A23(1.0-F    
222                                                   
223 //  if (rP < rT && r < rT-rP)                     
224   if ((r-rT)/rP < rth) {                          
225     G4double omega = 0.0;                         
226     if      (AT < 12.0)  omega = 1500.0;          
227     else if (AT <= 16.0) omega = 1500.0 - 320.    
228     Es *= 1.0 + F1*(5.0+omega*F1*F1);             
229   }                                               
230                                                   
231   if (Es < 0.0)                                   
232     Es = 0.0;                                     
233   else if (Es > B * AT)                           
234     Es = B * AT;                                  
235                                                   
236   delete revAbrasionGeometry;                     
237                                                   
238   return Es;                                      
239 }                                                 
240