Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VTrajectory Class Referenceabstract

#include <G4VTrajectory.hh>

Inheritance diagram for G4VTrajectory:

Public Member Functions

 G4VTrajectory ()
 
virtual ~G4VTrajectory ()
 
G4bool operator== (const G4VTrajectory &right) const
 
virtual G4int GetTrackID () const =0
 
virtual G4int GetParentID () const =0
 
virtual G4String GetParticleName () const =0
 
virtual G4double GetCharge () const =0
 
virtual G4int GetPDGEncoding () const =0
 
virtual G4ThreeVector GetInitialMomentum () const =0
 
virtual int GetPointEntries () const =0
 
virtual G4VTrajectoryPointGetPoint (G4int i) const =0
 
virtual void ShowTrajectory (std::ostream &os=G4cout) const
 
virtual void DrawTrajectory () const
 
virtual const std::map
< G4String, G4AttDef > * 
GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
virtual void AppendStep (const G4Step *aStep)=0
 
virtual void MergeTrajectory (G4VTrajectory *secondTrajectory)=0
 

Detailed Description

Definition at line 57 of file G4VTrajectory.hh.

Constructor & Destructor Documentation

G4VTrajectory::G4VTrajectory ( )

Definition at line 53 of file G4VTrajectory.cc.

53 {;}
G4VTrajectory::~G4VTrajectory ( )
virtual

Definition at line 54 of file G4VTrajectory.cc.

54 {;}

Member Function Documentation

virtual void G4VTrajectory::AppendStep ( const G4Step aStep)
pure virtual
virtual std::vector<G4AttValue>* G4VTrajectory::CreateAttValues ( ) const
inlinevirtual

Reimplemented in G4Trajectory, G4SmoothTrajectory, and G4RichTrajectory.

Definition at line 100 of file G4VTrajectory.hh.

101  { return 0; }

Here is the caller graph for this function:

void G4VTrajectory::DrawTrajectory ( ) const
virtual

Reimplemented in G4Trajectory, G4SmoothTrajectory, G4RichTrajectory, and G4RayTrajectory.

Definition at line 115 of file G4VTrajectory.cc.

116 {
118 
119  if (0 != pVVisManager) {
120  pVVisManager->DispatchToModel(*this);
121  }
122 }
static G4VVisManager * GetConcreteInstance()
virtual void DispatchToModel(const G4VTrajectory &)=0

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in G4Trajectory, G4SmoothTrajectory, and G4RichTrajectory.

Definition at line 94 of file G4VTrajectory.hh.

95  { return 0; }

Here is the caller graph for this function:

virtual G4double G4VTrajectory::GetCharge ( ) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual G4ThreeVector G4VTrajectory::GetInitialMomentum ( ) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual G4int G4VTrajectory::GetParentID ( ) const
pure virtual
virtual G4String G4VTrajectory::GetParticleName ( ) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual G4int G4VTrajectory::GetPDGEncoding ( ) const
pure virtual
virtual G4VTrajectoryPoint* G4VTrajectory::GetPoint ( G4int  i) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, G4RichTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual int G4VTrajectory::GetPointEntries ( ) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, G4RichTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual G4int G4VTrajectory::GetTrackID ( ) const
pure virtual

Implemented in G4Trajectory, G4SmoothTrajectory, and G4RayTrajectory.

Here is the caller graph for this function:

virtual void G4VTrajectory::MergeTrajectory ( G4VTrajectory secondTrajectory)
pure virtual
G4bool G4VTrajectory::operator== ( const G4VTrajectory right) const

Definition at line 56 of file G4VTrajectory.cc.

57 {
58  return (this==&right);
59 }
void G4VTrajectory::ShowTrajectory ( std::ostream &  os = G4cout) const
virtual

Reimplemented in G4Trajectory, G4SmoothTrajectory, G4RichTrajectory, and G4RayTrajectory.

Definition at line 61 of file G4VTrajectory.cc.

62 {
63  // Makes use of attribute values implemented in the concrete class.
64  // Note: the user needs to follow with new-line or end-of-string,
65  // depending on the nature of os.
66 
67  std::vector<G4AttValue>* attValues = CreateAttValues();
68  const std::map<G4String,G4AttDef>* attDefs = GetAttDefs();
69 
70  // Ensure validity...
71  if (G4AttCheck(attValues,attDefs).Check("G4VTrajectory::ShowTrajectory")) {
72  return;
73  }
74 
75  os << "Trajectory:";
76 
77  std::vector<G4AttValue>::iterator iAttVal;
78  for (iAttVal = attValues->begin();
79  iAttVal != attValues->end(); ++iAttVal) {
80  std::map<G4String,G4AttDef>::const_iterator iAttDef =
81  attDefs->find(iAttVal->GetName());
82  os << "\n " << iAttDef->second.GetDesc()
83  << " (" << iAttVal->GetName()
84  << "): " << iAttVal->GetValue();
85  }
86 
87  delete attValues; // AttValues must be deleted after use.
88 
89  //Now do trajectory points...
90  for (G4int i = 0; i < GetPointEntries(); i++) {
91 
92  G4VTrajectoryPoint* aTrajectoryPoint = GetPoint(i);
93  attValues = aTrajectoryPoint->CreateAttValues();
94  attDefs = aTrajectoryPoint->GetAttDefs();
95 
96  // Ensure validity...
97  if (G4AttCheck(attValues,attDefs).Check("G4VTrajectory::ShowTrajectory")) {
98  return;
99  }
100 
101  for (iAttVal = attValues->begin();
102  iAttVal != attValues->end(); ++iAttVal) {
103  std::map<G4String,G4AttDef>::const_iterator iAttDef =
104  attDefs->find(iAttVal->GetName());
105  os << "\n " << iAttDef->second.GetDesc()
106  << " (" << iAttVal->GetName()
107  << "): " << iAttVal->GetValue();
108  }
109 
110  delete attValues; // AttValues must be deleted after use.
111  }
112  os << std::endl;
113 }
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
int G4int
Definition: G4Types.hh:78
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual int GetPointEntries() const =0
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual std::vector< G4AttValue > * CreateAttValues() const

Here is the call graph for this function:

Here is the caller graph for this function:


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