Changeset 961 for trunk/source/processes/electromagnetic/highenergy/include/G4eeToHadronsMultiModel.hh
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/highenergy/include/G4eeToHadronsMultiModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToHadronsMultiModel.hh,v 1. 5 2007/05/23 08:50:41vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eeToHadronsMultiModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 59 59 60 60 class G4eeCrossSections; 61 class G4Vee2hadrons; 61 62 62 63 class G4eeToHadronsMultiModel : public G4VEmModel … … 84 85 G4double maxEnergy = DBL_MAX); 85 86 86 virtual G4double ComputeCrossSectionPerElectron(87 const G4ParticleDefinition*,88 G4double kineticEnergy,89 G4double cutEnergy = 0.0,90 G4double maxEnergy = DBL_MAX);91 92 87 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 93 88 const G4MaterialCutsCouple*, … … 96 91 G4double maxEnergy = DBL_MAX); 97 92 98 v oid PrintInfo();93 virtual void PrintInfo(); 99 94 100 95 // Set the factor to artificially increase the crossSection (default 1) 101 96 void SetCrossSecFactor(G4double fac); 102 97 98 inline G4double ComputeCrossSectionPerElectron( 99 const G4ParticleDefinition*, 100 G4double kineticEnergy, 101 G4double cutEnergy = 0.0, 102 G4double maxEnergy = DBL_MAX); 103 103 104 private: 105 106 void AddEEModel(G4Vee2hadrons*); 104 107 105 108 // hide assignment operator … … 128 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 132 130 inline G4double G4eeToHadronsMultiModel::CrossSectionPerVolume(131 const G4Material* mat,132 const G4ParticleDefinition* p,133 G4double kineticEnergy,134 G4double, G4double)135 {136 return mat->GetElectronDensity()*137 ComputeCrossSectionPerElectron(p, kineticEnergy);138 }139 140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....141 142 inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom(143 const G4ParticleDefinition* p,144 G4double kineticEnergy,145 G4double Z, G4double,146 G4double, G4double)147 {148 return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);149 }150 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....152 153 133 inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron( 154 134 const G4ParticleDefinition*, … … 169 149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 170 150 171 inline172 void G4eeToHadronsMultiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,173 const G4MaterialCutsCouple* couple,174 const G4DynamicParticle* dp,175 G4double, G4double)176 {177 G4double kinEnergy = dp->GetKineticEnergy();178 if (kinEnergy > thKineticEnergy) {179 G4double q = cumSum[nModels-1]*G4UniformRand();180 for(G4int i=0; i<nModels; i++) {181 if(q <= cumSum[i]) {182 (models[i])->SampleSecondaries(newp, couple,dp);183 if(newp->size() > 0) fParticleChange->ProposeTrackStatus(fStopAndKill);184 break;185 }186 }187 }188 }189 190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....191 192 151 #endif
Note: See TracChangeset
for help on using the changeset viewer.