00001 //---------------------------------------------------------------------------// 00012 00013 #ifndef BesTruthVertex_h 00014 #define BesTruthVertex_h 1 00015 00016 #include <iostream> 00017 using namespace std; 00018 #include "globals.hh" 00019 #include "G4ThreeVector.hh" 00020 00021 class BesTruthTrack; 00022 00023 class BesTruthVertex 00024 { 00025 public: 00026 BesTruthVertex(); 00027 ~BesTruthVertex() {;} 00028 00029 friend ostream &operator<<(ostream &, const BesTruthVertex&); 00030 friend ostream &operator<<(ostream &, const BesTruthVertex*); 00031 00032 enum {unassigned = -1} ; 00033 00034 G4String GetProcessName() const { return m_processName;} 00035 void SetProcessName(const G4String name) {m_processName=name;} 00036 00037 G4ThreeVector GetPosition() const { return m_position; } 00038 void SetPosition( const G4ThreeVector &p ) { m_position = p; } 00039 00040 G4double GetTime() const { return m_time; } 00041 void SetTime( const G4double &t ) { m_time = t; } 00042 00043 BesTruthTrack* GetParentTrack() const { return m_parent; } 00044 void SetParentTrack( BesTruthTrack *newParent ) { m_parent = newParent; } 00045 00046 bool GetTerminal() const { return m_terminal; } 00047 void SetTerminal( bool wasTerminal ) { m_terminal = wasTerminal; } 00048 00049 G4int GetIndex() const { return m_index; } 00050 void SetIndex( signed long newIndex ) { m_index = newIndex; } 00051 00052 G4int GetCurrentDau() const { return m_currentDau;} 00053 void AddCurrentDau() { m_currentDau++; } 00054 00055 G4int GetMinDau() const { return m_minDau; } 00056 void SetMinDau(G4int dau) { m_minDau = dau; } 00057 00058 private: 00059 //name of the process which created this vertex 00060 G4String m_processName; 00061 00062 //position of this vertex 00063 G4ThreeVector m_position; 00064 00065 //relative time of this vertex 00066 G4double m_time; 00067 00068 // _parent: oldest progenitor stored in a GTrack. 00069 BesTruthTrack* m_parent; 00070 00071 //_terminal: true if this vertex killed its parent particle 00072 bool m_terminal; 00073 00074 //index in vertexList 00075 signed long m_index; 00076 00077 //the following data member is added for recording trackIndex 00078 //current processed daughter index, count from 0 00079 G4int m_currentDau; 00080 00081 //minimum daughter index of this vertex 00082 G4int m_minDau; 00083 }; 00084 00085 #endif