#include <G4RayTrajectory.hh>
Inheritance diagram for G4RayTrajectory:
Public Member Functions | |
G4RayTrajectory () | |
G4RayTrajectory (G4RayTrajectory &right) | |
virtual | ~G4RayTrajectory () |
void * | operator new (size_t) |
void | operator delete (void *) |
virtual void | AppendStep (const G4Step *) |
virtual void | ShowTrajectory (std::ostream &) const |
virtual void | DrawTrajectory () const |
virtual void | DrawTrajectory (G4int) const |
virtual int | GetPointEntries () const |
virtual G4VTrajectoryPoint * | GetPoint (G4int i) const |
G4RayTrajectoryPoint * | GetPointC (G4int i) const |
virtual void | MergeTrajectory (G4VTrajectory *secondTrajectory) |
G4int | GetTrackID () const |
G4int | GetParentID () const |
G4String | GetParticleName () const |
G4double | GetCharge () const |
G4int | GetPDGEncoding () const |
G4ThreeVector | GetInitialMomentum () const |
Definition at line 57 of file G4RayTrajectory.hh.
G4RayTrajectory::G4RayTrajectory | ( | ) |
G4RayTrajectory::G4RayTrajectory | ( | G4RayTrajectory & | right | ) |
Definition at line 53 of file G4RayTrajectory.cc.
References positionRecord.
00054 : G4VTrajectory() 00055 { 00056 positionRecord = new std::vector<G4RayTrajectoryPoint*>; 00057 for(size_t i=0;i<right.positionRecord->size();i++) 00058 { 00059 G4RayTrajectoryPoint* rightPoint = (G4RayTrajectoryPoint*) 00060 ((*(right.positionRecord))[i]); 00061 positionRecord->push_back(new G4RayTrajectoryPoint(*rightPoint)); 00062 } 00063 }
G4RayTrajectory::~G4RayTrajectory | ( | ) | [virtual] |
Definition at line 65 of file G4RayTrajectory.cc.
00066 { 00067 //positionRecord->clearAndDestroy(); 00068 for(size_t i=0;i<positionRecord->size();i++) 00069 { delete (*positionRecord)[i]; } 00070 positionRecord->clear(); 00071 delete positionRecord; 00072 }
void G4RayTrajectory::AppendStep | ( | const G4Step * | ) | [virtual] |
Implements G4VTrajectory.
Definition at line 74 of file G4RayTrajectory.cc.
References G4VViewer::GetApplicableVisAttributes(), G4VisManager::GetCurrentViewer(), G4Navigator::GetLocalExitNormal(), G4Navigator::GetLocalToGlobalTransform(), G4VPhysicalVolume::GetLogicalVolume(), G4TransportationManager::GetNavigatorForTracking(), G4StepPoint::GetPhysicalVolume(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4Step::GetStepLength(), G4TransportationManager::GetTransportationManager(), G4LogicalVolume::GetVisAttributes(), G4RayTrajectoryPoint::SetPostStepAtt(), G4RayTrajectoryPoint::SetPreStepAtt(), G4RayTrajectoryPoint::SetStepLength(), G4RayTrajectoryPoint::SetSurfaceNormal(), and G4AffineTransform::TransformAxis().
00075 { 00076 G4RayTrajectoryPoint* trajectoryPoint = new G4RayTrajectoryPoint(); 00077 00078 trajectoryPoint->SetStepLength(aStep->GetStepLength()); 00079 00080 G4Navigator* theNavigator 00081 = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking(); 00082 G4bool valid; 00083 G4ThreeVector theLocalNormal = theNavigator->GetLocalExitNormal(&valid); 00084 if(valid) { theLocalNormal = -theLocalNormal; } 00085 G4ThreeVector theGrobalNormal 00086 = theNavigator->GetLocalToGlobalTransform().TransformAxis(theLocalNormal); 00087 trajectoryPoint->SetSurfaceNormal(theGrobalNormal); 00088 00089 G4VPhysicalVolume* prePhys = aStep->GetPreStepPoint()->GetPhysicalVolume(); 00090 const G4VisAttributes* preVisAtt = prePhys->GetLogicalVolume()->GetVisAttributes(); 00091 G4VisManager* visManager = G4VisManager::GetInstance(); 00092 if(visManager) { 00093 G4VViewer* viewer = visManager->GetCurrentViewer(); 00094 if (viewer) { 00095 preVisAtt = viewer->GetApplicableVisAttributes(preVisAtt); 00096 } 00097 } 00098 trajectoryPoint->SetPreStepAtt(preVisAtt); 00099 00100 const G4VPhysicalVolume* postPhys = aStep->GetPostStepPoint()->GetPhysicalVolume(); 00101 const G4VisAttributes* postVisAtt = NULL; 00102 if(postPhys) { 00103 postVisAtt = postPhys->GetLogicalVolume()->GetVisAttributes(); 00104 if(visManager) { 00105 G4VViewer* viewer = visManager->GetCurrentViewer(); 00106 if (viewer) { 00107 postVisAtt = viewer->GetApplicableVisAttributes(postVisAtt); 00108 } 00109 } 00110 } 00111 trajectoryPoint->SetPostStepAtt(postVisAtt); 00112 00113 positionRecord->push_back(trajectoryPoint); 00114 }
virtual void G4RayTrajectory::DrawTrajectory | ( | G4int | ) | const [inline, virtual] |
virtual void G4RayTrajectory::DrawTrajectory | ( | ) | const [inline, virtual] |
G4double G4RayTrajectory::GetCharge | ( | ) | const [inline, virtual] |
G4ThreeVector G4RayTrajectory::GetInitialMomentum | ( | ) | const [inline, virtual] |
Implements G4VTrajectory.
Definition at line 92 of file G4RayTrajectory.hh.
00092 { return G4ThreeVector(); }
G4int G4RayTrajectory::GetParentID | ( | ) | const [inline, virtual] |
G4String G4RayTrajectory::GetParticleName | ( | ) | const [inline, virtual] |
G4int G4RayTrajectory::GetPDGEncoding | ( | ) | const [inline, virtual] |
virtual G4VTrajectoryPoint* G4RayTrajectory::GetPoint | ( | G4int | i | ) | const [inline, virtual] |
Implements G4VTrajectory.
Definition at line 80 of file G4RayTrajectory.hh.
Referenced by MergeTrajectory().
G4RayTrajectoryPoint* G4RayTrajectory::GetPointC | ( | G4int | i | ) | const [inline] |
virtual int G4RayTrajectory::GetPointEntries | ( | ) | const [inline, virtual] |
Implements G4VTrajectory.
Definition at line 79 of file G4RayTrajectory.hh.
Referenced by G4TheRayTracer::GenerateColour(), and MergeTrajectory().
G4int G4RayTrajectory::GetTrackID | ( | ) | const [inline, virtual] |
void G4RayTrajectory::MergeTrajectory | ( | G4VTrajectory * | secondTrajectory | ) | [virtual] |
Implements G4VTrajectory.
Definition at line 119 of file G4RayTrajectory.cc.
References GetPoint(), GetPointEntries(), and positionRecord.
00120 { 00121 if(!secondTrajectory) return; 00122 00123 G4RayTrajectory* seco = (G4RayTrajectory*)secondTrajectory; 00124 G4int ent = seco->GetPointEntries(); 00125 for(G4int i=0;i<ent;i++) 00126 { positionRecord->push_back((G4RayTrajectoryPoint*)seco->GetPoint(i)); } 00127 seco->positionRecord->clear(); 00128 }
void G4RayTrajectory::operator delete | ( | void * | ) | [inline] |
Definition at line 112 of file G4RayTrajectory.hh.
References G4RayTrajectoryAllocator.
00113 { 00114 G4RayTrajectoryAllocator.FreeSingle((G4RayTrajectory*)aTrajectory); 00115 }
void * G4RayTrajectory::operator new | ( | size_t | ) | [inline] |
Definition at line 105 of file G4RayTrajectory.hh.
References G4RayTrajectoryAllocator.
00106 { 00107 void* aTrajectory; 00108 aTrajectory = (void*)G4RayTrajectoryAllocator.MallocSingle(); 00109 return aTrajectory; 00110 }
void G4RayTrajectory::ShowTrajectory | ( | std::ostream & | ) | const [virtual] |