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

#include <G4Step.hh>

Public Member Functions

 G4Step ()
 
 ~G4Step ()
 
 G4Step (const G4Step &)
 
G4Stepoperator= (const G4Step &)
 
G4TrackGetTrack () const
 
void SetTrack (G4Track *value)
 
G4StepPointGetPreStepPoint () const
 
void SetPreStepPoint (G4StepPoint *value)
 
G4StepPointGetPostStepPoint () const
 
void SetPostStepPoint (G4StepPoint *value)
 
G4double GetStepLength () const
 
void SetStepLength (G4double value)
 
G4double GetTotalEnergyDeposit () const
 
void SetTotalEnergyDeposit (G4double value)
 
G4double GetNonIonizingEnergyDeposit () const
 
void SetNonIonizingEnergyDeposit (G4double value)
 
G4SteppingControl GetControlFlag () const
 
void SetControlFlag (G4SteppingControl StepControlFlag)
 
void AddTotalEnergyDeposit (G4double value)
 
void ResetTotalEnergyDeposit ()
 
void AddNonIonizingEnergyDeposit (G4double value)
 
void ResetNonIonizingEnergyDeposit ()
 
G4bool IsFirstStepInVolume () const
 
G4bool IsLastStepInVolume () const
 
void SetFirstStepFlag ()
 
void ClearFirstStepFlag ()
 
void SetLastStepFlag ()
 
void ClearLastStepFlag ()
 
G4ThreeVector GetDeltaPosition () const
 
G4double GetDeltaTime () const
 
G4ThreeVector GetDeltaMomentum () const
 
G4double GetDeltaEnergy () const
 
void InitializeStep (G4Track *aValue)
 
void UpdateTrack ()
 
void CopyPostToPreStepPoint ()
 
G4PolylineCreatePolyline () const
 
const std::vector< const G4Track * > * GetSecondaryInCurrentStep () const
 
const G4TrackVectorGetSecondary () const
 
G4TrackVectorGetfSecondary ()
 
G4TrackVectorNewSecondaryVector ()
 
void DeleteSecondaryVector ()
 
void SetSecondary (G4TrackVector *value)
 
void SetPointerToVectorOfAuxiliaryPoints (std::vector< G4ThreeVector > *theNewVectorPointer)
 
std::vector< G4ThreeVector > * GetPointerToVectorOfAuxiliaryPoints () const
 

Protected Attributes

G4double fTotalEnergyDeposit
 
G4double fNonIonizingEnergyDeposit
 

Detailed Description

Definition at line 76 of file G4Step.hh.

Constructor & Destructor Documentation

◆ G4Step() [1/2]

G4Step::G4Step ( )

Definition at line 53 of file G4Step.cc.

56 fStepLength(0.), fpTrack(0),
57 fpSteppingControlFlag(NormalCondition),
58 fFirstStepInVolume(false),
59 fLastStepInVolume(false),
60 fSecondary(0),
61 nSecondaryByLastStep(0), secondaryInCurrentStep(),
62 fpVectorOfAuxiliaryPointsPointer(0)
63{
64 fpPreStepPoint = new G4StepPoint();
65 fpPostStepPoint = new G4StepPoint();
66
67 secondaryInCurrentStep = new std::vector<CT>;
68}
@ NormalCondition
G4double fNonIonizingEnergyDeposit
Definition: G4Step.hh:179
G4double fTotalEnergyDeposit
Definition: G4Step.hh:176

◆ ~G4Step()

G4Step::~G4Step ( )

Definition at line 71 of file G4Step.cc.

73{
74 delete fpPreStepPoint;
75 delete fpPostStepPoint;
76
77 secondaryInCurrentStep->clear();
78 delete secondaryInCurrentStep;
79
80 if (fSecondary !=0 ) {
81 fSecondary->clear();
82 delete fSecondary;
83 }
84}

◆ G4Step() [2/2]

G4Step::G4Step ( const G4Step right)

Definition at line 89 of file G4Step.cc.

93 fStepLength(right.fStepLength),
94 fpTrack(right.fpTrack),
95 fpSteppingControlFlag(right.fpSteppingControlFlag),
96 fFirstStepInVolume(right.fFirstStepInVolume),
97 fLastStepInVolume(right.fLastStepInVolume),
98 nSecondaryByLastStep(right.nSecondaryByLastStep),
99 secondaryInCurrentStep(right.secondaryInCurrentStep),
100 fpVectorOfAuxiliaryPointsPointer(right.fpVectorOfAuxiliaryPointsPointer)
101{
102 if (right.fpPreStepPoint !=0) {
103 fpPreStepPoint = new G4StepPoint(*(right.fpPreStepPoint));
104 } else {
105 fpPreStepPoint = new G4StepPoint();
106 }
107 if (right.fpPostStepPoint !=0) {
108 fpPostStepPoint = new G4StepPoint(*(right.fpPostStepPoint));
109 } else {
110 fpPostStepPoint = new G4StepPoint();
111 }
112
113 if (right.fSecondary !=0) {
114 fSecondary = new G4TrackVector(*(right.fSecondary));
115 } else {
116 fSecondary = new G4TrackVector();
117 }
118 secondaryInCurrentStep = new std::vector<CT>;
119}
std::vector< G4Track * > G4TrackVector

Member Function Documentation

◆ AddNonIonizingEnergyDeposit()

◆ AddTotalEnergyDeposit()

◆ ClearFirstStepFlag()

void G4Step::ClearFirstStepFlag ( )

◆ ClearLastStepFlag()

◆ CopyPostToPreStepPoint()

void G4Step::CopyPostToPreStepPoint ( )

◆ CreatePolyline()

G4Polyline * G4Step::CreatePolyline ( ) const

◆ DeleteSecondaryVector()

◆ GetControlFlag()

G4SteppingControl G4Step::GetControlFlag ( ) const

◆ GetDeltaEnergy()

G4double G4Step::GetDeltaEnergy ( ) const

Definition at line 176 of file G4Step.cc.

178{
179 static G4bool isFirstTime = true;
180 if (isFirstTime) {
181 isFirstTime = false;
182#ifdef G4VERBOSE
183 G4Exception( "G4Step::GetDeltaEnergy()","Warning", JustWarning,
184 "This method is obsolete and will be removed soon");
185#endif
186 }
187
188 return fpPostStepPoint->GetKineticEnergy()
189 - fpPreStepPoint->GetKineticEnergy();
190}
@ JustWarning
bool G4bool
Definition: G4Types.hh:67
G4double GetKineticEnergy() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetDeltaMomentum()

G4ThreeVector G4Step::GetDeltaMomentum ( ) const

Definition at line 159 of file G4Step.cc.

161{
162 static G4bool isFirstTime = true;
163 if (isFirstTime) {
164 isFirstTime = false;
165#ifdef G4VERBOSE
166 G4Exception( "G4Step::GetDeltaMomentum()","Warning", JustWarning,
167 "This method is obsolete and will be removed soon");
168#endif
169 }
170
171 return fpPostStepPoint->GetMomentum()
172 - fpPreStepPoint->GetMomentum();
173}
G4ThreeVector GetMomentum() const

◆ GetDeltaPosition()

G4ThreeVector G4Step::GetDeltaPosition ( ) const

◆ GetDeltaTime()

◆ GetfSecondary()

◆ GetNonIonizingEnergyDeposit()

◆ GetPointerToVectorOfAuxiliaryPoints()

std::vector< G4ThreeVector > * G4Step::GetPointerToVectorOfAuxiliaryPoints ( ) const
inline

Definition at line 240 of file G4Step.hh.

240 {
241 return fpVectorOfAuxiliaryPointsPointer;
242 }

Referenced by G4SmoothTrajectory::AppendStep().

◆ GetPostStepPoint()

G4StepPoint * G4Step::GetPostStepPoint ( ) const

Referenced by G4VAtomDeexcitation::AlongStepDeexcitation(), G4AdjointAlongStepWeightCorrection::AlongStepDoIt(), G4ContinuousGainOfEnergy::AlongStepDoIt(), G4VEnergyLossProcess::AlongStepDoIt(), G4VMultipleScattering::AlongStepDoIt(), G4NuclearStopping::AlongStepDoIt(), G4RayTrajectory::AppendStep(), G4RichTrajectory::AppendStep(), G4SmoothTrajectory::AppendStep(), G4Trajectory::AppendStep(), G4DNABrownianTransportation::ComputeStep(), G4AdjointCrossSurfChecker::CrossingAGivenRegisteredSurface(), G4AdjointCrossSurfChecker::CrossingAnInterfaceBetweenTwoVolumes(), G4AdjointCrossSurfChecker::CrossingASphere(), G4DecayWithSpin::DecayIt(), G4ITStepProcessor::DoDefinePhysicalStepLength(), G4ITStepProcessor::DoStepping(), G4ImportanceProcess::G4ImportanceProcess(), G4ParallelWorldProcess::G4ParallelWorldProcess(), G4ParallelWorldScoringProcess::G4ParallelWorldScoringProcess(), G4RichTrajectoryPoint::G4RichTrajectoryPoint(), G4ScoreSplittingProcess::G4ScoreSplittingProcess(), G4SteppingManager::G4SteppingManager(), G4WeightCutOffProcess::G4WeightCutOffProcess(), G4WeightWindowProcess::G4WeightWindowProcess(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolume(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface(), G4ITStepProcessor::InvokeAtRestDoItProcs(), G4ITStepProcessor::InvokePSDIP(), G4PSPassageCellCurrent::IsPassed(), G4PSPassageCellFlux::IsPassed(), G4PSPassageTrackLength::IsPassed(), G4PSFlatSurfaceCurrent::IsSelectedSurface(), G4PSFlatSurfaceFlux::IsSelectedSurface(), G4PSSphereSurfaceCurrent::IsSelectedSurface(), G4PSSphereSurfaceFlux::IsSelectedSurface(), G4PSCylinderSurfaceCurrent::IsSelectedSurface(), G4PSCylinderSurfaceFlux::IsSelectedSurface(), G4ErrorPropagator::MakeOneStep(), G4ImportanceProcess::PostStepDoIt(), G4WeightCutOffProcess::PostStepDoIt(), G4WeightWindowProcess::PostStepDoIt(), G4VEmProcess::PostStepDoIt(), G4VEnergyLossProcess::PostStepDoIt(), G4ScoreSplittingProcess::PostStepDoIt(), G4Cerenkov::PostStepDoIt(), G4ForwardXrayTR::PostStepDoIt(), G4Scintillation::PostStepDoIt(), G4VXTRenergyLoss::PostStepDoIt(), G4OpBoundaryProcess::PostStepDoIt(), G4OpWLS::PostStepDoIt(), G4PSCellCharge::ProcessHits(), G4PSCylinderSurfaceFlux::ProcessHits(), G4PSFlatSurfaceFlux::ProcessHits(), G4PSNofCollision::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4PSTrackCounter::ProcessHits(), G4ElectronIonPair::ResidualeChargePostStep(), G4ElectronIonPair::SampleIonsAlongStep(), G4VEnergyLossProcess::SampleSubCutSecondaries(), G4CellScorer::ScoreAnInVolumeStep(), G4ITStepProcessor::SetupMembers(), G4SteppingVerbose::ShowStep(), G4ParallelWorldProcess::StartTracking(), G4ScoreSplittingProcess::StartTracking(), G4SteppingVerbose::StepInfo(), G4SteppingManager::Stepping(), G4ParticleChange::UpdateStepForAlongStep(), G4ParticleChangeForLoss::UpdateStepForAlongStep(), G4ParticleChangeForMSC::UpdateStepForAlongStep(), G4ParticleChangeForTransport::UpdateStepForAlongStep(), G4VParticleChange::UpdateStepForAlongStep(), G4ParticleChangeForGamma::UpdateStepForAtRest(), G4FastStep::UpdateStepForAtRest(), G4ParticleChange::UpdateStepForAtRest(), G4ParticleChangeForDecay::UpdateStepForAtRest(), G4VParticleChange::UpdateStepForAtRest(), G4FastStep::UpdateStepForPostStep(), G4ParticleChange::UpdateStepForPostStep(), G4ParticleChangeForDecay::UpdateStepForPostStep(), G4ParticleChangeForGamma::UpdateStepForPostStep(), G4ParticleChangeForLoss::UpdateStepForPostStep(), G4ParticleChangeForMSC::UpdateStepForPostStep(), G4ParticleChangeForTransport::UpdateStepForPostStep(), G4VParticleChange::UpdateStepForPostStep(), G4AdjointSteppingAction::UserSteppingAction(), G4ParallelWorldScoringProcess::Verbose(), and G4ScoreSplittingProcess::Verbose().

◆ GetPreStepPoint()

G4StepPoint * G4Step::GetPreStepPoint ( ) const

Referenced by G4SDChargedFilter::Accept(), G4SDKineticEnergyFilter::Accept(), G4SDNeutralFilter::Accept(), G4VAtomDeexcitation::AlongStepDeexcitation(), G4VEnergyLossProcess::AlongStepDoIt(), G4VMultipleScattering::AlongStepDoIt(), G4NuclearStopping::AlongStepDoIt(), G4ITTransportation::AlongStepDoIt(), G4CoupledTransportation::AlongStepDoIt(), G4Transportation::AlongStepDoIt(), G4RayTrajectory::AppendStep(), G4RichTrajectory::AppendStep(), G4VReadOutGeometry::CheckROVolume(), G4VMscModel::ComputeGeomLimit(), G4DNABrownianTransportation::ComputeStep(), G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(), G4UrbanMscModel90::ComputeTruePathLengthLimit(), G4UrbanMscModel92::ComputeTruePathLengthLimit(), G4UrbanMscModel93::ComputeTruePathLengthLimit(), G4UrbanMscModel95::ComputeTruePathLengthLimit(), G4UrbanMscModel96::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTruePathLengthLimit(), G4WentzelVIRelModel::ComputeTruePathLengthLimit(), G4PSCellFlux::ComputeVolume(), G4PSDoseDeposit::ComputeVolume(), G4PSPassageCellFlux::ComputeVolume(), G4AdjointCrossSurfChecker::CrossingAnInterfaceBetweenTwoVolumes(), G4AdjointCrossSurfChecker::CrossingASphere(), G4CellScoreComposer::EstimatorCalculation(), G4DNASmoluchowskiReactionModel::FindReaction(), G4VReadOutGeometry::FindROTouchable(), G4ImportanceProcess::G4ImportanceProcess(), G4ParallelWorldProcess::G4ParallelWorldProcess(), G4ParallelWorldScoringProcess::G4ParallelWorldScoringProcess(), G4RichTrajectoryPoint::G4RichTrajectoryPoint(), G4ScoreSplittingProcess::G4ScoreSplittingProcess(), G4SteppingManager::G4SteppingManager(), G4WeightCutOffProcess::G4WeightCutOffProcess(), G4WeightWindowProcess::G4WeightWindowProcess(), G4VPrimitiveScorer::GetIndex(), G4PSCellCharge3D::GetIndex(), G4PSCellFlux3D::GetIndex(), G4PSCylinderSurfaceCurrent3D::GetIndex(), G4PSCylinderSurfaceFlux3D::GetIndex(), G4PSDoseDeposit3D::GetIndex(), G4PSEnergyDeposit3D::GetIndex(), G4PSFlatSurfaceCurrent3D::GetIndex(), G4PSFlatSurfaceFlux3D::GetIndex(), G4PSMinKinEAtGeneration3D::GetIndex(), G4PSNofCollision3D::GetIndex(), G4PSNofSecondary3D::GetIndex(), G4PSNofStep3D::GetIndex(), G4PSPassageCellCurrent3D::GetIndex(), G4PSPassageCellFlux3D::GetIndex(), G4PSPassageTrackLength3D::GetIndex(), G4PSPopulation3D::GetIndex(), G4PSSphereSurfaceCurrent3D::GetIndex(), G4PSSphereSurfaceFlux3D::GetIndex(), G4PSStepChecker3D::GetIndex(), G4PSTermination3D::GetIndex(), G4PSTrackCounter3D::GetIndex(), G4PSTrackLength3D::GetIndex(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolume(), G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface(), G4VGFlashSensitiveDetector::Hit(), G4ITStepProcessor::InitDefineStep(), G4PSPassageCellCurrent::IsPassed(), G4PSPassageCellFlux::IsPassed(), G4PSPassageTrackLength::IsPassed(), G4PSFlatSurfaceCurrent::IsSelectedSurface(), G4PSFlatSurfaceFlux::IsSelectedSurface(), G4PSSphereSurfaceCurrent::IsSelectedSurface(), G4PSSphereSurfaceFlux::IsSelectedSurface(), G4PSCylinderSurfaceCurrent::IsSelectedSurface(), G4PSCylinderSurfaceFlux::IsSelectedSurface(), G4ElectronIonPair::MeanNumberOfIonsAlongStep(), G4ImportanceProcess::PostStepDoIt(), G4ScoreSplittingProcess::PostStepDoIt(), G4Cerenkov::PostStepDoIt(), G4ForwardXrayTR::PostStepDoIt(), G4Scintillation::PostStepDoIt(), G4OpBoundaryProcess::PostStepDoIt(), G4VTransitionRadiation::PostStepDoIt(), G4PSCellCharge::ProcessHits(), G4PSCellFlux::ProcessHits(), G4PSCylinderSurfaceCurrent::ProcessHits(), G4PSCylinderSurfaceFlux::ProcessHits(), G4PSDoseDeposit::ProcessHits(), G4PSEnergyDeposit::ProcessHits(), G4PSFlatSurfaceCurrent::ProcessHits(), G4PSFlatSurfaceFlux::ProcessHits(), G4PSMinKinEAtGeneration::ProcessHits(), G4PSNofCollision::ProcessHits(), G4PSNofSecondary::ProcessHits(), G4PSPassageCellCurrent::ProcessHits(), G4PSPassageCellFlux::ProcessHits(), G4PSPopulation::ProcessHits(), G4PSSphereSurfaceCurrent::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4PSTermination::ProcessHits(), G4PSTrackCounter::ProcessHits(), G4PSTrackLength::ProcessHits(), G4ErrorFreeTrajState::PropagateError(), G4ElectronIonPair::SampleIonsAlongStep(), G4VEnergyLossProcess::SampleSubCutSecondaries(), G4ITStepProcessor::SetupMembers(), G4SteppingVerbose::ShowStep(), G4EnergySplitter::SplitEnergyInVolumes(), G4ParallelWorldProcess::StartTracking(), G4ScoreSplittingProcess::StartTracking(), G4SteppingManager::Stepping(), G4ParticleChange::UpdateStepForAlongStep(), G4ParticleChangeForLoss::UpdateStepForAlongStep(), G4ParticleChangeForTransport::UpdateStepForAlongStep(), G4VParticleChange::UpdateStepForAlongStep(), G4MSSteppingAction::UserSteppingAction(), G4ParallelWorldScoringProcess::Verbose(), and G4ScoreSplittingProcess::Verbose().

◆ GetSecondary()

◆ GetSecondaryInCurrentStep()

const std::vector< const G4Track * > * G4Step::GetSecondaryInCurrentStep ( ) const

Definition at line 193 of file G4Step.cc.

195{
196 secondaryInCurrentStep->clear();
197 G4int nSecondary = fSecondary->size();
198 for (G4int i=nSecondaryByLastStep; i<nSecondary; i++) {
199 secondaryInCurrentStep->push_back((*fSecondary)[i]);
200 }
201 return secondaryInCurrentStep;
202}
int G4int
Definition: G4Types.hh:66

◆ GetStepLength()

◆ GetTotalEnergyDeposit()

◆ GetTrack()

G4Track * G4Step::GetTrack ( ) const

◆ InitializeStep()

void G4Step::InitializeStep ( G4Track aValue)

◆ IsFirstStepInVolume()

G4bool G4Step::IsFirstStepInVolume ( ) const

◆ IsLastStepInVolume()

G4bool G4Step::IsLastStepInVolume ( ) const

◆ NewSecondaryVector()

◆ operator=()

G4Step & G4Step::operator= ( const G4Step right)

Definition at line 122 of file G4Step.cc.

124{
125 if (this != &right){
128 fStepLength = right.fStepLength;
129 fpTrack = right.fpTrack;
130 fpSteppingControlFlag = right.fpSteppingControlFlag;
131 fFirstStepInVolume = right.fFirstStepInVolume;
132 fLastStepInVolume = right.fLastStepInVolume;
133 nSecondaryByLastStep = right.nSecondaryByLastStep;
134 secondaryInCurrentStep = right.secondaryInCurrentStep;
135 fpVectorOfAuxiliaryPointsPointer = right.fpVectorOfAuxiliaryPointsPointer;
136
137 if (fpPreStepPoint !=0 ) delete fpPreStepPoint;
138 if (right.fpPreStepPoint !=0) {
139 fpPreStepPoint = new G4StepPoint(*(right.fpPreStepPoint));
140 } else {
141 fpPreStepPoint = new G4StepPoint();
142 }
143 if (fpPostStepPoint !=0 ) delete fpPostStepPoint;
144 if (right.fpPostStepPoint !=0) {
145 fpPostStepPoint = new G4StepPoint(*(right.fpPostStepPoint));
146 } else {
147 fpPostStepPoint = new G4StepPoint();
148 }
149 if (right.fSecondary !=0) {
150 fSecondary = new G4TrackVector(*(right.fSecondary));
151 } else {
152 fSecondary = new G4TrackVector();
153 }
154 }
155 return *this;
156}

◆ ResetNonIonizingEnergyDeposit()

void G4Step::ResetNonIonizingEnergyDeposit ( )

◆ ResetTotalEnergyDeposit()

void G4Step::ResetTotalEnergyDeposit ( )

◆ SetControlFlag()

void G4Step::SetControlFlag ( G4SteppingControl  StepControlFlag)

◆ SetFirstStepFlag()

void G4Step::SetFirstStepFlag ( )

◆ SetLastStepFlag()

◆ SetNonIonizingEnergyDeposit()

void G4Step::SetNonIonizingEnergyDeposit ( G4double  value)

◆ SetPointerToVectorOfAuxiliaryPoints()

void G4Step::SetPointerToVectorOfAuxiliaryPoints ( std::vector< G4ThreeVector > *  theNewVectorPointer)
inline

Definition at line 237 of file G4Step.hh.

237 {
238 fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
239 }

Referenced by G4ITStepProcessor::InitDefineStep(), G4SteppingManager::Stepping(), and G4ParticleChangeForTransport::UpdateStepForAlongStep().

◆ SetPostStepPoint()

void G4Step::SetPostStepPoint ( G4StepPoint value)

◆ SetPreStepPoint()

void G4Step::SetPreStepPoint ( G4StepPoint value)

◆ SetSecondary()

void G4Step::SetSecondary ( G4TrackVector value)

◆ SetStepLength()

◆ SetTotalEnergyDeposit()

void G4Step::SetTotalEnergyDeposit ( G4double  value)

◆ SetTrack()

void G4Step::SetTrack ( G4Track value)

◆ UpdateTrack()

Member Data Documentation

◆ fNonIonizingEnergyDeposit

G4double G4Step::fNonIonizingEnergyDeposit
protected

Definition at line 179 of file G4Step.hh.

Referenced by operator=().

◆ fTotalEnergyDeposit

G4double G4Step::fTotalEnergyDeposit
protected

Definition at line 176 of file G4Step.hh.

Referenced by operator=().


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