Geant4  10.02.p03
G4IT Class Referenceabstract

#include <G4IT.hh>

Inheritance diagram for G4IT:
Collaboration diagram for G4IT:

Public Types

enum  ELimited {
  kDoNot, kUnique, kSharedTransport, kSharedOther,
  kUndefLimited
}
 

Public Member Functions

 G4IT ()
 
 G4IT (G4Track *)
 
virtual ~G4IT ()
 
virtual void Print () const
 
virtual const G4StringGetName () const =0
 
virtual G4bool diff (const G4IT &right) const =0
 
virtual G4bool equal (const G4IT &right) const =0
 
G4bool operator< (const G4IT &right) const
 
G4bool operator== (const G4IT &right) const
 
G4bool operator!= (const G4IT &right) const
 
void SetTrack (G4Track *)
 
G4Track * GetTrack ()
 
const G4Track * GetTrack () const
 
void RecordCurrentPositionNTime ()
 
const G4ThreeVectorGetPosition () const
 
double operator[] (int i) const
 
const G4ThreeVectorGetPreStepPosition () const
 
G4double GetPreStepLocalTime () const
 
G4double GetPreStepGlobalTime () const
 
void SetPrevious (G4IT *)
 
void SetNext (G4IT *)
 
G4ITGetPrevious ()
 
G4ITGetNext ()
 
const G4ITGetPrevious () const
 
const G4ITGetNext () const
 
void SetITBox (G4ITBox *)
 
const G4ITBoxGetITBox () const
 
void TakeOutBox ()
 
void SetNode (G4KDNode_Base *)
 
G4KDNode_BaseGetNode () const
 
void SetParentID (int, int)
 
void GetParentID (int &, int &)
 
G4TrackingInformationGetTrackingInfo ()
 
G4TrackListNodeGetListNode ()
 
void SetListNode (G4TrackListNode *node)
 
virtual const G4ITType GetITType () const =0
 
virtual G4ITType GetITSubType () const
 

Protected Member Functions

 G4IT (const G4IT &)
 
G4IToperator= (const G4IT &)
 

Protected Attributes

G4Track * fpTrack
 

Private Attributes

G4ITBoxfpITBox
 
G4ITfpPreviousIT
 
G4ITfpNextIT
 
G4KDNode_BasefpKDNode
 
int fParentID_A
 
int fParentID_B
 
G4TrackingInformationfpTrackingInformation
 
G4TrackListNodefpTrackNode
 

Detailed Description

G4IT is a interface which allows the inheriting object to be tracked using G4ITStepProcessor The inheriting class must implement the operator < , == and != in order to enable the sorting out. also the concrete header of MyIT ("MyIt.hh") should contain : ITDef(MyIT) and the source of MyIT.cc : ITImp(MyIT)

Definition at line 84 of file G4IT.hh.

Member Enumeration Documentation

◆ ELimited

Enumerator
kDoNot 
kUnique 
kSharedTransport 
kSharedOther 
kUndefLimited 

Definition at line 67 of file G4ITMultiNavigator.hh.

Constructor & Destructor Documentation

◆ G4IT() [1/3]

G4IT::G4IT ( )

Definition at line 63 of file G4IT.cc.

63  :
64  G4VUserTrackInformation("G4IT"),
65  fpTrack(0),
66  fpPreviousIT(0),
67  fpNextIT(0),
69 {
70  fpITBox = 0;
71  fpKDNode = 0;
72  fpTrackNode = 0;
73  fParentID_A = 0;
74  fParentID_B = 0;
75 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
G4ITBox * fpITBox
Definition: G4IT.hh:167
G4Track * fpTrack
Definition: G4IT.hh:164
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
G4IT * fpNextIT
Definition: G4IT.hh:169
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
G4IT * fpPreviousIT
Definition: G4IT.hh:168
Here is the caller graph for this function:

◆ G4IT() [2/3]

G4IT::G4IT ( G4Track *  aTrack)

Definition at line 120 of file G4IT.cc.

120  :
121  G4VUserTrackInformation("G4IT"),
122  fpPreviousIT(0),
123  fpNextIT(0),
125 {
126  fpITBox = 0;
127  fpTrack = aTrack;
128  fpKDNode = 0;
129  fpTrackNode = 0;
130  fParentID_A = 0;
131  fParentID_B = 0;
133 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
void RecordCurrentPositionNTime()
Definition: G4IT.cc:217
G4ITBox * fpITBox
Definition: G4IT.hh:167
G4Track * fpTrack
Definition: G4IT.hh:164
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
G4IT * fpNextIT
Definition: G4IT.hh:169
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
G4IT * fpPreviousIT
Definition: G4IT.hh:168
Here is the call graph for this function:

◆ ~G4IT()

G4IT::~G4IT ( )
virtual

Definition at line 155 of file G4IT.cc.

156 {
157  TakeOutBox();
158 
160  {
161  delete fpTrackingInformation;
163  }
164 
165 // Note :
166 // G4ITTrackingManager will delete fTrackNode.
167 // fKDNode will be deleted when the KDTree is rebuilt
168 }
void TakeOutBox()
Definition: G4IT.cc:135
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
Here is the call graph for this function:

◆ G4IT() [3/3]

G4IT::G4IT ( const G4IT )
protected

Definition at line 78 of file G4IT.cc.

78  :
79  G4VUserTrackInformation("G4IT"),
80  fpTrack(0),
81  fpPreviousIT(0),
82  fpNextIT(0),
84 {
85  fpITBox = 0;
86  fpKDNode = 0;
87  fpTrackNode = 0;
88  fParentID_A = 0;
89  fParentID_B = 0;
90 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
G4ITBox * fpITBox
Definition: G4IT.hh:167
G4Track * fpTrack
Definition: G4IT.hh:164
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
G4IT * fpNextIT
Definition: G4IT.hh:169
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
G4IT * fpPreviousIT
Definition: G4IT.hh:168

Member Function Documentation

◆ diff()

virtual G4bool G4IT::diff ( const G4IT right) const
pure virtual
Here is the caller graph for this function:

◆ equal()

virtual G4bool G4IT::equal ( const G4IT right) const
pure virtual
Here is the caller graph for this function:

◆ GetITBox()

const G4ITBox * G4IT::GetITBox ( ) const
inline

Definition at line 180 of file G4IT.hh.

181 {
182  return fpITBox;
183 }
G4ITBox * fpITBox
Definition: G4IT.hh:167
Here is the caller graph for this function:

◆ GetITSubType()

virtual G4ITType G4IT::GetITSubType ( ) const
inlinevirtual

Reimplemented in G4Molecule.

Definition at line 156 of file G4IT.hh.

157  {
158  return 0;
159  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetITType()

virtual const G4ITType G4IT::GetITType ( ) const
pure virtual
Here is the caller graph for this function:

◆ GetListNode()

G4TrackListNode* G4IT::GetListNode ( )
inline

Definition at line 145 of file G4IT.hh.

146  {
147  return fpTrackNode;
148  }
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176

◆ GetName()

virtual const G4String& G4IT::GetName ( ) const
pure virtual

Implemented in G4Molecule.

Here is the caller graph for this function:

◆ GetNext() [1/2]

G4IT * G4IT::GetNext ( )
inline

Definition at line 205 of file G4IT.hh.

206 {
207  return fpNextIT;
208 }
G4IT * fpNextIT
Definition: G4IT.hh:169
Here is the caller graph for this function:

◆ GetNext() [2/2]

const G4IT * G4IT::GetNext ( ) const
inline

Definition at line 242 of file G4IT.hh.

243 {
244  return fpNextIT;
245 }
G4IT * fpNextIT
Definition: G4IT.hh:169

◆ GetNode()

G4KDNode_Base * G4IT::GetNode ( ) const
inline

Definition at line 252 of file G4IT.hh.

253 {
254  return fpKDNode;
255 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
Here is the caller graph for this function:

◆ GetParentID()

void G4IT::GetParentID ( int &  p_a,
int &  p_b 
)
inline

Definition at line 231 of file G4IT.hh.

232 {
233  p_a = fParentID_A;
234  p_b = fParentID_B;
235 }
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
Here is the caller graph for this function:

◆ GetPosition()

const G4ThreeVector & G4IT::GetPosition ( ) const

Definition at line 211 of file G4IT.cc.

212 {
213  if (fpTrack) return GetTrack()->GetPosition();
214  return *(new G4ThreeVector());
215 }
CLHEP::Hep3Vector G4ThreeVector
G4Track * fpTrack
Definition: G4IT.hh:164
G4Track * GetTrack()
Definition: G4IT.hh:215
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPreStepGlobalTime()

G4double G4IT::GetPreStepGlobalTime ( ) const

Definition at line 225 of file G4IT.cc.

226 {
228 }
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
G4double GetPreStepGlobalTime() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPreStepLocalTime()

G4double G4IT::GetPreStepLocalTime ( ) const

Definition at line 230 of file G4IT.cc.

231 {
233 }
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
G4double GetPreStepLocalTime() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPreStepPosition()

const G4ThreeVector & G4IT::GetPreStepPosition ( ) const

Definition at line 235 of file G4IT.cc.

236 {
238 }
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
const G4ThreeVector & GetPreStepPosition() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPrevious() [1/2]

G4IT * G4IT::GetPrevious ( )
inline

Definition at line 200 of file G4IT.hh.

201 {
202  return fpPreviousIT;
203 }
G4IT * fpPreviousIT
Definition: G4IT.hh:168
Here is the caller graph for this function:

◆ GetPrevious() [2/2]

const G4IT * G4IT::GetPrevious ( ) const
inline

Definition at line 237 of file G4IT.hh.

238 {
239  return fpPreviousIT;
240 }
G4IT * fpPreviousIT
Definition: G4IT.hh:168

◆ GetTrack() [1/2]

G4Track * G4IT::GetTrack ( )
inline

Definition at line 215 of file G4IT.hh.

216 {
217  return fpTrack;
218 }
G4Track * fpTrack
Definition: G4IT.hh:164
Here is the caller graph for this function:

◆ GetTrack() [2/2]

const G4Track * G4IT::GetTrack ( ) const
inline

Definition at line 220 of file G4IT.hh.

221 {
222  return fpTrack;
223 }
G4Track * fpTrack
Definition: G4IT.hh:164

◆ GetTrackingInfo()

G4TrackingInformation* G4IT::GetTrackingInfo ( )
inline

Definition at line 140 of file G4IT.hh.

141  {
142  return fpTrackingInformation;
143  }
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
Here is the caller graph for this function:

◆ operator!=()

G4bool G4IT::operator!= ( const G4IT right) const

Definition at line 197 of file G4IT.cc.

198 {
199  return !(this->operator==(right));
200 }
G4bool operator==(const G4IT &right) const
Definition: G4IT.cc:188
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<()

G4bool G4IT::operator< ( const G4IT right) const

Definition at line 175 of file G4IT.cc.

176 {
177  if (GetITType() == right.GetITType())
178  {
179  return (this->diff(right));
180  }
181  else
182  {
183  return (GetITType() < right.GetITType());
184  }
185  return false;
186 }
virtual G4bool diff(const G4IT &right) const =0
virtual const G4ITType GetITType() const =0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

G4IT & G4IT::operator= ( const G4IT right)
protected

Definition at line 93 of file G4IT.cc.

94 {
95  G4ExceptionDescription exceptionDescription;
96  exceptionDescription
97  << "The assignment operator of G4IT should not be used, "
98  "this feature is not supported."
99  << "If really needed, please contact the developers.";
100  G4Exception("G4IT::operator=(const G4IT& right)",
101  "G4IT001",
103  exceptionDescription);
104 
105  if (this == &right) return *this;
106 
107  fpTrack = 0;
108  fpITBox = 0;
109  fpPreviousIT = 0;
110  fpNextIT = 0;
111  fpKDNode = 0;
112  fParentID_A = 0;
113  fParentID_B = 0;
115  fpTrackNode = 0;
116 
117  return *this;
118 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
G4ITBox * fpITBox
Definition: G4IT.hh:167
G4Track * fpTrack
Definition: G4IT.hh:164
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
G4IT * fpNextIT
Definition: G4IT.hh:169
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
G4IT * fpPreviousIT
Definition: G4IT.hh:168
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

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

Definition at line 188 of file G4IT.cc.

189 {
190  if (GetITType() == right.GetITType())
191  {
192  return this->equal(right);
193  }
194  return false;
195 }
virtual G4bool equal(const G4IT &right) const =0
virtual const G4ITType GetITType() const =0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]()

double G4IT::operator[] ( int  i) const

Definition at line 204 of file G4IT.cc.

205 {
206  return fpTrack->GetPosition()[i];
207 }
G4Track * fpTrack
Definition: G4IT.hh:164
Here is the caller graph for this function:

◆ Print()

virtual void G4IT::Print ( void  ) const
inlinevirtual

Definition at line 94 of file G4IT.hh.

95  {
96  ;
97  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordCurrentPositionNTime()

void G4IT::RecordCurrentPositionNTime ( )

Definition at line 217 of file G4IT.cc.

218 {
219  if (fpTrack)
220  {
222  }
223 }
G4TrackingInformation * fpTrackingInformation
Definition: G4IT.hh:175
void RecordCurrentPositionNTime(G4Track *)
G4Track * fpTrack
Definition: G4IT.hh:164
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetITBox()

void G4IT::SetITBox ( G4ITBox aITBox)
inline

Definition at line 185 of file G4IT.hh.

186 {
187  fpITBox = aITBox;
188 }
G4ITBox * fpITBox
Definition: G4IT.hh:167
Here is the caller graph for this function:

◆ SetListNode()

void G4IT::SetListNode ( G4TrackListNode node)
inline

Definition at line 149 of file G4IT.hh.

150  {
151  fpTrackNode = node;
152  }
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
Here is the call graph for this function:

◆ SetNext()

void G4IT::SetNext ( G4IT aIT)
inline

Definition at line 195 of file G4IT.hh.

196 {
197  fpNextIT = aIT;
198 }
G4IT * fpNextIT
Definition: G4IT.hh:169
Here is the caller graph for this function:

◆ SetNode()

void G4IT::SetNode ( G4KDNode_Base aNode)
inline

Definition at line 247 of file G4IT.hh.

248 {
249  fpKDNode = aNode;
250 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
Here is the caller graph for this function:

◆ SetParentID()

void G4IT::SetParentID ( int  p_a,
int  p_b 
)
inline

Definition at line 225 of file G4IT.hh.

226 {
227  fParentID_A = p_a;
228  fParentID_B = p_b;
229 }
int fParentID_A
Definition: G4IT.hh:172
int fParentID_B
Definition: G4IT.hh:173
Here is the caller graph for this function:

◆ SetPrevious()

void G4IT::SetPrevious ( G4IT aIT)
inline

Definition at line 190 of file G4IT.hh.

191 {
192  fpPreviousIT = aIT;
193 }
G4IT * fpPreviousIT
Definition: G4IT.hh:168
Here is the caller graph for this function:

◆ SetTrack()

void G4IT::SetTrack ( G4Track *  track)
inline

Definition at line 210 of file G4IT.hh.

211 {
212  fpTrack = track;
213 }
G4Track * fpTrack
Definition: G4IT.hh:164
Here is the caller graph for this function:

◆ TakeOutBox()

void G4IT::TakeOutBox ( )

Definition at line 135 of file G4IT.cc.

136 {
137  if(fpITBox)
138  {
139  fpITBox->Extract(this);
140  }
141 
142  if(fpTrackNode)
143  {
144  delete fpTrackNode;
145  fpTrackNode = 0;
146  }
147 
148  if(fpKDNode)
149  {
151  fpKDNode = 0;
152  }
153 }
G4KDNode_Base * fpKDNode
Definition: G4IT.hh:170
G4ITBox * fpITBox
Definition: G4IT.hh:167
void InactiveNode(G4KDNode_Base *)
Definition: G4KDNode.cc:58
G4TrackListNode * fpTrackNode
Definition: G4IT.hh:176
void Extract(G4IT *)
Definition: G4ITBox.cc:87
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fParentID_A

int G4IT::fParentID_A
private

Definition at line 172 of file G4IT.hh.

◆ fParentID_B

int G4IT::fParentID_B
private

Definition at line 173 of file G4IT.hh.

◆ fpITBox

G4ITBox* G4IT::fpITBox
private

Definition at line 167 of file G4IT.hh.

◆ fpKDNode

G4KDNode_Base* G4IT::fpKDNode
private

Definition at line 170 of file G4IT.hh.

◆ fpNextIT

G4IT* G4IT::fpNextIT
private

Definition at line 169 of file G4IT.hh.

◆ fpPreviousIT

G4IT* G4IT::fpPreviousIT
private

Definition at line 168 of file G4IT.hh.

◆ fpTrack

G4Track* G4IT::fpTrack
protected

Definition at line 164 of file G4IT.hh.

◆ fpTrackingInformation

G4TrackingInformation* G4IT::fpTrackingInformation
private

Definition at line 175 of file G4IT.hh.

◆ fpTrackNode

G4TrackListNode* G4IT::fpTrackNode
private

Definition at line 176 of file G4IT.hh.


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