Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ElasticHadrNucleusHE.hh
Go to the documentation of this file.
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 //
27 // $Id: G4ElasticHadrNucleusHE.hh 90756 2015-06-09 07:43:33Z gcosmo $
28 //
29 // G4ElasticHadrNucleusHe.hh
30 
31 // The generator of high energy hadron-nucleus elastic scattering
32 // The hadron kinetic energy T > 1 GeV
33 // N. Starkov 2003.
34 //
35 // 19.05.04 Variant for G4 6.1: The 'ApplyYourself' was changed
36 // 19.11.05 The HE elastic scattering on proton is added (N.Starkov)
37 // 16.11.06 General redesign (N.Starkov)
38 // 23.11.06 General cleanup, ONQ0=3 (V.Ivanchenko)
39 // 15.05.07 Redesign and cleanup (V.Ivanchenko)
40 // 18.05.07 Cleanup (V.Grichine)
41 // 19.04.12 Fixed reproducibility violation (A.Ribon)
42 // 12.06.12 Fixed warnings of shadowed variables (A.Ribon)
43 //
44 
45 #ifndef G4ElasticHadrNucleusHE_h
46 #define G4ElasticHadrNucleusHE_h 1
47 
48 #include <vector>
49 
50 #include "globals.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ParticleChange.hh"
53 #include "G4Nucleus.hh"
54 #include "G4HadronElastic.hh"
55 
56 class G4NistManager;
57 
58 static const G4int NHADRONS = 26; // Number of hadrons for which model is applied
59 static const G4int ONQ0 = 5; // The initial number of steps on Q2
60 static const G4int ONQ2 = 100; // The total number of steps on Q2
61 static const G4int NENERGY = 30;
62 static const G4int ZMAX = 93;
63 static const G4int NQTABLE = NENERGY*ONQ2;
64 
65 
67 //
68 //
69 
71 {
72 public:
73 
75  G4int Z, G4double A, G4double* eGeV);
76 
78 
79  const G4ParticleDefinition* Hadron() {return hadr;}
80 
81 private:
82  void DefineNucleusParameters(G4double A);
83  const G4ParticleDefinition* hadr;
84 
85  // hide assignment operator
86  G4ElasticData & operator=(const G4ElasticData &right);
88 
89 public:
99 
102 };
103 
105 //
106 //
107 
109 {
110 public:
111 
112  G4ElasticHadrNucleusHE(const G4String& name = "hElasticGlauber");
113 
114  virtual ~G4ElasticHadrNucleusHE();
115 
117  G4double plab,
118  G4int Z, G4int A);
119 
120  virtual void ModelDescription(std::ostream&) const;
121 
123  G4double plab,
124  G4int Z, G4int A);
125 
127  G4double plabGeV, G4double tmax);
128 
129  void DefineHadronValues(G4int Z);
130 
132  G4double GetHeavyFq2(G4int Z, G4int Nucleus, G4double *LineFq2);
133 
135  G4double * F, G4double R);
136 
139  G4double p);
140 
142 
143  void InterpolateHN(G4int n, const G4double EnP[],
144  const G4double C0P[], const G4double C1P[],
145  const G4double B0P[], const G4double B1P[]);
146 
147  // hide assignment operator
150 
152 
153  G4double GetFt(G4double Q2);
154 
156 
157  G4double GetQ2(G4double Ran);
158 
160  G4double inLabMom);
161 
162  void GetKinematics(const G4ParticleDefinition * aHadron,
163  G4double MomentumH);
164 private:
165 
166  void Binom();
167 
168  // fields
169 
170  G4int iHadrCode;
171  G4int iHadron;
172  G4int HadronCode[NHADRONS];
173  G4int HadronType[NHADRONS];
174  G4int HadronType1[NHADRONS];
175 
176  // protection energy and momemtum
177 
178  G4double lowestEnergyLimit;
179  G4double plabLowLimit;
180  G4double dQ2;
181 
182  // transition between internal and CLHEP units
183 
184  G4double MbToGeV2;
185  G4double sqMbToGeV;
186  G4double Fm2ToGeV2;
187  G4double GeV2;
188  G4double protonM; // GeV
189  G4double protonM2; // GeV^2
190 
191  // projectile kinematics in GeV
192 
193  G4double hMass;
194  G4double hMass2;
195  G4double hLabMomentum;
196  G4double hLabMomentum2;
197  G4double MomentumCM;
198  G4double HadrEnergy;
199 
200  // nucleaus parameters
201 
202  G4double R1, R2, Pnucl, Aeff;
203  G4int NumbN;
204 
205  // elastic parameters
206 
207  G4double HadrTot, HadrSlope, HadrReIm, TotP,
208  DDSect2, DDSect3, ConstU, FmaxT;
209 
210  // momentum limits for different models of hadron/nucleon scatetring
211  G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
212 
213  // parameterisation of scattering
214 
215  G4double Slope1, Slope2, Coeff1, Coeff2, MaxTR;
216  G4double Slope0, Coeff0;
217 
218  G4double aAIm, aDIm, Dtot11;
219 
220  G4double Energy[NENERGY];
221  G4double LowEdgeEnergy[NENERGY];
222 
223  G4double SetBinom[240][240];
224 
225  static G4ElasticData* SetOfElasticData[NHADRONS][ZMAX];
226  G4NistManager* nistManager;
227  static G4Mutex eldata_m[NHADRONS][ZMAX];
228 
229 }; // The end of the class description
230 
232 
233 inline
236  G4double p)
237 {
238 // G4cout<<" LineInterpol: p1 p2 c1 c2 "<<p1<<" "<<p2<<" "
239 // <<c1<<" "<<c2<<" c "<<c1+(p-p1)*(c2-c1)/(p2-p1)<<G4endl;
240 
241 
242  return c1+(p-p1)*(c2-c1)/(p2-p1);
243 }
244 
246 
247 inline
249  const G4double C0P[], const G4double C1P[],
250  const G4double B0P[], const G4double B1P[])
251 {
252  G4int i;
253 
254  for(i=1; i<n; i++) if(hLabMomentum <= EnP[i]) break;
255 
256  if(i == n) i = n - 1;
257 
258  Coeff0 = LineInterpol(EnP[i], EnP[i-1], C0P[i], C0P[i-1], hLabMomentum);
259  Coeff1 = LineInterpol(EnP[i], EnP[i-1], C1P[i], C1P[i-1], hLabMomentum);
260  Slope0 = LineInterpol(EnP[i], EnP[i-1], B0P[i], B0P[i-1], hLabMomentum);
261  Slope1 = LineInterpol(EnP[i], EnP[i-1], B1P[i], B1P[i-1], hLabMomentum);
262 
263 // G4cout<<" InterpolHN: n i "<<n<<" "<<i<<" Mom "
264 // <<hLabMomentum<<G4endl;
265 }
266 
268 
269 inline
271 {
272  if ( numN >= numM && numN <= 240) return SetBinom[numN][numM];
273  else return 0.;
274 }
275 
277 
278 inline
280 {
281  return GetFt(Q2)/FmaxT;
282 }
283 
284 #endif
G4double LineInterpol(G4double p0, G4double p2, G4double c1, G4double c2, G4double p)
const XML_Char * name
Definition: expat.h:151
static c2_factory< G4double > c2
G4double SampleT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
static const G4int ONQ2
static const G4int ONQ0
G4double GetQ2(G4double Ran)
G4double GetBinomCof(G4int n, G4int m)
const char * p
Definition: xmltok.h:285
G4double GetDistrFun(G4double Q2)
const G4ParticleDefinition * Hadron()
G4double HadronProtonQ2(const G4ParticleDefinition *aHadron, G4double inLabMom)
static double Q[]
int G4int
Definition: G4Types.hh:78
void GetKinematics(const G4ParticleDefinition *aHadron, G4double MomentumH)
static const G4int ZMAX
double A(double temperature)
static constexpr double m
Definition: G4SIunits.hh:129
G4ElasticHadrNucleusHE(const G4String &name="hElasticGlauber")
G4double TableCrossSec[NQTABLE]
G4double HadrNucDifferCrSec(G4int Z, G4int Nucleus, G4double Q2)
G4double maxQ2[NENERGY]
const G4int n
G4ElasticHadrNucleusHE & operator=(const G4ElasticHadrNucleusHE &right)
static const G4int NENERGY
G4int G4Mutex
Definition: G4Threading.hh:173
static const G4int NQTABLE
G4ElasticData(const G4ParticleDefinition *h, G4int Z, G4double A, G4double *eGeV)
G4double GetLightFq2(G4int Z, G4int A, G4double Q)
virtual void ModelDescription(std::ostream &) const
G4double GetHeavyFq2(G4int Z, G4int Nucleus, G4double *LineFq2)
G4double TableQ2[ONQ2]
**D E S C R I P T I O N
Definition: HEPEvtcom.cc:77
G4double GetQ2_2(G4int N, G4double *Q, G4double *F, G4double R)
G4double HadronNucleusQ2_2(G4ElasticData *pElD, G4int Z, G4double plabGeV, G4double tmax)
void InterpolateHN(G4int n, const G4double EnP[], const G4double C0P[], const G4double C1P[], const G4double B0P[], const G4double B1P[])
double G4double
Definition: G4Types.hh:76
static const G4int NHADRONS
tuple c1
Definition: plottest35.py:14
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)