435 if (verboseLevel > 3)
436 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeRayleighModel" <<
G4endl;
440 if (photonEnergy0 <= fIntrinsicLowEnergyLimit)
456 if (!pMaxTable || !samplingTable || !logAtomicCrossSection || !atomicFormFactor ||
462 if (!logAtomicCrossSection)
463 logAtomicCrossSection =
new std::map<G4int,G4PhysicsFreeVector*>;
464 if (!atomicFormFactor)
465 atomicFormFactor =
new std::map<G4int,G4PhysicsFreeVector*>;
466 if (!logFormFactorTable)
467 logFormFactorTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
469 pMaxTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
471 samplingTable =
new std::map<const G4Material*,G4PenelopeSamplingData*>;
474 if (!samplingTable->count(theMat))
478 if (verboseLevel > 0)
482 ed <<
"Unable to find the samplingTable data for " <<
484 ed <<
"This can happen only in Unit Tests" <<
G4endl;
485 G4Exception(
"G4PenelopeRayleighModel::SampleSecondaries()",
493 G4int iZ = (
G4int) theElementVector->at(j)->GetZ();
494 if (!logAtomicCrossSection->count(iZ))
503 if (!logFormFactorTable->count(theMat))
504 BuildFormFactorTable(theMat);
507 if (!(samplingTable->count(theMat)))
508 InitializeSamplingAlgorithm(theMat);
511 if (!pMaxTable->count(theMat))
512 GetPMaxTable(theMat);
533 G4double G = 0.5*(1+cosTheta*cosTheta);
541 G4double LastQ2inTheTable = theDataTable->
GetX(nData-1);
559 cosTheta = 1.0-2.0*xx/q2max;
560 G4double G = 0.5*(1+cosTheta*cosTheta);
566 G4double sinTheta = std::sqrt(1-cosTheta*cosTheta);
570 G4double dirX = sinTheta*std::cos(phi);
571 G4double dirY = sinTheta*std::sin(phi);
577 photonDirection1.rotateUz(photonDirection0);
std::vector< G4Element * > G4ElementVector
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const
const G4String & GetName() const
const G4ElementVector * GetElementVector() const
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static constexpr double twopi
size_t GetNumberOfStoredPoints()
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double Value(G4double theEnergy, size_t &lastidx) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double SampleValue(G4double rndm)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetX(size_t index)
G4ParticleChangeForGamma * fParticleChange
void SetProposedKineticEnergy(G4double proposedKinEnergy)
size_t GetNumberOfElements() const
void ProposeTrackStatus(G4TrackStatus status)
const G4Material * GetMaterial() const