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

#include <G4TrajectoryPoint.hh>

+ Inheritance diagram for G4TrajectoryPoint:

Public Member Functions

 G4TrajectoryPoint ()=default
 
 G4TrajectoryPoint (G4ThreeVector pos)
 
 G4TrajectoryPoint (const G4TrajectoryPoint &right)
 
 ~G4TrajectoryPoint () override
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
G4bool operator== (const G4TrajectoryPoint &right) const
 
const G4ThreeVector GetPosition () 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
 
virtual const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const
 

Detailed Description

Definition at line 47 of file G4TrajectoryPoint.hh.

Constructor & Destructor Documentation

◆ G4TrajectoryPoint() [1/3]

G4TrajectoryPoint::G4TrajectoryPoint ( )
default

◆ G4TrajectoryPoint() [2/3]

G4TrajectoryPoint::G4TrajectoryPoint ( G4ThreeVector pos)

Definition at line 52 of file G4TrajectoryPoint.cc.

52{ fPosition = pos; }

◆ G4TrajectoryPoint() [3/3]

G4TrajectoryPoint::G4TrajectoryPoint ( const G4TrajectoryPoint & right)

Definition at line 54 of file G4TrajectoryPoint.cc.

54: fPosition(right.fPosition) {}

◆ ~G4TrajectoryPoint()

G4TrajectoryPoint::~G4TrajectoryPoint ( )
overridedefault

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 69 of file G4TrajectoryPoint.cc.

70{
71 auto values = new std::vector<G4AttValue>;
72
73 values->push_back(G4AttValue("Pos", G4BestUnit(fPosition, "Length"), ""));
74
75#ifdef G4ATTDEBUG
76 G4cout << G4AttCheck(values, GetAttDefs());
77#endif
78
79 return values;
80}
#define G4BestUnit(a, b)
G4GLOB_DLL std::ostream G4cout
const std::map< G4String, G4AttDef > * GetAttDefs() const override

Referenced by G4RichTrajectoryPoint::CreateAttValues().

◆ GetAttDefs()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 58 of file G4TrajectoryPoint.cc.

59{
60 G4bool isNew;
61 std::map<G4String, G4AttDef>* store = G4AttDefStore::GetInstance("G4TrajectoryPoint", isNew);
62 if (isNew) {
63 G4String Pos("Pos");
64 (*store)[Pos] = G4AttDef(Pos, "Position", "Physics", "G4BestUnit", "G4ThreeVector");
65 }
66 return store;
67}
bool G4bool
Definition G4Types.hh:86
ush Pos
Definition deflate.h:92
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)

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

◆ GetPosition()

const G4ThreeVector G4TrajectoryPoint::GetPosition ( ) const
inlineoverridevirtual

Implements G4VTrajectoryPoint.

Definition at line 65 of file G4TrajectoryPoint.hh.

65{ return fPosition; }

◆ operator delete()

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

Definition at line 85 of file G4TrajectoryPoint.hh.

86{
87 aTrajectoryPointAllocator()->FreeSingle((G4TrajectoryPoint*)aTrajectoryPoint);
88}
G4TRACKING_DLL G4Allocator< G4TrajectoryPoint > *& aTrajectoryPointAllocator()

◆ operator new()

void * G4TrajectoryPoint::operator new ( size_t )
inline

Definition at line 77 of file G4TrajectoryPoint.hh.

78{
79 if (aTrajectoryPointAllocator() == nullptr) {
81 }
82 return (void*)aTrajectoryPointAllocator()->MallocSingle();
83}

◆ operator==()

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

Definition at line 90 of file G4TrajectoryPoint.hh.

91{
92 return (this == &right);
93}

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