66 G4cout <<
"G4LivermoreGammaConversionModel is constructed " <<
G4endl;
96 G4cout <<
"Calling Initialise() of G4LivermoreGammaConversionModel."
118 char* path = std::getenv(
"G4LEDATA");
124 for(
G4int i=0; i<numOfCouples; ++i)
132 for (
G4int j=0; j<nelm; ++j)
166 G4cout <<
"Calling ReadData() of G4LivermoreGammaConversionModel"
170 if(
data[Z]) {
return; }
172 const char* datadir = path;
176 datadir = std::getenv(
"G4LEDATA");
179 G4Exception(
"G4LivermoreGammaConversionModel::ReadData()",
181 "Environment variable G4LEDATA not defined");
186 std::ostringstream ost;
187 ost << datadir <<
"/livermore/pair/pp-cs-" << Z <<
".dat";
188 std::ifstream
fin(ost.str().c_str());
193 ed <<
"G4LivermoreGammaConversionModel data file <" << ost.str().c_str()
194 <<
"> is not opened!" <<
G4endl;
195 G4Exception(
"G4LivermoreGammaConversionModel::ReadData()",
197 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
204 <<
" is opened by G4LivermoreGammaConversionModel" <<
G4endl;}
209 data[
Z] ->SetSpline(
true);
220 G4cout <<
"G4LivermoreGammaConversionModel::ComputeCrossSectionPerAtom() Z= "
238 if(!pv) {
return xs; }
241 xs = pv->
Value(GammaEnergy);
245 G4cout <<
"*** Gamma conversion xs for Z=" << Z <<
" at energy E(MeV)="
256 std::vector<G4DynamicParticle*>* fvect,
273 G4cout <<
"Calling SampleSecondaries() of G4LivermoreGammaConversionModel"
287 if (photonEnergy < smallEnergy )
289 epsilon = epsilon0Local + (0.5 - epsilon0Local) * rndmEngine->
flat();
319 if (photonEnergy > midEnergy) { fZ += 8. * (element->
GetfCoulomb()); }
327 G4double epsilon1 = 0.5 - 0.5 * std::sqrt(1. - screenMin / screenMax) ;
329 G4double epsilonRange = 0.5 - epsilonMin ;
342 if (normF1 > (normF1 + normF2)*rndmEngine->
flat() )
344 epsilon = 0.5 - epsilonRange *
G4Exp(
G4Log(rndmEngine->
flat())/3.);
345 screen = screenFactor / (epsilon * (1. -
epsilon));
350 epsilon = epsilonMin + epsilonRange * rndmEngine->
flat();
351 screen = screenFactor / (epsilon * (1 -
epsilon));
354 }
while ( gReject < rndmEngine->
flat() );
363 if (rndmEngine->
flat() > 0.5)
365 electronTotEnergy = (1. -
epsilon) * photonEnergy;
366 positronTotEnergy = epsilon * photonEnergy;
370 positronTotEnergy = (1. -
epsilon) * photonEnergy;
371 electronTotEnergy = epsilon * photonEnergy;
379 static const G4double a2 = 0.5333333333;
384 G4double sinte = std::sin(thetaEle);
385 G4double coste = std::cos(thetaEle);
388 G4double sintp = std::sin(thetaPos);
389 G4double costp = std::cos(thetaPos);
401 G4ThreeVector electronDirection (sinte*cosp, sinte*sinp, coste);
402 electronDirection.
rotateUz(photonDirection);
411 G4ThreeVector positronDirection (-sintp*cosp, -sintp*sinp, costp);
412 positronDirection.
rotateUz(photonDirection);
419 fvect->push_back(particle1);
420 fvect->push_back(particle2);
438 G4AutoLock l(&LivermoreGammaConversionModelMutex);
479 tcross = (0.0 <
cross) ? tcross/cross : 0.0;