Changeset 961 for trunk/source/processes/electromagnetic/muons/include
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (17 years ago)
- Location:
- trunk/source/processes/electromagnetic/muons/include
- Files:
-
- 8 edited
-
G4EnergyLossForExtrapolator.hh (modified) (9 diffs)
-
G4MuBetheBlochModel.hh (modified) (4 diffs)
-
G4MuBremsstrahlung.hh (modified) (3 diffs)
-
G4MuBremsstrahlungModel.hh (modified) (9 diffs)
-
G4MuIonisation.hh (modified) (3 diffs)
-
G4MuMultipleScattering.hh (modified) (3 diffs)
-
G4MuPairProduction.hh (modified) (3 diffs)
-
G4MuPairProductionModel.hh (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/muons/include/G4EnergyLossForExtrapolator.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EnergyLossForExtrapolator.hh,v 1. 9 2007/07/28 13:44:25vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4EnergyLossForExtrapolator.hh,v 1.12 2008/11/13 14:14:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 81 81 82 82 G4double EnergyBeforeStep(G4double kinEnergy, G4double step, 83 const G4Material*, const G4ParticleDefinition*); 83 const G4Material*, const G4ParticleDefinition*); 84 85 G4double TrueStepLength(G4double kinEnergy, G4double step, 86 const G4Material*, const G4ParticleDefinition* part); 84 87 85 88 inline G4double EnergyAfterStep(G4double kinEnergy, G4double step, 86 const G4Material*, const G4String& particleName);89 const G4Material*, const G4String& particleName); 87 90 88 91 inline G4double EnergyBeforeStep(G4double kinEnergy, G4double step, 89 const G4Material*, const G4String& particleName);92 const G4Material*, const G4String& particleName); 90 93 91 94 inline G4double AverageScatteringAngle(G4double kinEnergy, G4double step, 92 const G4Material*, const G4ParticleDefinition* part); 95 const G4Material*, 96 const G4ParticleDefinition* part); 93 97 94 98 inline G4double AverageScatteringAngle(G4double kinEnergy, G4double step, 95 const G4Material*, const G4String& particleName); 99 const G4Material*, 100 const G4String& particleName); 101 102 inline G4double ComputeTrueStep(const G4Material*, const G4ParticleDefinition* part, 103 G4double kinEnergy, G4double stepLength); 96 104 97 105 inline G4double EnergyDispersion(G4double kinEnergy, G4double step, 98 const G4Material*, const G4ParticleDefinition*);106 const G4Material*, const G4ParticleDefinition*); 99 107 100 108 inline G4double EnergyDispersion(G4double kinEnergy, G4double step, … … 113 121 void Initialisation(); 114 122 123 G4bool SetupKinematics(const G4ParticleDefinition*, const G4Material*, 124 G4double kinEnergy); 125 115 126 G4PhysicsTable* PrepareTable(); 116 127 … … 123 134 void ComputeProtonDEDX(const G4ParticleDefinition* part, G4PhysicsTable* table); 124 135 125 G4double ComputeTrueStep(const G4Material*, const G4ParticleDefinition* part, 126 G4double kinEnergy, G4double stepLength); 136 void ComputeTrasportXS(const G4ParticleDefinition* part, G4PhysicsTable* table); 127 137 128 138 inline G4double ComputeValue(G4double x, const G4PhysicsTable* table); 129 130 inline G4double ComputeScatteringAngle(G4double x);131 139 132 140 // hide assignment operator … … 158 166 G4PhysicsTable* invRangeMuon; 159 167 G4PhysicsTable* invRangeProton; 168 G4PhysicsTable* mscElectron; 160 169 161 170 const G4Material* currentMaterial; … … 214 223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 215 224 216 inline G4double G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy, 217 G4double step, 218 const G4Material* mat, 219 const G4String& name) 225 inline G4double 226 G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy, 227 G4double step, 228 const G4Material* mat, 229 const G4String& name) 220 230 { 221 231 return EnergyDispersion(kinEnergy,step,mat,FindParticle(name)); … … 224 234 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 225 235 226 inline G4double G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kinEnergy,227 G4double stepLength,228 const G4Material* mat,229 const G4ParticleDefinition* part)230 { 231 if(!isInitialised) Initialisation(); 236 inline G4double 237 G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kinEnergy, 238 G4double stepLength, 239 const G4Material* mat, 240 const G4ParticleDefinition* part) 241 { 232 242 G4double theta = 0.0; 233 if(mat && part && kinEnergy > 0.0) { 234 G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength); 235 if(step > 0.001*radLength) theta = ComputeScatteringAngle(stepLength); 243 if(SetupKinematics(part, mat, kinEnergy)) { 244 G4double t = stepLength/radLength; 245 G4double y = std::max(0.001, t); 246 theta = 19.23*MeV*std::sqrt(charge2*t)*(1.0 + 0.038*std::log(y))/(beta2*gam*mass); 236 247 } 237 248 return theta; … … 240 251 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 241 252 242 inline G4double G4EnergyLossForExtrapolator::ComputeScatteringAngle(G4double x) 243 { 244 G4double t = x/radLength; 245 return 19.23*MeV*std::sqrt(charge2*t)*(1.0 + 0.038*std::log(t))/(beta2*gam*mass); 246 } 253 inline G4double 254 G4EnergyLossForExtrapolator::ComputeTrueStep(const G4Material* mat, 255 const G4ParticleDefinition* part, 256 G4double kinEnergy, 257 G4double stepLength) 258 { 259 G4double theta = AverageScatteringAngle(kinEnergy,stepLength,mat,part); 260 return stepLength*std::sqrt(1.0 + 0.625*theta*theta); 261 } 247 262 248 263 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 249 264 250 inline G4double G4EnergyLossForExtrapolator::EnergyDispersion(251 G4double kinEnergy,265 inline 266 G4double G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy, 252 267 G4double stepLength, 253 268 const G4Material* mat, 254 269 const G4ParticleDefinition* part) 255 270 { 256 if(!isInitialised) Initialisation();257 271 G4double sig2 = 0.0; 258 if( mat && part) {272 if(SetupKinematics(part, mat, kinEnergy)) { 259 273 G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength); 260 sig2 = (1.0/beta2 - 0.5)* twopi_mc2_rcl2 * tmax*step * electronDensity *charge2;274 sig2 = (1.0/beta2 - 0.5)*twopi_mc2_rcl2*tmax*step*electronDensity*charge2; 261 275 } 262 276 return sig2; … … 269 283 { 270 284 G4double res = 0.0; 271 bool b;272 res = ((*table)[index])->GetValue(x, b);285 G4bool b; 286 if(table) res = ((*table)[index])->GetValue(x, b); 273 287 return res; 274 288 } -
trunk/source/processes/electromagnetic/muons/include/G4MuBetheBlochModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.hh,v 1.1 7 2007/05/22 17:35:58vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MuBetheBlochModel.hh,v 1.18 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 76 76 virtual ~G4MuBetheBlochModel(); 77 77 78 v oid Initialise(const G4ParticleDefinition*, const G4DataVector&);78 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 79 79 80 G4double MinEnergyCut(const G4ParticleDefinition*,81 const G4MaterialCutsCouple*);80 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 81 const G4MaterialCutsCouple*); 82 82 83 83 virtual G4double ComputeCrossSectionPerElectron( … … 113 113 protected: 114 114 115 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,116 G4double kinEnergy);115 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 116 G4double kinEnergy); 117 117 118 118 private: 119 119 120 void SetParticle(const G4ParticleDefinition* p);120 inline void SetParticle(const G4ParticleDefinition* p); 121 121 122 122 // hide assignment operator … … 141 141 }; 142 142 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 144 144 145 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy( 146 const G4ParticleDefinition*, 147 G4double kinEnergy) 145 inline void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p) 148 146 { 149 G4double tau = kinEnergy/mass; 150 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 151 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 152 return tmax; 147 if(!particle) { 148 particle = p; 149 mass = particle->GetPDGMass(); 150 massSquare = mass*mass; 151 ratio = electron_mass_c2/mass; 152 } 153 153 } 154 154 -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlung.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlung.hh,v 1. 29 2007/05/23 08:49:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MuBremsstrahlung.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 86 86 virtual ~G4MuBremsstrahlung(); 87 87 88 G4bool IsApplicable(const G4ParticleDefinition& p);88 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 89 89 90 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,91 const G4Material*,92 G4double cut);90 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 91 const G4Material*, 92 G4double cut); 93 93 94 94 // Print out of the class parameters 95 v oid PrintInfo();95 virtual void PrintInfo(); 96 96 97 97 protected: 98 98 99 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,100 const G4ParticleDefinition*);99 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 100 const G4ParticleDefinition*); 101 101 102 102 private: … … 114 114 115 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....117 118 inline G4bool G4MuBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)119 {120 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);121 }122 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....124 125 inline G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,126 const G4Material*,127 G4double)128 {129 return lowestKinEnergy;130 }131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......133 116 134 117 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlungModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlungModel.hh,v 1. 17 2007/10/11 09:25:31vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MuBremsstrahlungModel.hh,v 1.22 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // 10-02-04 Add lowestKinEnergy (V.Ivanchenko) 46 46 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 47 // 13-02-06 add ComputeCrossSectionPerAtom (mma)47 // 13-02-06 Add ComputeCrossSectionPerAtom (mma) 48 48 // 11-10-07 Add ignoreCut flag (V.Ivanchenko) 49 // 28-02-08 Reorganized protected methods and members (V.Ivanchenko) 50 // 06-03-08 Remove obsolete methods and members (V.Ivanchenko) 49 51 // 50 52 … … 52 54 // Class Description: 53 55 // 54 // Implementation of energy loss for gamma emissionby muons56 // Implementation of bremssrahlung by muons 55 57 56 58 // ------------------------------------------------------------------- … … 61 63 62 64 #include "G4VEmModel.hh" 65 #include "G4NistManager.hh" 63 66 64 67 class G4Element; … … 75 78 virtual ~G4MuBremsstrahlungModel(); 76 79 77 v oid SetParticle(const G4ParticleDefinition*);80 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 78 81 79 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 80 81 void SetLowestKineticEnergy(G4double e) {lowestKinEnergy = e;}; 82 83 G4double MinEnergyCut(const G4ParticleDefinition*, 84 const G4MaterialCutsCouple*); 82 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 83 const G4MaterialCutsCouple*); 85 84 86 85 virtual G4double ComputeCrossSectionPerAtom( … … 90 89 G4double cutEnergy, 91 90 G4double maxEnergy); 92 93 virtual G4double CrossSectionPerVolume(const G4Material*, 94 const G4ParticleDefinition*, 95 G4double kineticEnergy, 96 G4double cutEnergy, 97 G4double maxEnergy); 98 91 99 92 virtual G4double ComputeDEDXPerVolume(const G4Material*, 100 93 const G4ParticleDefinition*, … … 102 95 G4double cutEnergy); 103 96 104 void SampleSecondaries(std::vector<G4DynamicParticle*>*, 105 const G4MaterialCutsCouple*, 106 const G4DynamicParticle*, 107 G4double tmin, 108 G4double maxEnergy); 97 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 98 const G4MaterialCutsCouple*, 99 const G4DynamicParticle*, 100 G4double tmin, 101 G4double maxEnergy); 102 103 inline void SetLowestKineticEnergy(G4double e); 109 104 110 105 protected: 111 106 112 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 113 G4double kineticEnergy); 107 G4double ComputMuBremLoss(G4double Z, G4double tkin, G4double cut); 108 109 G4double ComputeMicroscopicCrossSection(G4double tkin, 110 G4double Z, 111 G4double cut); 114 112 115 public: 113 virtual G4double ComputeDMicroscopicCrossSection(G4double tkin, 114 G4double Z, 115 G4double gammaEnergy); 116 116 117 G4double ComputMuBremLoss(G4double Z, G4double A, G4double tkin, G4double cut); 118 119 G4double ComputeMicroscopicCrossSection(G4double tkin, 120 G4double Z, 121 G4double A, 122 G4double cut); 123 124 G4double ComputeDMicroscopicCrossSection(G4double tkin, 125 G4double Z, 126 G4double A, 127 G4double gammaEnergy); 128 129 inline void SetIgnoreCutFlag(G4bool); 130 131 inline G4bool IgnoreCutFlag() const; 117 inline void SetParticle(const G4ParticleDefinition*); 132 118 133 119 private: 134 120 135 G4DataVector* ComputePartialSumSigma(const G4Material* material,136 G4double tkin, G4double cut);121 G4DataVector* ComputePartialSumSigma(const G4Material* material, 122 G4double tkin, G4double cut); 137 123 138 const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const; 139 140 void MakeSamplingTables(); 141 124 const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const; 142 125 143 126 // hide assignment operator … … 145 128 G4MuBremsstrahlungModel(const G4MuBremsstrahlungModel&); 146 129 130 protected: 131 132 const G4ParticleDefinition* particle; 133 G4NistManager* nist; 134 G4double mass; 135 G4double rmass; 136 G4double cc; 137 G4double coeff; 138 G4double sqrte; 139 G4double bh; 140 G4double bh1; 141 G4double btf; 142 G4double btf1; 143 144 private: 145 147 146 G4ParticleDefinition* theGamma; 148 const G4ParticleDefinition* particle;149 147 G4ParticleChangeForLoss* fParticleChange; 150 148 … … 153 151 G4double lowestKinEnergy; 154 152 G4double minThreshold; 155 G4double mass;156 157 // tables for sampling158 G4int nzdat,ntdat,NBIN;159 static G4double zdat[5],adat[5],tdat[8];160 G4double ya[1001], proba[5][8][1001];161 G4double cutFixed;162 163 G4bool ignoreCut;164 153 165 154 std::vector<G4DataVector*> partialSumSigma; 166 G4bool samplingTablesAreFilled;167 168 155 }; 169 156 170 157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 171 158 172 inline G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy( 173 const G4ParticleDefinition*, 174 G4double kineticEnergy) 159 inline void G4MuBremsstrahlungModel::SetLowestKineticEnergy(G4double e) 175 160 { 176 return kineticEnergy;161 lowestKinEnergy = e; 177 162 } 178 163 179 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 180 165 181 inline void G4MuBremsstrahlungModel::SetIgnoreCutFlag(G4bool val) 166 inline 167 void G4MuBremsstrahlungModel::SetParticle(const G4ParticleDefinition* p) 182 168 { 183 ignoreCut = val; 184 } 185 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 187 188 inline G4bool G4MuBremsstrahlungModel::IgnoreCutFlag() const 189 { 190 return ignoreCut; 169 if(!particle) { 170 particle = p; 171 mass = particle->GetPDGMass(); 172 rmass=mass/electron_mass_c2 ; 173 cc=classic_electr_radius/rmass ; 174 coeff= 16.*fine_structure_const*cc*cc/3. ; 175 } 191 176 } 192 177 -
trunk/source/processes/electromagnetic/muons/include/G4MuIonisation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuIonisation.hh,v 1.3 0 2007/05/23 08:49:32vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MuIonisation.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 95 95 virtual ~G4MuIonisation(); 96 96 97 G4bool IsApplicable(const G4ParticleDefinition& p);97 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 98 98 99 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,100 const G4Material*, G4double cut);99 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 100 const G4Material*, G4double cut); 101 101 102 102 // Print out of the class parameters 103 v oid PrintInfo();103 virtual void PrintInfo(); 104 104 105 105 protected: … … 127 127 128 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....130 131 inline G4bool G4MuIonisation::IsApplicable(const G4ParticleDefinition& p)132 {133 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);134 }135 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....137 138 inline G4double G4MuIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,139 const G4Material*,140 G4double cut)141 {142 G4double x = 0.5*cut/electron_mass_c2;143 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));144 return mass*(g - 1.0);145 }146 147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....148 129 149 130 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuMultipleScattering.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuMultipleScattering.hh,v 1. 1 2007/10/26 09:52:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MuMultipleScattering.hh,v 1.2 2008/04/13 17:19:13 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 60 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 61 61 62 class G4 MuMscModel;62 class G4VMscModel; 63 63 64 64 class G4MuMultipleScattering : public G4VMultipleScattering … … 94 94 private: // data members 95 95 96 G4 MuMscModel* mscModel;96 G4VMscModel* mscModel; 97 97 98 98 G4double thetaLimit; -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProduction.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProduction.hh,v 1. 29 2007/05/23 08:49:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MuPairProduction.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 84 84 virtual ~G4MuPairProduction(); 85 85 86 G4bool IsApplicable(const G4ParticleDefinition& p);86 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 87 87 88 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,89 const G4Material*, G4double cut);88 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 89 const G4Material*, G4double cut); 90 90 91 91 // Print out of the class parameters 92 v oid PrintInfo();92 virtual void PrintInfo(); 93 93 94 94 protected: 95 95 96 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,97 const G4ParticleDefinition*);96 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 97 const G4ParticleDefinition*); 98 98 99 99 private: … … 113 113 114 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....116 117 inline G4bool G4MuPairProduction::IsApplicable(const G4ParticleDefinition& p)118 {119 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);120 }121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....123 124 inline G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,125 const G4Material*,126 G4double)127 {128 return lowestKinEnergy;129 }130 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......132 115 133 116 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProductionModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProductionModel.hh,v 1.2 4 2007/10/11 13:52:03vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MuPairProductionModel.hh,v 1.28 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 48 48 // 12-05-06 Add parameter to SelectRandomAtom (A.Bogdanov) 49 49 // 11-10-07 Add ignoreCut flag (V.Ivanchenko) 50 // 28-02-08 Reorganized protected methods and members (V.Ivanchenko) 50 51 51 52 // … … 62 63 63 64 #include "G4VEmModel.hh" 65 #include "G4NistManager.hh" 64 66 #include <vector> 65 67 … … 70 72 class G4MuPairProductionModel : public G4VEmModel 71 73 { 72 73 74 public: 74 75 … … 78 79 virtual ~G4MuPairProductionModel(); 79 80 80 void SetParticle(const G4ParticleDefinition*); 81 82 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 83 84 void SetLowestKineticEnergy(G4double e) {lowestKinEnergy = e;}; 85 86 G4double MinEnergyCut(const G4ParticleDefinition*, 87 const G4MaterialCutsCouple*); 81 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 82 88 83 89 84 virtual G4double ComputeCrossSectionPerAtom( … … 94 89 G4double maxEnergy); 95 90 96 virtual G4double CrossSectionPerVolume(const G4Material*,97 const G4ParticleDefinition*,98 G4double kineticEnergy,99 G4double cutEnergy,100 G4double maxEnergy);101 102 91 virtual G4double ComputeDEDXPerVolume(const G4Material*, 103 92 const G4ParticleDefinition*, … … 105 94 G4double cutEnergy); 106 95 107 void SampleSecondaries(std::vector<G4DynamicParticle*>*, 108 const G4MaterialCutsCouple*, 109 const G4DynamicParticle*, 110 G4double tmin, 111 G4double maxEnergy); 96 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 97 const G4MaterialCutsCouple*, 98 const G4DynamicParticle*, 99 G4double tmin, 100 G4double maxEnergy); 101 102 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 103 const G4MaterialCutsCouple*); 104 105 inline void SetLowestKineticEnergy(G4double e); 106 107 inline void SetParticle(const G4ParticleDefinition*); 112 108 113 109 protected: 114 115 inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,116 G4double kineticEnergy);117 118 119 public:120 110 121 111 G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut, … … 126 116 G4double cut); 127 117 128 G4double ComputeDMicroscopicCrossSection(G4double tkin, 129 G4double Z, 130 G4double pairEnergy); 131 132 inline void SetIgnoreCutFlag(G4bool); 133 134 inline G4bool IgnoreCutFlag() const; 118 virtual G4double ComputeDMicroscopicCrossSection(G4double tkin, 119 G4double Z, 120 G4double pairEnergy); 121 122 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 123 G4double kineticEnergy); 124 125 inline void SetCurrentElement(G4double Z); 135 126 136 127 private: … … 144 135 void MakeSamplingTables(); 145 136 146 void SetCurrentElement(G4double Z);147 148 137 inline G4double InterpolatedIntegralCrossSection( 149 138 G4double dt, G4double dz, G4int iz, … … 154 143 G4MuPairProductionModel(const G4MuPairProductionModel&); 155 144 156 G4ParticleDefinition* theElectron; 157 G4ParticleDefinition* thePositron; 158 G4ParticleChangeForLoss* fParticleChange; 159 G4ParticleChangeForGamma* gParticleChange; 160 161 G4double minPairEnergy; 162 G4double lowestKinEnergy; 145 protected: 146 147 const G4ParticleDefinition* particle; 148 G4NistManager* nist; 163 149 164 150 G4double factorForCross; … … 170 156 G4double lnZ; 171 157 172 const G4ParticleDefinition* particle; 158 static G4double xgi[8],wgi[8]; 159 160 private: 161 162 G4ParticleDefinition* theElectron; 163 G4ParticleDefinition* thePositron; 164 G4ParticleChangeForLoss* fParticleChange; 165 166 G4double minPairEnergy; 167 G4double lowestKinEnergy; 173 168 174 169 // tables for sampling … … 177 172 G4int nbiny; 178 173 size_t nmaxElements; 179 static G4double zdat[5],adat[5],tdat[8] ,xgi[8],wgi[8];174 static G4double zdat[5],adat[5],tdat[8]; 180 175 G4double ya[1001],proba[5][8][1001]; 181 176 … … 184 179 G4double dy; 185 180 186 G4bool ignoreCut;187 188 181 G4bool samplingTablesAreFilled; 189 182 std::vector<G4double> partialSum; … … 192 185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 193 186 194 inline G4double G4MuPairProductionModel::MaxSecondaryEnergy( 195 const G4ParticleDefinition*, 196 G4double kineticEnergy) 197 { 198 G4double maxPairEnergy = kineticEnergy + particleMass*(1.0 - 0.75*sqrte*z13); 199 return maxPairEnergy; 187 inline void G4MuPairProductionModel::SetLowestKineticEnergy(G4double e) 188 { 189 lowestKinEnergy = e; 190 } 191 192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 193 194 inline 195 void G4MuPairProductionModel::SetParticle(const G4ParticleDefinition* p) 196 { 197 if(!particle) { 198 particle = p; 199 particleMass = particle->GetPDGMass(); 200 } 200 201 } 201 202 … … 206 207 if(Z != currentZ) { 207 208 currentZ = Z; 208 z13 = std::pow(Z,0.333333333); 209 G4int iz = G4int(Z); 210 z13 = nist->GetZ13(iz); 209 211 z23 = z13*z13; 210 lnZ = std::log(Z);212 lnZ = nist->GetLOGZ(iz); 211 213 } 212 214 } … … 229 231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 230 232 231 inline void G4MuPairProductionModel::SetIgnoreCutFlag(G4bool val)232 {233 ignoreCut = val;234 }235 236 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......237 238 inline G4bool G4MuPairProductionModel::IgnoreCutFlag() const239 {240 return ignoreCut;241 }242 243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......244 245 233 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
