source: trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPKallbachMannSyst.cc @ 829

Last change on this file since 829 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// neutron_hp -- source file
27// J.P. Wellisch, Nov-1996
28// A prototype of the low energy neutron transport model.
29//
30#include "G4NeutronHPKallbachMannSyst.hh"
31#include "Randomize.hh"
32#include "G4HadronicException.hh"
33
34G4double G4NeutronHPKallbachMannSyst::Sample(G4double anEnergy)
35{
36  G4double result;
37 
38  G4double zero = GetKallbachZero(anEnergy);
39  if(zero>1) zero=1.;
40  if(zero<-1)zero=-1.;
41  G4double max = Kallbach(zero, anEnergy);
42  double upper = Kallbach(1., anEnergy);
43  double lower = Kallbach(-1., anEnergy);
44  if(upper>max) max=upper;
45  if(lower>max) max=lower;
46  G4double value, random;
47  do
48  {
49    result = 2.*G4UniformRand()-1; 
50    value = Kallbach(result, anEnergy)/max;
51    random = G4UniformRand();
52  }
53  while(random>value);
54 
55  return result;
56}
57
58G4double G4NeutronHPKallbachMannSyst::Kallbach(G4double cosTh, G4double anEnergy)
59{
60  // Kallbach-Mann systematics without normalization.
61  G4double result;
62  G4double theX = A(anEnergy)*cosTh;
63  result = 0.5*(std::exp( theX)*(1+theCompoundFraction)
64               +std::exp(-theX)*(1-theCompoundFraction));
65  return result;
66}
67
68G4double G4NeutronHPKallbachMannSyst::GetKallbachZero(G4double anEnergy)
69{
70  G4double result;
71  result = 0.5 * (1./A(anEnergy)) * std::log((1-theCompoundFraction)/(1+theCompoundFraction));
72  return result;
73}
74
75G4double G4NeutronHPKallbachMannSyst::A(G4double anEnergy)
76{ 
77  G4double result;
78  G4double C1 = 0.04/MeV;
79  G4double C2 = 1.8E-6/(MeV*MeV*MeV);
80  G4double C3 = 6.7E-7/(MeV*MeV*MeV*MeV);
81 
82    G4double epsa = anEnergy*theTargetMass/(theTargetMass+theIncidentMass);
83    G4int Ac = theTargetA+1; 
84    G4int Nc = Ac - theTargetZ;
85    G4int AA = theTargetA;
86    G4int ZA = theTargetZ;
87    G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
88    G4double Et1 = 130*MeV;
89    G4double R1 = std::min(ea, Et1);
90    // theProductEnergy is still in CMS!!!
91    G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
92    G4int AB = theResidualA;
93    G4int ZB = theResidualZ;
94    G4double eb = epsb+SeparationEnergy(Ac, Nc, AB, ZB );
95  G4double X1 = R1*eb/ea; 
96    G4double Et3 = 41*MeV;
97    G4double R3 = std::min(ea, Et3);
98  G4double X3 = R3*eb/ea;
99  G4double Ma = 1;
100  G4double mb(0);
101  G4int productA = theTargetA+1-theResidualA;
102  G4int productZ = theTargetZ-theResidualZ;
103  if(productZ==0)
104  {
105    mb = 0.5;
106  }
107  else if(productZ==1)
108  {
109    mb = 1;
110  }
111  else if(productZ==2)
112  {
113    mb = 2;
114    if(productA==3) mb=1;
115  }
116  else
117  {
118    throw G4HadronicException(__FILE__, __LINE__, "Severe error in the sampling of Kallbach-Mann Systematics");
119  }
120 
121  result = C1*X1 + C2*std::pow(X1, 3.) + C3*Ma*mb*std::pow(X3, 4.);
122  return result;
123}
124
125G4double G4NeutronHPKallbachMannSyst::SeparationEnergy(G4int Ac, G4int Nc, G4int AA, G4int ZA)
126{
127  G4double result;
128  G4int NA = AA-ZA;
129  G4int Zc = Ac-Nc;
130  result = 15.68*(Ac-AA);
131  result += -28.07*((Nc-Zc)*(Nc-Zc)/Ac - (NA-ZA)*(NA-ZA)/AA);
132  result += -18.56*(std::pow(G4double(Ac), 2./3.) - std::pow(G4double(AA), 2./3.));
133  result +=  33.22*((Nc-Zc)*(Nc-Zc)/std::pow(G4double(Ac), 4./3.) - (NA-ZA)*(NA-ZA)/std::pow(G4double(AA), 4./3.));
134  result += -0.717*(Zc*Zc/std::pow(G4double(Ac),1./3.)-ZA*ZA/std::pow(G4double(AA),1./3.));
135  result +=  1.211*(Zc*Zc/Ac-ZA*ZA/AA);
136  G4double totalBinding(0);
137  G4int productA = theTargetA+1-theResidualA;
138  G4int productZ = theTargetZ-theResidualZ;
139  if(productZ==0&&productA==1) totalBinding=0;
140  if(productZ==1&&productA==1) totalBinding=0;
141  if(productZ==1&&productA==2) totalBinding=2.22;
142  if(productZ==1&&productA==3) totalBinding=8.48;
143  if(productZ==2&&productA==3) totalBinding=7.72;
144  if(productZ==2&&productA==4) totalBinding=28.3;
145  result += -totalBinding;
146  result *= MeV;
147  return result;
148}
Note: See TracBrowser for help on using the repository browser.