66 #ifndef G4VEmProcess_h
67 #define G4VEmProcess_h 1
219 size_t& idxRegion)
const;
301 void BuildLambdaTable();
305 void FindLambdaMax();
309 inline void ComputeIntegralLambda(
G4double kinEnergy);
337 std::vector<G4VEmModel*> emModels;
338 G4int numberOfModels;
343 std::vector<G4double> theEnergyOfCrossSectionMax;
344 std::vector<G4double> theCrossSectionMax;
347 size_t idxLambdaPrim;
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;
399 G4int mainSecondaries;
410 return currentCoupleIndex;
417 return (*theCutsGamma)[currentCoupleIndex];
424 return (*theCutsElectron)[currentCoupleIndex];
431 if(couple != currentCouple) {
432 currentCouple = couple;
435 currentCoupleIndex = couple->
GetIndex();
436 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
437 fFactor = biasFactor*(*theDensityFactor)[currentCoupleIndex];
438 if(!baseMaterial) { baseMaterial = currentMaterial; }
440 idxLambda = idxLambdaPrim = 0;
449 if(1 < numberOfModels) {
450 currentModel = modelManager->
SelectModel(kinEnergy, index);
460 size_t& idxRegion)
const
462 return modelManager->
SelectModel(kinEnergy, idxRegion);
469 return ((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda);
476 return ((*theLambdaTablePrim)[basedCoupleIndex])->Value(e, idxLambdaPrim)/e;
484 e,(*theCuts)[currentCoupleIndex]);
492 if(e >= minKinEnergyPrim) { x = GetLambdaFromTablePrim(e); }
493 else if(theLambdaTable) { x = GetLambdaFromTable(e); }
494 else { x = ComputeCurrentLambda(e); }
504 DefineMaterial(couple);
506 return GetCurrentLambda(kinEnergy);
514 DefineMaterial(couple);
516 return fFactor*ComputeCurrentLambda(e);
521 inline void G4VEmProcess::ComputeIntegralLambda(
G4double e)
523 mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex];
524 if (e <= mfpKinEnergy) {
525 preStepLambda = GetCurrentLambda(e);
529 if(e1 > mfpKinEnergy) {
530 preStepLambda = GetCurrentLambda(e);
531 G4double preStepLambda1 = GetCurrentLambda(e1);
532 if(preStepLambda1 > preStepLambda) {
534 preStepLambda = preStepLambda1;
537 preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex];
574 minKinEnergyPrim = e;
581 if(val < 0.0) { polarAngleLimit = 0.0; }
582 else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; }
583 else { polarAngleLimit = val; }
590 return polarAngleLimit;
604 return theLambdaTable;
611 return theLambdaTablePrim;
625 return secondaryParticle;
632 if(val > 0.0 && val <= 1.0) { lambdaFactor = val; }
639 if(particle && particle != theGamma) { integral = val; }
660 buildLambdaTable = val;
682 secondaryParticle =
p;
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
G4double condition(const G4ErrorSymMatrix &m)
G4PhysicsTable * LambdaTable() const
virtual void PrintInfo()=0
G4double GetLambda(G4double &kinEnergy, const G4MaterialCutsCouple *couple)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4PhysicsTable * LambdaTablePrim() const
G4VEmModel * SelectModel(G4double &kinEnergy, size_t index)
G4VEmProcess(const G4String &name, G4ProcessType type=fElectromagnetic)
void SetBuildTableFlag(G4bool val)
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
G4VEmModel * EmModel(G4int index=1) const
G4ParticleChangeForGamma fParticleChange
G4double GetElectronEnergyCut()
void SetSplineFlag(G4bool val)
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
G4double MaxKinEnergy() const
const G4ParticleDefinition * SecondaryParticle() const
const G4ParticleDefinition * Particle() const
void BuildPhysicsTable(const G4ParticleDefinition &)
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void SetStartFromNullFlag(G4bool val)
void UpdateEmModel(const G4String &, G4double, G4double)
void SetApplyCuts(G4bool val)
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
G4int LambdaBinning() const
void SetMinKinEnergyPrim(G4double e)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *)
G4double MeanFreePath(const G4Track &track)
void SetLambdaBinning(G4int nbins)
void SetEmModel(G4VEmModel *, G4int index=1)
size_t CurrentMaterialCutsCoupleIndex() const
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
G4double PolarAngleLimit() const
G4double GetGammaEnergyCut()
void SetParticle(const G4ParticleDefinition *p)
G4ParticleChangeForGamma * GetParticleChange()
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void SetIntegral(G4bool val)
void PreparePhysicsTable(const G4ParticleDefinition &)
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, size_t &idxRegion) const
void SetMaxKinEnergy(G4double e)
G4double CrossSectionBiasingFactor() const
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
void SetCurrentCouple(const G4MaterialCutsCouple *)
void SetSecondaryParticle(const G4ParticleDefinition *p)
G4bool IsIntegral() const
const G4Element * GetCurrentElement() const
const G4Material * GetBaseMaterial() const
G4VEmModel * SelectModel(G4double &energy, size_t &index)
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
void SetMinKinEnergy(G4double e)
virtual G4bool IsApplicable(const G4ParticleDefinition &p)=0
void StartTracking(G4Track *)
G4double MinKinEnergy() const
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
void SetPolarAngleLimit(G4double a)
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
void SetLambdaFactor(G4double val)
const G4Material * GetMaterial() const
G4double RecalculateLambda(G4double kinEnergy, const G4MaterialCutsCouple *couple)