Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4eCoulombScatteringModel Class Reference

#include <G4eCoulombScatteringModel.hh>

+ Inheritance diagram for G4eCoulombScatteringModel:

Public Member Functions

 G4eCoulombScatteringModel (const G4String &nam="eCoulombScattering")
 
virtual ~G4eCoulombScatteringModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
void SetLowEnergyThreshold (G4double val)
 
void SetRecoilThreshold (G4double eth)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)=0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
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 &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=0)
 
void SetCrossSectionTable (G4PhysicsTable *)
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void ForceBuildTable (G4bool val)
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 

Protected Member Functions

void DefineMaterial (const G4MaterialCutsCouple *)
 
void SetupParticle (const G4ParticleDefinition *)
 
- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Protected Attributes

G4ParticleTabletheParticleTable
 
G4ParticleChangeForGammafParticleChange
 
G4WentzelOKandVIxSectionwokvi
 
G4NistManagerfNistManager
 
const std::vector< G4double > * pCuts
 
const G4MaterialCutsCouplecurrentCouple
 
const G4MaterialcurrentMaterial
 
G4int currentMaterialIndex
 
G4double cosThetaMin
 
G4double cosThetaMax
 
G4double cosTetMinNuc
 
G4double cosTetMaxNuc
 
G4double recoilThreshold
 
G4double elecRatio
 
G4double mass
 
const G4ParticleDefinitionparticle
 
const G4ParticleDefinitiontheProton
 
G4double lowEnergyThreshold
 
- Protected Attributes inherited from G4VEmModel
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 

Detailed Description

Definition at line 78 of file G4eCoulombScatteringModel.hh.

Constructor & Destructor Documentation

◆ G4eCoulombScatteringModel()

G4eCoulombScatteringModel::G4eCoulombScatteringModel ( const G4String nam = "eCoulombScattering")

Definition at line 79 of file G4eCoulombScatteringModel.cc.

80 : G4VEmModel(nam),
81 cosThetaMin(1.0),
82 cosThetaMax(-1.0),
83 isInitialised(false)
84{
89 currentMaterial = 0;
90
91 pCuts = 0;
92
93 lowEnergyThreshold = 1*keV; // particle will be killed for lower energy
94 recoilThreshold = 0.*keV; // by default does not work
95
96 particle = 0;
97 currentCouple = 0;
99
101
102 cosTetMinNuc = 1.0;
103 cosTetMaxNuc = -1.0;
104 elecRatio = 0.0;
105 mass = proton_mass_c2;
106}
static G4NistManager * Instance()
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
Definition: G4Proton.cc:93
G4WentzelOKandVIxSection * wokvi
const G4ParticleDefinition * particle
const G4MaterialCutsCouple * currentCouple
G4ParticleChangeForGamma * fParticleChange
const std::vector< G4double > * pCuts
const G4ParticleDefinition * theProton

◆ ~G4eCoulombScatteringModel()

G4eCoulombScatteringModel::~G4eCoulombScatteringModel ( )
virtual

Definition at line 110 of file G4eCoulombScatteringModel.cc.

111{
112 delete wokvi;
113}

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kinEnergy,
G4double  Z,
G4double  A,
G4double  cut,
G4double  emax 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 148 of file G4eCoulombScatteringModel.cc.

153{
154 //G4cout << "### G4eCoulombScatteringModel::ComputeCrossSectionPerAtom for "
155 // << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV << G4endl;
156 G4double cross = 0.0;
157 if(p != particle) { SetupParticle(p); }
158
159 // cross section is set to zero to avoid problems in sample secondary
160 if(kinEnergy <= 0.0) { return cross; }
164 G4int iz = G4int(Z);
165 cosTetMinNuc = wokvi->SetupTarget(iz, cutEnergy);
167 if(iz == 1 && cosTetMaxNuc < 0.0 && particle == theProton) {
168 cosTetMaxNuc = 0.0;
169 }
172 cross += elecRatio;
173 if(cross > 0.0) { elecRatio /= cross; }
174 }
175 /*
176 if(p->GetParticleName() == "e-")
177 G4cout << "e(MeV)= " << kinEnergy/MeV << " cross(b)= " << cross/barn
178 << " 1-cosTetMinNuc= " << 1-cosTetMinNuc
179 << " 1-cosTetMaxNuc= " << 1-cosTetMaxNuc
180 << G4endl;
181 */
182 return cross;
183}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
const G4MaterialCutsCouple * CurrentCouple() const
Definition: G4VEmModel.hh:377
G4double ComputeElectronCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4double SetupKinematic(G4double kinEnergy, const G4Material *mat)
G4double ComputeNuclearCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4double SetupTarget(G4int Z, G4double cut=DBL_MAX)
void DefineMaterial(const G4MaterialCutsCouple *)
void SetupParticle(const G4ParticleDefinition *)

Referenced by SampleSecondaries().

◆ DefineMaterial()

void G4eCoulombScatteringModel::DefineMaterial ( const G4MaterialCutsCouple cup)
inlineprotected

Definition at line 156 of file G4eCoulombScatteringModel.hh.

157{
158 if(cup != currentCouple) {
159 currentCouple = cup;
162 }
163}
const G4Material * GetMaterial() const

Referenced by ComputeCrossSectionPerAtom(), and SampleSecondaries().

◆ Initialise()

void G4eCoulombScatteringModel::Initialise ( const G4ParticleDefinition p,
const G4DataVector cuts 
)
virtual

Implements G4VEmModel.

Definition at line 117 of file G4eCoulombScatteringModel.cc.

119{
120 SetupParticle(p);
121 currentCouple = 0;
124 /*
125 G4cout << "G4eCoulombScatteringModel: " << particle->GetParticleName()
126 << " 1-cos(ThetaLimit)= " << 1 - cosThetaMin
127 << " cos(thetaMax)= " << cosThetaMax
128 << G4endl;
129 */
131 /*
132 G4cout << "!!! G4eCoulombScatteringModel::Initialise for "
133 << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin
134 << " cos(TetMax)= " << cosThetaMax <<G4endl;
135 G4cout << "cut0= " << cuts[0] << " cut1= " << cuts[1] << G4endl;
136 */
137 if(!isInitialised) {
138 isInitialised = true;
140 }
141 if(mass < GeV) {
143 }
144}
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double PolarAngleLimit() const
Definition: G4VEmModel.hh:550
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:109
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:123
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)

◆ SampleSecondaries()

void G4eCoulombScatteringModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmin,
G4double  maxEnergy 
)
virtual

Implements G4VEmModel.

Definition at line 187 of file G4eCoulombScatteringModel.cc.

193{
194 G4double kinEnergy = dp->GetKineticEnergy();
195
196 // absorb particle below low-energy limit to avoid situation
197 // when a particle has no energy loss
198 if(kinEnergy < lowEnergyThreshold) {
202 return;
203 }
205 DefineMaterial(couple);
206 /*
207 G4cout << "G4eCoulombScatteringModel::SampleSecondaries e(MeV)= "
208 << kinEnergy << " " << particle->GetParticleName()
209 << " cut= " << cutEnergy<< G4endl;
210 */
211 // Choose nucleus
212 const G4Element* currentElement =
213 SelectRandomAtom(couple,particle,kinEnergy,cutEnergy,kinEnergy);
214
215 G4double Z = currentElement->GetZ();
216
217 if(ComputeCrossSectionPerAtom(particle,kinEnergy, Z,
218 kinEnergy, cutEnergy, kinEnergy) == 0.0)
219 { return; }
220
221 G4int iz = G4int(Z);
222 G4int ia = SelectIsotopeNumber(currentElement);
223 G4double targetMass = G4NucleiProperties::GetNuclearMass(ia, iz);
224 wokvi->SetTargetMass(targetMass);
225
226 G4ThreeVector newDirection =
228 G4double cost = newDirection.z();
229
230 G4ThreeVector direction = dp->GetMomentumDirection();
231 newDirection.rotateUz(direction);
232
234
235 // recoil sampling assuming a small recoil
236 // and first order correction to primary 4-momentum
238 G4double trec = mom2*(1.0 - cost)/(targetMass + (mass + kinEnergy)*(1.0 - cost));
239 G4double finalT = kinEnergy - trec;
240 //G4cout<<"G4eCoulombScatteringModel: finalT= "<<finalT<<" Trec= "<<trec<<G4endl;
241 if(finalT <= lowEnergyThreshold) {
242 trec = kinEnergy;
243 finalT = 0.0;
244 }
245
248 if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); }
249
250 if(trec > tcut) {
251 G4ParticleDefinition* ion = theParticleTable->GetIon(iz, ia, 0.0);
252 G4ThreeVector dir = (direction*sqrt(mom2) -
253 newDirection*sqrt(finalT*(2*mass + finalT))).unit();
254 G4DynamicParticle* newdp = new G4DynamicParticle(ion, dir, trec);
255 fvect->push_back(newdp);
256 } else {
259 }
260
261 return;
262}
double z() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:72
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetZ() const
Definition: G4Element.hh:131
static G4double GetNuclearMass(const G4double A, const G4double Z)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4ParticleDefinition * GetIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:459
G4int SelectIsotopeNumber(const G4Element *)
Definition: G4VEmModel.hh:478
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4ThreeVector SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio=0.0)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax)

◆ SetLowEnergyThreshold()

void G4eCoulombScatteringModel::SetLowEnergyThreshold ( G4double  val)
inline

Definition at line 180 of file G4eCoulombScatteringModel.hh.

181{
182 lowEnergyThreshold = val;
183}

◆ SetRecoilThreshold()

void G4eCoulombScatteringModel::SetRecoilThreshold ( G4double  eth)
inline

Definition at line 187 of file G4eCoulombScatteringModel.hh.

188{
189 recoilThreshold = eth;
190}

◆ SetupParticle()

void G4eCoulombScatteringModel::SetupParticle ( const G4ParticleDefinition p)
inlineprotected

Definition at line 168 of file G4eCoulombScatteringModel.hh.

169{
170 // Initialise mass and charge
171 if(p != particle) {
172 particle = p;
175 }
176}
void SetupParticle(const G4ParticleDefinition *)

Referenced by ComputeCrossSectionPerAtom(), Initialise(), and SampleSecondaries().

Member Data Documentation

◆ cosTetMaxNuc

G4double G4eCoulombScatteringModel::cosTetMaxNuc
protected

◆ cosTetMinNuc

G4double G4eCoulombScatteringModel::cosTetMinNuc
protected

◆ cosThetaMax

G4double G4eCoulombScatteringModel::cosThetaMax
protected

Definition at line 135 of file G4eCoulombScatteringModel.hh.

Referenced by ComputeCrossSectionPerAtom(), and SampleSecondaries().

◆ cosThetaMin

G4double G4eCoulombScatteringModel::cosThetaMin
protected

Definition at line 134 of file G4eCoulombScatteringModel.hh.

Referenced by Initialise().

◆ currentCouple

const G4MaterialCutsCouple* G4eCoulombScatteringModel::currentCouple
protected

◆ currentMaterial

const G4Material* G4eCoulombScatteringModel::currentMaterial
protected

◆ currentMaterialIndex

G4int G4eCoulombScatteringModel::currentMaterialIndex
protected

◆ elecRatio

G4double G4eCoulombScatteringModel::elecRatio
protected

◆ fNistManager

G4NistManager* G4eCoulombScatteringModel::fNistManager
protected

Definition at line 126 of file G4eCoulombScatteringModel.hh.

Referenced by G4eCoulombScatteringModel().

◆ fParticleChange

G4ParticleChangeForGamma* G4eCoulombScatteringModel::fParticleChange
protected

◆ lowEnergyThreshold

G4double G4eCoulombScatteringModel::lowEnergyThreshold
protected

◆ mass

G4double G4eCoulombScatteringModel::mass
protected

◆ particle

const G4ParticleDefinition* G4eCoulombScatteringModel::particle
protected

◆ pCuts

const std::vector<G4double>* G4eCoulombScatteringModel::pCuts
protected

◆ recoilThreshold

G4double G4eCoulombScatteringModel::recoilThreshold
protected

◆ theParticleTable

G4ParticleTable* G4eCoulombScatteringModel::theParticleTable
protected

Definition at line 123 of file G4eCoulombScatteringModel.hh.

Referenced by G4eCoulombScatteringModel(), and SampleSecondaries().

◆ theProton

const G4ParticleDefinition* G4eCoulombScatteringModel::theProton
protected

◆ wokvi


The documentation for this class was generated from the following files: