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: G4MollerBhabhaModel.hh,v 1.7 2003/07/21 12:52:22 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: G4MollerBhabhaModel 31 // File name: G4MollerBhabhaModel 33 // 32 // 34 // Author: Vladimir Ivanchenko on base 33 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 34 // 36 // Creation date: 07.01.2002 35 // Creation date: 07.01.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 name (V.Ivanchenko) 41 // 13-02-03 Add name (V.Ivanchenko) 43 // 06-02-06 ComputeCrossSectionPerElectron, Co << 44 // 14-01-07 promote SetParticle() from private << 45 42 46 // 43 // 47 // Class Description: 44 // Class Description: 48 // 45 // 49 // Implementation of energy loss process and d 46 // Implementation of energy loss process and delta-electrons production 50 // of electrons and positrons 47 // of electrons and positrons 51 48 52 // ------------------------------------------- 49 // ------------------------------------------------------------------- 53 // 50 // 54 51 55 #ifndef G4MollerBhabhaModel_h 52 #ifndef G4MollerBhabhaModel_h 56 #define G4MollerBhabhaModel_h 1 53 #define G4MollerBhabhaModel_h 1 57 54 58 #include "G4VEmModel.hh" 55 #include "G4VEmModel.hh" 59 56 60 class G4ParticleChangeForLoss; << 61 << 62 class G4MollerBhabhaModel : public G4VEmModel 57 class G4MollerBhabhaModel : public G4VEmModel 63 { 58 { 64 59 65 public: 60 public: 66 61 67 explicit G4MollerBhabhaModel(const G4Particl << 62 G4MollerBhabhaModel(const G4ParticleDefinition* p = 0, const G4String& nam = "MollerBhabha"); 68 const G4String& nam = "MollerBhab << 69 63 70 ~G4MollerBhabhaModel() override; << 64 ~G4MollerBhabhaModel(); 71 65 72 void Initialise(const G4ParticleDefinition*, << 66 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 73 67 74 virtual G4double ComputeCrossSectionPerElect << 68 G4double HighEnergyLimit(const G4ParticleDefinition* p); 75 const G4ParticleDefinition*, << 76 G4double kineticEnergy, << 77 G4double cutEnergy, << 78 G4double maxEnergy); << 79 << 80 G4double ComputeCrossSectionPerAtom( << 81 const G4ParticleDefinition*, << 82 G4double kineticEnergy, << 83 G4double Z, G4double A, << 84 G4double cutEnergy, << 85 G4double maxEnergy) override; << 86 << 87 G4double CrossSectionPerVolume(const G4Mater << 88 const G4ParticleDefinition*, << 89 G4double kineticEnergy, << 90 G4double cutEnergy, << 91 G4double maxEnergy) override; << 92 << 93 G4double ComputeDEDXPerVolume(const G4Materi << 94 const G4ParticleDefinition*, << 95 G4double kineticEnergy, << 96 G4double cutEnergy) override; << 97 << 98 void SampleSecondaries(std::vector<G4Dynamic << 99 const G4MaterialCutsCouple*, << 100 const G4DynamicParticle*, << 101 G4double tmin, << 102 G4double maxEnergy) override; << 103 69 104 // hide assignment operator << 70 G4double LowEnergyLimit(const G4ParticleDefinition* p); 105 G4MollerBhabhaModel & operator=(const G4Mol << 71 106 G4MollerBhabhaModel(const G4MollerBhabhaMod << 72 void SetHighEnergyLimit(G4double e) {highKinEnergy = e;}; >> 73 >> 74 void SetLowEnergyLimit(G4double e) {lowKinEnergy = e;}; >> 75 >> 76 G4double MinEnergyCut(const G4ParticleDefinition*, >> 77 const G4MaterialCutsCouple*); >> 78 >> 79 G4bool IsInCharge(const G4ParticleDefinition*); >> 80 >> 81 G4double ComputeDEDX(const G4MaterialCutsCouple*, >> 82 const G4ParticleDefinition*, >> 83 G4double kineticEnergy, >> 84 G4double cutEnergy); >> 85 >> 86 G4double CrossSection(const G4MaterialCutsCouple*, >> 87 const G4ParticleDefinition*, >> 88 G4double kineticEnergy, >> 89 G4double cutEnergy, >> 90 G4double maxEnergy); >> 91 >> 92 G4DynamicParticle* SampleSecondary( >> 93 const G4MaterialCutsCouple*, >> 94 const G4DynamicParticle*, >> 95 G4double tmin, >> 96 G4double maxEnergy); >> 97 >> 98 std::vector<G4DynamicParticle*>* SampleSecondaries( >> 99 const G4MaterialCutsCouple*, >> 100 const G4DynamicParticle*, >> 101 G4double tmin, >> 102 G4double maxEnergy); >> 103 >> 104 G4double MaxSecondaryEnergy(const G4DynamicParticle*); 107 105 108 protected: 106 protected: 109 107 110 G4double MaxSecondaryEnergy(const G4Particle 108 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 111 G4double kinEnergy) final; << 109 G4double kinEnergy); 112 << 113 inline void SetParticle(const G4ParticleDefi << 114 110 115 const G4ParticleDefinition* particle; << 111 private: 116 G4ParticleDefinition* theElectron; << 117 G4ParticleChangeForLoss* fParticleChange; << 118 112 119 G4bool isElectron; << 113 void SetParticle(const G4ParticleDefinition* p); >> 114 >> 115 // hide assignment operator >> 116 G4MollerBhabhaModel & operator=(const G4MollerBhabhaModel &right); >> 117 G4MollerBhabhaModel(const G4MollerBhabhaModel&); >> 118 >> 119 const G4ParticleDefinition* particle; >> 120 G4ParticleDefinition* theElectron; >> 121 G4double highKinEnergy; >> 122 G4double lowKinEnergy; 120 G4double twoln10; 123 G4double twoln10; 121 G4double lowLimit; 124 G4double lowLimit; 122 << 125 G4bool isElectron; 123 private: << 126 }; 124 127 125 G4bool isInitialised; << 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 126 129 127 }; << 130 inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy( >> 131 const G4ParticleDefinition*, >> 132 G4double kinEnergy) >> 133 { >> 134 G4double tmax = kinEnergy; >> 135 if(isElectron) tmax *= 0.5; >> 136 return tmax; >> 137 } 128 138 129 //....oooOO0OOooo........oooOO0OOooo........oo << 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 130 140 131 inline void G4MollerBhabhaModel::SetParticle(c << 141 inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy(const G4DynamicParticle* dp) 132 { 142 { 133 particle = p; << 143 G4double tmax = dp->GetKineticEnergy(); 134 isElectron = (p == theElectron); << 144 if(isElectron) tmax *= 0.5; >> 145 return tmax; 135 } 146 } 136 147 137 //....oooOO0OOooo........oooOO0OOooo........oo << 148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 138 149 139 #endif 150 #endif 140 151