Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/inclxx/incl_physics/src/G4INCLNKbElasticChannel.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.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/inclxx/incl_physics/src/G4INCLNKbElasticChannel.cc (Version 11.3.0) and /processes/hadronic/models/inclxx/incl_physics/src/G4INCLNKbElasticChannel.cc (Version 9.1.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 // INCL++ intra-nuclear cascade model             
 27 // Alain Boudard, CEA-Saclay, France              
 28 // Joseph Cugnon, University of Liege, Belgium    
 29 // Jean-Christophe David, CEA-Saclay, France      
 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H    
 31 // Sylvie Leray, CEA-Saclay, France               
 32 // Davide Mancusi, CEA-Saclay, France             
 33 //                                                
 34 #define INCLXX_IN_GEANT4_MODE 1                   
 35                                                   
 36 #include "globals.hh"                             
 37                                                   
 38 #include "G4INCLNKbElasticChannel.hh"             
 39 #include "G4INCLKinematicsUtils.hh"               
 40 #include "G4INCLBinaryCollisionAvatar.hh"         
 41 #include "G4INCLRandom.hh"                        
 42 #include "G4INCLGlobals.hh"                       
 43 #include "G4INCLLogger.hh"                        
 44 #include <algorithm>                              
 45 #include "G4INCLPhaseSpaceGenerator.hh"           
 46                                                   
 47 namespace G4INCL {                                
 48                                                   
 49   NKbElasticChannel::NKbElasticChannel(Particl    
 50     : particle1(p1), particle2(p2)                
 51     {}                                            
 52                                                   
 53   NKbElasticChannel::~NKbElasticChannel(){}       
 54                                                   
 55   void NKbElasticChannel::fillFinalState(Final    
 56                                                   
 57     Particle *nucleon;                            
 58     Particle *kaon;                               
 59                                                   
 60     if(particle1->isNucleon()){                   
 61       nucleon = particle1;                        
 62       kaon = particle2;                           
 63     }                                             
 64     else{                                         
 65       nucleon = particle2;                        
 66       kaon = particle1;                           
 67     }                                             
 68                                                   
 69     ThreeVector mom_kaon = KaonMomentum(kaon,n    
 70                                                   
 71     kaon->setMomentum(mom_kaon);                  
 72     nucleon->setMomentum(-mom_kaon);              
 73                                                   
 74     nucleon->adjustEnergyFromMomentum();          
 75     kaon->adjustEnergyFromMomentum();             
 76                                                   
 77     fs->addModifiedParticle(nucleon);             
 78     fs->addModifiedParticle(kaon);                
 79                                                   
 80   }                                               
 81                                                   
 82   ThreeVector NKbElasticChannel::KaonMomentum(    
 83                                                   
 84     const G4double norm = KinematicsUtils::mom    
 85     const G4double pLab = KinematicsUtils::mom    
 86                                                   
 87     if(pLab < 225.) return Random::normVector(    
 88                                                   
 89     G4double cos_theta = 1.;                      
 90     G4double sin_theta = 0.;                      
 91     const G4double cos_phi = std::cos(Random::    
 92     const G4double sin_phi = std::sqrt(1-cos_p    
 93                                                   
 94     const G4double x = kaon->getMomentum().get    
 95     const G4double y = kaon->getMomentum().get    
 96     const G4double z = kaon->getMomentum().get    
 97                                                   
 98     const G4double r = std::sqrt(x*x+y*y+z*z);    
 99     const G4double rho = std::sqrt(x*x+y*y);      
100                                                   
101     if(pLab >= 2375.){                            
102       const G4double b = 12. * pLab/2375.; //     
103       cos_theta = std::log(Random::shoot()*(st    
104       sin_theta = std::sqrt(1-cos_theta*cos_th    
105                                                   
106     }                                             
107     else{                                         
108       const G4double Legendre_coef[431][11] =     
109         {225,0.14007,-0.1329,0.00044,-0.00469,    
110         {230,0.14143,-0.1335,0.00058,-0.00417,    
111         {235,0.14283,-0.1179,0.00077,-0.00364,    
112         {240,0.14428,-0.08345,0.00102,-0.00312    
113         {245,0.14582,-0.04111,0.00133,-0.00259    
114         {250,0.14746,-0.00771,0.00173,-0.00206    
115         {255,0.14924,0.00768,0.00222,-0.00153,    
116         {260,0.15117,0.00618,0.00283,-0.00098,    
117         {265,0.15327,-0.00651,0.00358,-0.00043    
118         {270,0.15552,-0.02353,0.00449,0.00014,    
119         {275,0.15793,-0.03863,0.00558,0.00072,    
120         {280,0.16051,-0.04941,0.00685,0.00131,    
121         {285,0.16325,-0.05717,0.00834,0.00192,    
122         {290,0.16617,-0.06091,0.01006,0.00255,    
123         {295,0.16926,-0.05462,0.01201,0.0032,-    
124         {300,0.17254,-0.03426,0.0142,0.00387,-    
125         {305,0.17599,-0.00416,0.01663,0.00457,    
126         {310,0.17961,0.02807,0.01931,0.00529,-    
127         {315,0.18341,0.05924,0.02221,0.00603,-    
128         {320,0.18737,0.09129,0.02534,0.00681,-    
129         {325,0.19147,0.12688,0.02868,0.0076,-2    
130         {330,0.19568,0.16704,0.03221,0.00841,0    
131         {335,0.20001,0.21052,0.03591,0.00927,0    
132         {340,0.20444,0.25417,0.03977,0.01019,0    
133         {345,0.20897,0.29637,0.04374,0.01121,0    
134         {350,0.21361,0.34404,0.04781,0.01235,0    
135         {355,0.21836,0.41178,0.05192,0.01363,0    
136         {360,0.22323,0.51001,0.05605,0.01505,0    
137         {365,0.22824,0.63548,0.06014,0.01663,0    
138         {370,0.2334,0.7775,0.06415,0.01839,0.0    
139         {375,0.23875,0.92674,0.06804,0.02031,0    
140         {380,0.24435,1.07258,0.07178,0.02238,0    
141         {385,0.25024,1.19622,0.07534,0.0246,0.    
142         {390,0.25648,1.27148,0.07871,0.02695,0    
143         {395,0.26314,1.27773,0.08191,0.02941,0    
144         {400,0.2703,1.21317,0.08493,0.03197,0.    
145         {405,0.27805,1.09842,0.08781,0.03461,0    
146         {410,0.28645,0.96106,0.09058,0.03732,0    
147         {415,0.29558,0.82322,0.09326,0.04009,0    
148         {420,0.30549,0.70361,0.09589,0.04293,0    
149         {425,0.31624,0.61949,0.09849,0.04579,0    
150         {430,0.32784,0.57051,0.10106,0.04865,0    
151         {435,0.34034,0.53542,0.10361,0.05148,0    
152         {440,0.35375,0.49078,0.10615,0.05423,0    
153         {445,0.36809,0.42743,0.10865,0.05688,0    
154         {450,0.38335,0.35685,0.11111,0.05938,0    
155         {455,0.39954,0.29473,0.11352,0.0617,0.    
156         {460,0.41664,0.24563,0.11587,0.0638,0.    
157         {465,0.43459,0.21189,0.11819,0.06569,0    
158         {470,0.45332,0.19982,0.12049,0.06737,0    
159         {475,0.47275,0.20898,0.12283,0.06886,0    
160         {480,0.49282,0.22837,0.12528,0.07016,0    
161         {485,0.51344,0.24427,0.12795,0.0713,0.    
162         {490,0.53457,0.25093,0.13095,0.07231,0    
163         {495,0.55613,0.25424,0.13442,0.07322,0    
164         {500,0.57806,0.26108,0.13848,0.07406,0    
165         {505,0.60029,0.27305,0.14325,0.07486,0    
166         {510,0.62275,0.2865,0.14878,0.07566,0.    
167         {515,0.64538,0.30095,0.15509,0.07648,0    
168         {520,0.66812,0.32366,0.16211,0.07734,0    
169         {525,0.69093,0.35704,0.16973,0.07824,0    
170         {530,0.71377,0.36827,0.17776,0.07915,0    
171         {535,0.7366,0.38051,0.18596,0.08008,0.    
172         {540,0.75939,0.39356,0.19409,0.08101,0    
173         {545,0.78211,0.40692,0.20194,0.08198,0    
174         {550,0.80474,0.42044,0.20931,0.083,0.0    
175         {555,0.82725,0.43387,0.21611,0.08409,0    
176         {560,0.84963,0.447,0.2222,0.08529,0.04    
177         {565,0.87184,0.45974,0.22759,0.08661,0    
178         {570,0.89386,0.47209,0.23233,0.08808,0    
179         {575,0.91567,0.4841,0.23658,0.08972,0.    
180         {580,0.93726,0.4957,0.24036,0.09155,0.    
181         {585,0.95862,0.50708,0.24394,0.09359,0    
182         {590,0.97974,0.51822,0.24738,0.09584,0    
183         {595,1.00062,0.52933,0.25094,0.09833,0    
184         {600,1.02125,0.54045,0.2547,0.10105,0.    
185         {605,1.04163,0.55179,0.25885,0.10403,0    
186         {610,1.06175,0.56353,0.2635,0.10727,0.    
187         {615,1.08161,0.57592,0.26878,0.1108,0.    
188         {620,1.10122,0.58905,0.27473,0.1146,0.    
189         {625,1.12057,0.6033,0.28148,0.11868,0.    
190         {630,1.13968,0.61885,0.28905,0.12305,0    
191         {635,1.15854,0.63595,0.2975,0.1277,0.0    
192         {640,1.17716,0.65493,0.30687,0.13264,0    
193         {645,1.19553,0.67602,0.31718,0.13783,0    
194         {650,1.21364,0.69939,0.32841,0.14324,0    
195         {655,1.23147,0.72528,0.34057,0.14882,0    
196         {660,1.249,0.7539,0.35367,0.15454,0.06    
197         {665,1.26621,0.78533,0.36764,0.16034,0    
198         {670,1.28308,0.8195,0.3824,0.1662,0.07    
199         {675,1.29958,0.85642,0.39788,0.17209,0    
200         {680,1.31567,0.89591,0.41398,0.17799,0    
201         {685,1.3313,0.93777,0.43055,0.1839,0.0    
202         {690,1.3464,0.98156,0.44745,0.1898,0.0    
203         {695,1.36092,1.02685,0.46446,0.19569,0    
204         {700,1.3748,1.07309,0.48139,0.20155,0.    
205         {705,1.38798,1.11974,0.49805,0.20738,0    
206         {710,1.4004,1.16608,0.51421,0.21317,0.    
207         {715,1.41199,1.2115,0.52966,0.21892,0.    
208         {720,1.4227,1.25536,0.54424,0.22461,0.    
209         {725,1.43247,1.29714,0.55781,0.23025,0    
210         {730,1.44128,1.33634,0.57029,0.23586,0    
211         {735,1.4491,1.37258,0.58161,0.24145,0.    
212         {740,1.4559,1.40563,0.59178,0.24704,0.    
213         {745,1.46166,1.43537,0.60085,0.25266,0    
214         {750,1.4664,1.46184,0.60893,0.25834,0.    
215         {755,1.47012,1.48507,0.61613,0.2641,0.    
216         {760,1.47283,1.50532,0.62261,0.27,0.14    
217         {765,1.47454,1.52274,0.62849,0.27606,0    
218         {770,1.47527,1.5377,0.634,0.2823,0.155    
219         {775,1.47506,1.55045,0.63926,0.28875,0    
220         {780,1.47395,1.56132,0.64445,0.29542,0    
221         {785,1.47197,1.57062,0.64973,0.30235,0    
222         {790,1.46919,1.5787,0.65524,0.30957,0.    
223         {795,1.46566,1.58579,0.66108,0.31709,0    
224         {800,1.46143,1.59213,0.66731,0.32494,0    
225         {805,1.45658,1.59801,0.67402,0.33312,0    
226         {810,1.45114,1.60371,0.68124,0.34165,0    
227         {815,1.44519,1.60936,0.68893,0.35054,0    
228         {820,1.43878,1.61515,0.69704,0.35982,0    
229         {825,1.43195,1.62131,0.70553,0.36949,0    
230         {830,1.42477,1.62791,0.71427,0.37956,0    
231         {835,1.41729,1.63504,0.72318,0.39006,0    
232         {840,1.40956,1.64282,0.73218,0.401,0.2    
233         {845,1.40161,1.65132,0.74124,0.41239,0    
234         {850,1.3935,1.66056,0.7503,0.42424,0.2    
235         {855,1.38526,1.67054,0.75937,0.43656,0    
236         {860,1.37693,1.68128,0.76851,0.44938,0    
237         {865,1.36855,1.69275,0.77776,0.46269,0    
238         {870,1.36017,1.70495,0.78724,0.47652,0    
239         {875,1.35182,1.71783,0.79705,0.49087,0    
240         {880,1.34355,1.73135,0.80728,0.50576,0    
241         {885,1.33538,1.74545,0.81803,0.52118,0    
242         {890,1.32737,1.76009,0.82938,0.53712,0    
243         {895,1.31955,1.77516,0.8414,0.55357,0.    
244         {900,1.31195,1.79066,0.85422,0.57052,0    
245         {905,1.30462,1.80645,0.86774,0.58794,0    
246         {910,1.29758,1.82248,0.88204,0.60577,0    
247         {915,1.29087,1.83865,0.89711,0.62396,0    
248         {920,1.28451,1.85489,0.91289,0.64244,0    
249         {925,1.27854,1.87113,0.92941,0.66113,0    
250         {930,1.27299,1.88729,0.94663,0.67995,0    
251         {935,1.26789,1.90333,0.9646,0.69881,0.    
252         {940,1.26327,1.91917,0.98329,0.71765,0    
253         {945,1.25914,1.93478,1.00276,0.73636,0    
254         {950,1.25553,1.95014,1.02309,0.75486,0    
255         {955,1.25247,1.96526,1.04444,0.77305,0    
256         {960,1.24996,1.98014,1.06695,0.79084,0    
257         {965,1.24804,1.99479,1.09078,0.80815,0    
258         {970,1.24672,2.00926,1.11616,0.82491,0    
259         {975,1.24601,2.02357,1.14324,0.84102,0    
260         {980,1.24594,2.03775,1.17221,0.8564,0.    
261         {985,1.2465,2.0518,1.20312,0.87098,0.4    
262         {990,1.24771,2.06568,1.23594,0.88468,0    
263         {995,1.24956,2.0793,1.27044,0.89743,0.    
264         {1000,1.25203,2.09256,1.30631,0.90917,    
265         {1005,1.25511,2.10532,1.34305,0.91985,    
266         {1010,1.2588,2.11731,1.37985,0.92939,0    
267         {1015,1.26308,2.12833,1.41594,0.93779,    
268         {1020,1.26795,2.13814,1.45041,0.94503,    
269         {1025,1.27338,2.14656,1.48242,0.95109,    
270         {1030,1.27938,2.15331,1.51104,0.95597,    
271         {1035,1.28592,2.15832,1.53575,0.95964,    
272         {1040,1.293,2.16155,1.55614,0.96211,0.    
273         {1045,1.30061,2.163,1.57204,0.96334,0.    
274         {1050,1.30872,2.16272,1.58343,0.96336,    
275         {1055,1.31732,2.16081,1.5905,0.96221,0    
276         {1060,1.32638,2.15741,1.59355,0.95996,    
277         {1065,1.33587,2.15274,1.59306,0.95665,    
278         {1070,1.34578,2.14696,1.58939,0.95236,    
279         {1075,1.35609,2.14027,1.58309,0.94716,    
280         {1080,1.36676,2.13286,1.57454,0.94113,    
281         {1085,1.37779,2.12492,1.56429,0.93433,    
282         {1090,1.38914,2.11665,1.55271,0.92686,    
283         {1095,1.40076,2.10821,1.54028,0.91878,    
284         {1100,1.41261,2.09974,1.52734,0.9102,0    
285         {1105,1.42462,2.09138,1.51429,0.90121,    
286         {1110,1.43677,2.08324,1.50142,0.89189,    
287         {1115,1.44898,2.07537,1.48901,0.88234,    
288         {1120,1.46122,2.06783,1.4773,0.87264,0    
289         {1125,1.47343,2.06063,1.46643,0.86287,    
290         {1130,1.48556,2.05378,1.45653,0.85308,    
291         {1135,1.49758,2.04726,1.44767,0.84333,    
292         {1140,1.50943,2.04106,1.43987,0.83366,    
293         {1145,1.52109,2.03518,1.43314,0.82413,    
294         {1150,1.53252,2.0296,1.42743,0.81479,0    
295         {1155,1.54367,2.02432,1.42269,0.8057,0    
296         {1160,1.5545,2.01935,1.41883,0.79694,0    
297         {1165,1.56496,2.01471,1.41576,0.78856,    
298         {1170,1.57503,2.01042,1.41337,0.78064,    
299         {1175,1.58469,2.1965,1.41155,0.77321,0    
300         {1180,1.5939,2.00299,1.41016,0.76633,0    
301         {1185,1.60265,1.9999,1.40908,0.76005,0    
302         {1190,1.61092,1.99724,1.40818,0.7544,0    
303         {1195,1.6187,1.99499,1.40729,0.7494,0.    
304         {1200,1.62597,1.99317,1.40635,0.74509,    
305         {1205,1.63272,1.99173,1.40521,0.74151,    
306         {1210,1.63895,1.99063,1.40379,0.73867,    
307         {1215,1.64465,1.98982,1.40203,0.73662,    
308         {1220,1.64984,1.98925,1.39991,0.73538,    
309         {1225,1.65456,1.98885,1.39743,0.73499,    
310         {1230,1.65885,1.98857,1.39463,0.73546,    
311         {1235,1.66276,1.9884,1.39163,0.73683,0    
312         {1240,1.66633,1.98832,1.38853,0.7391,0    
313         {1245,1.66959,1.98831,1.38547,0.74229,    
314         {1250,1.67261,1.98841,1.38262,0.74638,    
315         {1255,1.67544,1.98864,1.38016,0.75139,    
316         {1260,1.67811,1.98907,1.37827,0.75735,    
317         {1265,1.6807,1.98975,1.37713,0.76427,0    
318         {1270,1.68325,1.99077,1.37693,0.77218,    
319         {1275,1.68581,1.99224,1.37785,0.7811,0    
320         {1280,1.68844,1.99422,1.38006,0.79104,    
321         {1285,1.69117,1.99685,1.38376,0.80203,    
322         {1290,1.69404,2.00021,1.38909,0.81409,    
323         {1295,1.69705,2.00443,1.39628,0.8272,0    
324         {1300,1.70021,2.00965,1.4055,0.84135,0    
325         {1305,1.70353,2.01597,1.41698,0.85652,    
326         {1310,1.70703,2.02352,1.43096,0.87269,    
327         {1315,1.7107,2.0324,1.44765,0.88983,0.    
328         {1320,1.71455,2.04268,1.46721,0.90794,    
329         {1325,1.7186,2.0544,1.48977,0.92699,0.    
330         {1330,1.72283,2.06752,1.51535,0.94694,    
331         {1335,1.72726,2.082,1.54394,0.96778,0.    
332         {1340,1.73188,2.09761,1.57517,0.98947,    
333         {1345,1.73669,2.11416,1.60872,1.01198,    
334         {1350,1.74168,2.13141,1.64411,1.03528,    
335         {1355,1.74687,2.14911,1.68074,1.05933,    
336         {1360,1.75224,2.16699,1.71798,1.08412,    
337         {1365,1.7578,2.1849,1.75528,1.1096,0.6    
338         {1370,1.76355,2.20267,1.79212,1.13575,    
339         {1375,1.76948,2.22025,1.82818,1.16253,    
340         {1380,1.7756,2.23755,1.863,1.18992,0.7    
341         {1385,1.78191,2.25468,1.89666,1.21789,    
342         {1390,1.78839,2.27153,1.92896,1.2464,0    
343         {1395,1.79506,2.28807,1.95988,1.2754,0    
344         {1400,1.80191,2.3043,1.9895,1.30486,0.    
345         {1405,1.80892,2.32031,2.01814,1.33474,    
346         {1410,1.81611,2.33611,2.04597,1.36499,    
347         {1415,1.82347,2.35183,2.0734,1.39557,0    
348         {1420,1.83098,2.36761,2.10085,1.42644,    
349         {1425,1.83866,2.3837,2.12881,1.45756,0    
350         {1430,1.8465,2.40026,2.15761,1.48889,0    
351         {1435,1.85448,2.41772,2.18799,1.52038,    
352         {1440,1.86261,2.43632,2.22012,1.55198,    
353         {1445,1.87088,2.4564,2.25442,1.58366,1    
354         {1450,1.87926,2.47821,2.29095,1.61534,    
355         {1455,1.88775,2.50203,2.32979,1.64699,    
356         {1460,1.89633,2.52791,2.37059,1.67854,    
357         {1465,1.90498,2.55575,2.41275,1.70994,    
358         {1470,1.9137,2.58528,2.45552,1.74115,1    
359         {1475,1.92247,2.61583,2.49765,1.77211,    
360         {1480,1.93128,2.64682,2.53822,1.80277,    
361         {1485,1.9401,2.67749,2.57631,1.83306,1    
362         {1490,1.94894,2.70719,2.61131,1.86296,    
363         {1495,1.95779,2.73518,2.64271,1.89239,    
364         {1500,1.96663,2.76107,2.67053,1.92133,    
365         {1505,1.97546,2.78466,2.6951,1.94971,1    
366         {1510,1.98427,2.80574,2.71662,1.9775,1    
367         {1515,1.99305,2.82446,2.73579,2.00463,    
368         {1520,2.00181,2.84098,2.7532,2.03108,1    
369         {1525,2.01052,2.85555,2.76943,2.05678,    
370         {1530,2.01919,2.86842,2.78501,2.08169,    
371         {1535,2.0278,2.87996,2.80048,2.10576,1    
372         {1540,2.03635,2.8903,2.8161,2.12896,1.    
373         {1545,2.04483,2.89977,2.83218,2.15129,    
374         {1550,2.05324,2.90864,2.84896,2.17277,    
375         {1555,2.06156,2.91713,2.86654,2.1934,1    
376         {1560,2.06979,2.92546,2.88488,2.2132,1    
377         {1565,2.07792,2.93381,2.90387,2.23216,    
378         {1570,2.08595,2.94231,2.92325,2.25032,    
379         {1575,2.09387,2.95113,2.94275,2.26766,    
380         {1580,2.10166,2.96017,2.96173,2.28421,    
381         {1585,2.10933,2.96958,2.97993,2.29998,    
382         {1590,2.11686,2.97912,2.99666,2.31496,    
383         {1595,2.12426,2.98872,3.01163,2.32918,    
384         {1600,2.1315,2.99818,3.0245,2.34264,1.    
385         {1605,2.13859,3.00725,3.03509,2.35536,    
386         {1610,2.14551,3.01569,3.04332,2.36733,    
387         {1615,2.15227,3.02325,3.04931,2.37858,    
388         {1620,2.15884,3.02974,3.05324,2.38911,    
389         {1625,2.16523,3.03506,3.0554,2.39893,1    
390         {1630,2.17143,3.03914,3.05609,2.40805,    
391         {1635,2.17743,3.04206,3.05566,2.41649,    
392         {1640,2.18323,3.0438,3.05428,2.42425,1    
393         {1645,2.18883,3.04456,3.05224,2.43135,    
394         {1650,2.19425,3.04449,3.04972,2.43784,    
395         {1655,2.19949,3.04374,3.04683,2.44372,    
396         {1660,2.20457,3.04245,3.04363,2.44904,    
397         {1665,2.20949,3.04076,3.04018,2.4538,1    
398         {1670,2.21426,3.03876,3.03649,2.45804,    
399         {1675,2.21889,3.03657,3.03256,2.46178,    
400         {1680,2.22339,3.03424,3.02844,2.46505,    
401         {1685,2.22778,3.03182,3.02406,2.46788,    
402         {1690,2.23204,3.02936,3.01948,2.47029,    
403         {1695,2.2362,3.02689,3.01476,2.47235,1    
404         {1700,2.24024,3.02446,3.00998,2.47413,    
405         {1705,2.24417,3.0221,3.00522,2.47568,1    
406         {1710,2.24799,3.01984,3.00059,2.47707,    
407         {1715,2.2517,3.01771,2.99623,2.47837,1    
408         {1720,2.2553,3.01574,2.99226,2.47962,1    
409         {1725,2.25879,3.01395,2.98884,2.48091,    
410         {1730,2.26217,3.01237,2.98611,2.48228,    
411         {1735,2.26543,3.01101,2.98419,2.48381,    
412         {1740,2.2686,3.00988,2.98319,2.48555,1    
413         {1745,2.27167,3.00897,2.98323,2.48753,    
414         {1750,2.27466,3.00828,2.98436,2.48976,    
415         {1755,2.27759,3.00777,2.9866,2.49229,1    
416         {1760,2.28046,3.00743,2.98993,2.49512,    
417         {1765,2.28329,3.00722,2.99427,2.49831,    
418         {1770,2.2861,3.00712,2.99948,2.50185,1    
419         {1775,2.28889,3.00709,3.00539,2.5058,1    
420         {1780,2.29169,3.1971,3.01177,2.51016,1    
421         {1785,2.2945,3.00713,3.01836,2.51497,1    
422         {1790,2.29733,3.00727,3.02501,2.52024,    
423         {1795,2.30019,3.00743,3.03129,2.52598,    
424         {1800,2.30308,3.00769,3.03701,2.53218,    
425         {1805,2.30599,3.1981,3.04192,2.53883,1    
426         {1810,2.30894,3.00875,3.04579,2.54593,    
427         {1815,2.31191,3.00975,3.04841,2.55348,    
428         {1820,2.31492,3.01122,3.04963,2.56148,    
429         {1825,2.31795,3.01333,3.04935,2.56991,    
430         {1830,2.32102,3.01624,3.04762,2.57878,    
431         {1835,2.32413,3.02014,3.04457,2.58808,    
432         {1840,2.32727,3.02528,3.04081,2.59781,    
433         {1845,2.33044,3.03168,3.03673,2.60797,    
434         {1850,2.33366,3.03949,3.03328,2.61854,    
435         {1855,2.33691,3.04874,3.03143,2.62953,    
436         {1860,2.3402,3.0594,3.03217,2.64094,1.    
437         {1865,2.34353,3.07137,3.03635,2.65275,    
438         {1870,2.3469,3.08454,3.04459,2.66497,1    
439         {1875,2.35032,3.09878,3.05724,2.67759,    
440         {1880,2.35378,3.11396,3.07431,2.69061,    
441         {1885,2.35728,3.12996,3.09565,2.70402,    
442         {1890,2.36083,3.1466,3.12083,2.71781,1    
443         {1895,2.3644,3.16367,3.14918,2.73195,1    
444         {1900,2.36801,3.181,3.18008,2.74642,1.    
445         {1905,2.37163,3.19834,3.21275,2.76118,    
446         {1910,2.37525,3.2154,3.24639,2.77619,1    
447         {1915,2.37887,3.23188,3.28016,2.79144,    
448         {1920,2.38247,3.24747,3.31324,2.80688,    
449         {1925,2.38605,3.26188,3.34488,2.82248,    
450         {1930,2.3896,3.27487,3.37443,2.83822,1    
451         {1935,2.3931,3.28629,3.40141,2.85406,1    
452         {1940,2.39655,3.29596,3.42532,2.86997,    
453         {1945,2.39994,3.30388,3.44597,2.88593,    
454         {1950,2.40326,3.31012,3.46328,2.90189,    
455         {1955,2.4065,3.31482,3.47731,2.91783,2    
456         {1960,2.40965,3.31816,3.48822,2.93371,    
457         {1965,2.41269,3.32044,3.49632,2.94951,    
458         {1970,2.41563,3.32179,3.50179,2.96519,    
459         {1975,2.41845,3.32254,3.50506,2.98073,    
460         {1980,2.42114,3.32293,3.50649,2.99609,    
461         {1985,2.42369,3.32318,3.50645,3.01123,    
462         {1990,2.4261,3.32346,3.50529,3.02615,2    
463         {1995,2.42837,3.3239,3.50335,3.04085,2    
464         {2000,2.43052,3.3246,3.50095,3.05532,2    
465         {2005,2.43254,3.32561,3.49838,3.0696,2    
466         {2010,2.43445,3.32696,3.49592,3.08368,    
467         {2015,2.43626,3.32865,3.49379,3.09757,    
468         {2020,2.43797,3.33067,3.4922,3.11129,2    
469         {2025,2.43959,3.33296,3.49131,3.12484,    
470         {2030,2.44113,3.3355,3.49125,3.13823,2    
471         {2035,2.4426,3.33826,3.49211,3.15148,2    
472         {2040,2.444,3.34111,3.49372,3.16458,2.    
473         {2045,2.44535,3.34405,3.49616,3.17756,    
474         {2050,2.44665,3.34702,3.49935,3.19042,    
475         {2055,2.44791,3.34996,3.50318,3.20317,    
476         {2060,2.44914,3.35283,3.50751,3.21581,    
477         {2065,2.45034,3.35558,3.51224,3.22837,    
478         {2070,2.45152,3.35816,3.51725,3.24084,    
479         {2075,2.4527,3.36053,3.52245,3.25325,2    
480         {2080,2.45388,3.36265,3.52782,3.26559,    
481         {2085,2.45506,3.36448,3.53335,3.27788,    
482         {2090,2.45626,3.36599,3.53911,3.29012,    
483         {2095,2.45747,3.36713,3.54518,3.30232,    
484         {2100,2.4587,3.36785,3.5517,3.31448,2.    
485         {2105,2.45995,3.3681,3.55882,3.32661,2    
486         {2110,2.46121,3.36785,3.56668,3.3387,2    
487         {2115,2.46248,3.36709,3.57531,3.35077,    
488         {2120,2.46378,3.36582,3.58467,3.3628,2    
489         {2125,2.4651,3.36413,3.59451,3.37482,2    
490         {2130,2.46643,3.36214,3.60448,3.38682,    
491         {2135,2.46779,3.36001,3.61413,3.39879,    
492         {2140,2.46917,3.35797,3.62309,3.41076,    
493         {2145,2.47056,3.35605,3.63094,3.42271,    
494         {2150,2.47199,3.35441,3.63757,3.43466,    
495         {2155,2.47343,3.3531,3.64301,3.4466,2.    
496         {2160,2.4749,3.35214,3.64737,3.45854,2    
497         {2165,2.47639,3.35154,3.65085,3.47048,    
498         {2170,2.47791,3.3513,3.65368,3.48243,2    
499         {2175,2.47945,3.35147,3.65608,3.49439,    
500         {2180,2.48102,3.35223,3.65849,3.50635,    
501         {2185,2.48262,3.35353,3.66096,3.51833,    
502         {2190,2.48425,3.35566,3.66378,3.53033,    
503         {2195,2.4859,3.3589,3.66741,3.54235,2.    
504         {2200,2.48758,3.36365,3.6723,3.55439,2    
505         {2205,2.4893,3.3704,3.67895,3.56646,2.    
506         {2210,2.49104,3.37963,3.68794,3.57856,    
507         {2215,2.49282,3.39172,3.69969,3.59069,    
508         {2220,2.49463,3.40674,3.7144,3.60285,2    
509         {2225,2.49647,3.42421,3.73174,3.61506,    
510         {2230,2.49835,3.44326,3.75104,3.62731,    
511         {2235,2.50025,3.46231,3.77088,3.6396,2    
512         {2240,2.5022,3.48011,3.78998,3.65194,2    
513         {2245,2.50418,3.49581,3.80762,3.66433,    
514         {2250,2.5062,3.50913,3.82344,3.67678,2    
515         {2255,2.50825,3.52022,3.83754,3.68929,    
516         {2260,2.51034,3.52949,3.85027,3.70185,    
517         {2265,2.51247,3.53741,3.86203,3.71448,    
518         {2270,2.51464,3.54443,3.87322,3.72718,    
519         {2275,2.51685,3.5509,3.88415,3.73994,2    
520         {2280,2.5191,3.55707,3.89503,3.75278,2    
521         {2285,2.52139,3.56312,3.90596,3.7657,2    
522         {2290,2.52372,3.56913,3.91699,3.77869,    
523         {2295,2.52609,3.57517,3.92809,3.79175,    
524         {2300,2.5285,3.58122,3.93914,3.80486,3    
525         {2305,2.53093,3.58725,3.95002,3.81803,    
526         {2310,2.5334,3.5932,3.96055,3.83123,3.    
527         {2315,2.53589,3.599,3.97054,3.84446,3.    
528         {2320,2.5384,3.60457,3.97979,3.85771,3    
529         {2325,2.54093,3.60985,3.98817,3.87097,    
530         {2330,2.54348,3.61467,3.99541,3.88423,    
531         {2335,2.54603,3.61904,4.00148,3.89749,    
532         {2340,2.5486,3.6229,4.00632,3.91072,3.    
533         {2345,2.55117,3.62622,4.00994,3.92392,    
534         {2350,2.55375,3.62901,4.01239,3.93709,    
535         {2355,2.55632,3.6313,4.01379,3.9502,3.    
536         {2360,2.5589,3.6331,4.01428,3.96326,3.    
537         {2365,2.56146,3.63449,4.01403,3.97626,    
538         {2370,2.56401,3.63552,4.0132,3.98917,3    
539         {2375,2.56655,3.63624,4.01196,4.002,3.    
540                                                   
541       const G4int coef_ener = G4int((pLab-Lege    
542       const G4double sup_ener = pLab/5. - coef    
543       //std::cout << "sup_ener\t" << sup_ener     
544                                                   
545 // assert(pLab >= Legendre_coef[coef_ener][0]     
546                                                   
547       // Legendre coefficient normalized          
548       const G4double A0 = 1.;                     
549       const G4double A1 = (1-sup_ener)*Legendr    
550       const G4double A2 = (1-sup_ener)*Legendr    
551       const G4double A3 = (1-sup_ener)*Legendr    
552       const G4double A4 = (1-sup_ener)*Legendr    
553       const G4double A5 = (1-sup_ener)*Legendr    
554       const G4double A6 = (1-sup_ener)*Legendr    
555       const G4double A7 = (1-sup_ener)*Legendr    
556       const G4double A8 = (1-sup_ener)*Legendr    
557       const G4double A9 = (1-sup_ener)*Legendr    
558       const G4double A10 = (1-sup_ener)*Legend    
559                                                   
560       // Theoritical max if all Ai > 0 (often     
561       const G4double A = std::fabs(A0) + std::    
562                                                   
563       G4bool success = false;                     
564       G4int maxloop = 0;                          
565                                                   
566       while(!success && maxloop < 1000){          
567                                                   
568         cos_theta = Random::shoot()*2-1.; // n    
569                                                   
570         // Legendre Polynomial                    
571         G4double P0 = A0;                         
572         G4double P1 = A1*cos_theta;               
573         G4double P2 = A2/2.*(3*std::pow(cos_th    
574         G4double P3 = A3/2.*(5*std::pow(cos_th    
575         G4double P4 = A4/8.*(35*std::pow(cos_t    
576         G4double P5 = A5/8.*(63*std::pow(cos_t    
577         G4double P6 = A6/16.*(231*std::pow(cos    
578         G4double P7 = A7/16.*(429*std::pow(cos    
579         G4double P8 = A8/128.*(6435*std::pow(c    
580         G4double P9 = A9/128.*(12155*std::pow(    
581         G4double P10 = A10/256.*(46189*std::po    
582                                                   
583         G4double P = (P0 + P1 + P2 + P3 + P4 +    
584                                                   
585         if(Random::shoot()*A < P) success = tr    
586         maxloop +=1 ;                             
587         if(maxloop==1000) cos_theta = std::log    
588       }                                           
589       sin_theta = std::sqrt(1-cos_theta*cos_th    
590     }                                             
591                                                   
592     if(rho == 0) return ThreeVector(sin_theta*    
593     // Rotation in the direction of the incide    
594     const G4double px = x/r*cos_theta - y/rho*    
595     const G4double py = y/r*cos_theta + x/rho*    
596     const G4double pz = z/r*cos_theta - rho/r*    
597                                                   
598                                                   
599     return ThreeVector(px,py,pz)*norm;            
600   }                                               
601 }                                                 
602