90 if(edep <= 0.0) {
return 0.0; }
100 evis /= (1.0 + bfactor*edep/manager->
GetRange(electron,edep,couple));
107 if(nloss < 0.0) nloss = 0.0;
111 if(2112 == pdgCode || eloss < 0.0 || length <= 0.0) {
117 if(eloss > 0.0) { eloss /= (1.0 + bfactor*eloss/length); }
124 nloss /= (1.0 + bfactor*nloss/range);
127 evis = eloss + nloss;
141 for(
G4int j=0; j<nG4Birks; ++j) {
142 if(name == g4MatNames[j]) {
144 G4cout <<
"### G4EmSaturation::FindG4BirksCoefficient for "
145 << name <<
" is " << g4MatData[j]*
MeV/
mm <<
" mm/MeV "
150 return FindBirksCoefficient(mat);
163 if(mat == curMaterial) {
return curBirks; }
171 for(
G4int i=0; i<nMaterials; ++i) {
172 if(mat == matPointers[i]) {
174 curRatio = massFactors[i];
175 curChargeSq = effCharges[i];
185 if(curBirks == 0.0) {
186 for(
G4int j=0; j<nG4Birks; ++j) {
187 if(name == g4MatNames[j]) {
189 curBirks = g4MatData[j];
195 if(curBirks == 0.0 && verbose > 0) {
196 G4cout <<
"### G4EmSaturation::FindBirksCoefficient fails "
197 " for material " << name <<
G4endl;
207 for (
size_t i=0; i<nelm; ++i) {
208 const G4Element* elm = (*theElementVector)[i];
210 G4double w = Z*Z*theAtomNumDensityVector[i];
219 matPointers.push_back(mat);
220 matNames.push_back(name);
221 massFactors.push_back(curRatio);
222 effCharges.push_back(curChargeSq);
224 if(curBirks > 0.0 && verbose > 0) {
225 G4cout <<
"### G4EmSaturation::FindBirksCoefficient Birks coefficient for "
226 << name <<
" " << curBirks*
MeV/
mm <<
" mm/MeV" <<
G4endl;
236 G4cout <<
"### Birks coeffitients used in run time" <<
G4endl;
237 for(
G4int i=0; i<nMaterials; ++i) {
238 G4double br = matPointers[i]->GetIonisation()->GetBirksConstant();
239 G4cout <<
" " << matNames[i] <<
" "
240 << br*
MeV/
mm <<
" mm/MeV" <<
" "
241 << br*matPointers[i]->GetDensity()*
MeV*
cm2/
g
253 G4cout <<
"### Birks coeffitients for Geant4 materials" <<
G4endl;
254 for(
G4int i=0; i<nG4Birks; ++i) {
255 G4cout <<
" " << g4MatNames[i] <<
" "
263 void G4EmSaturation::Initialise()
267 g4MatNames.push_back(
"G4_POLYSTYRENE");
268 g4MatData.push_back(0.07943*
mm/
MeV);
272 g4MatNames.push_back(
"G4_BGO");
273 g4MatData.push_back(0.008415*
mm/
MeV);
280 g4MatNames.push_back(
"G4_lAr");
281 g4MatData.push_back(0.1576*
mm/
MeV);
294 nG4Birks = g4MatData.size();