| 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 | // -------------------------------------------------------------------
|
|---|
| 28 | //
|
|---|
| 29 | // GEANT4 Class header file
|
|---|
| 30 | //
|
|---|
| 31 | //
|
|---|
| 32 | // File name: G4PAIPhotonModel
|
|---|
| 33 | //
|
|---|
| 34 | // Author: V. Grichine based on Vladimir Ivanchenko code
|
|---|
| 35 | //
|
|---|
| 36 | // Creation date: 05.10.2003
|
|---|
| 37 | //
|
|---|
| 38 | // Modifications:
|
|---|
| 39 | // 11.04.05 Major optimisation of internal interfaces (V.Ivantchenko)
|
|---|
| 40 | // 26-09-07 Fixed tmax computation (V.Ivantchenko)
|
|---|
| 41 | //
|
|---|
| 42 | //
|
|---|
| 43 | // Class Description:
|
|---|
| 44 | //
|
|---|
| 45 | // Implementation of PAI model of energy loss and
|
|---|
| 46 | // delta-electron production by heavy charged particles
|
|---|
| 47 |
|
|---|
| 48 | // -------------------------------------------------------------------
|
|---|
| 49 | //
|
|---|
| 50 |
|
|---|
| 51 | #ifndef G4PAIPhotonModel_h
|
|---|
| 52 | #define G4PAIPhotonModel_h 1
|
|---|
| 53 |
|
|---|
| 54 | #include <vector>
|
|---|
| 55 | #include "G4VEmModel.hh"
|
|---|
| 56 | #include "globals.hh"
|
|---|
| 57 | #include "G4VEmFluctuationModel.hh"
|
|---|
| 58 |
|
|---|
| 59 | class G4PhysicsLogVector;
|
|---|
| 60 | class G4PhysicsTable;
|
|---|
| 61 | class G4Region;
|
|---|
| 62 | class G4MaterialCutsCouple;
|
|---|
| 63 | class G4ParticleChangeForLoss;
|
|---|
| 64 |
|
|---|
| 65 | class G4PAIPhotonModel : public G4VEmModel, public G4VEmFluctuationModel
|
|---|
| 66 | {
|
|---|
| 67 |
|
|---|
| 68 | public:
|
|---|
| 69 |
|
|---|
| 70 | G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAIPhoton");
|
|---|
| 71 |
|
|---|
| 72 | virtual ~G4PAIPhotonModel();
|
|---|
| 73 |
|
|---|
| 74 | virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
|---|
| 75 |
|
|---|
| 76 | virtual void InitialiseMe(const G4ParticleDefinition*) {};
|
|---|
| 77 |
|
|---|
| 78 | virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
|
|---|
| 79 | const G4ParticleDefinition*,
|
|---|
| 80 | G4double kineticEnergy,
|
|---|
| 81 | G4double cutEnergy);
|
|---|
| 82 |
|
|---|
| 83 | virtual G4double CrossSection(const G4MaterialCutsCouple*,
|
|---|
| 84 | const G4ParticleDefinition*,
|
|---|
| 85 | G4double kineticEnergy,
|
|---|
| 86 | G4double cutEnergy,
|
|---|
| 87 | G4double maxEnergy);
|
|---|
| 88 |
|
|---|
| 89 | virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
|---|
| 90 | const G4MaterialCutsCouple*,
|
|---|
| 91 | const G4DynamicParticle*,
|
|---|
| 92 | G4double tmin,
|
|---|
| 93 | G4double maxEnergy);
|
|---|
| 94 |
|
|---|
| 95 | virtual G4double SampleFluctuations(const G4Material*,
|
|---|
| 96 | const G4DynamicParticle*,
|
|---|
| 97 | G4double&,
|
|---|
| 98 | G4double&,
|
|---|
| 99 | G4double&);
|
|---|
| 100 |
|
|---|
| 101 | virtual G4double Dispersion( const G4Material*,
|
|---|
| 102 | const G4DynamicParticle*,
|
|---|
| 103 | G4double&,
|
|---|
| 104 | G4double&);
|
|---|
| 105 |
|
|---|
| 106 | void DefineForRegion(const G4Region* r) ;
|
|---|
| 107 | void ComputeSandiaPhotoAbsCof();
|
|---|
| 108 | void BuildPAIonisationTable();
|
|---|
| 109 | void BuildLambdaVector(const G4MaterialCutsCouple* matCutsCouple);
|
|---|
| 110 |
|
|---|
| 111 | G4double GetdNdxCut( G4int iPlace, G4double transferCut);
|
|---|
| 112 | G4double GetdNdxPhotonCut( G4int iPlace, G4double transferCut);
|
|---|
| 113 | G4double GetdNdxPlasmonCut( G4int iPlace, G4double transferCut);
|
|---|
| 114 |
|
|---|
| 115 | G4double GetdEdxCut( G4int iPlace, G4double transferCut);
|
|---|
| 116 |
|
|---|
| 117 | G4double GetPostStepTransfer(G4PhysicsTable*, G4PhysicsLogVector*,
|
|---|
| 118 | G4int iPlace, G4double scaledTkin );
|
|---|
| 119 | G4double GetAlongStepTransfer(G4PhysicsTable*, G4PhysicsLogVector*,
|
|---|
| 120 | G4int iPlace, G4double scaledTkin,G4double step, G4double cof );
|
|---|
| 121 | G4double GetEnergyTransfer(G4PhysicsTable*, G4int iPlace,
|
|---|
| 122 | G4double position, G4int iTransfer );
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 | protected:
|
|---|
| 127 |
|
|---|
| 128 | G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
|
|---|
| 129 | G4double kinEnergy);
|
|---|
| 130 |
|
|---|
| 131 | private:
|
|---|
| 132 |
|
|---|
| 133 | void SetParticle(const G4ParticleDefinition* p);
|
|---|
| 134 |
|
|---|
| 135 | // hide assignment operator
|
|---|
| 136 | G4PAIPhotonModel & operator=(const G4PAIPhotonModel &right);
|
|---|
| 137 | G4PAIPhotonModel(const G4PAIPhotonModel&);
|
|---|
| 138 |
|
|---|
| 139 | // The vector over proton kinetic energies: the range of gammas
|
|---|
| 140 |
|
|---|
| 141 | G4double fLowestKineticEnergy;
|
|---|
| 142 | G4double fHighestKineticEnergy;
|
|---|
| 143 | G4int fTotBin;
|
|---|
| 144 | G4int fMeanNumber;
|
|---|
| 145 | G4int fVerbose;
|
|---|
| 146 | G4PhysicsLogVector* fProtonEnergyVector ;
|
|---|
| 147 |
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 | // vectors
|
|---|
| 151 |
|
|---|
| 152 | G4PhysicsTable* fPAItransferTable;
|
|---|
| 153 | std::vector<G4PhysicsTable*> fPAIxscBank;
|
|---|
| 154 |
|
|---|
| 155 | G4PhysicsTable* fPAIphotonTable;
|
|---|
| 156 | std::vector<G4PhysicsTable*> fPAIphotonBank;
|
|---|
| 157 |
|
|---|
| 158 | G4PhysicsTable* fPAIplasmonTable;
|
|---|
| 159 | std::vector<G4PhysicsTable*> fPAIplasmonBank;
|
|---|
| 160 |
|
|---|
| 161 | G4PhysicsTable* fPAIdEdxTable;
|
|---|
| 162 | std::vector<G4PhysicsTable*> fPAIdEdxBank;
|
|---|
| 163 |
|
|---|
| 164 | std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
|
|---|
| 165 | std::vector<const G4Region*> fPAIRegionVector;
|
|---|
| 166 |
|
|---|
| 167 | size_t fMatIndex ;
|
|---|
| 168 | G4double** fSandiaPhotoAbsCof ;
|
|---|
| 169 | G4int fSandiaIntervalNumber ;
|
|---|
| 170 |
|
|---|
| 171 | G4PhysicsLogVector* fdEdxVector ;
|
|---|
| 172 | std::vector<G4PhysicsLogVector*> fdEdxTable ;
|
|---|
| 173 |
|
|---|
| 174 | G4PhysicsLogVector* fLambdaVector ;
|
|---|
| 175 | std::vector<G4PhysicsLogVector*> fLambdaTable ;
|
|---|
| 176 |
|
|---|
| 177 | G4PhysicsLogVector* fdNdxCutVector ;
|
|---|
| 178 | std::vector<G4PhysicsLogVector*> fdNdxCutTable ;
|
|---|
| 179 |
|
|---|
| 180 | G4PhysicsLogVector* fdNdxCutPhotonVector ;
|
|---|
| 181 | std::vector<G4PhysicsLogVector*> fdNdxCutPhotonTable ;
|
|---|
| 182 |
|
|---|
| 183 | G4PhysicsLogVector* fdNdxCutPlasmonVector ;
|
|---|
| 184 | std::vector<G4PhysicsLogVector*> fdNdxCutPlasmonTable ;
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 | const G4ParticleDefinition* fParticle;
|
|---|
| 188 | const G4ParticleDefinition* fElectron;
|
|---|
| 189 | const G4ParticleDefinition* fPositron;
|
|---|
| 190 | G4ParticleChangeForLoss* fParticleChange;
|
|---|
| 191 |
|
|---|
| 192 | G4double fMass;
|
|---|
| 193 | G4double fSpin;
|
|---|
| 194 | G4double fChargeSquare;
|
|---|
| 195 | G4double fRatio;
|
|---|
| 196 | G4double fHighKinEnergy;
|
|---|
| 197 | G4double fLowKinEnergy;
|
|---|
| 198 | G4double fTwoln10;
|
|---|
| 199 | G4double fBg2lim;
|
|---|
| 200 | G4double fTaulim;
|
|---|
| 201 | G4double fQc;
|
|---|
| 202 |
|
|---|
| 203 | G4bool isInitialised;
|
|---|
| 204 | };
|
|---|
| 205 |
|
|---|
| 206 | /////////////////////////////////////////////////////////////////////
|
|---|
| 207 |
|
|---|
| 208 | inline G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,
|
|---|
| 209 | G4double kinEnergy)
|
|---|
| 210 | {
|
|---|
| 211 | G4double tmax = kinEnergy;
|
|---|
| 212 | if(p == fElectron) tmax *= 0.5;
|
|---|
| 213 | else if(p != fPositron) {
|
|---|
| 214 | G4double mass = p->GetPDGMass();
|
|---|
| 215 | G4double ratio= electron_mass_c2/mass;
|
|---|
| 216 | G4double gamma= kinEnergy/mass + 1.0;
|
|---|
| 217 | tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
|
|---|
| 218 | (1. + 2.0*gamma*ratio + ratio*ratio);
|
|---|
| 219 | }
|
|---|
| 220 | return tmax;
|
|---|
| 221 | }
|
|---|
| 222 |
|
|---|
| 223 | ///////////////////////////////////////////////////////////////
|
|---|
| 224 |
|
|---|
| 225 | inline void G4PAIPhotonModel::DefineForRegion(const G4Region* r)
|
|---|
| 226 | {
|
|---|
| 227 | fPAIRegionVector.push_back(r);
|
|---|
| 228 | }
|
|---|
| 229 |
|
|---|
| 230 | #endif
|
|---|
| 231 |
|
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 |
|
|---|
| 237 |
|
|---|