132 if(0 == numRegions) {
134 "no G4Regions are registered for the PAI model - World is used");
136 ->GetRegion(
"DefaultRegionForTheWorld",
false));
141 G4cout <<
"G4PAIModel is defined for " << numRegions <<
" regions "
143 G4cout <<
" total number of materials " << numOfMat <<
G4endl;
145 for(
size_t iReg = 0; iReg<numRegions; ++iReg) {
149 for(
size_t jMat = 0; jMat<numOfMat; ++jMat) {
163 << mat->
GetName() <<
"> CoupleIndex= "
166 <<
" cutsize= " << cuts.size() <<
G4endl;
171 for(
size_t i=0; i<
n; ++i) {
224 if(0 > coupleIndex) {
return 0.0; }
248 if(0 > coupleIndex) {
return 0.0; }
251 if(tmax <= cutEnergy) {
return 0.0; }
275 if(0 > coupleIndex) {
return; }
281 if(maxEnergy < tmax) { tmax = maxEnergy; }
282 if(tmin >= tmax) {
return; }
287 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy+fMass));
295 if( !(deltaTkin <= 0.) && !(deltaTkin > 0)) {
296 G4cout<<
"G4PAIModel::SampleSecondaries; deltaKIn = "<<deltaTkin/
keV
297 <<
" keV "<<
" Escaled(MeV)= " << scaledTkin <<
G4endl;
300 if( deltaTkin <= 0.) {
return; }
302 if( deltaTkin > tmax) { deltaTkin = tmax; }
313 kineticEnergy -= deltaTkin;
315 direction = dir.
unit();
319 vdp->push_back(deltaRay);
330 if(0 > coupleIndex) {
return eloss; }
368 G4double etot = kineticEnergy + particleMass;
369 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
371 * electronDensity * q * q;
388 (1. + 2.0*gamma*ratio + ratio*ratio);
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
G4PAIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PAI")
void DefineForRegion(const G4Region *r) final
static size_t GetNumberOfMaterials()
void SetParticle(const G4ParticleDefinition *p)
static G4MaterialTable * GetMaterialTable()
static constexpr double keV
static constexpr double twopi_mc2_rcl2
const G4String & GetName() const
const G4ThreeVector & GetMomentumDirection() const
const G4String & GetParticleName() const
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4double SamplePostStepTransfer(G4int coupleIndex, G4double scaledTkin, G4double tmin, G4double tmax) const
void SetProposedMomentumDirection(const G4ThreeVector &dir)
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4ParticleChangeForLoss * fParticleChange
const G4ParticleDefinition * fParticle
G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double) final
G4double LowEnergyLimit() const
const G4String & GetName() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
G4ParticleDefinition * GetDefinition() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) final
void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
static constexpr double electron_mass_c2
void Initialise(const G4MaterialCutsCouple *, G4PAIModel *)
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
G4double GetCharge() const
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
static G4Positron * Positron()
static constexpr double eV
void SetAngularDistribution(G4VEmAngularDistribution *)
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
static G4Electron * Electron()
const G4MaterialCutsCouple * CurrentCouple() const
G4double SampleAlongStepTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double tmax, G4double stepFactor) const
std::vector< G4Material * > G4MaterialTable
static constexpr double eplus
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) final
static G4RegionStore * GetInstance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) final
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * fElectron
G4MaterialCutsCouple * FindCouple(G4Material *mat)
G4VEmAngularDistribution * GetAngularDistribution()
const G4Material * GetMaterial() const
G4PAIModelData * GetPAIModelData()
static const G4double reg
const G4ParticleDefinition * fPositron
std::vector< const G4Region * > fPAIRegionVector
G4double HighEnergyLimit() const
G4double GetElectronDensity() const
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
G4PAIModelData * fModelData
G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double) final
T min(const T t1, const T t2)
brief Return the smallest of the two arguments