| 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 | // $Id: G4EmCorrections.hh,v 1.10 2008/01/11 19:55:29 vnivanch Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-01-patch-02 $
|
|---|
| 28 | //
|
|---|
| 29 | // -------------------------------------------------------------------
|
|---|
| 30 | //
|
|---|
| 31 | // GEANT4 Class header file
|
|---|
| 32 | //
|
|---|
| 33 | //
|
|---|
| 34 | // File name: G4EmCorrections
|
|---|
| 35 | //
|
|---|
| 36 | // Author: Vladimir Ivanchenko
|
|---|
| 37 | //
|
|---|
| 38 | // Creation date: 13.01.2005
|
|---|
| 39 | //
|
|---|
| 40 | // Modifications:
|
|---|
| 41 | // 28.04.2006 General cleanup, add finite size corrections (V.Ivanchenko)
|
|---|
| 42 | // 13.05.2006 Add corrections for ion stopping (V.Ivanhcenko)
|
|---|
| 43 | //
|
|---|
| 44 | // Class Description:
|
|---|
| 45 | //
|
|---|
| 46 | // This class provides calculation of EM corrections to ionisation
|
|---|
| 47 | //
|
|---|
| 48 |
|
|---|
| 49 | // -------------------------------------------------------------------
|
|---|
| 50 | //
|
|---|
| 51 |
|
|---|
| 52 | #ifndef G4EmCorrections_h
|
|---|
| 53 | #define G4EmCorrections_h 1
|
|---|
| 54 |
|
|---|
| 55 | #include "globals.hh"
|
|---|
| 56 | #include "G4AtomicShells.hh"
|
|---|
| 57 | #include "G4ionEffectiveCharge.hh"
|
|---|
| 58 | #include "G4Material.hh"
|
|---|
| 59 | #include "G4ParticleDefinition.hh"
|
|---|
| 60 |
|
|---|
| 61 | class G4VEmModel;
|
|---|
| 62 | class G4PhysicsVector;
|
|---|
| 63 | class G4IonTable;
|
|---|
| 64 | class G4NistManager;
|
|---|
| 65 |
|
|---|
| 66 | class G4EmCorrections
|
|---|
| 67 | {
|
|---|
| 68 |
|
|---|
| 69 | public:
|
|---|
| 70 |
|
|---|
| 71 | G4EmCorrections();
|
|---|
| 72 |
|
|---|
| 73 | virtual ~G4EmCorrections();
|
|---|
| 74 |
|
|---|
| 75 | G4double HighOrderCorrections(const G4ParticleDefinition* p,
|
|---|
| 76 | const G4Material* material,
|
|---|
| 77 | G4double kineticEnergy);
|
|---|
| 78 |
|
|---|
| 79 | G4double Bethe(const G4ParticleDefinition* p,
|
|---|
| 80 | const G4Material* material,
|
|---|
| 81 | G4double kineticEnergy);
|
|---|
| 82 |
|
|---|
| 83 | G4double SpinCorrection(const G4ParticleDefinition* p,
|
|---|
| 84 | const G4Material* material,
|
|---|
| 85 | G4double kineticEnergy);
|
|---|
| 86 |
|
|---|
| 87 | G4double KShellCorrection(const G4ParticleDefinition* p,
|
|---|
| 88 | const G4Material* material,
|
|---|
| 89 | G4double kineticEnergy);
|
|---|
| 90 |
|
|---|
| 91 | G4double LShellCorrection(const G4ParticleDefinition* p,
|
|---|
| 92 | const G4Material* material,
|
|---|
| 93 | G4double kineticEnergy);
|
|---|
| 94 |
|
|---|
| 95 | G4double ShellCorrection(const G4ParticleDefinition* p,
|
|---|
| 96 | const G4Material* material,
|
|---|
| 97 | G4double kineticEnergy);
|
|---|
| 98 |
|
|---|
| 99 | G4double ShellCorrectionSTD(const G4ParticleDefinition* p,
|
|---|
| 100 | const G4Material* material,
|
|---|
| 101 | G4double kineticEnergy);
|
|---|
| 102 |
|
|---|
| 103 | G4double DensityCorrection(const G4ParticleDefinition* p,
|
|---|
| 104 | const G4Material* material,
|
|---|
| 105 | G4double kineticEnergy);
|
|---|
| 106 |
|
|---|
| 107 | G4double BarkasCorrection(const G4ParticleDefinition* p,
|
|---|
| 108 | const G4Material* material,
|
|---|
| 109 | G4double kineticEnergy);
|
|---|
| 110 |
|
|---|
| 111 | G4double BlochCorrection(const G4ParticleDefinition* p,
|
|---|
| 112 | const G4Material* material,
|
|---|
| 113 | G4double kineticEnergy);
|
|---|
| 114 |
|
|---|
| 115 | G4double MottCorrection(const G4ParticleDefinition* p,
|
|---|
| 116 | const G4Material* material,
|
|---|
| 117 | G4double kineticEnergy);
|
|---|
| 118 |
|
|---|
| 119 | G4double FiniteSizeCorrection(const G4ParticleDefinition* p,
|
|---|
| 120 | const G4Material* material,
|
|---|
| 121 | G4double kineticEnergy);
|
|---|
| 122 |
|
|---|
| 123 | G4double NuclearDEDX(const G4ParticleDefinition* p,
|
|---|
| 124 | const G4Material* material,
|
|---|
| 125 | G4double kineticEnergy,
|
|---|
| 126 | G4bool fluct = true);
|
|---|
| 127 |
|
|---|
| 128 | void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
|
|---|
| 129 | G4PhysicsVector& dVector);
|
|---|
| 130 |
|
|---|
| 131 | G4double EffectiveChargeCorrection(const G4ParticleDefinition*,
|
|---|
| 132 | const G4Material*,
|
|---|
| 133 | G4double);
|
|---|
| 134 |
|
|---|
| 135 | G4ionEffectiveCharge* GetIonEffectiveCharge(G4VEmModel* m = 0);
|
|---|
| 136 |
|
|---|
| 137 | G4int GetNumberOfStoppingVectors();
|
|---|
| 138 |
|
|---|
| 139 | private:
|
|---|
| 140 |
|
|---|
| 141 | void Initialise();
|
|---|
| 142 |
|
|---|
| 143 | G4PhysicsVector* InitialiseMaterial(const G4Material* mat);
|
|---|
| 144 |
|
|---|
| 145 | void SetupKinematics(const G4ParticleDefinition* p,
|
|---|
| 146 | const G4Material* material,
|
|---|
| 147 | G4double kineticEnergy);
|
|---|
| 148 |
|
|---|
| 149 | G4double KShell(G4double theta, G4double eta);
|
|---|
| 150 |
|
|---|
| 151 | G4double LShell(G4double theta, G4double eta);
|
|---|
| 152 |
|
|---|
| 153 | G4int Index(G4double x, G4double* y, G4int n);
|
|---|
| 154 |
|
|---|
| 155 | G4double Value(G4double xv, G4double x1, G4double x2, G4double y1, G4double y2);
|
|---|
| 156 |
|
|---|
| 157 | G4double Value2(G4double xv, G4double yv, G4double x1, G4double x2,
|
|---|
| 158 | G4double y1, G4double y2,
|
|---|
| 159 | G4double z11, G4double z21, G4double z12, G4double z22);
|
|---|
| 160 |
|
|---|
| 161 | G4double NuclearStoppingPower(G4double e, G4double z1, G4double z2,
|
|---|
| 162 | G4double m1, G4double m2);
|
|---|
| 163 |
|
|---|
| 164 | // hide assignment operator
|
|---|
| 165 | G4EmCorrections & operator=(const G4EmCorrections &right);
|
|---|
| 166 | G4EmCorrections(const G4EmCorrections&);
|
|---|
| 167 |
|
|---|
| 168 | G4double engBarkas[47];
|
|---|
| 169 | G4double corBarkas[47];
|
|---|
| 170 | G4double ed[104];
|
|---|
| 171 | G4double a[104];
|
|---|
| 172 | G4double theZieglerFactor;
|
|---|
| 173 | G4double alpha2;
|
|---|
| 174 | G4bool lossFlucFlag;
|
|---|
| 175 |
|
|---|
| 176 | G4int verbose;
|
|---|
| 177 |
|
|---|
| 178 | G4int nK;
|
|---|
| 179 | G4int nL;
|
|---|
| 180 | G4int nEtaK;
|
|---|
| 181 | G4int nEtaL;
|
|---|
| 182 |
|
|---|
| 183 | G4double COSEB[14];
|
|---|
| 184 | G4double COSXI[14];
|
|---|
| 185 | G4double ZD[11];
|
|---|
| 186 |
|
|---|
| 187 | G4double TheK[20];
|
|---|
| 188 | G4double SK[20];
|
|---|
| 189 | G4double TK[20];
|
|---|
| 190 | G4double UK[20];
|
|---|
| 191 | G4double VK[20];
|
|---|
| 192 | G4double ZK[20];
|
|---|
| 193 |
|
|---|
| 194 | G4double TheL[26];
|
|---|
| 195 | G4double SL[26];
|
|---|
| 196 | G4double TL[26];
|
|---|
| 197 | G4double UL[26];
|
|---|
| 198 | G4double VL[26];
|
|---|
| 199 |
|
|---|
| 200 | G4double Eta[29];
|
|---|
| 201 | G4double CK[20][29];
|
|---|
| 202 | G4double CL[26][28];
|
|---|
| 203 | G4double HM[53];
|
|---|
| 204 | G4double HN[31];
|
|---|
| 205 | G4double MSH[93];
|
|---|
| 206 | G4double TAU[93];
|
|---|
| 207 | G4double Z23[100];
|
|---|
| 208 |
|
|---|
| 209 | const G4ParticleDefinition* particle;
|
|---|
| 210 | const G4ParticleDefinition* curParticle;
|
|---|
| 211 | const G4Material* material;
|
|---|
| 212 | const G4Material* curMaterial;
|
|---|
| 213 | const G4ElementVector* theElementVector;
|
|---|
| 214 | const G4double* atomDensity;
|
|---|
| 215 |
|
|---|
| 216 | G4int numberOfElements;
|
|---|
| 217 | G4double kinEnergy;
|
|---|
| 218 | G4double mass;
|
|---|
| 219 | G4double massFactor;
|
|---|
| 220 | G4double tau;
|
|---|
| 221 | G4double gamma;
|
|---|
| 222 | G4double bg2;
|
|---|
| 223 | G4double beta2;
|
|---|
| 224 | G4double beta;
|
|---|
| 225 | G4double ba2;
|
|---|
| 226 | G4double tmax;
|
|---|
| 227 | G4double tmax0;
|
|---|
| 228 | G4double charge;
|
|---|
| 229 | G4double q2;
|
|---|
| 230 |
|
|---|
| 231 | G4AtomicShells shells;
|
|---|
| 232 | G4ionEffectiveCharge effCharge;
|
|---|
| 233 |
|
|---|
| 234 | G4NistManager* nist;
|
|---|
| 235 | const G4IonTable* ionTable;
|
|---|
| 236 | G4VEmModel* ionModel;
|
|---|
| 237 |
|
|---|
| 238 | // Ion stopping data
|
|---|
| 239 | G4int nIons;
|
|---|
| 240 | G4int idx;
|
|---|
| 241 | std::vector<G4int> Zion;
|
|---|
| 242 | std::vector<G4int> Aion;
|
|---|
| 243 | std::vector<G4String> materialName;
|
|---|
| 244 |
|
|---|
| 245 | std::vector<const G4Material*> materialList;
|
|---|
| 246 | std::vector<G4PhysicsVector*> stopData;
|
|---|
| 247 | G4PhysicsVector* curVector;
|
|---|
| 248 | };
|
|---|
| 249 |
|
|---|
| 250 | inline G4int G4EmCorrections::Index(G4double x, G4double* y, G4int n)
|
|---|
| 251 | {
|
|---|
| 252 | G4int iddd = n-1;
|
|---|
| 253 | do {iddd--;} while (iddd>0 && x<y[iddd]);
|
|---|
| 254 | return iddd;
|
|---|
| 255 | }
|
|---|
| 256 |
|
|---|
| 257 | inline G4double G4EmCorrections::Value(G4double xv, G4double x1, G4double x2,
|
|---|
| 258 | G4double y1, G4double y2)
|
|---|
| 259 | {
|
|---|
| 260 | return y1 + (y2 - y1)*(xv - x1)/(x2 - x1);
|
|---|
| 261 | }
|
|---|
| 262 |
|
|---|
| 263 | inline G4double G4EmCorrections::Value2(G4double xv, G4double yv,
|
|---|
| 264 | G4double x1, G4double x2,
|
|---|
| 265 | G4double y1, G4double y2,
|
|---|
| 266 | G4double z11, G4double z21,
|
|---|
| 267 | G4double z12, G4double z22)
|
|---|
| 268 | {
|
|---|
| 269 | return (z11*(x2-xv)*(y2-yv) + z22*(xv-x1)*(yv-y1) +
|
|---|
| 270 | 0.5*(z12*((x2-xv)*(yv-y1)+(xv-x1)*(y2-yv))+
|
|---|
| 271 | z21*((xv-x1)*(y2-yv)+(yv-y1)*(x2-xv))))
|
|---|
| 272 | / ((x2-x1)*(y2-y1));
|
|---|
| 273 | }
|
|---|
| 274 |
|
|---|
| 275 | inline void G4EmCorrections::SetupKinematics(const G4ParticleDefinition* p,
|
|---|
| 276 | const G4Material* mat,
|
|---|
| 277 | G4double kineticEnergy)
|
|---|
| 278 | {
|
|---|
| 279 | if(kineticEnergy != kinEnergy || p != particle) {
|
|---|
| 280 | particle = p;
|
|---|
| 281 | kinEnergy = kineticEnergy;
|
|---|
| 282 | mass = p->GetPDGMass();
|
|---|
| 283 | tau = kineticEnergy / mass;
|
|---|
| 284 | gamma = 1.0 + tau;
|
|---|
| 285 | bg2 = tau * (tau+2.0);
|
|---|
| 286 | beta2 = bg2/(gamma*gamma);
|
|---|
| 287 | beta = std::sqrt(beta2);
|
|---|
| 288 | ba2 = beta2/alpha2;
|
|---|
| 289 | G4double ratio = electron_mass_c2/mass;
|
|---|
| 290 | tmax = 2.0*electron_mass_c2*bg2 /(1. + 2.0*gamma*ratio + ratio*ratio);
|
|---|
| 291 | tmax0 = tmax;
|
|---|
| 292 | charge = p->GetPDGCharge()/eplus;
|
|---|
| 293 | if(charge < 1.5) q2 = charge*charge;
|
|---|
| 294 | else {
|
|---|
| 295 | q2 = effCharge.EffectiveChargeSquareRatio(p,mat,kinEnergy);
|
|---|
| 296 | charge = std::sqrt(q2);
|
|---|
| 297 | }
|
|---|
| 298 | if(mass > 120.*MeV)
|
|---|
| 299 | tmax = std::min(tmax,51200.*electron_mass_c2*std::pow(proton_mass_c2/mass,0.666667));
|
|---|
| 300 | }
|
|---|
| 301 | if(mat != material) {
|
|---|
| 302 | material = mat;
|
|---|
| 303 | theElementVector = material->GetElementVector();
|
|---|
| 304 | atomDensity = material->GetAtomicNumDensityVector();
|
|---|
| 305 | numberOfElements = material->GetNumberOfElements();
|
|---|
| 306 | }
|
|---|
| 307 | }
|
|---|
| 308 |
|
|---|
| 309 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 310 |
|
|---|
| 311 | #endif
|
|---|