93 if(p) { SetParticle(p); }
94 else { SetParticle(fElectron); }
99 isInitialised =
false;
106 if(
IsMaster()) {
delete fModelData; }
118 if(isInitialised) {
return; }
119 isInitialised =
true;
137 size_t numRegions = fPAIRegionVector.size();
139 for(
size_t iReg = 0; iReg < numRegions; ++iReg) {
140 const G4Region* curReg = fPAIRegionVector[iReg];
143 for(
size_t jMat = 0; jMat < numOfMat; ++jMat) {
156 size_t n = fMaterialCutsCoupleVector.size();
158 for(
size_t i=0; i<fMaterialCutsCoupleVector.size(); ++i) {
159 if(cutCouple == fMaterialCutsCoupleVector[i]) {
165 fMaterialCutsCoupleVector.push_back(cutCouple);
167 fModelData->
Initialise(cutCouple, deltaCutInKinEnergy,
this);
191 if(0 > coupleIndex) {
return 0.0; }
195 G4double scaledTkin = kineticEnergy*fRatio;
197 return fChargeSquare*fModelData->
DEDXPerVolume(coupleIndex, scaledTkin, cut);
209 if(0 > coupleIndex) {
return 0.0; }
212 if(tmax <= cutEnergy) {
return 0.0; }
214 G4double scaledTkin = kineticEnergy*fRatio;
232 G4int coupleIndex = FindCoupleIndex(matCC);
233 if(0 > coupleIndex) {
return; }
239 if(maxEnergy < tmax) { tmax = maxEnergy; }
240 if(tmin >= tmax) {
return; }
243 G4double scaledTkin = kineticEnergy*fRatio;
244 G4double totalEnergy = kineticEnergy + fMass;
245 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy+fMass));
253 if( deltaTkin <= 0. && fVerbose > 0)
255 G4cout<<
"G4PAIModel::SampleSecondary e- deltaTkin = "<<deltaTkin<<
G4endl;
257 if( deltaTkin <= 0.) {
return; }
259 if( deltaTkin > tmax) { deltaTkin = tmax; }
270 kineticEnergy -= deltaTkin;
271 G4ThreeVector dir = totalMomentum*direction - deltaRay->GetMomentum();
272 direction = dir.
unit();
276 vdp->push_back(deltaRay);
286 G4int coupleIndex = FindCoupleIndex(matCC);
287 if(0 > coupleIndex) {
return eloss; }
325 G4double etot = kineticEnergy + particleMass;
326 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
328 * electronDensity * q * q;
352 if(p == fElectron) { tmax *= 0.5; }
353 else if(p != fPositron) {
355 G4double gamma= kinEnergy/fMass + 1.0;
357 (1. + 2.0*gamma*ratio + ratio*ratio);
366 fPAIRegionVector.push_back(r);
G4double LowEnergyLimit() const
G4PAIModelData * GetPAIModelData()
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4double HighEnergyLimit() const
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4VEmAngularDistribution * GetAngularDistribution()
G4ParticleDefinition * GetDefinition() const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double)
G4double SampleAlongStepTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double stepFactor) const
const G4String & GetParticleName() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
const G4MaterialCutsCouple * CurrentCouple() const
G4GLOB_DLL std::ostream G4cout
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetCharge() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4MaterialCutsCouple * FindCouple(G4Material *mat)
std::vector< G4EmElementSelector * > * GetElementSelectors()
static size_t GetNumberOfMaterials()
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
static G4Positron * Positron()
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4PAIModel(const G4ParticleDefinition *p=0, const G4String &nam="PAI")
void SetAngularDistribution(G4VEmAngularDistribution *)
void Initialise(const G4MaterialCutsCouple *, G4double cut, G4PAIModel *)
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4Electron * Electron()
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
void DefineForRegion(const G4Region *r)
G4double SamplePostStepTransfer(G4int coupleIndex, G4double scaledTkin) const
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Material * GetMaterial() const