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

#include <G4CoulombScattering.hh>

+ Inheritance diagram for G4CoulombScattering:

Public Member Functions

 G4CoulombScattering (const G4String &name, G4bool combined)
 
 G4CoulombScattering (G4bool combined=true)
 
 G4CoulombScattering (const G4String &name)
 
 ~G4CoulombScattering () override
 
G4bool IsApplicable (const G4ParticleDefinition &p) final
 
void ProcessDescription (std::ostream &) const override
 
void SetIsCombined (G4bool val)
 
G4CoulombScatteringoperator= (const G4CoulombScattering &right)=delete
 
 G4CoulombScattering (const G4CoulombScattering &)=delete
 
- Public Member Functions inherited from G4VEmProcess
 G4VEmProcess (const G4String &name, G4ProcessType type=fElectromagnetic)
 
 ~G4VEmProcess () override
 
void ProcessDescription (std::ostream &outFile) const override
 
void PreparePhysicsTable (const G4ParticleDefinition &) override
 
void BuildPhysicsTable (const G4ParticleDefinition &) override
 
void StartTracking (G4Track *) override
 
G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &) override
 
G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
 
G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
 
virtual G4VEmProcessGetEmProcess (const G4String &name)
 
G4double GetLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple, G4double logKinEnergy)
 
G4double GetCrossSection (const G4double kinEnergy, const G4MaterialCutsCouple *couple) override
 
G4double ComputeCrossSectionPerAtom (G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
 
G4double MeanFreePath (const G4Track &track)
 
void SetLambdaBinning (G4int nbins)
 
void SetMinKinEnergy (G4double e)
 
void SetMinKinEnergyPrim (G4double e)
 
void SetMaxKinEnergy (G4double e)
 
G4PhysicsTableLambdaTable () const
 
G4PhysicsTableLambdaTablePrim () const
 
void SetLambdaTable (G4PhysicsTable *)
 
void SetLambdaTablePrim (G4PhysicsTable *)
 
std::vector< G4double > * EnergyOfCrossSectionMax () const
 
void SetEnergyOfCrossSectionMax (std::vector< G4double > *)
 
G4CrossSectionType CrossSectionType () const
 
void SetCrossSectionType (G4CrossSectionType val)
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t idxCouple) const
 
void AddEmModel (G4int, G4VEmModel *, const G4Region *region=nullptr)
 
void SetEmModel (G4VEmModel *, G4int index=0)
 
G4int NumberOfModels () const
 
G4VEmModelEmModel (size_t index=0) const
 
const G4VEmModelGetCurrentModel () const
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) const
 
const G4ElementGetCurrentElement () const
 
void SetCrossSectionBiasingFactor (G4double f, G4bool flag=true)
 
G4double CrossSectionBiasingFactor () const
 
void ActivateForcedInteraction (G4double length=0.0, const G4String &r="", G4bool flag=true)
 
void ActivateSecondaryBiasing (const G4String &region, G4double factor, G4double energyLimit)
 
void SetEmMasterProcess (const G4VEmProcess *)
 
void SetBuildTableFlag (G4bool val)
 
void CurrentSetup (const G4MaterialCutsCouple *, G4double energy)
 
G4bool UseBaseMaterial () const
 
void BuildLambdaTable ()
 
void StreamInfo (std::ostream &outFile, const G4ParticleDefinition &, G4bool rst=false) const
 
 G4VEmProcess (G4VEmProcess &)=delete
 
G4VEmProcessoperator= (const G4VEmProcess &right)=delete
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
G4VDiscreteProcessoperator= (const G4VDiscreteProcess &)=delete
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual const G4VProcessGetCreatorProcess () const
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

void StreamProcessInfo (std::ostream &outFile) const override
 
void InitialiseProcess (const G4ParticleDefinition *) override
 
G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *) final
 
- Protected Member Functions inherited from G4VEmProcess
G4VEmModelSelectModel (G4double kinEnergy, size_t)
 
G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4PhysicsVectorLambdaPhysicsVector (const G4MaterialCutsCouple *)
 
void DefineMaterial (const G4MaterialCutsCouple *couple)
 
G4int LambdaBinning () const
 
G4double MinKinEnergy () const
 
G4double MaxKinEnergy () const
 
G4double PolarAngleLimit () const
 
G4ParticleChangeForGammaGetParticleChange ()
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetSecondaryParticle (const G4ParticleDefinition *p)
 
size_t CurrentMaterialCutsCoupleIndex () const
 
const G4MaterialCutsCoupleMaterialCutsCouple () const
 
G4bool ApplyCuts () const
 
G4double GetGammaEnergyCut ()
 
G4double GetElectronEnergyCut ()
 
void SetStartFromNullFlag (G4bool val)
 
void SetSplineFlag (G4bool val)
 
const G4ElementGetTargetElement () const
 
const G4IsotopeGetTargetIsotope () const
 
G4int DensityIndex (G4int idx) const
 
G4double DensityFactor (G4int idx) const
 
- Protected Member Functions inherited from G4VDiscreteProcess
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VEmProcess
const G4MaterialCutsCouplecurrentCouple = nullptr
 
const G4MaterialcurrentMaterial = nullptr
 
G4EmBiasingManagerbiasManager = nullptr
 
std::vector< G4double > * theEnergyOfCrossSectionMax = nullptr
 
G4double mfpKinEnergy = DBL_MAX
 
G4double preStepKinEnergy = 0.0
 
G4double preStepLambda = 0.0
 
G4int mainSecondaries = 1
 
G4int secID = _EM
 
G4int fluoID = _Fluorescence
 
G4int augerID = _AugerElectron
 
G4int biasID = _EM
 
G4int tripletID = _TripletElectron
 
size_t currentCoupleIndex = 0
 
size_t basedCoupleIndex = 0
 
size_t coupleIdxLambda = 0
 
size_t idxLambda = 0
 
G4bool isTheMaster = true
 
G4bool baseMat = false
 
std::vector< G4DynamicParticle * > secParticles
 
G4ParticleChangeForGamma fParticleChange
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Detailed Description

Definition at line 54 of file G4CoulombScattering.hh.

Constructor & Destructor Documentation

◆ G4CoulombScattering() [1/4]

G4CoulombScattering::G4CoulombScattering ( const G4String & name,
G4bool combined )
explicit

Definition at line 58 of file G4CoulombScattering.cc.

59 : G4VEmProcess(nam),
60 q2Max(CLHEP::TeV*CLHEP::TeV),
61 isCombined(comb)
62{
65 SetSplineFlag(false);
69}
@ fCoulombScattering
@ fEmOnePeak
static G4Proton * Proton()
Definition G4Proton.cc:90
G4VEmProcess(const G4String &name, G4ProcessType type=fElectromagnetic)
void SetBuildTableFlag(G4bool val)
void SetSecondaryParticle(const G4ParticleDefinition *p)
void SetSplineFlag(G4bool val)
void SetCrossSectionType(G4CrossSectionType val)
void SetStartFromNullFlag(G4bool val)
void SetProcessSubType(G4int)

◆ G4CoulombScattering() [2/4]

G4CoulombScattering::G4CoulombScattering ( G4bool combined = true)

Definition at line 79 of file G4CoulombScattering.cc.

80 : G4CoulombScattering("CoulombScat", comb)
81{}
G4CoulombScattering(const G4String &name, G4bool combined)

◆ G4CoulombScattering() [3/4]

G4CoulombScattering::G4CoulombScattering ( const G4String & name)

Definition at line 73 of file G4CoulombScattering.cc.

74 : G4CoulombScattering(nam, true)
75{}

◆ ~G4CoulombScattering()

G4CoulombScattering::~G4CoulombScattering ( )
overridedefault

◆ G4CoulombScattering() [4/4]

G4CoulombScattering::G4CoulombScattering ( const G4CoulombScattering & )
delete

Member Function Documentation

◆ InitialiseProcess()

void G4CoulombScattering::InitialiseProcess ( const G4ParticleDefinition * p)
overrideprotectedvirtual

Implements G4VEmProcess.

Definition at line 96 of file G4CoulombScattering.cc.

97{
98 // second initialisation not allowed for the time being
99 // this means that polar angle limit change will not be appled
100 // after first initialisation
101 if(isInitialised) { return; }
102
104 G4double a = param->FactorForAngleLimit()*CLHEP::hbarc/CLHEP::fermi;
105 q2Max = 0.5*a*a;
106 G4double theta = param->MscThetaLimit();
107
108 // restricted or non-restricted cross section table
109 if(isCombined) {
110 if(theta == CLHEP::pi) {
111 // for restriced single scattering change cross section shape
114 }
115 } else {
116 SetSplineFlag(true);
118 }
119 isInitialised = true;
120 G4double mass = p->GetPDGMass();
122
123 G4bool ion = false;
124 if (mass > CLHEP::GeV || p->GetParticleType() == "nucleus") {
125 SetBuildTableFlag(false);
126 ion = true;
127 if(name != "GenericIon") { SetVerboseLevel(0); }
128 } else {
129 if(name != "e-" && name != "e+" &&
130 name != "mu+" && name != "mu-" && name != "pi+" &&
131 name != "kaon+" && name != "proton" ) { SetVerboseLevel(0); }
132 }
133 /*
134 G4cout << "### G4CoulombScattering::InitialiseProcess: "
135 << p->GetParticleName()
136 << " Emin(MeV)= " << MinKinEnergy()/MeV
137 << " Emax(TeV)= " << MaxKinEnergy()/TeV
138 << " nbins= " << LambdaBinning()
139 << " theta= " << theta
140 << " mass(MeV)= " << mass
141 << " isCombined=" << isCombined
142 << " ion=" << ion
143 << G4endl;
144 */
145 if(nullptr == EmModel(0)) {
146 if(ion) { SetEmModel(new G4IonCoulombScatteringModel()); }
147 else { SetEmModel(new G4eCoulombScatteringModel(isCombined)); }
148 }
149 G4VEmModel* model = EmModel(0);
150 G4double emin = std::max(param->MinKinEnergy(),model->LowEnergyLimit());
151 G4double emax = std::min(param->MaxKinEnergy(),model->HighEnergyLimit());
152 model->SetPolarAngleLimit(theta);
153 model->SetLowEnergyLimit(emin);
154 model->SetHighEnergyLimit(emax);
155 AddEmModel(1, model);
156}
@ fEmDecreasing
@ fEmIncreasing
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
static G4EmParameters * Instance()
G4double MinKinEnergy() const
G4double MscThetaLimit() const
G4double MaxKinEnergy() const
G4double FactorForAngleLimit() const
const G4String & GetParticleType() const
const G4String & GetParticleName() const
void SetPolarAngleLimit(G4double)
void SetHighEnergyLimit(G4double)
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
G4VEmModel * EmModel(size_t index=0) const
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetVerboseLevel(G4int value)
const char * name(G4int ptype)

◆ IsApplicable()

G4bool G4CoulombScattering::IsApplicable ( const G4ParticleDefinition & p)
finalvirtual

Implements G4VEmProcess.

Definition at line 89 of file G4CoulombScattering.cc.

90{
91 return (p.GetPDGCharge() != 0.0);
92}

◆ MinPrimaryEnergy()

G4double G4CoulombScattering::MinPrimaryEnergy ( const G4ParticleDefinition * part,
const G4Material * mat )
finalprotectedvirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 160 of file G4CoulombScattering.cc.

162{
163 // Pure Coulomb scattering
164 G4double emin = 0.0;
165
166 // Coulomb scattering combined with multiple or hadronic scattering
168
169 if(0.0 < theta) {
170 G4double p2 = q2Max*mat->GetIonisation()->GetInvA23()/(1.0 - std::cos(theta));
171 G4double mass = part->GetPDGMass();
172 emin = p2/(std::sqrt(p2 + mass*mass) + mass);
173 }
174
175 return emin;
176}
G4double GetInvA23() const
G4IonisParamMat * GetIonisation() const

◆ operator=()

G4CoulombScattering & G4CoulombScattering::operator= ( const G4CoulombScattering & right)
delete

◆ ProcessDescription()

void G4CoulombScattering::ProcessDescription ( std::ostream & out) const
overridevirtual

Reimplemented from G4VProcess.

Definition at line 196 of file G4CoulombScattering.cc.

197{
198 out <<
199 " Coulomb scattering. Simulation of elastic scattering\n" <<
200 " events individually. May be used in combination with multiple\n" <<
201 " scattering, where Coulomb scattering is used for hard (large angle)\n" <<
202 " collisions and multiple scattering for soft collisions.";
204}
void ProcessDescription(std::ostream &outFile) const override

◆ SetIsCombined()

void G4CoulombScattering::SetIsCombined ( G4bool val)
inline

Definition at line 74 of file G4CoulombScattering.hh.

74{ isCombined = val; }

◆ StreamProcessInfo()

void G4CoulombScattering::StreamProcessInfo ( std::ostream & outFile) const
overrideprotectedvirtual

Reimplemented from G4VEmProcess.

Definition at line 180 of file G4CoulombScattering.cc.

181{
182 G4double tetmin = G4EmParameters::Instance()->MscThetaLimit()/CLHEP::degree;
183 outFile << " ";
184 if(tetmin > 179.) { outFile << "ThetaMin(p)"; }
185 else { outFile << tetmin; }
186 outFile << " < Theta(degree) < 180";
187
188 if(q2Max < DBL_MAX) {
189 outFile << ", pLimit(GeV^1)= " << std::sqrt(q2Max)/GeV;
190 }
191 outFile << G4endl;
192}
#define G4endl
Definition G4ios.hh:67
#define DBL_MAX
Definition templates.hh:62

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