Geant4 9.6.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 ()
 
 G4SmoothTrajectoryPoint (G4ThreeVector pos, std::vector< G4ThreeVector > *auxiliaryPoints)
 
 G4SmoothTrajectoryPoint (G4ThreeVector pos)
 
 G4SmoothTrajectoryPoint (const G4SmoothTrajectoryPoint &right)
 
virtual ~G4SmoothTrajectoryPoint ()
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
int operator== (const G4SmoothTrajectoryPoint &right) const
 
const G4ThreeVector GetPosition () const
 
const std::vector< G4ThreeVector > * GetAuxiliaryPoints () 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 47 of file G4SmoothTrajectoryPoint.hh.

Constructor & Destructor Documentation

◆ G4SmoothTrajectoryPoint() [1/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( )

Definition at line 50 of file G4SmoothTrajectoryPoint.cc.

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

◆ G4SmoothTrajectoryPoint() [2/4]

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

Definition at line 62 of file G4SmoothTrajectoryPoint.cc.

64: fPosition(pos),
65 fAuxiliaryPointVector(auxiliaryPoints)
66{}

◆ G4SmoothTrajectoryPoint() [3/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector  pos)

Definition at line 56 of file G4SmoothTrajectoryPoint.cc.

57: fAuxiliaryPointVector(0)
58{
59 fPosition = pos;
60}

◆ G4SmoothTrajectoryPoint() [4/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( const G4SmoothTrajectoryPoint right)

Definition at line 68 of file G4SmoothTrajectoryPoint.cc.

70 fPosition(right.fPosition),fAuxiliaryPointVector(right.fAuxiliaryPointVector)
71{
72}

◆ ~G4SmoothTrajectoryPoint()

G4SmoothTrajectoryPoint::~G4SmoothTrajectoryPoint ( )
virtual

Definition at line 74 of file G4SmoothTrajectoryPoint.cc.

75{
76 if(fAuxiliaryPointVector) {
77 delete fAuxiliaryPointVector;
78 }
79}

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 99 of file G4SmoothTrajectoryPoint.cc.

100{
101 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
102
103 if (fAuxiliaryPointVector) {
104 std::vector<G4ThreeVector>::iterator iAux;
105 for (iAux = fAuxiliaryPointVector->begin();
106 iAux != fAuxiliaryPointVector->end(); ++iAux) {
107 values->push_back(G4AttValue("Aux",G4BestUnit(*iAux,"Length"),""));
108 }
109 }
110
111 values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
112
113#ifdef G4ATTDEBUG
114 G4cout << G4AttCheck(values,GetAttDefs());
115#endif
116
117 return values;
118}
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4DLLIMPORT std::ostream G4cout
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const

◆ GetAttDefs()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 83 of file G4SmoothTrajectoryPoint.cc.

84{
85 G4bool isNew;
86 std::map<G4String,G4AttDef>* store
87 = G4AttDefStore::GetInstance("G4SmoothTrajectoryPoint",isNew);
88 if (isNew) {
89 G4String Pos("Pos");
90 (*store)[Pos] = G4AttDef(Pos, "Step Position",
91 "Physics","G4BestUnit","G4ThreeVector");
92 G4String Aux("Aux");
93 (*store)[Aux] = G4AttDef(Aux, "Auxiliary Point Position",
94 "Physics","G4BestUnit","G4ThreeVector");
95 }
96 return store;
97}
bool G4bool
Definition: G4Types.hh:67
ush Pos
Definition: deflate.h:82
std::map< G4String, G4AttDef > * GetInstance(G4String storeKey, G4bool &isNew)

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

◆ GetAuxiliaryPoints()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 78 of file G4SmoothTrajectoryPoint.hh.

79 { return fAuxiliaryPointVector; }

◆ GetPosition()

const G4ThreeVector G4SmoothTrajectoryPoint::GetPosition ( ) const
inlinevirtual

Implements G4VTrajectoryPoint.

Definition at line 76 of file G4SmoothTrajectoryPoint.hh.

77 { return fPosition; }

◆ operator delete()

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

Definition at line 107 of file G4SmoothTrajectoryPoint.hh.

108{
109 aSmoothTrajectoryPointAllocator.FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
110}
G4DLLIMPORT G4Allocator< G4SmoothTrajectoryPoint > aSmoothTrajectoryPointAllocator

◆ operator new()

void * G4SmoothTrajectoryPoint::operator new ( size_t  )
inline

Definition at line 100 of file G4SmoothTrajectoryPoint.hh.

101{
102 void *aTrajectoryPoint;
103 aTrajectoryPoint = (void *) aSmoothTrajectoryPointAllocator.MallocSingle();
104 return aTrajectoryPoint;
105}

◆ operator==()

int G4SmoothTrajectoryPoint::operator== ( const G4SmoothTrajectoryPoint right) const
inline

Definition at line 72 of file G4SmoothTrajectoryPoint.hh.

73 { return (this==&right); };

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