Geant4 10.7.0
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 ()
 
 G4TrajectoryPoint (G4ThreeVector pos)
 
 G4TrajectoryPoint (const G4TrajectoryPoint &right)
 
virtual ~G4TrajectoryPoint ()
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
G4bool operator== (const G4TrajectoryPoint &right) const
 
const G4ThreeVector GetPosition () const
 
virtual const std::map< G4String, G4AttDef > * GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
- Public Member Functions inherited from G4VTrajectoryPoint
 G4VTrajectoryPoint ()
 
virtual ~G4VTrajectoryPoint ()
 
G4bool operator== (const G4VTrajectoryPoint &right) const
 
virtual const G4ThreeVector GetPosition () const =0
 
virtual const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const
 
virtual const std::map< G4String, G4AttDef > * GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 

Detailed Description

Definition at line 46 of file G4TrajectoryPoint.hh.

Constructor & Destructor Documentation

◆ G4TrajectoryPoint() [1/3]

G4TrajectoryPoint::G4TrajectoryPoint ( )

Definition at line 52 of file G4TrajectoryPoint.cc.

53{
54 fPosition = G4ThreeVector(0.,0.,0.);
55}
CLHEP::Hep3Vector G4ThreeVector

◆ G4TrajectoryPoint() [2/3]

G4TrajectoryPoint::G4TrajectoryPoint ( G4ThreeVector  pos)

Definition at line 57 of file G4TrajectoryPoint.cc.

58{
59 fPosition = pos;
60}

◆ G4TrajectoryPoint() [3/3]

G4TrajectoryPoint::G4TrajectoryPoint ( const G4TrajectoryPoint right)

Definition at line 62 of file G4TrajectoryPoint.cc.

63 : G4VTrajectoryPoint(),fPosition(right.fPosition)
64{
65}

◆ ~G4TrajectoryPoint()

G4TrajectoryPoint::~G4TrajectoryPoint ( )
virtual

Definition at line 67 of file G4TrajectoryPoint.cc.

68{
69}

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4VTrajectoryPoint.

Reimplemented in G4RichTrajectoryPoint.

Definition at line 85 of file G4TrajectoryPoint.cc.

86{
87 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
88
89 values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
90
91#ifdef G4ATTDEBUG
92 G4cout << G4AttCheck(values,GetAttDefs());
93#endif
94
95 return values;
96}
#define G4BestUnit(a, b)
G4GLOB_DLL std::ostream G4cout
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const

Referenced by G4RichTrajectoryPoint::CreateAttValues().

◆ GetAttDefs()

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

Reimplemented from G4VTrajectoryPoint.

Reimplemented in G4RichTrajectoryPoint.

Definition at line 71 of file G4TrajectoryPoint.cc.

72{
73 G4bool isNew;
74 std::map<G4String,G4AttDef>* store
75 = G4AttDefStore::GetInstance("G4TrajectoryPoint",isNew);
76 if (isNew)
77 {
78 G4String Pos("Pos");
79 (*store)[Pos] =
80 G4AttDef(Pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
81 }
82 return store;
83}
bool G4bool
Definition: G4Types.hh:86
ush Pos
Definition: deflate.h:91
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
inlinevirtual

Implements G4VTrajectoryPoint.

Definition at line 65 of file G4TrajectoryPoint.hh.

66 { return fPosition; }

◆ operator delete()

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

Definition at line 91 of file G4TrajectoryPoint.hh.

92{
94 ->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
95}
G4TRACKING_DLL G4Allocator< G4TrajectoryPoint > *& aTrajectoryPointAllocator()

◆ operator new()

void * G4TrajectoryPoint::operator new ( size_t  )
inline

Definition at line 82 of file G4TrajectoryPoint.hh.

83{
84 if (aTrajectoryPointAllocator() == nullptr)
85 {
87 }
88 return (void *) aTrajectoryPointAllocator()->MallocSingle();
89}

◆ operator==()

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

Definition at line 98 of file G4TrajectoryPoint.hh.

99{
100 return (this==&right);
101}

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