Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPKallbachMannSyst Class Reference

#include <G4ParticleHPKallbachMannSyst.hh>

Public Member Functions

 G4ParticleHPKallbachMannSyst (G4double aCompoundFraction, G4double anIncidentEnergy, G4double anIncidentMass, G4double aProductEnergy, G4double aProductMass, G4double aResidualMass, G4int aResidualA, G4int aResidualZ, G4double aTargetMass, G4int aTargetA, G4int aTargetZ)
 
 ~G4ParticleHPKallbachMannSyst ()
 
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 34 of file G4ParticleHPKallbachMannSyst.hh.

Constructor & Destructor Documentation

G4ParticleHPKallbachMannSyst::G4ParticleHPKallbachMannSyst ( 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 38 of file G4ParticleHPKallbachMannSyst.hh.

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

Definition at line 57 of file G4ParticleHPKallbachMannSyst.hh.

57 {};

Member Function Documentation

G4double G4ParticleHPKallbachMannSyst::A ( G4double  anEnergy)

Definition at line 96 of file G4ParticleHPKallbachMannSyst.cc.

97 {
99  G4double C1 = 0.04/MeV;
100  G4double C2 = 1.8E-6/(MeV*MeV*MeV);
101  G4double C3 = 6.7E-7/(MeV*MeV*MeV*MeV);
102 
103  G4double epsa = anEnergy*theTargetMass/(theTargetMass+theIncidentMass);
104  G4int Ac = theTargetA+1;
105  G4int Nc = Ac - theTargetZ;
106  G4int AA = theTargetA;
107  G4int ZA = theTargetZ;
108  G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
109  G4double Et1 = 130*MeV;
110  G4double R1 = std::min(ea, Et1);
111  // theProductEnergy is still in CMS!!!
112  G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
113  G4int AB = theResidualA;
114  G4int ZB = theResidualZ;
115  G4double eb = epsb+SeparationEnergy(Ac, Nc, AB, ZB );
116  G4double X1 = R1*eb/ea;
117  G4double Et3 = 41*MeV;
118  G4double R3 = std::min(ea, Et3);
119  G4double X3 = R3*eb/ea;
120  G4double Ma = 1;
121  G4double mb(0);
122  G4int productA = theTargetA+1-theResidualA;
123  G4int productZ = theTargetZ-theResidualZ;
124  if(productZ==0)
125  {
126  mb = 0.5;
127  }
128  else if(productZ==1)
129  {
130  mb = 1;
131  }
132  else if(productZ==2)
133  {
134  mb = 2;
135  if(productA==3) mb=1;
136  }
137  else
138  {
139  throw G4HadronicException(__FILE__, __LINE__, "Severe error in the sampling of Kallbach-Mann Systematics");
140  }
141 
142  //result = C1*X1 + C2*G4Pow::GetInstance()->powA(X1, 3.) + C3*Ma*mb*G4Pow::GetInstance()->powA(X3, 4.);
143  result = C1*X1 + C2*G4Pow::GetInstance()->powN(X1, 3) + C3*Ma*mb*G4Pow::GetInstance()->powN(X3, 4);
144  return result;
145 }
G4double G4ParticleHPJENDLHEData::G4double result
const double C2
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:128
const double C1
int G4int
Definition: G4Types.hh:78
#define C3
G4double SeparationEnergy(G4int Ac, G4int Nc, G4int AA, G4int ZA)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4ParticleHPKallbachMannSyst::GetKallbachZero ( G4double  anEnergy)

Definition at line 84 of file G4ParticleHPKallbachMannSyst.cc.

85 {
87  if ( theCompoundFraction == 1 )
88  {
89  //G4cout << "080730b Adjust theCompoundFraction " << G4endl;
90  theCompoundFraction *= (1-1.0e-15);
91  }
92  result = 0.5 * (1./A(anEnergy)) * G4Log((1-theCompoundFraction)/(1+theCompoundFraction));
93  return result;
94 }
G4double G4ParticleHPJENDLHEData::G4double result
G4double G4Log(G4double x)
Definition: G4Log.hh:230
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4ParticleHPKallbachMannSyst::Kallbach ( G4double  cosTh,
G4double  anEnergy 
)

Definition at line 74 of file G4ParticleHPKallbachMannSyst.cc.

75 {
76  // Kallbach-Mann systematics without normalization.
78  G4double theX = A(anEnergy)*cosTh;
79  result = 0.5*(G4Exp( theX)*(1+theCompoundFraction)
80  +G4Exp(-theX)*(1-theCompoundFraction));
81  return result;
82 }
G4double G4ParticleHPJENDLHEData::G4double result
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4ParticleHPKallbachMannSyst::Sample ( G4double  anEnergy)

Definition at line 42 of file G4ParticleHPKallbachMannSyst.cc.

43 {
45 
46  G4double zero = GetKallbachZero(anEnergy);
47  if(zero>1) zero=1.;
48  if(zero<-1)zero=-1.;
49  G4double max = Kallbach(zero, anEnergy);
50  double upper = Kallbach(1., anEnergy);
51  double lower = Kallbach(-1., anEnergy);
52  if(upper>max) max=upper;
53  if(lower>max) max=lower;
54  G4double value, random;
55 
56  G4int icounter=0;
57  G4int icounter_max=1024;
58  do
59  {
60  icounter++;
61  if ( icounter > icounter_max ) {
62  G4cout << "Loop-counter exceeded the threshold value at " << __LINE__ << "th line of " << __FILE__ << "." << G4endl;
63  break;
64  }
65  result = 2.*G4UniformRand()-1;
66  value = Kallbach(result, anEnergy)/max;
67  random = G4UniformRand();
68  }
69  while(random>value); // Loop checking, 11.05.2015, T. Koi
70 
71  return result;
72 }
G4double G4ParticleHPJENDLHEData::G4double result
G4double GetKallbachZero(G4double anEnergy)
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
Definition: expat.h:331
T max(const T t1, const T t2)
brief Return the largest of the two arguments
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double Kallbach(G4double cosTh, G4double anEnergy)

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4ParticleHPKallbachMannSyst::SeparationEnergy ( G4int  Ac,
G4int  Nc,
G4int  AA,
G4int  ZA 
)

Definition at line 147 of file G4ParticleHPKallbachMannSyst.cc.

148 {
150  G4int NA = AA-ZA;
151  G4int Zc = Ac-Nc;
152  result = 15.68*(Ac-AA);
153  result += -28.07*((Nc-Zc)*(Nc-Zc)/Ac - (NA-ZA)*(NA-ZA)/AA);
154  //result += -18.56*(std::pow(G4double(Ac), 2./3.) - std::pow(G4double(AA), 2./3.));
155  result += -18.56*(G4Pow::GetInstance()->A23(G4double(Ac)) - G4Pow::GetInstance()->A23(G4double(AA)));
156  result += 33.22*((Nc-Zc)*(Nc-Zc)/G4Pow::GetInstance()->powA(G4double(Ac), 4./3.) - (NA-ZA)*(NA-ZA)/G4Pow::GetInstance()->powA(G4double(AA), 4./3.));
157  //result += -0.717*(Zc*Zc/std::pow(G4double(Ac),1./3.)-ZA*ZA/std::pow(G4double(AA),1./3.));
158  result += -0.717*(Zc*Zc/G4Pow::GetInstance()->A13(G4double(Ac))-ZA*ZA/G4Pow::GetInstance()->A13(G4double(AA)));
159  result += 1.211*(Zc*Zc/Ac-ZA*ZA/AA);
160  G4double totalBinding(0);
161  G4int productA = theTargetA+1-theResidualA;
162  G4int productZ = theTargetZ-theResidualZ;
163  if(productZ==0&&productA==1) totalBinding=0;
164  if(productZ==1&&productA==1) totalBinding=0;
165  if(productZ==1&&productA==2) totalBinding=2.22;
166  if(productZ==1&&productA==3) totalBinding=8.48;
167  if(productZ==2&&productA==3) totalBinding=7.72;
168  if(productZ==2&&productA==4) totalBinding=28.3;
169  result += -totalBinding;
170  result *= MeV;
171  return result;
172 }
G4double G4ParticleHPJENDLHEData::G4double result
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double powA(G4double A, G4double y) const
Definition: G4Pow.hh:259
int G4int
Definition: G4Types.hh:78
G4double A23(G4double A) const
Definition: G4Pow.hh:160
G4double A13(G4double A) const
Definition: G4Pow.hh:132
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:


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