Geant4  10.02.p03
WLSTrajectoryPoint Class Reference

#include <WLSTrajectoryPoint.hh>

Inheritance diagram for WLSTrajectoryPoint:
Collaboration diagram for WLSTrajectoryPoint:

Public Member Functions

 WLSTrajectoryPoint ()
 
 WLSTrajectoryPoint (const G4Track *)
 
 WLSTrajectoryPoint (const G4Step *)
 
 WLSTrajectoryPoint (const WLSTrajectoryPoint &right)
 
virtual ~WLSTrajectoryPoint ()
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
int operator== (const WLSTrajectoryPoint &right) const
 
G4double GetTime () const
 
const G4ThreeVector GetMomentum () const
 
G4StepStatus GetStepStatus () const
 
G4String GetVolumeName () const
 
virtual const std::map< G4String, G4AttDef > * GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
- Public Member Functions inherited from G4TrajectoryPoint
 G4TrajectoryPoint ()
 
 G4TrajectoryPoint (G4ThreeVector pos)
 
 G4TrajectoryPoint (const G4TrajectoryPoint &right)
 
virtual ~G4TrajectoryPoint ()
 
void * operator new (size_t)
 
void operator delete (void *aTrajectoryPoint)
 
int operator== (const G4TrajectoryPoint &right) const
 
const G4ThreeVector GetPosition () const
 
- Public Member Functions inherited from G4VTrajectoryPoint
 G4VTrajectoryPoint ()
 
virtual ~G4VTrajectoryPoint ()
 
G4bool operator== (const G4VTrajectoryPoint &right) const
 
virtual const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const
 

Private Attributes

G4double fTime
 
G4ThreeVector fMomentum
 
G4StepStatus fStepStatus
 
G4String fVolumeName
 

Detailed Description

Definition at line 50 of file WLSTrajectoryPoint.hh.

Constructor & Destructor Documentation

◆ WLSTrajectoryPoint() [1/4]

WLSTrajectoryPoint::WLSTrajectoryPoint ( )

Definition at line 54 of file WLSTrajectoryPoint.cc.

55  : fTime(0.), fMomentum(0.,0.,0.),
56  fStepStatus(fUndefined), fVolumeName("") { }

◆ WLSTrajectoryPoint() [2/4]

WLSTrajectoryPoint::WLSTrajectoryPoint ( const G4Track *  aTrack)

Definition at line 77 of file WLSTrajectoryPoint.cc.

78  : G4TrajectoryPoint(aTrack->GetPosition())
79 {
80  fTime = aTrack->GetGlobalTime();
81  fMomentum = aTrack->GetMomentum();
82  fStepStatus = fUndefined;
83  fVolumeName = aTrack->GetVolume()->GetName();
84 }

◆ WLSTrajectoryPoint() [3/4]

WLSTrajectoryPoint::WLSTrajectoryPoint ( const G4Step *  aStep)

Definition at line 60 of file WLSTrajectoryPoint.cc.

61  : G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition())
62 {
63  fTime = aStep->GetPostStepPoint()->GetGlobalTime();
64  fMomentum = aStep->GetPostStepPoint()->GetMomentum();
65  fStepStatus = aStep->GetPostStepPoint()->GetStepStatus();
66  if (aStep->GetPostStepPoint()->GetPhysicalVolume())
67  {
68  fVolumeName = aStep->GetPostStepPoint()->
69  GetPhysicalVolume()->GetName();
70  } else {
71  fVolumeName = " ";
72  }
73 }

◆ WLSTrajectoryPoint() [4/4]

WLSTrajectoryPoint::WLSTrajectoryPoint ( const WLSTrajectoryPoint right)

Definition at line 88 of file WLSTrajectoryPoint.cc.

89  : G4TrajectoryPoint(right)
90 {
91  fTime = right.fTime;
92  fMomentum = right.fMomentum;
93  fStepStatus = right.fStepStatus;
94  fVolumeName = right.fVolumeName;
95 }

◆ ~WLSTrajectoryPoint()

WLSTrajectoryPoint::~WLSTrajectoryPoint ( )
virtual

Definition at line 99 of file WLSTrajectoryPoint.cc.

99 { }

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4TrajectoryPoint.

Definition at line 135 of file WLSTrajectoryPoint.cc.

136 {
137  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
138 
139  values->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
140 
141  values->push_back(G4AttValue("Momentum",G4BestUnit(fMomentum,"Momentum"),""));
142 
143  values->push_back(G4AttValue("StepStatus",fStepStatus,""));
144 
145  values->push_back(G4AttValue("VolumeName",fVolumeName,""));
146 
147 #ifdef G4ATTDEBUG
148  G4cout << G4AttCheck(values,GetAttDefs());
149 #endif
150 
151  return values;
152 }
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAttDefs()

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

Reimplemented from G4TrajectoryPoint.

Definition at line 103 of file WLSTrajectoryPoint.cc.

104 {
105  G4bool isNew;
106  std::map<G4String,G4AttDef>* store
107  = G4AttDefStore::GetInstance("TrajectoryPoint",isNew);
108  if (isNew) {
109  G4String Pos("Pos");
110  (*store)[Pos] =
111  G4AttDef(Pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
112 
113  G4String Time("Time");
114  (*store)[Time] =
115  G4AttDef(Time, "Time", "Physics","G4BestUnit","G4double");
116 
117  G4String Momentum("Momentum");
118  (*store)[Momentum] =
119  G4AttDef(Momentum, "Momentum", "Physics","G4BestUnit","G4ThreeVector");
120 
121  G4String StepStatus("StepStatus");
122  (*store)[StepStatus] =
123  G4AttDef(StepStatus, "StepStatus", "Physics", "", "G4StepStatus");
124 
125  G4String VolumeName("VolumeName");
126  (*store)[VolumeName] =
127  G4AttDef(VolumeName, "VolumeName", "Physics", "", "G4String");
128 
129  }
130  return store;
131 }
ush Pos
Definition: deflate.h:89
bool G4bool
Definition: G4Types.hh:79
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMomentum()

const G4ThreeVector WLSTrajectoryPoint::GetMomentum ( ) const
inline

Definition at line 74 of file WLSTrajectoryPoint.hh.

74 { return fMomentum; };

◆ GetStepStatus()

G4StepStatus WLSTrajectoryPoint::GetStepStatus ( ) const
inline

Definition at line 75 of file WLSTrajectoryPoint.hh.

75 { return fStepStatus; };

◆ GetTime()

G4double WLSTrajectoryPoint::GetTime ( ) const
inline

Definition at line 73 of file WLSTrajectoryPoint.hh.

73 { return fTime; };

◆ GetVolumeName()

G4String WLSTrajectoryPoint::GetVolumeName ( ) const
inline

Definition at line 76 of file WLSTrajectoryPoint.hh.

76 { return fVolumeName; };
Here is the call graph for this function:

◆ operator delete()

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

Definition at line 105 of file WLSTrajectoryPoint.hh.

106 {
107  WLSTrajPointAllocator->FreeSingle(
108  (WLSTrajectoryPoint *) aTrajectoryPoint);
109 }
G4ThreadLocal G4Allocator< WLSTrajectoryPoint > * WLSTrajPointAllocator

◆ operator new()

void * WLSTrajectoryPoint::operator new ( size_t  )
inline

Definition at line 98 of file WLSTrajectoryPoint.hh.

99 {
102  return (void *) WLSTrajPointAllocator->MallocSingle();
103 }
G4ThreadLocal G4Allocator< WLSTrajectoryPoint > * WLSTrajPointAllocator

◆ operator==()

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

Definition at line 68 of file WLSTrajectoryPoint.hh.

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

Member Data Documentation

◆ fMomentum

G4ThreeVector WLSTrajectoryPoint::fMomentum
private

Definition at line 90 of file WLSTrajectoryPoint.hh.

◆ fStepStatus

G4StepStatus WLSTrajectoryPoint::fStepStatus
private

Definition at line 91 of file WLSTrajectoryPoint.hh.

◆ fTime

G4double WLSTrajectoryPoint::fTime
private

Definition at line 89 of file WLSTrajectoryPoint.hh.

◆ fVolumeName

G4String WLSTrajectoryPoint::fVolumeName
private

Definition at line 92 of file WLSTrajectoryPoint.hh.


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