Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // >> 23 // $Id: G4BraggIonModel.hh,v 1.4 2005/05/12 11:06:42 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-07-01 $ 26 // 25 // 27 // ------------------------------------------- 26 // ------------------------------------------------------------------- 28 // 27 // 29 // GEANT4 Class header file 28 // GEANT4 Class header file 30 // 29 // 31 // 30 // 32 // File name: G4BraggIonModel 31 // File name: G4BraggIonModel 33 // 32 // 34 // Author: Vladimir Ivanchenko 33 // Author: Vladimir Ivanchenko 35 // 34 // 36 // Creation date: 13.10.2004 35 // Creation date: 13.10.2004 37 // 36 // 38 // Modifications: 37 // Modifications: 39 // 09-11-04 Migration to new interface of Stor 38 // 09-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) 40 // 11-05-05 Major optimisation of internal int 39 // 11-05-05 Major optimisation of internal interfaces (V.Ivantchenko) 41 // 15-02-06 ComputeCrossSectionPerElectron, Co << 42 // 25-04-06 Add stopping data from ASTAR (V.Iv << 43 // 12-08-08 Added methods GetParticleCharge, G << 44 // CorrectionsAlongStep needed for io << 45 << 46 // 40 // 47 // Class Description: 41 // Class Description: 48 // 42 // 49 // Implementation of energy loss and delta-ele 43 // Implementation of energy loss and delta-electron production 50 // by heavy slow charged particles using ICRU' << 44 // by heavy slow charged particles using eveluated data 51 // evaluated data for alpha and protons << 52 45 53 // ------------------------------------------- 46 // ------------------------------------------------------------------- 54 // 47 // 55 48 56 #ifndef G4BraggIonModel_h 49 #ifndef G4BraggIonModel_h 57 #define G4BraggIonModel_h 1 50 #define G4BraggIonModel_h 1 58 51 59 #include "G4BraggModel.hh" << 52 #include "G4VEmModel.hh" 60 53 61 class G4ASTARStopping; << 54 class G4ParticleChangeForLoss; 62 55 63 class G4BraggIonModel : public G4BraggModel << 56 class G4BraggIonModel : public G4VEmModel 64 { 57 { 65 58 66 public: 59 public: 67 60 68 explicit G4BraggIonModel(const G4ParticleDef << 61 G4BraggIonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "BraggIon"); 69 const G4String& nam = "BraggIon"); << 70 62 71 ~G4BraggIonModel() override; << 63 virtual ~G4BraggIonModel(); 72 64 73 void Initialise(const G4ParticleDefinition*, << 65 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 74 const G4DataVector&) override; << 75 66 76 G4double ComputeCrossSectionPerAtom( << 67 G4double MinEnergyCut(const G4ParticleDefinition*, 77 const G4ParticleDefinition*, << 68 const G4MaterialCutsCouple*); 78 G4double kineticEnergy, << 79 G4double Z, G4double A, << 80 G4double cutEnergy, << 81 G4double maxEnergy) override; << 82 << 83 G4double CrossSectionPerVolume(const G4Mater << 84 const G4ParticleDefinition*, << 85 G4double kineticEnergy, << 86 G4double cutEnergy, << 87 G4double maxEnergy) override; << 88 << 89 G4double ComputeDEDXPerVolume(const G4Materi << 90 const G4Partic << 91 G4double kinet << 92 G4double cutEn << 93 << 94 // Compute ion charge not applied to alpha << 95 G4double GetChargeSquareRatio(const G4Partic << 96 const G4Material*, << 97 G4double kineticEnergy) override; << 98 << 99 // add correction to energy loss and ompute << 100 void CorrectionsAlongStep(const G4MaterialCu << 101 const G4DynamicParticle*, << 102 const G4double& length, << 103 G4double& eloss) override; << 104 69 105 // hide assignment operator << 70 virtual G4double ComputeDEDXPerVolume(const G4Material*, 106 G4BraggIonModel & operator=(const G4BraggIo << 71 const G4ParticleDefinition*, 107 G4BraggIonModel(const G4BraggIonModel&) = d << 72 G4double kineticEnergy, >> 73 G4double cutEnergy); >> 74 >> 75 virtual G4double CrossSectionPerVolume(const G4Material*, >> 76 const G4ParticleDefinition*, >> 77 G4double kineticEnergy, >> 78 G4double cutEnergy, >> 79 G4double maxEnergy); >> 80 >> 81 virtual std::vector<G4DynamicParticle*>* SampleSecondaries( >> 82 const G4MaterialCutsCouple*, >> 83 const G4DynamicParticle*, >> 84 G4double tmin, >> 85 G4double maxEnergy); >> 86 >> 87 protected: >> 88 >> 89 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, >> 90 G4double kinEnergy); 108 91 109 private: 92 private: 110 93 111 G4double HeEffChargeSquare(const G4double z, << 94 void SetParticle(const G4ParticleDefinition* p); 112 const G4double ki << 95 >> 96 G4double HeEffChargeSquare(G4double z, G4double kinEnergyInMeV) const; >> 97 >> 98 // hide assignment operator >> 99 G4BraggIonModel & operator=(const G4BraggIonModel &right); >> 100 G4BraggIonModel(const G4BraggIonModel&); >> 101 >> 102 G4bool HasMaterial(const G4Material* material); 113 103 114 G4int HasMaterialForHe(const G4Material* mat << 104 G4double StoppingPower(const G4Material* material, >> 105 G4double kineticEnergy); 115 106 116 G4double HeStoppingPower(const G4double kinE << 107 G4double ElectronicStoppingPower(G4double z, >> 108 G4double kineticEnergy) const; 117 109 118 G4double HeElectronicStoppingPower(const G4i << 110 void SetMoleculaNumber(G4int number) {iMolecula = number;}; 119 111 120 G4double HeDEDX(const G4Material* material, << 112 G4double DEDX(const G4Material* material, G4double kineticEnergy); 121 113 122 static G4ASTARStopping* fASTAR; << 114 const G4ParticleDefinition* particle; >> 115 G4ParticleDefinition* theElectron; >> 116 G4ParticleChangeForLoss* fParticleChange; 123 117 124 G4double heChargeSquare = 4.0; << 118 G4double mass; >> 119 G4double spin; >> 120 G4double chargeSquare; >> 121 G4double massRate; >> 122 G4double ratio; >> 123 G4double highKinEnergy; >> 124 G4double lowKinEnergy; >> 125 G4double lowestKinEnergy; 125 G4double HeMass; 126 G4double HeMass; 126 G4double massFactor; 127 G4double massFactor; >> 128 G4double rateMassHe2p; >> 129 G4double theZieglerFactor; 127 130 128 G4int iASTAR = -1; // index in ASTAR << 131 G4int iMolecula; // index in the molecula's table 129 G4bool isAlpha = false; << 132 G4bool isIon; 130 G4bool isFirstAlpha = false; << 131 }; 133 }; 132 134 133 //....oooOO0OOooo........oooOO0OOooo........oo << 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 136 >> 137 inline G4double G4BraggIonModel::MaxSecondaryEnergy( >> 138 const G4ParticleDefinition* pd, >> 139 G4double kinEnergy) >> 140 { >> 141 if(pd != particle) SetParticle(pd); >> 142 G4double tau = kinEnergy/mass; >> 143 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / >> 144 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); >> 145 return tmax; >> 146 } >> 147 >> 148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 149 >> 150 inline void G4BraggIonModel::SetParticle(const G4ParticleDefinition* p) >> 151 { >> 152 particle = p; >> 153 mass = particle->GetPDGMass(); >> 154 spin = particle->GetPDGSpin(); >> 155 G4double q = particle->GetPDGCharge()/eplus; >> 156 chargeSquare = q*q; >> 157 massRate = mass/proton_mass_c2; >> 158 ratio = electron_mass_c2/mass; >> 159 } >> 160 >> 161 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 134 162 135 #endif 163 #endif 136 164