69 flucModel(nullptr),anglModel(nullptr),
name(nam), lowLimit(0.1*CLHEP::
keV),
70 highLimit(100.0*CLHEP::
TeV),eMinActive(0.0),eMaxActive(
DBL_MAX),
71 polarAngleLimit(CLHEP::
pi),secondaryThreshold(
DBL_MAX),
72 theLPMflag(false),flagDeexcitation(false),flagForceBuildTable(false),
73 isMaster(true),fElementData(nullptr),pParticleChange(nullptr),xSectionTable(nullptr),
74 theDensityFactor(nullptr),theDensityIdx(nullptr),fCurrentCouple(nullptr),
75 fCurrentElement(nullptr),fCurrentIsotope(nullptr),nsec(5)
79 elmSelectors =
nullptr;
80 localElmSelectors =
true;
82 useAngularGenerator =
false;
94 if(localElmSelectors) {
96 for(
G4int i=0; i<nSelectors; ++i) {
97 delete (*elmSelectors)[i];
159 if(highLimit <= lowLimit) {
return; }
169 elmSelectors =
new std::vector<G4EmElementSelector*>;
171 if(numOfCouples > nSelectors) {
172 for(
G4int i=nSelectors; i<numOfCouples; ++i) {
173 elmSelectors->push_back(
nullptr);
175 nSelectors = numOfCouples;
179 for(
G4int i=0; i<numOfCouples; ++i) {
182 if(cuts[i] ==
DBL_MAX) {
continue; }
189 if((*elmSelectors)[i]) {
190 if(material == ((*elmSelectors)[i])->GetMaterial()) { create =
false; }
191 else {
delete (*elmSelectors)[i]; }
204 ((*elmSelectors)[i])->
Initialise(part, cuts[i]);
230 for(
G4int i=0; i<
n; ++i) {
231 G4int Z = ((*theElementVector)[i])->GetZasInt();
266 const G4double* theAtomNumDensityVector =
273 for (
G4int i=0; i<nelm; ++i) {
274 cross += theAtomNumDensityVector[i]*
305 fCurrentElement = (*theElementVector)[
n];
309 for(
G4int i=0; i<
n; ++i) {
311 fCurrentElement = (*theElementVector)[i];
316 return fCurrentElement;
406 return kineticEnergy;
435 localTable = isLocal;
442 outFile <<
"The description for this model has not been written yet.\n";
G4int NumberOfBinsPerDecade() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
virtual void StartTracking(G4Track *)
static G4LossTableManager * Instance()
G4ParticleChangeForLoss * GetParticleChangeForLoss()
std::vector< G4Element * > G4ElementVector
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
void DeRegister(G4VEnergyLossProcess *p)
virtual void DefineForRegion(const G4Region *)
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *)
const G4ElementVector * GetElementVector() const
G4VEmModel(const G4String &nam)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)=0
static constexpr double TeV
const G4double * GetVecNbOfAtomsPerVolume() const
G4double GetKineticEnergy() const
virtual void InitialiseForMaterial(const G4ParticleDefinition *, const G4Material *)
size_t GetTableSize() const
virtual void ModelDescription(std::ostream &outFile) const
static const G4double inveplus
const G4ParticleDefinition * GetParticleDefinition() const
static constexpr double eplus
void SetCrossSectionTable(G4PhysicsTable *, G4bool isLocal)
void Register(G4VEnergyLossProcess *p)
virtual G4double GetPartialCrossSection(const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual G4double ChargeSquareRatio(const G4Track &)
G4Material * GetMaterial() const
static const G4double emax
G4double G4Log(G4double x)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
virtual G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
static G4ProductionCutsTable * GetProductionCutsTable()
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetCurrentCouple(const G4MaterialCutsCouple *)
static G4EmParameters * Instance()
virtual G4double ComputeCrossSectionPerShell(const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4VParticleChange * pParticleChange
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kineticEnergy)
static constexpr double pi
size_t GetNumberOfElements() const
G4PhysicsTable * xSectionTable
G4double GetPDGCharge() const
static constexpr double keV
G4ElementData * fElementData
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
const G4Material * GetMaterial() const