130 if(0 == numRegions) {
132 "no G4Regions are registered for the PAI model - World is used");
134 ->GetRegion(
"DefaultRegionForTheWorld",
false));
138 for(
size_t iReg = 0; iReg < numRegions; ++iReg )
143 for(
size_t jMat = 0; jMat < numOfMat; ++jMat)
153 << mat->
GetName() <<
"> fCouple= "
154 << cutCouple <<
", idx= " << cutCouple->
GetIndex()
156 <<
", cuts.size() = " << cuts.size() <<
G4endl;
211 if(0 > coupleIndex) {
return 0.0; }
230 if(0 > coupleIndex)
return 0.0;
234 if(tmax <= cutEnergy)
return 0.0;
255 if(0 > coupleIndex) {
return; }
263 if( maxEnergy < tmax) tmax = maxEnergy;
264 if( tmin >= tmax)
return;
269 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy + fMass));
279 if( deltaTkin <= 0. && fVerbose > 0)
281 G4cout<<
"G4PAIPhotModel::SampleSecondary e- deltaTkin = "<<deltaTkin<<
G4endl;
283 if( deltaTkin <= 0.)
return;
285 if( deltaTkin > tmax) deltaTkin = tmax;
297 kineticEnergy -= deltaTkin;
299 if( kineticEnergy <= 0. )
309 direction = dir.
unit();
312 vdp->push_back(deltaRay);
321 if( deltaTkin <= 0. )
323 G4cout<<
"G4PAIPhotonModel::SampleSecondary gamma deltaTkin = "<<deltaTkin<<
G4endl;
325 if( deltaTkin <= 0.)
return;
327 if( deltaTkin >= kineticEnergy )
333 G4double sintheta = sqrt((1.+costheta)*(1.-costheta));
337 G4double dirx = sintheta*cos(phi), diry = sintheta*sin(phi), dirz = costheta;
342 if( kineticEnergy > 0.)
344 kineticEnergy -= deltaTkin;
359 vdp->push_back(photonRay);
373 if(0 > coupleIndex) {
return eloss; }
415 G4double etot = kineticEnergy + particleMass;
416 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
418 * electronDensity * q * q;
447 (1. + 2.0*gamma*ratio + ratio*ratio);
const G4ParticleDefinition * fParticle
G4double SamplePostStepPlasmonTransfer(G4int coupleIndex, G4double scaledTkin) const
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4PAIPhotData * GetPAIPhotData()
static size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
void SetKineticEnergy(G4double aEnergy)
G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double) final
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) final
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
static constexpr double twopi_mc2_rcl2
const G4String & GetName() const
const G4ThreeVector & GetMomentumDirection() const
const G4String & GetParticleName() const
Hep3Vector & rotateUz(const Hep3Vector &)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
G4double GetPlasmonRatio(G4int coupleIndex, G4double scaledTkin) const
G4double LowEnergyLimit() const
void SetMomentumDirection(const G4ThreeVector &aDirection)
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
const G4String & GetName() const
G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double) final
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4ParticleDefinition * GetDefinition() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4ParticleChangeForLoss * fParticleChange
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
static constexpr double electron_mass_c2
const G4ParticleDefinition * fElectron
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
static constexpr double twopi
G4double GetCharge() const
static G4Positron * Positron()
static constexpr double eV
void SetAngularDistribution(G4VEmAngularDistribution *)
static G4Electron * Electron()
void Initialise(const G4MaterialCutsCouple *, G4double cut, G4PAIPhotModel *)
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
const G4MaterialCutsCouple * CurrentCouple() const
std::vector< G4Material * > G4MaterialTable
G4PAIPhotData * fModelData
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) final
static constexpr double eplus
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double SamplePostStepPhotonTransfer(G4int coupleIndex, G4double scaledTkin) const
G4double SampleAlongStepPlasmonTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double stepFactor) const
G4PAIPhotModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PAI")
const G4ParticleDefinition * fPositron
static G4RegionStore * GetInstance()
void DefineForRegion(const G4Region *r) final
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double GetKineticEnergy() const
G4double SampleAlongStepPhotonTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double stepFactor) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
G4GLOB_DLL std::ostream G4cout
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) final
G4MaterialCutsCouple * FindCouple(G4Material *mat)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
G4VEmAngularDistribution * GetAngularDistribution()
const G4Material * GetMaterial() const
static const G4double reg
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetParticle(const G4ParticleDefinition *p)
std::vector< const G4Region * > fPAIRegionVector
G4double HighEnergyLimit() const
G4double GetElectronDensity() const
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments