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

#include <G4SmoothTrajectoryPoint.hh>

Inheritance diagram for G4SmoothTrajectoryPoint:

Public Member Functions

 G4SmoothTrajectoryPoint ()=default
 G4SmoothTrajectoryPoint (G4ThreeVector pos, std::vector< G4ThreeVector > *auxiliaryPoints)
 G4SmoothTrajectoryPoint (G4ThreeVector pos)
 ~G4SmoothTrajectoryPoint () override
 G4SmoothTrajectoryPoint (const G4SmoothTrajectoryPoint &right)
G4SmoothTrajectoryPointoperator= (const G4SmoothTrajectoryPoint &)=delete
void * operator new (size_t)
void operator delete (void *aTrajectoryPoint)
G4bool operator== (const G4SmoothTrajectoryPoint &right) const
const G4ThreeVector GetPosition () const override
const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const override
const std::map< G4String, G4AttDef > * GetAttDefs () const override
std::vector< G4AttValue > * CreateAttValues () const override
Public Member Functions inherited from G4VTrajectoryPoint
 G4VTrajectoryPoint ()=default
virtual ~G4VTrajectoryPoint ()=default
G4bool operator== (const G4VTrajectoryPoint &right) const
std::shared_ptr< std::vector< G4AttValue > > GetAttValues () const

Friends

class G4ClonedSmoothTrajectoryPoint

Additional Inherited Members

Protected Member Functions inherited from G4VTrajectoryPoint
 G4VTrajectoryPoint (const G4VTrajectoryPoint &right)=default
G4VTrajectoryPointoperator= (const G4VTrajectoryPoint &right)=default
 G4VTrajectoryPoint (G4VTrajectoryPoint &&)=default
G4VTrajectoryPointoperator= (G4VTrajectoryPoint &&)=default

Detailed Description

Definition at line 50 of file G4SmoothTrajectoryPoint.hh.

Constructor & Destructor Documentation

◆ G4SmoothTrajectoryPoint() [1/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( )
default

◆ G4SmoothTrajectoryPoint() [2/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector pos,
std::vector< G4ThreeVector > * auxiliaryPoints )

Definition at line 55 of file G4SmoothTrajectoryPoint.cc.

57 : fPosition(pos), fAuxiliaryPointVector(auxiliaryPoints)
58{}

◆ G4SmoothTrajectoryPoint() [3/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector pos)

Definition at line 53 of file G4SmoothTrajectoryPoint.cc.

53{ fPosition = pos; }

◆ ~G4SmoothTrajectoryPoint()

G4SmoothTrajectoryPoint::~G4SmoothTrajectoryPoint ( )
override

Definition at line 65 of file G4SmoothTrajectoryPoint.cc.

65{ delete fAuxiliaryPointVector; }

◆ G4SmoothTrajectoryPoint() [4/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( const G4SmoothTrajectoryPoint & right)

Definition at line 60 of file G4SmoothTrajectoryPoint.cc.

62 fPosition(right.fPosition), fAuxiliaryPointVector(right.fAuxiliaryPointVector)
63{}
G4VTrajectoryPoint()=default

Member Function Documentation

◆ CreateAttValues()

std::vector< G4AttValue > * G4SmoothTrajectoryPoint::CreateAttValues ( ) const
overridevirtual

Reimplemented from G4VTrajectoryPoint.

Definition at line 82 of file G4SmoothTrajectoryPoint.cc.

83{
84 auto values = new std::vector<G4AttValue>;
85
86 if (fAuxiliaryPointVector != nullptr) {
87 for (const auto& iAux : *fAuxiliaryPointVector) {
88 values->push_back(G4AttValue("Aux", G4BestUnit(iAux, "Length"), ""));
89 }
90 }
91
92 values->push_back(G4AttValue("Pos", G4BestUnit(fPosition, "Length"), ""));
93
94#ifdef G4ATTDEBUG
95 G4cout << G4AttCheck(values, GetAttDefs());
96#endif
97
98 return values;
99}
#define G4BestUnit(a, b)
G4GLOB_DLL std::ostream G4cout
const std::map< G4String, G4AttDef > * GetAttDefs() const override

◆ GetAttDefs()

const std::map< G4String, G4AttDef > * G4SmoothTrajectoryPoint::GetAttDefs ( ) const
overridevirtual

Reimplemented from G4VTrajectoryPoint.

Definition at line 67 of file G4SmoothTrajectoryPoint.cc.

68{
69 G4bool isNew;
70 std::map<G4String, G4AttDef>* store =
71 G4AttDefStore::GetInstance("G4SmoothTrajectoryPoint", isNew);
72 if (isNew) {
73 G4String Pos("Pos");
74 (*store)[Pos] = G4AttDef(Pos, "Step Position", "Physics", "G4BestUnit", "G4ThreeVector");
75 G4String Aux("Aux");
76 (*store)[Aux] =
77 G4AttDef(Aux, "Auxiliary Point Position", "Physics", "G4BestUnit", "G4ThreeVector");
78 }
79 return store;
80}
bool G4bool
Definition G4Types.hh:86
ush Pos
Definition deflate.h:96
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)

Referenced by CreateAttValues(), G4VisCommandList::SetNewValue(), and G4VisCommandSceneAddTrajectories::SetNewValue().

◆ GetAuxiliaryPoints()

const std::vector< G4ThreeVector > * G4SmoothTrajectoryPoint::GetAuxiliaryPoints ( ) const
inlineoverridevirtual

Reimplemented from G4VTrajectoryPoint.

Definition at line 73 of file G4SmoothTrajectoryPoint.hh.

74 {
75 return fAuxiliaryPointVector;
76 }

◆ GetPosition()

const G4ThreeVector G4SmoothTrajectoryPoint::GetPosition ( ) const
inlineoverridevirtual

Implements G4VTrajectoryPoint.

Definition at line 72 of file G4SmoothTrajectoryPoint.hh.

72{ return fPosition; }

◆ operator delete()

void G4SmoothTrajectoryPoint::operator delete ( void * aTrajectoryPoint)
inline

Definition at line 98 of file G4SmoothTrajectoryPoint.hh.

99{
100 aSmoothTrajectoryPointAllocator()->FreeSingle((G4SmoothTrajectoryPoint*)aTrajectoryPoint);
101}
G4TRACKING_DLL G4Allocator< G4SmoothTrajectoryPoint > *& aSmoothTrajectoryPointAllocator()
G4SmoothTrajectoryPoint()=default

◆ operator new()

void * G4SmoothTrajectoryPoint::operator new ( size_t )
inline

Definition at line 90 of file G4SmoothTrajectoryPoint.hh.

91{
92 if (aSmoothTrajectoryPointAllocator() == nullptr) {
93 aSmoothTrajectoryPointAllocator() = new G4Allocator<G4SmoothTrajectoryPoint>;
94 }
95 return (void*)aSmoothTrajectoryPointAllocator()->MallocSingle();
96}

◆ operator=()

G4SmoothTrajectoryPoint & G4SmoothTrajectoryPoint::operator= ( const G4SmoothTrajectoryPoint & )
delete

◆ operator==()

G4bool G4SmoothTrajectoryPoint::operator== ( const G4SmoothTrajectoryPoint & right) const
inline

Definition at line 103 of file G4SmoothTrajectoryPoint.hh.

104{
105 return (this == &r);
106}

◆ G4ClonedSmoothTrajectoryPoint

friend class G4ClonedSmoothTrajectoryPoint
friend

Definition at line 52 of file G4SmoothTrajectoryPoint.hh.

Referenced by G4ClonedSmoothTrajectoryPoint.


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