Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4NeutronHPKallbachMannSyst Class Reference

#include <G4NeutronHPKallbachMannSyst.hh>

Public Member Functions

 G4NeutronHPKallbachMannSyst (G4double aCompoundFraction, G4double anIncidentEnergy, G4double anIncidentMass, G4double aProductEnergy, G4double aProductMass, G4double aResidualMass, G4int aResidualA, G4int aResidualZ, G4double aTargetMass, G4int aTargetA, G4int aTargetZ)
 
 ~G4NeutronHPKallbachMannSyst ()
 
G4double Sample (G4double anEnergy)
 
G4double Kallbach (G4double cosTh, G4double anEnergy)
 
G4double GetKallbachZero (G4double anEnergy)
 
G4double A (G4double anEnergy)
 
G4double SeparationEnergy (G4int Ac, G4int Nc, G4int AA, G4int ZA)
 

Detailed Description

Definition at line 33 of file G4NeutronHPKallbachMannSyst.hh.

Constructor & Destructor Documentation

G4NeutronHPKallbachMannSyst::G4NeutronHPKallbachMannSyst ( G4double  aCompoundFraction,
G4double  anIncidentEnergy,
G4double  anIncidentMass,
G4double  aProductEnergy,
G4double  aProductMass,
G4double  aResidualMass,
G4int  aResidualA,
G4int  aResidualZ,
G4double  aTargetMass,
G4int  aTargetA,
G4int  aTargetZ 
)
inline

Definition at line 37 of file G4NeutronHPKallbachMannSyst.hh.

42  {
43  theCompoundFraction = aCompoundFraction;
44  theIncidentEnergy = anIncidentEnergy;
45  theIncidentMass = anIncidentMass;
46  theProductEnergy = aProductEnergy;
47  theProductMass = aProductMass;
48  theResidualMass = aResidualMass;
49  theResidualA = aResidualA;
50  theResidualZ = aResidualZ;
51  theTargetMass = aTargetMass;
52  theTargetA = aTargetA;
53  theTargetZ = aTargetZ;
54  }
G4NeutronHPKallbachMannSyst::~G4NeutronHPKallbachMannSyst ( )
inline

Definition at line 56 of file G4NeutronHPKallbachMannSyst.hh.

56 {};

Member Function Documentation

G4double G4NeutronHPKallbachMannSyst::A ( G4double  anEnergy)

Definition at line 83 of file G4NeutronHPKallbachMannSyst.cc.

References C1, C3, python.hepunit::MeV, G4INCL::Math::min(), and SeparationEnergy().

Referenced by GetKallbachZero(), and Kallbach().

84 {
85  G4double result;
86  G4double C1 = 0.04/MeV;
87  G4double C2 = 1.8E-6/(MeV*MeV*MeV);
88  G4double C3 = 6.7E-7/(MeV*MeV*MeV*MeV);
89 
90  G4double epsa = anEnergy*theTargetMass/(theTargetMass+theIncidentMass);
91  G4int Ac = theTargetA+1;
92  G4int Nc = Ac - theTargetZ;
93  G4int AA = theTargetA;
94  G4int ZA = theTargetZ;
95  G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
96  G4double Et1 = 130*MeV;
97  G4double R1 = std::min(ea, Et1);
98  // theProductEnergy is still in CMS!!!
99  G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
100  G4int AB = theResidualA;
101  G4int ZB = theResidualZ;
102  G4double eb = epsb+SeparationEnergy(Ac, Nc, AB, ZB );
103  G4double X1 = R1*eb/ea;
104  G4double Et3 = 41*MeV;
105  G4double R3 = std::min(ea, Et3);
106  G4double X3 = R3*eb/ea;
107  G4double Ma = 1;
108  G4double mb(0);
109  G4int productA = theTargetA+1-theResidualA;
110  G4int productZ = theTargetZ-theResidualZ;
111  if(productZ==0)
112  {
113  mb = 0.5;
114  }
115  else if(productZ==1)
116  {
117  mb = 1;
118  }
119  else if(productZ==2)
120  {
121  mb = 2;
122  if(productA==3) mb=1;
123  }
124  else
125  {
126  throw G4HadronicException(__FILE__, __LINE__, "Severe error in the sampling of Kallbach-Mann Systematics");
127  }
128 
129  result = C1*X1 + C2*std::pow(X1, 3.) + C3*Ma*mb*std::pow(X3, 4.);
130  return result;
131 }
G4double SeparationEnergy(G4int Ac, G4int Nc, G4int AA, G4int ZA)
int G4int
Definition: G4Types.hh:78
#define C3
#define C1
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
G4double G4NeutronHPKallbachMannSyst::GetKallbachZero ( G4double  anEnergy)

Definition at line 71 of file G4NeutronHPKallbachMannSyst.cc.

References A().

Referenced by Sample().

72 {
73  G4double result;
74  if ( theCompoundFraction == 1 )
75  {
76  //G4cout << "080730b Adjust theCompoundFraction " << G4endl;
77  theCompoundFraction *= (1-1.0e-15);
78  }
79  result = 0.5 * (1./A(anEnergy)) * std::log((1-theCompoundFraction)/(1+theCompoundFraction));
80  return result;
81 }
double G4double
Definition: G4Types.hh:76
G4double G4NeutronHPKallbachMannSyst::Kallbach ( G4double  cosTh,
G4double  anEnergy 
)

Definition at line 61 of file G4NeutronHPKallbachMannSyst.cc.

References A().

Referenced by Sample().

62 {
63  // Kallbach-Mann systematics without normalization.
64  G4double result;
65  G4double theX = A(anEnergy)*cosTh;
66  result = 0.5*(std::exp( theX)*(1+theCompoundFraction)
67  +std::exp(-theX)*(1-theCompoundFraction));
68  return result;
69 }
double G4double
Definition: G4Types.hh:76
G4double G4NeutronHPKallbachMannSyst::Sample ( G4double  anEnergy)

Definition at line 37 of file G4NeutronHPKallbachMannSyst.cc.

References G4UniformRand, GetKallbachZero(), Kallbach(), and G4INCL::Math::max().

Referenced by G4NeutronHPContAngularPar::Sample().

38 {
39  G4double result;
40 
41  G4double zero = GetKallbachZero(anEnergy);
42  if(zero>1) zero=1.;
43  if(zero<-1)zero=-1.;
44  G4double max = Kallbach(zero, anEnergy);
45  double upper = Kallbach(1., anEnergy);
46  double lower = Kallbach(-1., anEnergy);
47  if(upper>max) max=upper;
48  if(lower>max) max=lower;
49  G4double value, random;
50  do
51  {
52  result = 2.*G4UniformRand()-1;
53  value = Kallbach(result, anEnergy)/max;
54  random = G4UniformRand();
55  }
56  while(random>value);
57 
58  return result;
59 }
#define G4UniformRand()
Definition: Randomize.hh:87
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double Kallbach(G4double cosTh, G4double anEnergy)
const XML_Char int const XML_Char * value
G4double GetKallbachZero(G4double anEnergy)
double G4double
Definition: G4Types.hh:76
G4double G4NeutronHPKallbachMannSyst::SeparationEnergy ( G4int  Ac,
G4int  Nc,
G4int  AA,
G4int  ZA 
)

Definition at line 133 of file G4NeutronHPKallbachMannSyst.cc.

References python.hepunit::MeV.

Referenced by A().

134 {
135  G4double result;
136  G4int NA = AA-ZA;
137  G4int Zc = Ac-Nc;
138  result = 15.68*(Ac-AA);
139  result += -28.07*((Nc-Zc)*(Nc-Zc)/Ac - (NA-ZA)*(NA-ZA)/AA);
140  result += -18.56*(std::pow(G4double(Ac), 2./3.) - std::pow(G4double(AA), 2./3.));
141  result += 33.22*((Nc-Zc)*(Nc-Zc)/std::pow(G4double(Ac), 4./3.) - (NA-ZA)*(NA-ZA)/std::pow(G4double(AA), 4./3.));
142  result += -0.717*(Zc*Zc/std::pow(G4double(Ac),1./3.)-ZA*ZA/std::pow(G4double(AA),1./3.));
143  result += 1.211*(Zc*Zc/Ac-ZA*ZA/AA);
144  G4double totalBinding(0);
145  G4int productA = theTargetA+1-theResidualA;
146  G4int productZ = theTargetZ-theResidualZ;
147  if(productZ==0&&productA==1) totalBinding=0;
148  if(productZ==1&&productA==1) totalBinding=0;
149  if(productZ==1&&productA==2) totalBinding=2.22;
150  if(productZ==1&&productA==3) totalBinding=8.48;
151  if(productZ==2&&productA==3) totalBinding=7.72;
152  if(productZ==2&&productA==4) totalBinding=28.3;
153  result += -totalBinding;
154  result *= MeV;
155  return result;
156 }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

The documentation for this class was generated from the following files: