76 G4cout <<
"Livermore Polarized Rayleigh is constructed " <<
G4endl
114 G4cout <<
"Calling G4LivermorePolarizedRayleighModel::Initialise()" <<
G4endl;
122 G4String formFactorFile =
"rayl/re-ff-";
130 char* path = std::getenv(
"G4LEDATA");
135 for(
G4int i=0; i<numOfCouples; ++i)
143 for (
G4int j=0; j<nelm; ++j)
174 G4cout <<
"Calling ReadData() of G4LivermoreRayleighModel"
180 const char* datadir = path;
184 datadir = std::getenv(
"G4LEDATA");
187 G4Exception(
"G4LivermoreRayleighModelModel::ReadData()",
"em0006",
189 "Environment variable G4LEDATA not defined");
201 std::ostringstream ostCS;
202 ostCS << datadir <<
"/livermore/rayl/re-cs-" << Z <<
".dat";
203 std::ifstream finCS(ostCS.str().c_str());
205 if( !finCS .is_open() )
208 ed <<
"G4LivermorePolarizedRayleighModel data file <" << ostCS.str().c_str()
209 <<
"> is not opened!" <<
G4endl;
211 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
217 G4cout <<
"File " << ostCS.str()
218 <<
" is opened by G4LivermoreRayleighModel" <<
G4endl;
234 G4cout <<
"G4LivermoreRayleighModel::ComputeCrossSectionPerAtom()"
244 if(intZ < 1 || intZ >
maxZ) {
return xs; }
253 if(!pv) {
return xs; }
260 }
else if(e >= pv->
Energy(0)) {
290 G4cout <<
"Calling SampleSecondaries() of G4LivermorePolarizedRayleighModel" <<
G4endl;
332 zDir=outcomingPhotonCosTheta;
333 xDir=std::sqrt(1-outcomingPhotonCosTheta*outcomingPhotonCosTheta);
335 xDir*=std::cos(outcomingPhotonPhi);
336 yDir*=std::sin(outcomingPhotonPhi);
343 G4ThreeVector outcomingPhotonPolarization(xPrime*std::cos(beta) + yPrime*std::sin(beta));
381 if (incomingPhotonEnergy > 5.*
MeV)
392 fCosTheta = (1.+cosTheta*cosTheta)/2.;
396 x = xFactor*std::sqrt((1.-cosTheta)/2.);
427 sin2Theta=1.-cosTheta*cosTheta;
432 cosPhi = std::cos(phi);
433 phiProbability= 1. - sin2Theta*cosPhi*cosPhi;
462 if ((!photonPolarization.
isOrthogonal(photonMomentumDirection, 1
e-6)) || photonPolarization.
mag()==0.)
475 photonPolarization=
e1+
e2;
477 else if (photonPolarization.
howOrthogonal(photonMomentumDirection) != 0.)
482 photonPolarization=photonPolarization.
perpPart(photonMomentumDirection);
485 return photonPolarization.
unit();
496 G4AutoLock l(&LivermorePolarizedRayleighModelMutex);