G4VTrajectory Class Reference

#include <G4VTrajectory.hh>

Inheritance diagram for G4VTrajectory:

G4RayTrajectory G4SmoothTrajectory G4Trajectory G4RichTrajectory

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 (G4int i_mode=0) 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.

00053 {;}

G4VTrajectory::~G4VTrajectory (  )  [virtual]

Definition at line 54 of file G4VTrajectory.cc.

00054 {;}


Member Function Documentation

virtual void G4VTrajectory::AppendStep ( const G4Step aStep  )  [pure virtual]

Implemented in G4RichTrajectory, G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

virtual std::vector<G4AttValue>* G4VTrajectory::CreateAttValues (  )  const [inline, virtual]

Reimplemented in G4RichTrajectory, G4SmoothTrajectory, and G4Trajectory.

Definition at line 102 of file G4VTrajectory.hh.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4TrajectoriesModelDebugG4AttValues(), G4VSceneHandler::LoadAtts(), and ShowTrajectory().

00103    { return 0; }

void G4VTrajectory::DrawTrajectory ( G4int  i_mode = 0  )  const [virtual]

Reimplemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Definition at line 125 of file G4VTrajectory.cc.

References G4VVisManager::DispatchToModel(), G4Exception(), G4VVisManager::GetConcreteInstance(), and JustWarning.

Referenced by G4VSceneHandler::AddCompound(), G4GMocrenFileSceneHandler::AddCompound(), G4Trajectory::DrawTrajectory(), and G4SmoothTrajectory::DrawTrajectory().

00126 {
00127   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
00128 
00129   static G4bool warnedAboutIMode = false;
00130   if (!warnedAboutIMode && i_mode != 0) {
00131     G4Exception
00132         ("G4VTrajectory::DrawTrajectory()",
00133          "Tracking0100", JustWarning,
00134          "DEPRECATED! The use of i_mode argument in DrawTrajectory()"
00135          "\n  is deprecated and will be removed at the next major release.");
00136     warnedAboutIMode = true;
00137   }
00138 
00139   if (0 != pVVisManager) {
00140     pVVisManager->DispatchToModel(*this, i_mode);
00141   }
00142 }

virtual const std::map<G4String,G4AttDef>* G4VTrajectory::GetAttDefs (  )  const [inline, virtual]

Reimplemented in G4RichTrajectory, G4SmoothTrajectory, and G4Trajectory.

Definition at line 96 of file G4VTrajectory.hh.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4TrajectoriesModelDebugG4AttValues(), G4VSceneHandler::LoadAtts(), and ShowTrajectory().

00097    { return 0; }

virtual G4double G4VTrajectory::GetCharge (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4GMocrenFileSceneHandler::AddCompound(), G4TrajectoryDrawByCharge::Draw(), and G4TrajectoryChargeFilter::Evaluate().

virtual G4ThreeVector G4VTrajectory::GetInitialMomentum (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4GMocrenFileSceneHandler::AddCompound().

virtual G4int G4VTrajectory::GetParentID (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

virtual G4String G4VTrajectory::GetParticleName (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4GMocrenFileSceneHandler::AddCompound(), G4TrajectoryDrawByParticleID::Draw(), and G4TrajectoryParticleFilter::Evaluate().

virtual G4int G4VTrajectory::GetPDGEncoding (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

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

Implemented in G4RichTrajectory, G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4GMocrenFileSceneHandler::AddCompound(), G4TrajectoryDrawByOriginVolume::Draw(), G4TrajectoryOriginVolumeFilter::Evaluate(), G4TrajectoriesModelDebugG4AttValues(), G4TrajectoryDrawerUtils::GetPointsAndTimes(), G4VSceneHandler::LoadAtts(), and ShowTrajectory().

virtual int G4VTrajectory::GetPointEntries (  )  const [pure virtual]

Implemented in G4RichTrajectory, G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4GMocrenFileSceneHandler::AddCompound(), G4TrajectoriesModelDebugG4AttValues(), G4TrajectoryDrawerUtils::GetPointsAndTimes(), G4VSceneHandler::LoadAtts(), and ShowTrajectory().

virtual G4int G4VTrajectory::GetTrackID (  )  const [pure virtual]

Implemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Referenced by G4GMocrenFileSceneHandler::AddCompound().

virtual void G4VTrajectory::MergeTrajectory ( G4VTrajectory secondTrajectory  )  [pure virtual]

Implemented in G4RichTrajectory, G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

G4bool G4VTrajectory::operator== ( const G4VTrajectory right  )  const

Definition at line 56 of file G4VTrajectory.cc.

00057 {
00058   return (this==&right);
00059 }

void G4VTrajectory::ShowTrajectory ( std::ostream &  os = G4cout  )  const [virtual]

Reimplemented in G4SmoothTrajectory, G4Trajectory, and G4RayTrajectory.

Definition at line 61 of file G4VTrajectory.cc.

References G4VTrajectoryPoint::CreateAttValues(), CreateAttValues(), GetAttDefs(), GetPoint(), and GetPointEntries().

Referenced by G4TrackingManager::ProcessOneTrack(), G4Trajectory::ShowTrajectory(), and G4SmoothTrajectory::ShowTrajectory().

00062 {
00063   // Makes use of attribute values implemented in the concrete class.
00064   // Note: the user needs to follow with new-line or end-of-string,
00065   // depending on the nature of os.
00066 
00067   std::vector<G4AttValue>* attValues = CreateAttValues();
00068   const std::map<G4String,G4AttDef>* attDefs = GetAttDefs();
00069 
00070   // Ensure validity...
00071   if (G4AttCheck(attValues,attDefs).Check("G4VTrajectory::ShowTrajectory")) {
00072     return;
00073   }
00074 
00075   os << "Trajectory:";
00076 
00077   std::vector<G4AttValue>::iterator iAttVal;
00078   for (iAttVal = attValues->begin();
00079        iAttVal != attValues->end(); ++iAttVal) {
00080     std::map<G4String,G4AttDef>::const_iterator iAttDef =
00081       attDefs->find(iAttVal->GetName());
00082     os << "\n  " << iAttDef->second.GetDesc()
00083        << " (" << iAttVal->GetName()
00084        << "): " << iAttVal->GetValue();
00085   }
00086 
00087   delete attValues;  // AttValues must be deleted after use.
00088 
00089   //Now do trajectory points...
00090   for (G4int i = 0; i < GetPointEntries(); i++) {
00091 
00092     G4VTrajectoryPoint* aTrajectoryPoint = GetPoint(i);
00093     attValues = aTrajectoryPoint->CreateAttValues();
00094     attDefs = aTrajectoryPoint->GetAttDefs();
00095 
00096     // Ensure validity...
00097     if (G4AttCheck(attValues,attDefs).Check("G4VTrajectory::ShowTrajectory")) {
00098       return;
00099     }
00100 
00101     for (iAttVal = attValues->begin();
00102          iAttVal != attValues->end(); ++iAttVal) {
00103       std::map<G4String,G4AttDef>::const_iterator iAttDef =
00104         attDefs->find(iAttVal->GetName());
00105       os << "\n    " << iAttDef->second.GetDesc()
00106          << " (" << iAttVal->GetName()
00107          << "): " << iAttVal->GetValue();
00108     }
00109 
00110     delete attValues;  // AttValues must be deleted after use.
00111   }
00112 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:55 2013 for Geant4 by  doxygen 1.4.7