ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ElasticHadrNucleusHE.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 // G4ElasticHadrNucleusHe.hh
27 
28 // The generator of high energy hadron-nucleus elastic scattering
29 // The hadron kinetic energy T > 1 GeV
30 // N.Starkov 2003.
31 //
32 // 19.11.05 The HE elastic scattering on proton is added (N.Starkov)
33 // 16.11.06 General redesign (N.Starkov)
34 // 23.11.06 General cleanup, ONQ0=3 (V.Ivanchenko)
35 // 15.05.07 Redesign and cleanup (V.Ivanchenko)
36 // 18.05.07 Cleanup (V.Grichine)
37 // 19.04.12 Fixed reproducibility violation (A.Ribon)
38 // 12.06.12 Fixed warnings of shadowed variables (A.Ribon)
39 //
40 
41 #ifndef G4ElasticHadrNucleusHE_h
42 #define G4ElasticHadrNucleusHE_h 1
43 
44 #include <vector>
45 
46 #include "globals.hh"
47 #include "G4ParticleDefinition.hh"
48 #include "G4ParticleChange.hh"
49 #include "G4Nucleus.hh"
50 #include "G4HadronElastic.hh"
51 #include "G4Threading.hh"
52 
53 class G4NistManager;
54 
55 static const G4int NHADRONS = 26; // Number of allowed hadrons
56 static const G4int ONQ2 = 102; // Number of points on Q2
57 static const G4int NENERGY = 24;
58 static const G4int ZMAX = 93;
59 
61 
63 {
64 
66 
67 public:
68 
70  const G4double* e);
71 
73 
74 private:
75 
77 
78  // hide assignment operator
81 
87  std::vector<G4double> fCumProb[NENERGY];
88 };
89 
91 
93 {
94 public:
95 
96  explicit G4ElasticHadrNucleusHE(const G4String& name = "hElasticGlauber");
97 
98  ~G4ElasticHadrNucleusHE() override;
99 
101  G4int Z, G4int A) override;
102 
103  void InitialiseModel() override;
104 
105  void ModelDescription(std::ostream&) const override;
106 
107 private:
108 
109  G4double HadronNucleusQ2_2(const G4ElasticData *pElD, G4double plabGeV,
110  G4double tmax);
111 
112  void DefineHadronValues(G4int Z);
113  G4int FillFq2(G4int A);
114 
116 
117  G4double GetQ2_2(G4int N, G4int Nmax,
118  const std::vector<G4double>& F, G4double rand);
119 
121 
122  void InterpolateHN(G4int n, const G4double EnP[],
123  const G4double C0P[], const G4double C1P[],
124  const G4double B0P[], const G4double B1P[]);
125 
126  G4double GetFt(G4double Q2);
127 
129 
130  void Binom();
131 
132  void FillData(const G4ParticleDefinition* p, G4int idx, G4int Z);
133 
134  inline G4double LineInterpol(G4double p0, G4double p2,
136 
137  inline G4double GetBinomCof( G4int n, G4int m );
138 
139  // hide assignment operator
142 
143  // fields
147  static const G4int fHadronCode[NHADRONS];
148  static const G4int fHadronType[NHADRONS];
149  static const G4int fHadronType1[NHADRONS];
150 
151  // momemtum limits
154 
155  // projectile kinematics in GeV
161 
162  // elastic parameters
165 
166  // momentum limits for different models of hadron/nucleon scatetring
168 
169  // parameterisation of scattering
172 
174 
175  // nucleaus parameters
177 
181  static G4double fBinom[240][240];
182 
186 
187 #ifdef G4MULTITHREADED
188  static G4Mutex elasticMutex;
189 #endif
190 
191 };
192 
194 
195 inline
198  G4double p)
199 {
200  return c1+(p-p1)*(c2-c1)/(p2-p1);
201 }
202 
204 
205 inline
207 {
208  return (numN >= numM && numN < 240) ? fBinom[numN][numM] : 0.0;
209 }
210 
212 
213 #endif