83 if(p) { SetParticle(p); }
84 else { SetParticle(fElectron); }
89 isInitialised =
false;
96 if(
IsMaster()) {
delete fModelData; }
109 if(isInitialised) {
return; }
110 isInitialised =
true;
128 size_t numRegions = fPAIRegionVector.size();
130 for(
size_t iReg = 0; iReg < numRegions; ++iReg) {
131 const G4Region* curReg = fPAIRegionVector[iReg];
134 for(
size_t jMat = 0; jMat < numOfMat; ++jMat) {
147 size_t n = fMaterialCutsCoupleVector.size();
149 for(
size_t i=0; i<fMaterialCutsCoupleVector.size(); ++i) {
150 if(cutCouple == fMaterialCutsCoupleVector[i]) {
156 fMaterialCutsCoupleVector.push_back(cutCouple);
158 fModelData->
Initialise(cutCouple, deltaCutInKinEnergy,
this);
182 if(0 > coupleIndex) {
return 0.0; }
186 G4double scaledTkin = kineticEnergy*fRatio;
188 return fChargeSquare*fModelData->
DEDXPerVolume(coupleIndex, scaledTkin, cut);
201 if(0 > coupleIndex)
return 0.0;
205 if(tmax <= cutEnergy)
return 0.0;
207 G4double scaledTkin = kineticEnergy*fRatio;
225 G4int coupleIndex = FindCoupleIndex(matCC);
226 if(0 > coupleIndex) {
return; }
234 if( maxEnergy < tmax) tmax = maxEnergy;
235 if( tmin >= tmax)
return;
238 G4double scaledTkin = kineticEnergy*fRatio;
239 G4double totalEnergy = kineticEnergy + fMass;
240 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy + fMass));
250 if( deltaTkin <= 0. && fVerbose > 0)
252 G4cout<<
"G4PAIPhotModel::SampleSecondary e- deltaTkin = "<<deltaTkin<<
G4endl;
254 if( deltaTkin <= 0.)
return;
256 if( deltaTkin > tmax) deltaTkin = tmax;
268 kineticEnergy -= deltaTkin;
270 if( kineticEnergy <= 0. )
280 direction = dir.
unit();
283 vdp->push_back(deltaRay);
292 if( deltaTkin <= 0. )
294 G4cout<<
"G4PAIPhotonModel::SampleSecondary gamma deltaTkin = "<<deltaTkin<<
G4endl;
296 if( deltaTkin <= 0.)
return;
298 if( deltaTkin >= kineticEnergy )
300 deltaTkin = kineticEnergy;
304 G4double sintheta = sqrt((1.+costheta)*(1.-costheta));
308 G4double dirx = sintheta*cos(phi), diry = sintheta*sin(phi), dirz = costheta;
313 if( kineticEnergy > 0.)
315 kineticEnergy -= deltaTkin;
330 vdp->push_back(photonRay);
343 G4int coupleIndex = FindCoupleIndex(matCC);
344 if(0 > coupleIndex) {
return eloss; }
386 G4double etot = kineticEnergy + particleMass;
387 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
389 * electronDensity * q * q;
413 if(p == fElectron) { tmax *= 0.5; }
414 else if(p != fPositron) {
416 G4double gamma= kinEnergy/fMass + 1.0;
418 (1. + 2.0*gamma*ratio + ratio*ratio);
427 fPAIRegionVector.push_back(r);
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
G4double SamplePostStepPhotonTransfer(G4int coupleIndex, G4double scaledTkin) const
virtual ~G4PAIPhotModel()
G4double LowEnergyLimit() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4double HighEnergyLimit() const
G4PAIPhotData * GetPAIPhotData()
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double GetPlasmonRatio(G4int coupleIndex, G4double scaledTkin) const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
static G4MaterialTable * GetMaterialTable()
G4double SampleAlongStepPhotonTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double stepFactor) const
std::vector< G4Material * > G4MaterialTable
G4VEmAngularDistribution * GetAngularDistribution()
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
void SetMomentumDirection(const G4ThreeVector &aDirection)
G4ParticleDefinition * GetDefinition() const
const G4String & GetParticleName() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
void Initialise(const G4MaterialCutsCouple *, G4double cut, G4PAIPhotModel *)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
const G4MaterialCutsCouple * CurrentCouple() const
G4GLOB_DLL std::ostream G4cout
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
G4double DEDXPerVolume(G4int coupleIndex, G4double scaledTkin, G4double cut) const
Hep3Vector & rotateUz(const Hep3Vector &)
G4double GetCharge() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4MaterialCutsCouple * FindCouple(G4Material *mat)
std::vector< G4EmElementSelector * > * GetElementSelectors()
static size_t GetNumberOfMaterials()
void SetProposedMomentumDirection(const G4ThreeVector &dir)
void SetKineticEnergy(G4double aEnergy)
G4PAIPhotModel(const G4ParticleDefinition *p=0, const G4String &nam="PAI")
static G4Positron * Positron()
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double)
G4double SamplePostStepPlasmonTransfer(G4int coupleIndex, G4double scaledTkin) const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double)
void SetAngularDistribution(G4VEmAngularDistribution *)
G4double CrossSectionPerVolume(G4int coupleIndex, G4double scaledTkin, G4double tcut, G4double tmax) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double SampleAlongStepPlasmonTransfer(G4int coupleIndex, G4double kinEnergy, G4double scaledTkin, G4double stepFactor) const
static G4Electron * Electron()
void DefineForRegion(const G4Region *r)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Material * GetMaterial() const