131 if(0 == numRegions) {
133 "no G4Regions are registered for the PAI model - World is used");
135 ->GetRegion(
"DefaultRegionForTheWorld",
false));
140 G4cout <<
"G4PAIModel is defined for " << numRegions <<
" regions "
141 <<
"; number of materials " << numOfMat <<
G4endl;
143 for(
size_t iReg = 0; iReg<numRegions; ++iReg) {
147 for(
size_t jMat = 0; jMat<numOfMat; ++jMat) {
158 if(
nullptr != cutCouple) {
161 << mat->
GetName() <<
"> CoupleIndex= "
164 <<
" cutsize= " << cuts.size() <<
G4endl;
169 for(
size_t i=0; i<
n; ++i) {
223 if(0 > coupleIndex) {
return 0.0; }
247 if(0 > coupleIndex) {
return 0.0; }
250 if(tmax <= cutEnergy) {
return 0.0; }
274 if(0 > coupleIndex) {
return; }
280 if(maxEnergy < tmax) { tmax = maxEnergy; }
281 if(tmin >= tmax) {
return; }
286 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy+
fMass));
294 if( !(deltaTkin <= 0.) && !(deltaTkin > 0)) {
295 G4cout<<
"G4PAIModel::SampleSecondaries; deltaKIn = "<<deltaTkin/
keV
296 <<
" keV "<<
" Escaled(MeV)= " << scaledTkin <<
G4endl;
299 if( deltaTkin <= 0.) {
return; }
301 if( deltaTkin > tmax) { deltaTkin = tmax; }
314 kineticEnergy -= deltaTkin;
316 direction = dir.
unit();
320 vdp->push_back(deltaRay);
333 if(0 > coupleIndex) {
return eloss; }
372 G4double etot = kineticEnergy + particleMass;
373 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
375 * electronDensity * q * q;
392 (1. + 2.0*gamma*ratio + ratio*ratio);
static const G4double reg
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Material * > G4MaterialTable
static constexpr double eplus
static constexpr double keV
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double GetCharge() const
G4double GetLogKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
static G4Electron * Electron()
const G4Material * GetMaterial() const
static size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
void Initialise(const G4MaterialCutsCouple *, G4PAIModel *)
G4double SamplePostStepTransfer(G4int coupleIndex, G4double scaledTkin, G4double tmin, G4double tmax) const
G4double SampleAlongStepTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double tmax, G4double stepFactor) const
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
const G4ParticleDefinition * fParticle
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) final
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
G4PAIModelData * GetPAIModelData()
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
void SetParticle(const G4ParticleDefinition *p)
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
const G4ParticleDefinition * fElectron
G4ParticleChangeForLoss * fParticleChange
std::vector< const G4Region * > fPAIRegionVector
G4PAIModelData * fModelData
const G4ParticleDefinition * fPositron
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) final
void DefineForRegion(const G4Region *r) final
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double, const G4double, const G4double, const G4double) final
void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
G4double Dispersion(const G4Material *, const G4DynamicParticle *, const G4double, const G4double, const G4double) final
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) final
G4PAIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PAI")
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
const G4String & GetParticleName() const
static G4Positron * Positron()
static G4RegionStore * GetInstance()
const G4String & GetName() const
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4VEmAngularDistribution * GetAngularDistribution()
G4double LowEnergyLimit() const
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4double HighEnergyLimit() const
void SetAngularDistribution(G4VEmAngularDistribution *)
const G4MaterialCutsCouple * CurrentCouple() const
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4ParticleChangeForLoss * GetParticleChangeForLoss()
static constexpr double eV
T min(const T t1, const T t2)
brief Return the smallest of the two arguments