67#define G4VEmProcess_h 1
219 size_t& idxRegion)
const;
307 void BuildLambdaTable();
309 void FindLambdaMax();
313 inline void ComputeIntegralLambda(
G4double kinEnergy);
340 std::vector<G4VEmModel*> emModels;
341 G4int numberOfModels;
346 std::vector<G4double> theEnergyOfCrossSectionMax;
347 std::vector<G4double> theCrossSectionMax;
349 const std::vector<G4double>* theCuts;
350 const std::vector<G4double>* theCutsGamma;
351 const std::vector<G4double>* theCutsElectron;
352 const std::vector<G4double>* theCutsPositron;
353 const std::vector<G4double>* theDensityFactor;
354 const std::vector<G4int>* theDensityIdx;
378 std::vector<G4DynamicParticle*> secParticles;
389 size_t currentCoupleIndex;
390 size_t basedCoupleIndex;
406 return currentCoupleIndex;
413 return (*theCutsGamma)[currentCoupleIndex];
420 return (*theCutsElectron)[currentCoupleIndex];
427 if(couple != currentCouple) {
428 currentCouple = couple;
431 currentCoupleIndex = couple->
GetIndex();
432 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
433 fFactor = biasFactor*(*theDensityFactor)[currentCoupleIndex];
434 if(!baseMaterial) { baseMaterial = currentMaterial; }
444 if(1 < numberOfModels) {
445 currentModel = modelManager->
SelectModel(kinEnergy, index);
455 size_t& idxRegion)
const
457 return modelManager->
SelectModel(kinEnergy, idxRegion);
464 return ((*theLambdaTable)[basedCoupleIndex])->Value(e);
471 return ((*theLambdaTablePrim)[basedCoupleIndex])->Value(e)/e;
479 e,(*theCuts)[currentCoupleIndex]);
487 if(e >= minKinEnergyPrim) { x = GetLambdaFromTablePrim(e); }
488 else if(theLambdaTable) { x = GetLambdaFromTable(e); }
489 else { x = ComputeCurrentLambda(e); }
499 DefineMaterial(couple);
501 return GetCurrentLambda(kinEnergy);
509 DefineMaterial(couple);
511 return fFactor*ComputeCurrentLambda(e);
516inline void G4VEmProcess::ComputeIntegralLambda(
G4double e)
518 mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex];
519 if (e <= mfpKinEnergy) {
520 preStepLambda = GetCurrentLambda(e);
524 if(e1 > mfpKinEnergy) {
525 preStepLambda = GetCurrentLambda(e);
526 G4double preStepLambda1 = GetCurrentLambda(e1);
527 if(preStepLambda1 > preStepLambda) {
529 preStepLambda = preStepLambda1;
532 preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex];
569 minKinEnergyPrim = e;
576 if(val < 0.0) { polarAngleLimit = 0.0; }
577 else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; }
578 else { polarAngleLimit = val; }
585 return polarAngleLimit;
599 return theLambdaTable;
613 return secondaryParticle;
620 if(val > 0.0 && val <= 1.0) { lambdaFactor = val; }
627 if(particle && particle != theGamma) { integral = val; }
648 buildLambdaTable = val;
670 secondaryParticle = p;
G4double condition(const G4ErrorSymMatrix &m)
G4VEmModel * SelectModel(G4double &energy, size_t &index)
const G4Material * GetMaterial() const
const G4Material * GetBaseMaterial() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetCurrentCouple(const G4MaterialCutsCouple *)
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4double RecalculateLambda(G4double kinEnergy, const G4MaterialCutsCouple *couple)
G4double GetGammaEnergyCut()
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false)
void SetIntegral(G4bool val)
G4double MeanFreePath(const G4Track &track)
void StartTracking(G4Track *)
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
virtual void PrintInfo()=0
const G4ParticleDefinition * Particle() const
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
virtual G4bool IsApplicable(const G4ParticleDefinition &p)=0
void SetLambdaFactor(G4double val)
void SetBuildTableFlag(G4bool val)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *)
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
void SetMinKinEnergy(G4double e)
G4double GetElectronEnergyCut()
G4VEmModel * SelectModel(G4double &kinEnergy, size_t index)
G4double CrossSectionBiasingFactor() const
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void SetEmModel(G4VEmModel *, G4int index=1)
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void SetLambdaBinning(G4int nbins)
G4VEmModel * EmModel(G4int index=1)
void SetSecondaryParticle(const G4ParticleDefinition *p)
G4double GetLambda(G4double &kinEnergy, const G4MaterialCutsCouple *couple)
void SetSplineFlag(G4bool val)
void PrintInfoDefinition()
void UpdateEmModel(const G4String &, G4double, G4double)
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
void BuildPhysicsTable(const G4ParticleDefinition &)
G4double MaxKinEnergy() const
G4ParticleChangeForGamma * GetParticleChange()
void SetApplyCuts(G4bool val)
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, size_t &idxRegion) const
G4double MinKinEnergy() const
const G4PhysicsTable * LambdaTable() const
void PreparePhysicsTable(const G4ParticleDefinition &)
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
void SetStartFromNullFlag(G4bool val)
G4VEmModel * Model(G4int index=1)
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
G4double PolarAngleLimit() const
G4ParticleChangeForGamma fParticleChange
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
G4bool IsIntegral() const
G4int LambdaBinning() const
void SetParticle(const G4ParticleDefinition *p)
void SetMinKinEnergyPrim(G4double e)
void SetMaxKinEnergy(G4double e)
void SetPolarAngleLimit(G4double a)
size_t CurrentMaterialCutsCoupleIndex() const
const G4Element * GetCurrentElement() const
void SetModel(G4VEmModel *, G4int index=1)
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
const G4ParticleDefinition * SecondaryParticle() const