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.14 2005/04/12 13:31:16 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-07-01-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 << 42 // 10-02-04 Calculation of radiative corrections using R.Kokoulin model (V.Ivanchenko) 44 // 08-04-05 Major optimisation of internal int 43 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 45 // 12-04-05 Add usage of G4EmCorrections (V.Iv 44 // 12-04-05 Add usage of G4EmCorrections (V.Ivanchenko) 46 // 13-02-06 ComputeCrossSectionPerElectron, Co << 47 // 45 // 48 46 49 // 47 // 50 // Class Description: 48 // Class Description: 51 // 49 // 52 // Implementation of Bethe-Bloch model of ener 50 // Implementation of Bethe-Bloch model of energy loss and 53 // delta-electron production by heavy charged 51 // delta-electron production by heavy charged particles 54 52 55 // ------------------------------------------- 53 // ------------------------------------------------------------------- 56 // 54 // 57 55 58 #ifndef G4MuBetheBlochModel_h 56 #ifndef G4MuBetheBlochModel_h 59 #define G4MuBetheBlochModel_h 1 57 #define G4MuBetheBlochModel_h 1 60 58 61 #include "G4VEmModel.hh" 59 #include "G4VEmModel.hh" 62 60 63 class G4ParticleChangeForLoss; 61 class G4ParticleChangeForLoss; 64 class G4EmCorrections; 62 class G4EmCorrections; 65 63 66 class G4MuBetheBlochModel : public G4VEmModel 64 class G4MuBetheBlochModel : public G4VEmModel 67 { 65 { 68 66 69 public: 67 public: 70 68 71 explicit G4MuBetheBlochModel(const G4Particl << 69 G4MuBetheBlochModel(const G4ParticleDefinition* p = 0, const G4String& nam = "MuBetheBloch"); 72 const G4String& << 73 70 74 ~G4MuBetheBlochModel() override = default; << 71 virtual ~G4MuBetheBlochModel(); 75 72 76 void Initialise(const G4ParticleDefinition*, << 73 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 77 74 78 G4double MinEnergyCut(const G4ParticleDefini 75 G4double MinEnergyCut(const G4ParticleDefinition*, 79 const G4MaterialCutsCouple*) override; << 76 const G4MaterialCutsCouple*); 80 << 81 G4double ComputeCrossSectionPerElectron( << 82 const G4ParticleDefinition*, << 83 G4double kineticEnergy, << 84 G4double cutEnergy, << 85 G4double maxEnergy); << 86 << 87 G4double ComputeCrossSectionPerAtom( << 88 const G4ParticleDefinition*, << 89 G4double kineticEnergy, << 90 G4double Z, G4double A, << 91 G4double cutEnergy, << 92 G4double maxEnergy) override; << 93 << 94 G4double CrossSectionPerVolume(const G4Mater << 95 const G4ParticleDefinition*, << 96 G4double kineticEnergy, << 97 G4double cutEnergy, << 98 G4double maxEnergy) override; << 99 << 100 G4double ComputeDEDXPerVolume(const G4Materi << 101 const G4Partic << 102 G4double kinet << 103 G4double cutEn << 104 << 105 void SampleSecondaries(std::vector<G4Dynamic << 106 const G4MaterialCutsCouple*, << 107 const G4DynamicParticle*, << 108 G4double tmin, << 109 G4double maxEnergy) override; << 110 77 111 // hide assignment operator << 78 virtual G4double ComputeDEDXPerVolume( 112 G4MuBetheBlochModel & operator=(const G4MuB << 79 const G4Material*, 113 G4MuBetheBlochModel(const G4MuBetheBlochMod << 80 const G4ParticleDefinition*, >> 81 G4double kineticEnergy, >> 82 G4double cutEnergy); >> 83 >> 84 virtual G4double CrossSectionPerVolume( >> 85 const G4Material*, >> 86 const G4ParticleDefinition*, >> 87 G4double kineticEnergy, >> 88 G4double cutEnergy, >> 89 G4double maxEnergy); >> 90 >> 91 virtual std::vector<G4DynamicParticle*>* SampleSecondaries( >> 92 const G4MaterialCutsCouple*, >> 93 const G4DynamicParticle*, >> 94 G4double tmin, >> 95 G4double maxEnergy); 114 96 115 protected: 97 protected: 116 98 117 G4double MaxSecondaryEnergy(const G4Particle 99 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 118 G4double kinEner << 100 G4double kinEnergy); 119 101 120 private: 102 private: 121 103 122 void SetParticle(const G4ParticleDefinition* 104 void SetParticle(const G4ParticleDefinition* p); 123 105 124 const G4ParticleDefinition* particle = nullp << 106 // hide assignment operator 125 G4ParticleDefinition* theElectron = nu << 107 G4MuBetheBlochModel & operator=(const G4MuBetheBlochModel &right); 126 G4ParticleChangeForLoss* fParticleChange << 108 G4MuBetheBlochModel(const G4MuBetheBlochModel&); 127 G4EmCorrections* corr = nullptr; << 109 >> 110 const G4ParticleDefinition* particle; >> 111 G4ParticleDefinition* theElectron; >> 112 G4ParticleChangeForLoss* fParticleChange; >> 113 G4EmCorrections* corr; 128 114 129 G4double limitRadCorrection; << 130 G4double limitKinEnergy; 115 G4double limitKinEnergy; 131 G4double logLimitKinEnergy; 116 G4double logLimitKinEnergy; 132 G4double mass = 1.0; << 117 G4double mass; 133 G4double massSquare = 1.0; << 118 G4double massSquare; 134 G4double ratio = 1.0; << 119 G4double ratio; 135 G4double twoln10; 120 G4double twoln10; >> 121 G4double bg2lim; >> 122 G4double taulim; 136 G4double alphaprime; 123 G4double alphaprime; 137 static G4double xgi[8],wgi[8]; 124 static G4double xgi[8],wgi[8]; 138 }; 125 }; 139 126 140 //....oooOO0OOooo........oooOO0OOooo........oo << 127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 128 >> 129 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy( >> 130 const G4ParticleDefinition*, >> 131 G4double kinEnergy) >> 132 { >> 133 G4double tau = kinEnergy/mass; >> 134 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / >> 135 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); >> 136 return tmax; >> 137 } >> 138 >> 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 141 140 142 #endif 141 #endif 143 142