229 if (verboseLevel > 3) {
230 G4cout <<
"Calling SampleSecondaries() of G4LivermorePolarizedPhotoElectricGDModel"
235 if (verboseLevel > 3) {
236 G4cout <<
"G4LivermorePolarizedPhotoElectricGDModel::SampleSecondaries() Egamma(keV)= "
250 if(fWater && (material == fWater ||
252 if(photonEnergy <= fWaterEnergyLimit) {
265 if(!(gammaPolarization0.
isOrthogonal(photonDirection, 1e-6))||(gammaPolarization0.
mag()==0))
267 gammaPolarization0 = GetRandomPolarization(photonDirection);
273 gammaPolarization0 = GetPerpendicularPolarization(photonDirection, gammaPolarization0);
293 if(Z >= maxZ) { Z = maxZ-1; }
296 if(!fCrossSection[Z]) {
303 size_t nn = fNShellsUsed[
Z];
306 if(photonEnergy >= (*(fParam[Z]))[0]) {
311 G4int idx = nn*6 - 4;
315 + x1*(*(fParam[
Z]))[idx+1]
316 + x2*(*(fParam[
Z]))[idx+2]
317 + x3*(*(fParam[
Z]))[idx+3]
318 + x4*(*(fParam[
Z]))[idx+4]);
319 for(shellIdx=0; shellIdx<
nn; ++shellIdx) {
320 idx = shellIdx*6 + 2;
321 if(photonEnergy > (*(fParam[Z]))[idx-1]) {
322 G4double cs = (*(fParam[
Z]))[idx] + x1*(*(fParam[
Z]))[idx+1]
323 + x2*(*(fParam[
Z]))[idx+2] + x3*(*(fParam[
Z]))[idx+3]
324 + x4*(*(fParam[
Z]))[idx+4];
325 if(cs >= cs0) {
break; }
328 if(shellIdx >= nn) { shellIdx = nn-1; }
336 if(photonEnergy >= (*(fParam[Z]))[1]) {
337 cs *= (fCrossSection[
Z])->
Value(photonEnergy);
339 cs *= (fCrossSectionLE[
Z])->
Value(photonEnergy);
342 for(
size_t j=0; j<
nn; ++j) {
344 if(photonEnergy > (*(fParam[Z]))[6*shellIdx+1]) {
347 if(cs <= 0.0 || j+1 == nn) {
break; }
361 if(fDeexcitationActive && shellIdx + 1 < nn) {
368 if(photonEnergy < bindingEnergy) {
379 G4double costheta = SetCosTheta(eKineticEnergy);
380 G4double sintheta = sqrt(1. - costheta*costheta);
381 G4double phi = SetPhi(photonEnergy,eKineticEnergy,costheta);
386 SystemOfRefChange(photonDirection, electronDirection, gammaPolarization0);
390 fvect->push_back(electron);
397 G4int nbefore = fvect->size();
400 G4int nafter = fvect->size();
401 if(nafter > nbefore) {
403 for (
G4int j=nbefore; j<nafter; ++j) {
405 G4double e = ((*fvect)[j])->GetKineticEnergy();
406 if(esec + e > edep) {
409 ((*fvect)[j])->SetKineticEnergy(e);
412 for (
G4int jj=nafter-1; jj>j; --jj) {
G4ParticleChangeForGamma * fParticleChange
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
G4double GetKineticEnergy() const
bool isOrthogonal(const Hep3Vector &v, double epsilon=tolerance) const
double howOrthogonal(const Hep3Vector &v) const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4int GetComponentID(G4int Z, size_t idx)
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetPolarization() const
G4double GetValueForComponent(G4int Z, size_t idx, G4double kinEnergy)
const G4Material * GetBaseMaterial() const
static G4Electron * Electron()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeTrackStatus(G4TrackStatus status)
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
G4double bindingEnergy(G4int A, G4int Z)
static constexpr double keV
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
const G4Material * GetMaterial() const