source: trunk/source/processes/hadronic/models/coherent_elastic/include/G4ElasticHadrNucleusHE.hh@ 1036

Last change on this file since 1036 was 1007, checked in by garnier, 17 years ago

update to geant4.9.2

File size: 8.0 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//
27// $Id: G4ElasticHadrNucleusHE.hh,v 1.45 2007/12/19 18:27:16 vnivanch Exp $
28// GEANT4 tag $Name: geant4-09-02 $
29//
30// G4ElasticHadrNucleusHe.hh
31
32// The generator of high energy hadron-nucleus elastic scattering
33// The hadron kinetic energy T > 1 GeV
34// N. Starkov 2003.
35//
36// 19.05.04 Variant for G4 6.1: The 'ApplyYourself' was changed
37// 19.11.05 The HE elastic scattering on proton is added (N.Starkov)
38// 16.11.06 General redesign (N.Starkov)
39// 23.11.06 General cleanup, ONQ0=3 (V.Ivanchenko)
40// 15.05.07 Redesign and cleanup (V.Ivanchenko)
41// 18.05.07 Cleanup (V.Grichine)
42//
43
44#ifndef G4ElasticHadrNucleusHE_h
45#define G4ElasticHadrNucleusHE_h 1
46
47#include <vector>
48
49#include "globals.hh"
50#include "G4ParticleDefinition.hh"
51#include "G4ParticleChange.hh"
52#include "G4Nucleus.hh"
53
54#include "G4HadronicInteraction.hh"
55
56class G4NistManager;
57
58static const G4int NHADRONS = 26; // Number of hadrons for which model is applied
59static const G4int ONQ0 = 5; // The initial number of steps on Q2
60static const G4int ONQ2 = 100; // The total number of steps on Q2
61static const G4int NENERGY = 30;
62static const G4int NQTABLE = NENERGY*ONQ2;
63
64
65///////////////////////////////////////////////////////////////////////
66//
67//
68
69class G4ElasticData
70{
71public:
72
73 G4ElasticData(const G4ParticleDefinition* h,
74 G4int Z, G4double A, G4double* eGeV);
75
76 ~G4ElasticData(){}
77
78 const G4ParticleDefinition* Hadron() {return hadr;}
79
80private:
81 void DefineNucleusParameters(G4double A);
82 const G4ParticleDefinition* hadr;
83
84 // hide assignment operator
85 G4ElasticData & operator=(const G4ElasticData &right);
86 G4ElasticData(const G4ElasticData&);
87
88public:
89 G4int AtomicWeight;
90 G4double R1, R2, Pnucl, Aeff;
91 G4double limitQ2;
92 G4double massGeV;
93 G4double mass2GeV2;
94 G4double massA;
95 G4double massA2;
96 G4int dnkE[NENERGY];
97 G4double maxQ2[NENERGY];
98 G4double CrossSecMaxQ2[NENERGY];
99
100 G4double TableQ2[ONQ2];
101 G4double TableCrossSec[NQTABLE];
102};
103
104/////////////////////////////////////////////////////////////////////
105//
106//
107
108class G4ElasticHadrNucleusHE : public G4HadronicInteraction
109{
110public:
111
112 G4ElasticHadrNucleusHE();
113
114 virtual ~G4ElasticHadrNucleusHE();
115
116 G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack,
117 G4Nucleus& G4Nucleus);
118
119 G4double SampleT(const G4ParticleDefinition* p, G4double plab,
120 G4int Z, G4int A);
121 G4double HadronNucleusQ2_2(G4ElasticData * pElD, G4int Z,
122 G4double plabGeV, G4double tmax);
123
124 void DefineHadronValues(G4int Z);
125
126 G4double GetLightFq2(G4int Z, G4int A, G4double Q);
127 G4double GetHeavyFq2(G4int Nucleus, G4double *LineFq2);
128
129 G4double GetQ2_2(G4int N, G4double * Q,
130 G4double * F, G4double R);
131
132 G4double LineInterpol(G4double p0, G4double p2,
133 G4double c1, G4double c2,
134 G4double p);
135
136 G4double HadrNucDifferCrSec(G4int Nucleus, G4double Q2);
137
138 void InterpolateHN(G4int n, const G4double EnP[],
139 const G4double C0P[], const G4double C1P[],
140 const G4double B0P[], const G4double B1P[]);
141
142 // hide assignment operator
143 G4ElasticHadrNucleusHE & operator=(const G4ElasticHadrNucleusHE &right);
144 G4ElasticHadrNucleusHE(const G4ElasticHadrNucleusHE&);
145
146 G4double GetBinomCof( G4int n, G4int m );
147
148 G4double GetFt(G4double Q2);
149
150 G4double GetDistrFun(G4double Q2);
151
152 G4double GetQ2(G4double Ran);
153
154 G4double HadronProtonQ2(const G4ParticleDefinition * aHadron,
155 G4double inLabMom);
156
157 void GetKinematics(const G4ParticleDefinition * aHadron,
158 G4double MomentumH);
159private:
160
161 void Binom();
162
163 // fields
164
165 G4int iHadrCode;
166 G4int iHadron;
167 G4int HadronCode[NHADRONS];
168 G4int HadronType[NHADRONS];
169 G4int HadronType1[NHADRONS];
170
171 // protection energy and momemtum
172
173 G4double lowestEnergyLimit;
174 G4double plabLowLimit;
175 G4double dQ2;
176
177 // transition between internal and CLHEP units
178
179 G4double MbToGeV2;
180 G4double sqMbToGeV;
181 G4double Fm2ToGeV2;
182 G4double GeV2;
183 G4double protonM; // GeV
184 G4double protonM2; // GeV^2
185
186 // projectile kinematics in GeV
187
188 G4double hMass;
189 G4double hMass2;
190 G4double hLabMomentum;
191 G4double hLabMomentum2;
192 G4double MomentumCM;
193 G4double HadrEnergy;
194
195 // nucleaus parameters
196
197 G4double R1, R2, Pnucl, Aeff;
198 G4int NumbN;
199
200 // elastic parameters
201
202 G4double HadrTot, HadrSlope, HadrReIm, TotP,
203 DDSect2, DDSect3, ConstU, FmaxT;
204
205 // momentum limits for different models of hadron/nucleon scatetring
206 G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
207
208 // parameterisation of scattering
209
210 G4double Slope1, Slope2, Coeff1, Coeff2, MaxTR;
211 G4double Slope0, Coeff0;
212
213 G4double aAIm, aDIm, Dtot11;
214
215 G4double Energy[NENERGY];
216 G4double LowEdgeEnergy[NENERGY];
217
218 G4double SetBinom[240][240];
219
220 G4ElasticData* SetOfElasticData[NHADRONS][93];
221 G4NistManager* nistManager;
222
223}; // The end of the class description
224
225////////////////////////////////////////////////////////////////
226
227inline
228G4double G4ElasticHadrNucleusHE::LineInterpol(G4double p1, G4double p2,
229 G4double c1, G4double c2,
230 G4double p)
231{
232// G4cout<<" LineInterpol: p1 p2 c1 c2 "<<p1<<" "<<p2<<" "
233// <<c1<<" "<<c2<<" c "<<c1+(p-p1)*(c2-c1)/(p2-p1)<<G4endl;
234
235
236 return c1+(p-p1)*(c2-c1)/(p2-p1);
237}
238
239////////////////////////////////////////////////////////////////
240
241inline
242void G4ElasticHadrNucleusHE::InterpolateHN(G4int n, const G4double EnP[],
243 const G4double C0P[], const G4double C1P[],
244 const G4double B0P[], const G4double B1P[])
245{
246 G4int i;
247
248 for(i=1; i<n; i++) if(hLabMomentum <= EnP[i]) break;
249
250 if(i == n) i = n - 1;
251
252 Coeff0 = LineInterpol(EnP[i], EnP[i-1], C0P[i], C0P[i-1], hLabMomentum);
253 Coeff1 = LineInterpol(EnP[i], EnP[i-1], C1P[i], C1P[i-1], hLabMomentum);
254 Slope0 = LineInterpol(EnP[i], EnP[i-1], B0P[i], B0P[i-1], hLabMomentum);
255 Slope1 = LineInterpol(EnP[i], EnP[i-1], B1P[i], B1P[i-1], hLabMomentum);
256
257// G4cout<<" InterpolHN: n i "<<n<<" "<<i<<" Mom "
258// <<hLabMomentum<<G4endl;
259}
260
261////////////////////////////////////////////////////////////////
262
263inline
264G4double G4ElasticHadrNucleusHE::GetBinomCof( G4int n, G4int m )
265{
266 if ( n >= m && n <= 240) return SetBinom[n][m];
267 else return 0.;
268}
269
270////////////////////////////////////////////////////////////////
271
272inline
273G4double G4ElasticHadrNucleusHE::GetDistrFun(G4double Q2)
274{
275 return GetFt(Q2)/FmaxT;
276}
277
278#endif
Note: See TracBrowser for help on using the repository browser.