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

#include <G4VMscModel.hh>

+ Inheritance diagram for G4VMscModel:

Public Member Functions

 G4VMscModel (const G4String &nam)
 
virtual ~G4VMscModel ()
 
virtual G4double ComputeTruePathLengthLimit (const G4Track &track, G4double &stepLimit)
 
virtual G4double ComputeGeomPathLength (G4double truePathLength)
 
virtual G4double ComputeTrueStepLength (G4double geomPathLength)
 
virtual G4ThreeVectorSampleScattering (const G4DynamicParticle *, G4double safety)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double tmax)
 
void SetStepLimitType (G4MscStepLimitType)
 
void SetLateralDisplasmentFlag (G4bool val)
 
void SetRangeFactor (G4double)
 
void SetGeomFactor (G4double)
 
void SetSkin (G4double)
 
void SetSampleZ (G4bool)
 
G4VEnergyLossProcessGetIonisation () const
 
void SetIonisation (G4VEnergyLossProcess *, const G4ParticleDefinition *part)
 
G4double ComputeSafety (const G4ThreeVector &position, G4double limit)
 
G4double ComputeGeomLimit (const G4Track &, G4double &presafety, G4double limit)
 
G4double GetDEDX (const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4double GetRange (const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4double GetEnergy (const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
 
G4double GetTransportMeanFreePath (const G4ParticleDefinition *part, G4double kinEnergy)
 
- 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

G4ParticleChangeForMSCGetParticleChangeForMSC (const G4ParticleDefinition *p=0)
 
G4double ConvertTrueToGeom (G4double &tLength, G4double &gLength)
 
- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Protected Attributes

G4double facrange
 
G4double facgeom
 
G4double facsafety
 
G4double skin
 
G4double dtrl
 
G4double lambdalimit
 
G4double geomMin
 
G4double geomMax
 
G4ThreeVector fDisplacement
 
G4MscStepLimitType steppingAlgorithm
 
G4bool samplez
 
G4bool latDisplasment
 
- Protected Attributes inherited from G4VEmModel
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 

Detailed Description

Definition at line 68 of file G4VMscModel.hh.

Constructor & Destructor Documentation

◆ G4VMscModel()

G4VMscModel::G4VMscModel ( const G4String nam)

Definition at line 58 of file G4VMscModel.cc.

58 :
59 G4VEmModel(nam),
60 safetyHelper(0),
61 ionisation(0),
62 facrange(0.04),
63 facgeom(2.5),
64 facsafety(0.3),
65 skin(1.0),
66 dtrl(0.05),
67 lambdalimit(mm),
68 geomMin(1.e-6*CLHEP::mm),
69 geomMax(1.e50*CLHEP::mm),
71 samplez(false),
72 latDisplasment(true)
73{
74 dedx = 2.0*CLHEP::MeV*CLHEP::cm2/CLHEP::g;
75 localrange = DBL_MAX;
76 localtkin = 0.0;
78 currentPart = 0;
79}
@ fUseSafety
static G4LossTableManager * Instance()
G4double dtrl
Definition: G4VMscModel.hh:180
G4double facrange
Definition: G4VMscModel.hh:176
G4bool samplez
Definition: G4VMscModel.hh:188
G4double skin
Definition: G4VMscModel.hh:179
G4double geomMin
Definition: G4VMscModel.hh:182
G4double geomMax
Definition: G4VMscModel.hh:183
G4double lambdalimit
Definition: G4VMscModel.hh:181
G4MscStepLimitType steppingAlgorithm
Definition: G4VMscModel.hh:186
G4bool latDisplasment
Definition: G4VMscModel.hh:189
G4double facsafety
Definition: G4VMscModel.hh:178
G4double facgeom
Definition: G4VMscModel.hh:177
#define DBL_MAX
Definition: templates.hh:83

◆ ~G4VMscModel()

G4VMscModel::~G4VMscModel ( )
virtual

Definition at line 83 of file G4VMscModel.cc.

84{}

Member Function Documentation

◆ ComputeGeomLimit()

G4double G4VMscModel::ComputeGeomLimit ( const G4Track track,
G4double presafety,
G4double  limit 
)
inline

Definition at line 256 of file G4VMscModel.hh.

259{
260 G4double res = geomMax;
261 if(track.GetVolume() != safetyHelper->GetWorldVolume()) {
262 res = safetyHelper->CheckNextStep(
263 track.GetStep()->GetPreStepPoint()->GetPosition(),
264 track.GetMomentumDirection(),
265 limit, presafety);
266 }
267 return res;
268}
double G4double
Definition: G4Types.hh:64
G4double CheckNextStep(const G4ThreeVector &position, const G4ThreeVector &direction, const G4double currentMaxStep, G4double &newSafety)
G4VPhysicalVolume * GetWorldVolume()
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPreStepPoint() const
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetMomentumDirection() const
const G4Step * GetStep() const

Referenced by G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(), G4UrbanMscModel90::ComputeTruePathLengthLimit(), G4UrbanMscModel92::ComputeTruePathLengthLimit(), G4UrbanMscModel93::ComputeTruePathLengthLimit(), G4UrbanMscModel95::ComputeTruePathLengthLimit(), G4UrbanMscModel96::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTruePathLengthLimit(), and G4WentzelVIRelModel::ComputeTruePathLengthLimit().

◆ ComputeGeomPathLength()

G4double G4VMscModel::ComputeGeomPathLength ( G4double  truePathLength)
virtual

◆ ComputeSafety()

◆ ComputeTruePathLengthLimit()

G4double G4VMscModel::ComputeTruePathLengthLimit ( const G4Track track,
G4double stepLimit 
)
virtual

◆ ComputeTrueStepLength()

G4double G4VMscModel::ComputeTrueStepLength ( G4double  geomPathLength)
virtual

◆ ConvertTrueToGeom()

◆ GetDEDX()

G4double G4VMscModel::GetDEDX ( const G4ParticleDefinition part,
G4double  kineticEnergy,
const G4MaterialCutsCouple couple 
)
inline

Definition at line 273 of file G4VMscModel.hh.

275{
276 G4double x;
277 if(ionisation) { x = ionisation->GetDEDX(kinEnergy, couple); }
278 else {
279 G4double q = part->GetPDGCharge()/CLHEP::eplus;
280 x = dedx*q*q;
281 }
282 return x;
283}
G4double GetPDGCharge() const
G4double GetDEDX(G4double &kineticEnergy, const G4MaterialCutsCouple *)

Referenced by G4GoudsmitSaundersonMscModel::SampleScattering(), G4UrbanMscModel90::SampleScattering(), G4UrbanMscModel92::SampleScattering(), G4UrbanMscModel93::SampleScattering(), G4UrbanMscModel95::SampleScattering(), and G4UrbanMscModel96::SampleScattering().

◆ GetEnergy()

G4double G4VMscModel::GetEnergy ( const G4ParticleDefinition part,
G4double  range,
const G4MaterialCutsCouple couple 
)
inline

◆ GetIonisation()

G4VEnergyLossProcess * G4VMscModel::GetIonisation ( ) const
inline

Definition at line 319 of file G4VMscModel.hh.

320{
321 return ionisation;
322}

◆ GetParticleChangeForMSC()

G4ParticleChangeForMSC * G4VMscModel::GetParticleChangeForMSC ( const G4ParticleDefinition p = 0)
protected

Definition at line 89 of file G4VMscModel.cc.

90{
91 if(!safetyHelper) {
94 safetyHelper->InitialiseHelper();
95 }
96 G4ParticleChangeForMSC* change = 0;
97 if (pParticleChange) {
98 change = static_cast<G4ParticleChangeForMSC*>(pParticleChange);
99 } else {
100 change = new G4ParticleChangeForMSC();
101 }
102 if(p) {
103
104 // table is never built for GenericIon
105 if(p->GetParticleName() == "GenericIon") {
106 if(xSectionTable) {
108 delete xSectionTable;
109 xSectionTable = 0;
110 }
111
112 // table is always built for low mass particles
113 } else if(p->GetPDGMass() < 4.5*GeV || ForceBuildTableFlag()) {
116 emin = std::max(emin, man->MinKinEnergy());
117 emax = std::min(emax, man->MaxKinEnergy());
118 G4LossTableBuilder* builder = man->GetTableBuilder();
120 emin, emax, true);
122 theDensityIdx = builder->GetCoupleIndexes();
123 }
124 }
125 return change;
126}
const std::vector< G4double > * GetDensityFactors()
G4PhysicsTable * BuildTableForModel(G4PhysicsTable *table, G4VEmModel *model, const G4ParticleDefinition *, G4double emin, G4double emax, G4bool spline)
const std::vector< G4int > * GetCoupleIndexes()
G4double MinKinEnergy() const
G4LossTableBuilder * GetTableBuilder()
G4double MaxKinEnergy() const
const G4String & GetParticleName() const
void clearAndDestroy()
void InitialiseHelper()
static G4TransportationManager * GetTransportationManager()
G4SafetyHelper * GetSafetyHelper() const
G4PhysicsTable * xSectionTable
Definition: G4VEmModel.hh:352
const std::vector< G4double > * theDensityFactor
Definition: G4VEmModel.hh:353
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:529
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:522
G4VParticleChange * pParticleChange
Definition: G4VEmModel.hh:351
G4double HighEnergyActivationLimit() const
Definition: G4VEmModel.hh:536
const std::vector< G4int > * theDensityIdx
Definition: G4VEmModel.hh:354
G4double LowEnergyActivationLimit() const
Definition: G4VEmModel.hh:543
G4bool ForceBuildTableFlag() const
Definition: G4VEmModel.hh:578

Referenced by G4GoudsmitSaundersonMscModel::Initialise(), G4UrbanMscModel90::Initialise(), G4UrbanMscModel92::Initialise(), G4UrbanMscModel93::Initialise(), G4UrbanMscModel95::Initialise(), G4UrbanMscModel96::Initialise(), G4WentzelVIModel::Initialise(), and G4WentzelVIRelModel::Initialise().

◆ GetRange()

G4double G4VMscModel::GetRange ( const G4ParticleDefinition part,
G4double  kineticEnergy,
const G4MaterialCutsCouple couple 
)
inline

Definition at line 288 of file G4VMscModel.hh.

290{
291 if(ionisation) {
292 localrange = ionisation->GetRangeForLoss(kinEnergy, couple);
293 } else {
294 G4double q = part->GetPDGCharge()/CLHEP::eplus;
295 localrange = kinEnergy/(dedx*q*q*couple->GetMaterial()->GetDensity());
296 localtkin = kinEnergy;
297 }
298 return localrange;
299}
G4double GetRangeForLoss(G4double &kineticEnergy, const G4MaterialCutsCouple *)

Referenced by G4VMultipleScattering::AlongStepDoIt(), G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(), G4UrbanMscModel90::ComputeTruePathLengthLimit(), G4UrbanMscModel92::ComputeTruePathLengthLimit(), G4UrbanMscModel93::ComputeTruePathLengthLimit(), G4UrbanMscModel95::ComputeTruePathLengthLimit(), G4UrbanMscModel96::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTruePathLengthLimit(), and G4WentzelVIRelModel::ComputeTruePathLengthLimit().

◆ GetTransportMeanFreePath()

G4double G4VMscModel::GetTransportMeanFreePath ( const G4ParticleDefinition part,
G4double  kinEnergy 
)
inline

Definition at line 332 of file G4VMscModel.hh.

334{
335 G4double x;
336 if(xSectionTable) {
337 G4int idx = CurrentCouple()->GetIndex();
338 x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin)
339 *(*theDensityFactor)[idx]/(ekin*ekin);
340 } else {
341 x = CrossSectionPerVolume(CurrentCouple()->GetMaterial(), part, ekin,
342 0.0, DBL_MAX);
343 }
344 if(0.0 >= x) { x = DBL_MAX; }
345 else { x = 1.0/x; }
346 return x;
347}
int G4int
Definition: G4Types.hh:66
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:186
const G4MaterialCutsCouple * CurrentCouple() const
Definition: G4VEmModel.hh:377

Referenced by G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(), G4UrbanMscModel90::ComputeGeomPathLength(), G4UrbanMscModel92::ComputeGeomPathLength(), G4UrbanMscModel93::ComputeGeomPathLength(), G4UrbanMscModel95::ComputeGeomPathLength(), G4UrbanMscModel96::ComputeGeomPathLength(), G4WentzelVIModel::ComputeGeomPathLength(), G4WentzelVIRelModel::ComputeGeomPathLength(), G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(), G4UrbanMscModel90::ComputeTruePathLengthLimit(), G4UrbanMscModel92::ComputeTruePathLengthLimit(), G4UrbanMscModel93::ComputeTruePathLengthLimit(), G4UrbanMscModel95::ComputeTruePathLengthLimit(), G4UrbanMscModel96::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTruePathLengthLimit(), G4WentzelVIRelModel::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTrueStepLength(), and G4WentzelVIRelModel::ComputeTrueStepLength().

◆ SampleScattering()

G4ThreeVector & G4VMscModel::SampleScattering ( const G4DynamicParticle ,
G4double  safety 
)
virtual

◆ SampleSecondaries()

void G4VMscModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
const G4MaterialCutsCouple ,
const G4DynamicParticle ,
G4double  tmin,
G4double  tmax 
)
virtual

Implements G4VEmModel.

Reimplemented in G4DummyModel, and G4UrbanMscModel90.

Definition at line 159 of file G4VMscModel.cc.

163{}

◆ SetGeomFactor()

void G4VMscModel::SetGeomFactor ( G4double  val)
inline

◆ SetIonisation()

void G4VMscModel::SetIonisation ( G4VEnergyLossProcess p,
const G4ParticleDefinition part 
)
inline

Definition at line 324 of file G4VMscModel.hh.

326{
327 ionisation = p;
328 currentPart = part;
329}

Referenced by G4VMultipleScattering::PreparePhysicsTable(), G4VMultipleScattering::SetIonisation(), and G4VMultipleScattering::StartTracking().

◆ SetLateralDisplasmentFlag()

void G4VMscModel::SetLateralDisplasmentFlag ( G4bool  val)
inline

◆ SetRangeFactor()

void G4VMscModel::SetRangeFactor ( G4double  val)
inline

◆ SetSampleZ()

void G4VMscModel::SetSampleZ ( G4bool  val)
inline

Definition at line 231 of file G4VMscModel.hh.

232{
233 samplez = val;
234}

Referenced by G4UrbanMscModel95::G4UrbanMscModel95(), and G4UrbanMscModel96::G4UrbanMscModel96().

◆ SetSkin()

void G4VMscModel::SetSkin ( G4double  val)
inline

◆ SetStepLimitType()

void G4VMscModel::SetStepLimitType ( G4MscStepLimitType  val)
inline

Member Data Documentation

◆ dtrl

◆ facgeom

◆ facrange

◆ facsafety

◆ fDisplacement

◆ geomMax

G4double G4VMscModel::geomMax
protected

Definition at line 183 of file G4VMscModel.hh.

Referenced by ComputeGeomLimit().

◆ geomMin

G4double G4VMscModel::geomMin
protected

Definition at line 182 of file G4VMscModel.hh.

◆ lambdalimit

G4double G4VMscModel::lambdalimit
protected

Definition at line 181 of file G4VMscModel.hh.

Referenced by G4UrbanMscModel90::ComputeTruePathLengthLimit().

◆ latDisplasment

◆ samplez

◆ skin

◆ steppingAlgorithm


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