Geant4_10
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 66892 2013-01-17 10:57:59Z gunter $
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 NQTABLE = NENERGY*ONQ2;
63 
64 
66 //
67 //
68 
70 {
71 public:
72 
74  G4int Z, G4double A, G4double* eGeV);
75 
77 
78  const G4ParticleDefinition* Hadron() {return hadr;}
79 
80 private:
81  void DefineNucleusParameters(G4double A);
82  const G4ParticleDefinition* hadr;
83 
84  // hide assignment operator
85  G4ElasticData & operator=(const G4ElasticData &right);
87 
88 public:
96  G4int dnkE[NENERGY];
97  G4double maxQ2[NENERGY];
98  //G4double CrossSecMaxQ2[NENERGY];
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 Description() 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 
138  G4double c1, G4double c2,
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  G4ElasticData* SetOfElasticData[NHADRONS][93];
226  G4NistManager* nistManager;
227 
228 }; // The end of the class description
229 
231 
232 inline
234  G4double c1, G4double c2,
235  G4double p)
236 {
237 // G4cout<<" LineInterpol: p1 p2 c1 c2 "<<p1<<" "<<p2<<" "
238 // <<c1<<" "<<c2<<" c "<<c1+(p-p1)*(c2-c1)/(p2-p1)<<G4endl;
239 
240 
241  return c1+(p-p1)*(c2-c1)/(p2-p1);
242 }
243 
245 
246 inline
248  const G4double C0P[], const G4double C1P[],
249  const G4double B0P[], const G4double B1P[])
250 {
251  G4int i;
252 
253  for(i=1; i<n; i++) if(hLabMomentum <= EnP[i]) break;
254 
255  if(i == n) i = n - 1;
256 
257  Coeff0 = LineInterpol(EnP[i], EnP[i-1], C0P[i], C0P[i-1], hLabMomentum);
258  Coeff1 = LineInterpol(EnP[i], EnP[i-1], C1P[i], C1P[i-1], hLabMomentum);
259  Slope0 = LineInterpol(EnP[i], EnP[i-1], B0P[i], B0P[i-1], hLabMomentum);
260  Slope1 = LineInterpol(EnP[i], EnP[i-1], B1P[i], B1P[i-1], hLabMomentum);
261 
262 // G4cout<<" InterpolHN: n i "<<n<<" "<<i<<" Mom "
263 // <<hLabMomentum<<G4endl;
264 }
265 
267 
268 inline
270 {
271  if ( numN >= numM && numN <= 240) return SetBinom[numN][numM];
272  else return 0.;
273 }
274 
276 
277 inline
279 {
280  return GetFt(Q2)/FmaxT;
281 }
282 
283 #endif
G4double LineInterpol(G4double p0, G4double p2, G4double c1, G4double c2, G4double p)
G4double SampleT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
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)
const XML_Char * name
Definition: expat.h:151
TCanvas * c1
Definition: plotHisto.C:7
int G4int
Definition: G4Types.hh:78
void GetKinematics(const G4ParticleDefinition *aHadron, G4double MomentumH)
Char_t n[5]
Float_t Z
Definition: plot.C:39
G4ElasticHadrNucleusHE(const G4String &name="hElasticGlauber")
G4double TableCrossSec[NQTABLE]
G4double HadrNucDifferCrSec(G4int Z, G4int Nucleus, G4double Q2)
G4double maxQ2[NENERGY]
virtual void Description() const
G4ElasticHadrNucleusHE & operator=(const G4ElasticHadrNucleusHE &right)
G4ElasticData(const G4ParticleDefinition *h, G4int Z, G4double A, G4double *eGeV)
G4double GetLightFq2(G4int Z, G4int A, G4double Q)
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
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)