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: G4MuBetheBlochModel.hh,v 1.8 2003/07/21 12:52:35 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-06-00-patch-01 $ 26 // 25 // 27 // ------------------------------------------- 26 // ------------------------------------------------------------------- 28 // 27 // 29 // GEANT4 Class header file 28 // GEANT4 Class header file 30 // 29 // 31 // 30 // 32 // File name: G4MuBetheBlochModel 31 // File name: G4MuBetheBlochModel 33 // 32 // 34 // Author: Vladimir Ivanchenko on base 33 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 34 // 36 // Creation date: 09.08.2002 35 // Creation date: 09.08.2002 37 // 36 // 38 // Modifications: 37 // Modifications: 39 // 38 // 40 // 23-12-02 Change interface in order to move 39 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko) 41 // 24-01-03 Make models region aware (V.Ivanch 40 // 24-01-03 Make models region aware (V.Ivanchenko) 42 // 13-02-03 Add Nama (V.Ivanchenko) 41 // 13-02-03 Add Nama (V.Ivanchenko) 43 // 10-02-04 Calculation of radiative correctio << 44 // 08-04-05 Major optimisation of internal int << 45 // 12-04-05 Add usage of G4EmCorrections (V.Iv << 46 // 13-02-06 ComputeCrossSectionPerElectron, Co << 47 // 42 // 48 43 49 // 44 // 50 // Class Description: 45 // Class Description: 51 // 46 // 52 // Implementation of Bethe-Bloch model of ener 47 // Implementation of Bethe-Bloch model of energy loss and 53 // delta-electron production by heavy charged 48 // delta-electron production by heavy charged particles 54 49 55 // ------------------------------------------- 50 // ------------------------------------------------------------------- 56 // 51 // 57 52 58 #ifndef G4MuBetheBlochModel_h 53 #ifndef G4MuBetheBlochModel_h 59 #define G4MuBetheBlochModel_h 1 54 #define G4MuBetheBlochModel_h 1 60 55 61 #include "G4VEmModel.hh" 56 #include "G4VEmModel.hh" 62 57 63 class G4ParticleChangeForLoss; << 64 class G4EmCorrections; << 65 << 66 class G4MuBetheBlochModel : public G4VEmModel 58 class G4MuBetheBlochModel : public G4VEmModel 67 { 59 { 68 60 69 public: 61 public: 70 62 71 explicit G4MuBetheBlochModel(const G4Particl << 63 G4MuBetheBlochModel(const G4ParticleDefinition* p = 0, const G4String& nam = "MuBetheBloch"); 72 const G4String& << 64 >> 65 ~G4MuBetheBlochModel(); >> 66 >> 67 void Initialise(const G4ParticleDefinition*, const G4DataVector&); >> 68 >> 69 G4double HighEnergyLimit(const G4ParticleDefinition* p); 73 70 74 ~G4MuBetheBlochModel() override = default; << 71 G4double LowEnergyLimit(const G4ParticleDefinition* p); 75 72 76 void Initialise(const G4ParticleDefinition*, << 73 void SetHighEnergyLimit(G4double e) {highKinEnergy = e;}; >> 74 >> 75 void SetLowEnergyLimit(G4double e) {lowKinEnergy = e;}; 77 76 78 G4double MinEnergyCut(const G4ParticleDefini 77 G4double MinEnergyCut(const G4ParticleDefinition*, 79 const G4MaterialCutsCouple*) override; << 78 const G4MaterialCutsCouple*); 80 << 79 81 G4double ComputeCrossSectionPerElectron( << 80 G4bool IsInCharge(const G4ParticleDefinition*); 82 const G4ParticleDefinition*, << 81 83 G4double kineticEnergy, << 82 virtual G4double ComputeDEDX(const G4MaterialCutsCouple*, 84 G4double cutEnergy, << 83 const G4ParticleDefinition*, 85 G4double maxEnergy); << 84 G4double kineticEnergy, 86 << 85 G4double cutEnergy); 87 G4double ComputeCrossSectionPerAtom( << 86 88 const G4ParticleDefinition*, << 87 virtual G4double CrossSection(const G4MaterialCutsCouple*, 89 G4double kineticEnergy, << 88 const G4ParticleDefinition*, 90 G4double Z, G4double A, << 89 G4double kineticEnergy, 91 G4double cutEnergy, << 90 G4double cutEnergy, 92 G4double maxEnergy) override; << 91 G4double maxEnergy); 93 << 92 94 G4double CrossSectionPerVolume(const G4Mater << 93 virtual G4DynamicParticle* SampleSecondary( 95 const G4ParticleDefinition*, << 94 const G4MaterialCutsCouple*, 96 G4double kineticEnergy, << 95 const G4DynamicParticle*, 97 G4double cutEnergy, << 96 G4double tmin, 98 G4double maxEnergy) override; << 97 G4double maxEnergy); 99 << 98 100 G4double ComputeDEDXPerVolume(const G4Materi << 99 virtual std::vector<G4DynamicParticle*>* SampleSecondaries( 101 const G4Partic << 100 const G4MaterialCutsCouple*, 102 G4double kinet << 101 const G4DynamicParticle*, 103 G4double cutEn << 102 G4double tmin, 104 << 103 G4double maxEnergy); 105 void SampleSecondaries(std::vector<G4Dynamic << 104 106 const G4MaterialCutsCouple*, << 105 G4double MaxSecondaryEnergy(const G4DynamicParticle*); 107 const G4DynamicParticle*, << 108 G4double tmin, << 109 G4double maxEnergy) override; << 110 << 111 // hide assignment operator << 112 G4MuBetheBlochModel & operator=(const G4MuB << 113 G4MuBetheBlochModel(const G4MuBetheBlochMod << 114 106 115 protected: 107 protected: 116 108 117 G4double MaxSecondaryEnergy(const G4Particle 109 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 118 G4double kinEner << 110 G4double kinEnergy); 119 111 120 private: 112 private: 121 113 122 void SetParticle(const G4ParticleDefinition* 114 void SetParticle(const G4ParticleDefinition* p); 123 115 124 const G4ParticleDefinition* particle = nullp << 116 G4double CrossSectionPerAtom(G4double Z, 125 G4ParticleDefinition* theElectron = nu << 117 G4double kineticEnergy, 126 G4ParticleChangeForLoss* fParticleChange << 118 G4double tmin, 127 G4EmCorrections* corr = nullptr; << 119 G4double tmax, 128 << 120 G4double tmaxSecondary); 129 G4double limitRadCorrection; << 121 130 G4double limitKinEnergy; << 122 G4double DifCrossSectionPerAtom(G4double kineticEnergy, 131 G4double logLimitKinEnergy; << 123 G4double knockonEnergy, 132 G4double mass = 1.0; << 124 G4double tmaxSecondary); 133 G4double massSquare = 1.0; << 125 134 G4double ratio = 1.0; << 126 // hide assignment operator >> 127 G4MuBetheBlochModel & operator=(const G4MuBetheBlochModel &right); >> 128 G4MuBetheBlochModel(const G4MuBetheBlochModel&); >> 129 >> 130 const G4ParticleDefinition* particle; >> 131 G4double mass; >> 132 G4double chargeSquare; >> 133 G4double ratio; >> 134 G4double highKinEnergy; >> 135 G4double lowKinEnergy; 135 G4double twoln10; 136 G4double twoln10; 136 G4double alphaprime; << 137 G4double bg2lim; 137 static G4double xgi[8],wgi[8]; << 138 G4double taulim; >> 139 G4double qc; 138 }; 140 }; 139 141 140 //....oooOO0OOooo........oooOO0OOooo........oo << 142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 143 >> 144 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy( >> 145 const G4ParticleDefinition*, >> 146 G4double kinEnergy) >> 147 { >> 148 >> 149 G4double gamma= kinEnergy/mass + 1.0; >> 150 G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / >> 151 (1. + 2.0*gamma*ratio + ratio*ratio); >> 152 >> 153 return tmax; >> 154 } >> 155 >> 156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 157 >> 158 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy(const G4DynamicParticle* dp) >> 159 { >> 160 >> 161 G4double kineticEnergy = dp->GetKineticEnergy(); >> 162 G4double gamma= kineticEnergy/mass + 1.0; >> 163 G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / >> 164 (1. + 2.0*gamma*ratio + ratio*ratio); >> 165 >> 166 return tmax; >> 167 } >> 168 >> 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 141 170 142 #endif 171 #endif 143 172