Geant4 10.7.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 ()
 
G4SmoothTrajectoryPointoperator= (const G4SmoothTrajectoryPoint &)=delete
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
G4bool 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 53 of file G4SmoothTrajectoryPoint.cc.

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

◆ G4SmoothTrajectoryPoint() [2/4]

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

Definition at line 63 of file G4SmoothTrajectoryPoint.cc.

66 : fPosition(pos), fAuxiliaryPointVector(auxiliaryPoints)
67{
68}

◆ G4SmoothTrajectoryPoint() [3/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector  pos)

Definition at line 58 of file G4SmoothTrajectoryPoint.cc.

59{
60 fPosition = pos;
61}

◆ G4SmoothTrajectoryPoint() [4/4]

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( const G4SmoothTrajectoryPoint right)

Definition at line 70 of file G4SmoothTrajectoryPoint.cc.

73 fPosition(right.fPosition),
74 fAuxiliaryPointVector(right.fAuxiliaryPointVector)
75{
76}

◆ ~G4SmoothTrajectoryPoint()

G4SmoothTrajectoryPoint::~G4SmoothTrajectoryPoint ( )
virtual

Definition at line 78 of file G4SmoothTrajectoryPoint.cc.

79{
80 delete fAuxiliaryPointVector;
81}

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 102 of file G4SmoothTrajectoryPoint.cc.

103{
104 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
105
106 if (fAuxiliaryPointVector != nullptr)
107 {
108 for (auto iAux = fAuxiliaryPointVector->cbegin();
109 iAux != fAuxiliaryPointVector->cend(); ++iAux)
110 {
111 values->push_back(G4AttValue("Aux",G4BestUnit(*iAux,"Length"),""));
112 }
113 }
114
115 values->push_back(G4AttValue("Pos", G4BestUnit(fPosition,"Length"),""));
116
117#ifdef G4ATTDEBUG
118 G4cout << G4AttCheck(values,GetAttDefs());
119#endif
120
121 return values;
122}
#define G4BestUnit(a, b)
G4GLOB_DLL 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 85 of file G4SmoothTrajectoryPoint.cc.

86{
87 G4bool isNew;
88 std::map<G4String,G4AttDef>* store
89 = G4AttDefStore::GetInstance("G4SmoothTrajectoryPoint",isNew);
90 if (isNew)
91 {
92 G4String Pos("Pos");
93 (*store)[Pos] = G4AttDef(Pos, "Step Position",
94 "Physics","G4BestUnit","G4ThreeVector");
95 G4String Aux("Aux");
96 (*store)[Aux] = G4AttDef(Aux, "Auxiliary Point Position",
97 "Physics","G4BestUnit","G4ThreeVector");
98 }
99 return store;
100}
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(), G4VisCommandList::SetNewValue(), and G4VisCommandSceneAddTrajectories::SetNewValue().

◆ GetAuxiliaryPoints()

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

Reimplemented from G4VTrajectoryPoint.

Definition at line 74 of file G4SmoothTrajectoryPoint.hh.

75 { return fAuxiliaryPointVector; }

◆ GetPosition()

const G4ThreeVector G4SmoothTrajectoryPoint::GetPosition ( ) const
inlinevirtual

Implements G4VTrajectoryPoint.

Definition at line 72 of file G4SmoothTrajectoryPoint.hh.

73 { return fPosition; }

◆ operator delete()

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

Definition at line 102 of file G4SmoothTrajectoryPoint.hh.

103{
105 ->FreeSingle((G4SmoothTrajectoryPoint*) aTrajectoryPoint);
106}
G4TRACKING_DLL G4Allocator< G4SmoothTrajectoryPoint > *& aSmoothTrajectoryPointAllocator()

◆ operator new()

void * G4SmoothTrajectoryPoint::operator new ( size_t  )
inline

Definition at line 92 of file G4SmoothTrajectoryPoint.hh.

93{
94 if (aSmoothTrajectoryPointAllocator() == nullptr)
95 {
97 }
98 return (void *) aSmoothTrajectoryPointAllocator()->MallocSingle();
99}

◆ operator=()

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

◆ operator==()

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

Definition at line 109 of file G4SmoothTrajectoryPoint.hh.

110{
111 return (this==&r);
112}

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