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 "
142 G4cout <<
" total number of materials " << numOfMat <<
G4endl;
144 for(
size_t iReg = 0; iReg<numRegions; ++iReg) {
148 for(
size_t jMat = 0; jMat<numOfMat; ++jMat) {
162 << mat->
GetName() <<
"> CoupleIndex= "
165 <<
" cutsize= " << cuts.size() <<
G4endl;
170 for(
size_t i=0; i<
n; ++i) {
215 if(0 > coupleIndex) {
return 0.0; }
239 if(0 > coupleIndex) {
return 0.0; }
242 if(tmax <= cutEnergy) {
return 0.0; }
266 if(0 > coupleIndex) {
return; }
272 if(maxEnergy < tmax) { tmax = maxEnergy; }
273 if(tmin >= tmax) {
return; }
278 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy+fMass));
286 if( !(deltaTkin <= 0.) && !(deltaTkin > 0)) {
287 G4cout<<
"G4PAIModel::SampleSecondaries; deltaKIn = "<<deltaTkin/
keV
288 <<
" keV "<<
" Escaled(MeV)= " << scaledTkin <<
G4endl;
291 if( deltaTkin <= 0.) {
return; }
293 if( deltaTkin > tmax) { deltaTkin = tmax; }
304 kineticEnergy -= deltaTkin;
305 G4ThreeVector dir = totalMomentum*direction - deltaRay->GetMomentum();
306 direction = dir.unit();
310 vdp->push_back(deltaRay);
321 if(0 > coupleIndex) {
return eloss; }
359 G4double etot = kineticEnergy + particleMass;
360 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
361 G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * step
362 * electronDensity * q * q;
378 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
379 (1. + 2.0*gamma*ratio + ratio*ratio);
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
G4double LowEnergyLimit() const
G4PAIModelData * GetPAIModelData()
G4PAIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PAI")
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
const G4String & GetName() const
const G4ParticleDefinition * fPositron
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
G4double HighEnergyLimit() const
std::vector< const G4Region * > fPAIRegionVector
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4VEmAngularDistribution * GetAngularDistribution()
G4ParticleDefinition * GetDefinition() const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double) final
const G4String & GetParticleName() const
static const G4double reg
G4double SampleAlongStepTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double tmax, G4double stepFactor) const
static G4RegionStore * GetInstance()
void SetParticle(const G4ParticleDefinition *p)
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double) final
const G4ParticleDefinition * fParticle
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
const G4MaterialCutsCouple * CurrentCouple() const
G4GLOB_DLL std::ostream G4cout
G4double GetElectronDensity() const
G4PAIModelData * fModelData
const G4ThreeVector & GetMomentumDirection() const
virtual void DefineForRegion(const G4Region *r) final
G4double GetCharge() const
static constexpr double eplus
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4MaterialCutsCouple * FindCouple(G4Material *mat)
std::vector< G4EmElementSelector * > * GetElementSelectors()
static size_t GetNumberOfMaterials()
const G4ParticleDefinition * fElectron
void SetProposedMomentumDirection(const G4ThreeVector &dir)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) final
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) final
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
G4ParticleChangeForLoss * fParticleChange
static G4Positron * Positron()
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
void SetAngularDistribution(G4VEmAngularDistribution *)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4Electron * Electron()
G4double SamplePostStepTransfer(G4int coupleIndex, G4double scaledTkin, G4double tmin, G4double tmax) const
void Initialise(const G4MaterialCutsCouple *, G4PAIModel *)
static constexpr double keV
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Material * GetMaterial() const