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