Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ElasticHadrNucleusHE.hh
이 파일의 문서화 페이지로 가기
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:
84 
85  // hide assignment operator
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 
175 
176  // protection energy and momemtum
177 
181 
182  // transition between internal and CLHEP units
183 
189  G4double protonM2; // GeV^2
190 
191  // projectile kinematics in GeV
192 
199 
200  // nucleaus parameters
201 
204 
205  // elastic parameters
206 
209 
210  // momentum limits for different models of hadron/nucleon scatetring
212 
213  // parameterisation of scattering
214 
217 
219 
222 
223  G4double SetBinom[240][240];
224 
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
static G4ElasticData * SetOfElasticData[NHADRONS][ZMAX]
const XML_Char * name
Definition: expat.h:151
void DefineNucleusParameters(G4double A)
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double maxQ2[NENERGY]
static const G4int ZMAX
static const G4int NHADRONS
const char * p
Definition: xmltok.h:285
const G4ParticleDefinition * hadr
G4ElasticData & operator=(const G4ElasticData &right)
G4double HadrNucDifferCrSec(G4int Z, G4int Nucleus, G4double Q2)
static const G4int NENERGY
G4double GetQ2_2(G4int N, G4double *Q, G4double *F, G4double R)
G4ElasticHadrNucleusHE & operator=(const G4ElasticHadrNucleusHE &right)
void InterpolateHN(G4int n, const G4double EnP[], const G4double C0P[], const G4double C1P[], const G4double B0P[], const G4double B1P[])
Float_t Z
static const G4int ONQ2
static const G4int ONQ0
static constexpr double m
Definition: G4SIunits.hh:129
double G4double
Definition: G4Types.hh:76
**D E S C R I P T I O N
G4double TableQ2[ONQ2]
G4double GetDistrFun(G4double Q2)
TCanvas * c2
Definition: plot_hist.C:75
G4double TableCrossSec[NQTABLE]
Double_t R
G4double HadronProtonQ2(const G4ParticleDefinition *aHadron, G4double inLabMom)
G4double GetBinomCof(G4int n, G4int m)
double A(double temperature)
G4ElasticData(const G4ParticleDefinition *h, G4int Z, G4double A, G4double *eGeV)
G4double GetLightFq2(G4int Z, G4int A, G4double Q)
static const G4int NQTABLE
int G4int
Definition: G4Types.hh:78
G4double HadronNucleusQ2_2(G4ElasticData *pElD, G4int Z, G4double plabGeV, G4double tmax)
void GetKinematics(const G4ParticleDefinition *aHadron, G4double MomentumH)
static G4Mutex eldata_m[NHADRONS][ZMAX]
G4double LineInterpol(G4double p0, G4double p2, G4double c1, G4double c2, G4double p)
G4ElasticHadrNucleusHE(const G4String &name="hElasticGlauber")
G4double GetQ2(G4double Ran)
Char_t n[5]
static double Q[]
virtual void ModelDescription(std::ostream &) const
const G4ParticleDefinition * Hadron()
G4double SampleT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetHeavyFq2(G4int Z, G4int Nucleus, G4double *LineFq2)
std::mutex G4Mutex
Definition: G4Threading.hh:84