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

#include <G4VCurvedTrajectoryFilter.hh>

+ Inheritance diagram for G4VCurvedTrajectoryFilter:

Public Member Functions

 G4VCurvedTrajectoryFilter ()=default
 
virtual ~G4VCurvedTrajectoryFilter ()=default
 
void CreateNewTrajectorySegment ()
 
virtual void TakeIntermediatePoint (G4ThreeVector newPoint)=0
 
std::vector< G4ThreeVector > * GimmeThePointsAndForgetThem ()
 

Protected Attributes

std::vector< G4ThreeVector > * fpFilteredPoints = nullptr
 

Detailed Description

Definition at line 50 of file G4VCurvedTrajectoryFilter.hh.

Constructor & Destructor Documentation

◆ G4VCurvedTrajectoryFilter()

G4VCurvedTrajectoryFilter::G4VCurvedTrajectoryFilter ( )
default

◆ ~G4VCurvedTrajectoryFilter()

virtual G4VCurvedTrajectoryFilter::~G4VCurvedTrajectoryFilter ( )
virtualdefault

Member Function Documentation

◆ CreateNewTrajectorySegment()

void G4VCurvedTrajectoryFilter::CreateNewTrajectorySegment ( )

Definition at line 50 of file G4VCurvedTrajectoryFilter.cc.

51{
52 if (fpFilteredPoints != nullptr)
53 {
54 // GimmePoints has not been called (it would have set the
55 // pointer to nullptr), therefore nobody has taken charge of the
56 // points and they will never be deleted!
57 G4cout << "!!!!!!!! Filter: auxiliary points are being memory leaked !!!!!"
58 << G4endl;
59 }
60 fpFilteredPoints = new std::vector<G4ThreeVector>;
61}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
std::vector< G4ThreeVector > * fpFilteredPoints

Referenced by G4PropagatorInField::ComputeStep().

◆ GimmeThePointsAndForgetThem()

std::vector< G4ThreeVector > * G4VCurvedTrajectoryFilter::GimmeThePointsAndForgetThem ( )

Definition at line 34 of file G4VCurvedTrajectoryFilter.cc.

35{
36 std::vector<G4ThreeVector>* tmp = fpFilteredPoints;
37 // ParticleChangeForTransport invokes this method (via
38 // PropagatorInField) at every Step, even if the step did not
39 // involve PropagatorInField. Must, therefore, ensure that points
40 // submitted by previous invocations of PIF are not
41 // copied. Therefore the points must be cleared. (Note that the
42 // responsibility for deleting the vector lies with the
43 // SmoothTrajctoryPoint, which is the vector's final destination.)
44 // (jacek 08/11/2002)
45 fpFilteredPoints = nullptr;
46 return tmp;
47}

Referenced by G4PropagatorInField::GimmeTrajectoryVectorAndForgetIt().

◆ TakeIntermediatePoint()

virtual void G4VCurvedTrajectoryFilter::TakeIntermediatePoint ( G4ThreeVector newPoint)
pure virtual

Member Data Documentation

◆ fpFilteredPoints

std::vector<G4ThreeVector>* G4VCurvedTrajectoryFilter::fpFilteredPoints = nullptr
protected

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