330{
340
341 G4cout <<
"**** Constructing Majorant Surface for 2BN Distribution ****" <<
G4endl;
342
343 if(kcut > kmin) kmin = kcut;
344
346
347 for(
G4int index = index_min; index < index_max; index++){
348
350 Ek = std::pow(10.,fraction);
351 Eel = Ek + electron_mass_c2;
352
353
354 dsmax = 0.;
355 thetamax = 0.;
356
357 for(theta = 0.; theta < pi; theta = theta + dtheta){
358
360
361 if(ds > dsmax){
362 dsmax = ds;
363 thetamax = theta;
364 }
365 }
366
367
368 if(Ek < kmin || thetamax == 0){
369 c = 0;
371 }else{
372 c = 1/(thetamax*thetamax);
373 A = 2*std::sqrt(c)*dsmax/(std::pow(kmin,-b));
374 }
375
376
377 ratmin = 1.;
378
379
380 Vds = 0.;
381 Vdf = 0.;
383 theta0 = 0.;
384
385 vmax =
G4int(100.*std::log10(Ek/kmin));
386
387 for(
G4int v = 0; v < vmax; v++){
389 k = std::pow(10.,fractionLocal)*kmin;
390
391 for(theta = 0.; theta < pi; theta = theta + dtheta){
393 dt = theta - theta0;
395 Vds = Vds + ds*dk*dt;
397 Vdf = Vdf + df*dk*dt;
398
399 if(ds != 0.){
400 if(df != 0.) ratio = df/ds;
401 }
402
403 if(ratio < ratmin && ratio != 0.){
404 ratmin = ratio;
405 }
406 }
407 }
408
409
410 Atab[i] =
A/ratmin * 1.04;
411 ctab[i] = c;
412
413
414 i++;
415 }
416}
G4GLOB_DLL std::ostream G4cout
G4double CalculateFkt(G4double k, G4double theta, G4double A, G4double c) const
G4double Calculatedsdkdt(G4double kout, G4double theta, G4double Eel) const