90 for(i = 0; i < nShells - 1; ++i)
96 electronEnergy + (*theElementVector)[
fIndexElement]->GetAtomicShell(i);
107 G4double b = 0.5 * gamma * (gamma - 1.) * (gamma - 2.);
109 G4double rndm, term, greject, grejsup;
111 grejsup = gamma * gamma * (1. + b -
beta * b);
113 grejsup = gamma * gamma * (1. + b +
beta * b);
118 cos_theta = (rndm +
beta) / (rndm *
beta + 1.);
119 term = 1. -
beta * cos_theta;
120 greject = (1. - cos_theta * cos_theta) * (1. + b * term) / (term * term);
126 G4double sin_theta = std::sqrt(1. - cos_theta * cos_theta);
128 G4double dirx = sin_theta * std::cos(phi);
129 G4double diry = sin_theta * std::sin(phi);
132 adjoint_gammaDirection.
rotateUz(electronDirection);
136 gammaEnergy, isScatProjToProj);
158 new_weight *= w_corr * projectileKinEnergy / adjointPrimKinEnergy;
179 const G4double* theAtomNumDensityVector =
193 return totBiasedAdjointCS;
207 adjointCS += CS / gammaEnergy;
209 for(
G4int i = 1; i < nShells; ++i)
213 if(electronEnergy < Bi1 - Bi)
215 gammaEnergy = electronEnergy + Bi;
217 gammaEnergy,
Z, 0., 0., 0.);
219 adjointCS += CS / gammaEnergy;
223 adjointCS *= electronEnergy;
std::vector< const G4Element * > G4ElementVector
static constexpr double twopi
Hep3Vector & rotateUz(const Hep3Vector &)
G4double GetPostStepWeightCorrection()
static G4AdjointCSManager * GetAdjointCSManager()
static G4AdjointElectron * AdjointElectron()
static G4AdjointGamma * AdjointGamma()
void CorrectPostStepWeight(G4ParticleChange *fParticleChange, G4double old_weight, G4double adjointPrimKinEnergy, G4double projectileKinEnergy, G4bool isScatProjToProj) override
void DefineCurrentMaterialAndElectronEnergy(const G4MaterialCutsCouple *aCouple, G4double eEnergy)
G4double fPreStepAdjointCS
G4double fShellProb[40][40]
G4AdjointPhotoElectricModel()
G4double AdjointCrossSection(const G4MaterialCutsCouple *aCouple, G4double primEnergy, G4bool isScatProjToProj) override
G4double fPostStepAdjointCS
void SampleSecondaries(const G4Track &aTrack, G4bool isScatProjToProj, G4ParticleChange *fParticleChange) override
~G4AdjointPhotoElectricModel() override
G4double fFactorCSBiasing
G4double AdjointCrossSectionPerAtom(const G4Element *anElement, G4double electronEnergy)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetNbOfAtomicShells() const
G4double GetAtomicShell(G4int index) const
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
void AddSecondary(G4Track *aSecondary)
G4double GetWeight() const
const G4DynamicParticle * GetDynamicParticle() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4bool fSecondPartSameType
G4ParticleDefinition * fAdjEquivDirectSecondPart
void SetUseMatrix(G4bool aBool)
G4ParticleDefinition * fAdjEquivDirectPrimPart
G4MaterialCutsCouple * fCurrentCouple
G4Material * fCurrentMaterial
G4VEmModel * fDirectModel
G4ParticleDefinition * fDirectPrimaryPart
void SetApplyCutInRange(G4bool aBool)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetCurrentCouple(const G4MaterialCutsCouple *)
void ProposeTrackStatus(G4TrackStatus status)
void SetSecondaryWeightByProcess(G4bool)
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments