- Timestamp:
- Apr 17, 2009, 12:17:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/utils/src/G4VEmModel.cc
r961 r991 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmModel.cc,v 1.2 5 2009/02/19 09:57:36 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-02 -ref-02$26 // $Id: G4VEmModel.cc,v 1.20 2008/11/13 23:13:18 schaelic Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 25.10.2005 Set default highLimit=100.TeV (V.Ivanchenko) 42 42 // 06.02.2006 add method ComputeMeanFreePath() (mma) 43 // 16.02.2009 Move implementations of virtual methods to source (VI)44 43 // 45 44 // … … 61 60 fluc(0), name(nam), lowLimit(0.1*keV), highLimit(100.0*TeV), 62 61 polarAngleLimit(0.0),secondaryThreshold(DBL_MAX),theLPMflag(false), 63 pParticleChange(0),nuclearStopping(false), 64 currentCouple(0),currentElement(0), 65 nsec(5),flagDeexcitation(false) 62 pParticleChange(0),nuclearStopping(false),nsec(5) 66 63 { 67 64 xsec.resize(nsec); … … 85 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 86 83 84 G4double G4VEmModel::CrossSectionPerVolume(const G4Material* material, 85 const G4ParticleDefinition* p, 86 G4double ekin, 87 G4double emin, 88 G4double emax) 89 { 90 SetupForMaterial(p, material, ekin); 91 G4double cross = 0.0; 92 const G4ElementVector* theElementVector = material->GetElementVector(); 93 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 94 G4int nelm = material->GetNumberOfElements(); 95 if(nelm > nsec) { 96 xsec.resize(nelm); 97 nsec = nelm; 98 } 99 for (G4int i=0; i<nelm; i++) { 100 cross += theAtomNumDensityVector[i]* 101 ComputeCrossSectionPerAtom(p,(*theElementVector)[i],ekin,emin,emax); 102 xsec[i] = cross; 103 } 104 return cross; 105 } 106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 108 109 G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* p, 110 G4double ekin, 111 const G4Material* material, 112 G4double emin, 113 G4double emax) 114 { 115 G4double mfp = DBL_MAX; 116 G4double cross = CrossSectionPerVolume(material,p,ekin,emin,emax); 117 if (cross > DBL_MIN) mfp = 1./cross; 118 return mfp; 119 } 120 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 122 87 123 void G4VEmModel::InitialiseElementSelectors(const G4ParticleDefinition* p, 88 124 const G4DataVector& cuts) 89 125 { 90 // initialise before run91 flagDeexcitation = false;92 93 126 G4int nbins = G4int(std::log10(highLimit/lowLimit) + 0.5); 94 127 if(nbins < 3) nbins = 3; … … 129 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 130 163 131 G4double G4VEmModel::ComputeDEDXPerVolume(const G4Material*,132 const G4ParticleDefinition*,133 G4double,G4double)134 {135 return 0.0;136 }137 164 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......139 140 G4double G4VEmModel::CrossSectionPerVolume(const G4Material* material,141 const G4ParticleDefinition* p,142 G4double ekin,143 G4double emin,144 G4double emax)145 {146 SetupForMaterial(p, material, ekin);147 G4double cross = 0.0;148 const G4ElementVector* theElementVector = material->GetElementVector();149 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume();150 G4int nelm = material->GetNumberOfElements();151 if(nelm > nsec) {152 xsec.resize(nelm);153 nsec = nelm;154 }155 for (G4int i=0; i<nelm; i++) {156 cross += theAtomNumDensityVector[i]*157 ComputeCrossSectionPerAtom(p,(*theElementVector)[i],ekin,emin,emax);158 xsec[i] = cross;159 }160 return cross;161 }162 163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......164 165 G4double G4VEmModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,166 G4double, G4double, G4double,167 G4double, G4double)168 {169 return 0.0;170 }171 172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......173 174 G4double G4VEmModel::MinEnergyCut(const G4ParticleDefinition*,175 const G4MaterialCutsCouple*)176 {177 return 0.0;178 }179 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......181 182 G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p,183 const G4Material*, G4double)184 {185 G4double q = p->GetPDGCharge()/CLHEP::eplus;186 return q*q;187 }188 189 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......190 191 G4double G4VEmModel::GetParticleCharge(const G4ParticleDefinition* p,192 const G4Material*, G4double)193 {194 return p->GetPDGCharge();195 }196 197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......198 199 void G4VEmModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,200 const G4DynamicParticle*,201 G4double&,G4double&,G4double)202 {}203 204 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......205 206 void G4VEmModel::SampleDeexcitationAlongStep(const G4Material*,207 const G4Track&,208 G4double& )209 {}210 211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......212 213 G4double G4VEmModel::MaxSecondaryEnergy(const G4ParticleDefinition*,214 G4double kineticEnergy)215 {216 return kineticEnergy;217 }218 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......220 221 void G4VEmModel::SampleScattering(const G4DynamicParticle*, G4double)222 {}223 224 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......225 226 G4double G4VEmModel::ComputeTruePathLengthLimit(const G4Track&,227 G4PhysicsTable*,228 G4double)229 {230 return DBL_MAX;231 }232 233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......234 235 G4double G4VEmModel::ComputeGeomPathLength(G4double truePathLength)236 {237 return truePathLength;238 }239 240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......241 242 G4double G4VEmModel::ComputeTrueStepLength(G4double geomPathLength)243 {244 return geomPathLength;245 }246 247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......248 249 void G4VEmModel::DefineForRegion(const G4Region*)250 {}251 252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......253 254 void G4VEmModel::SetupForMaterial(const G4ParticleDefinition*,255 const G4Material*, G4double)256 {}257 258 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.