62 G4cout <<
"G4LivermoreNuclearGammaConversionModel is constructed " <<
G4endl;
89 G4cout <<
"Calling Initialise() of G4LivermoreNuclearGammaConversionModel."
92 << LowEnergyLimit() /
MeV <<
" MeV - "
93 << HighEnergyLimit() /
GeV <<
" GeV"
102 InitialiseElementSelectors(particle, cuts);
106 char* path = std::getenv(
"G4LEDATA");
113 for(
G4int i=0; i<numOfCouples; ++i)
120 for (
G4int j=0; j<nelm; ++j)
125 if(!
data[Z]) { ReadData(Z, path); }
129 if(isInitialised) {
return; }
130 fParticleChange = GetParticleChangeForGamma();
131 isInitialised =
true;
149 return lowEnergyLimit;
156 if (verboseLevel > 1)
158 G4cout <<
"Calling ReadData() of G4LivermoreNuclearGammaConversionModel"
163 if(
data[Z]) {
return; }
165 const char* datadir = path;
169 datadir = std::getenv(
"G4LEDATA");
172 G4Exception(
"G4LivermoreNuclearGammaConversionModel::ReadData()",
174 "Environment variable G4LEDATA not defined");
185 std::ostringstream ost;
186 ost << datadir <<
"/livermore/pairdata/pp-pair-cs-" << Z <<
".dat";
187 std::ifstream
fin(ost.str().c_str());
192 ed <<
"G4LivermoreNuclearGammaConversionModel data file <" << ost.str().c_str()
193 <<
"> is not opened!" <<
G4endl;
194 G4Exception(
"G4LivermoreNuclearGammaConversionModel::ReadData()",
196 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
203 if(verboseLevel > 3) {
G4cout <<
"File " << ost.str()
204 <<
" is opened by G4LivermoreNuclearGammaConversionModel" <<
G4endl;}
210 data[
Z] ->SetSpline(
true);
222 if (verboseLevel > 1)
224 G4cout <<
"Calling ComputeCrossSectionPerAtom() of G4LivermoreNuclearGammaConversionModel"
228 if (GammaEnergy < lowEnergyLimit) {
return 0.0; }
234 if(intZ < 1 || intZ >
maxZ) {
return xs; }
242 InitialiseForElement(0, intZ);
244 if(!pv) {
return xs; }
247 xs = pv->
Value(GammaEnergy);
252 G4cout <<
"****** DEBUG: tcs value for Z=" << Z <<
" at energy (MeV)="
254 G4cout <<
" cs (Geant4 internal unit)=" << xs <<
G4endl;
255 G4cout <<
" -> first cs value in EADL data file (iu) =" << (*pv)[0] <<
G4endl;
256 G4cout <<
" -> last cs value in EADL data file (iu) =" << (*pv)[
n] <<
G4endl;
257 G4cout <<
"*********************************************************" <<
G4endl;
267 std::vector<G4DynamicParticle*>* fvect,
283 if (verboseLevel > 1) {
284 G4cout <<
"Calling SampleSecondaries() of G4LivermoreNuclearGammaConversionModel"
295 if (photonEnergy < smallEnergy )
297 epsilon = epsilon0Local + (0.5 - epsilon0Local) *
G4UniformRand();
304 const G4Element* element = SelectRandomAtom(couple,particle,photonEnergy);
308 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - element = 0"
315 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - ionisation = 0"
322 if (photonEnergy > 50. *
MeV) fZ += 8. * (element->
GetfCoulomb());
330 G4double epsilon1 = 0.5 - 0.5 * std::sqrt(1. - screenMin / screenMax) ;
332 G4double epsilonRange = 0.5 - epsilonMin ;
338 G4double f10 = ScreenFunction1(screenMin) - fZ;
339 G4double f20 = ScreenFunction2(screenMin) - fZ;
347 epsilon = 0.5 - epsilonRange * std::pow(
G4UniformRand(), 0.333333) ;
348 screen = screenFactor / (epsilon * (1. -
epsilon));
349 gReject = (ScreenFunction1(screen) - fZ) / f10 ;
354 screen = screenFactor / (epsilon * (1 -
epsilon));
355 gReject = (ScreenFunction2(screen) - fZ) / f20 ;
368 electronTotEnergy = (1. -
epsilon) * photonEnergy;
369 positronTotEnergy = epsilon * photonEnergy;
373 positronTotEnergy = (1. -
epsilon) * photonEnergy;
374 electronTotEnergy = epsilon * photonEnergy;
400 G4double dxEle= std::sin(thetaEle)*std::cos(phi),dyEle= std::sin(thetaEle)*std::sin(phi),dzEle=std::cos(thetaEle);
401 G4double dxPos=-std::sin(thetaPos)*std::cos(phi),dyPos=-std::sin(thetaPos)*std::sin(phi),dzPos=std::cos(thetaPos);
411 electronDirection.
rotateUz(photonDirection);
421 positronDirection.
rotateUz(photonDirection);
428 fvect->push_back(particle1);
429 fvect->push_back(particle2);
432 fParticleChange->SetProposedKineticEnergy(0.);
446 if (screenVariable > 1.)
447 value = 42.24 - 8.368 *
G4Log(screenVariable + 0.952);
449 value = 42.392 - screenVariable * (7.796 - 1.961 * screenVariable);
463 if (screenVariable > 1.)
464 value = 42.24 - 8.368 *
G4Log(screenVariable + 0.952);
466 value = 41.405 - screenVariable * (5.828 - 0.8945 * screenVariable);
480 G4AutoLock l(&LivermoreNuclearGammaConversionModelMutex);
483 if(!
data[Z]) { ReadData(Z); }