Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 *)
 
G4TrackGetTrack ()
 
const G4TrackGetTrack () 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
 
- Public Member Functions inherited from G4VUserTrackInformation
 G4VUserTrackInformation ()
 
 G4VUserTrackInformation (const G4String &infoType)
 
 G4VUserTrackInformation (const G4VUserTrackInformation &)
 
G4VUserTrackInformationoperator= (const G4VUserTrackInformation &)
 
virtual ~G4VUserTrackInformation ()
 
const G4StringGetType () const
 

Protected Member Functions

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

Protected Attributes

G4TrackfpTrack
 
- Protected Attributes inherited from G4VUserTrackInformation
G4StringpType
 

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 88 of file G4IT.hh.

Member Enumeration Documentation

Enumerator
kDoNot 
kUnique 
kSharedTransport 
kSharedOther 
kUndefLimited 

Definition at line 67 of file G4ITMultiNavigator.hh.

Constructor & Destructor Documentation

G4IT::G4IT ( )

Definition at line 68 of file G4IT.cc.

68  :
70  fpTrack(nullptr),
71  fpPreviousIT(nullptr),
72  fpNextIT(nullptr),
73  fpTrackingInformation(new G4TrackingInformation())
74 {
75  fpITBox = nullptr;
76  fpKDNode = nullptr;
77  fpTrackNode = nullptr;
78  fParentID_A = 0;
79  fParentID_B = 0;
80 }
G4Track * fpTrack
Definition: G4IT.hh:168
G4IT::G4IT ( G4Track aTrack)

Definition at line 125 of file G4IT.cc.

125  :
126  G4VUserTrackInformation("G4IT"),
127  fpPreviousIT(0),
128  fpNextIT(0),
129  fpTrackingInformation(new G4TrackingInformation())
130 {
131  fpITBox = 0;
132  fpTrack = aTrack;
133  fpKDNode = nullptr;
134  fpTrackNode = nullptr;
135  fParentID_A = 0;
136  fParentID_B = 0;
138 }
void RecordCurrentPositionNTime()
Definition: G4IT.cc:221
G4Track * fpTrack
Definition: G4IT.hh:168

Here is the call graph for this function:

G4IT::~G4IT ( )
virtual

Definition at line 161 of file G4IT.cc.

162 {
163  TakeOutBox();
164 
165  if(fpTrackingInformation)
166  {
167  delete fpTrackingInformation;
168  fpTrackingInformation = nullptr;
169  }
170 
171 // Note :
172 // G4ITTrackingManager will delete fTrackNode.
173 // fKDNode will be deleted when the KDTree is rebuilt
174 }
void TakeOutBox()
Definition: G4IT.cc:140

Here is the call graph for this function:

G4IT::G4IT ( const G4IT )
protected

Definition at line 83 of file G4IT.cc.

83  :
85  fpTrack(nullptr),
86  fpPreviousIT(nullptr),
87  fpNextIT(nullptr),
88  fpTrackingInformation(new G4TrackingInformation())
89 {
90  fpITBox = nullptr;
91  fpKDNode = nullptr;
92  fpTrackNode = nullptr;
93  fParentID_A = 0;
94  fParentID_B = 0;
95 }
G4Track * fpTrack
Definition: G4IT.hh:168

Member Function Documentation

virtual G4bool G4IT::diff ( const G4IT right) const
pure virtual

Here is the caller graph for this function:

virtual G4bool G4IT::equal ( const G4IT right) const
pure virtual

Here is the caller graph for this function:

const G4ITBox * G4IT::GetITBox ( ) const
inline

Definition at line 184 of file G4IT.hh.

185 {
186  return fpITBox;
187 }
virtual G4ITType G4IT::GetITSubType ( ) const
inlinevirtual

Reimplemented in G4Molecule.

Definition at line 160 of file G4IT.hh.

161  {
162  return 0;
163  }

Here is the caller graph for this function:

virtual const G4ITType G4IT::GetITType ( ) const
pure virtual

Here is the caller graph for this function:

G4TrackListNode* G4IT::GetListNode ( )
inline

Definition at line 149 of file G4IT.hh.

150  {
151  return fpTrackNode;
152  }

Here is the caller graph for this function:

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

Implemented in G4Molecule.

Here is the caller graph for this function:

G4IT * G4IT::GetNext ( )
inline

Definition at line 209 of file G4IT.hh.

210 {
211  return fpNextIT;
212 }

Here is the caller graph for this function:

const G4IT * G4IT::GetNext ( ) const
inline

Definition at line 246 of file G4IT.hh.

247 {
248  return fpNextIT;
249 }
G4KDNode_Base * G4IT::GetNode ( ) const
inline

Definition at line 256 of file G4IT.hh.

257 {
258  return fpKDNode;
259 }
void G4IT::GetParentID ( int p_a,
int p_b 
)
inline

Definition at line 235 of file G4IT.hh.

236 {
237  p_a = fParentID_A;
238  p_b = fParentID_B;
239 }
const G4ThreeVector & G4IT::GetPosition ( ) const

Definition at line 215 of file G4IT.cc.

216 {
217  if (fpTrack) return GetTrack()->GetPosition();
218  return *(new G4ThreeVector());
219 }
CLHEP::Hep3Vector G4ThreeVector
const G4ThreeVector & GetPosition() const
G4Track * fpTrack
Definition: G4IT.hh:168
G4Track * GetTrack()
Definition: G4IT.hh:219

Here is the call graph for this function:

G4double G4IT::GetPreStepGlobalTime ( ) const

Definition at line 229 of file G4IT.cc.

230 {
231  return fpTrackingInformation->GetPreStepGlobalTime();
232 }
G4double GetPreStepGlobalTime() const

Here is the call graph for this function:

G4double G4IT::GetPreStepLocalTime ( ) const

Definition at line 234 of file G4IT.cc.

235 {
236  return fpTrackingInformation->GetPreStepLocalTime();
237 }
G4double GetPreStepLocalTime() const

Here is the call graph for this function:

const G4ThreeVector & G4IT::GetPreStepPosition ( ) const

Definition at line 239 of file G4IT.cc.

240 {
241  return fpTrackingInformation->GetPreStepPosition();
242 }
const G4ThreeVector & GetPreStepPosition() const

Here is the call graph for this function:

G4IT * G4IT::GetPrevious ( )
inline

Definition at line 204 of file G4IT.hh.

205 {
206  return fpPreviousIT;
207 }

Here is the caller graph for this function:

const G4IT * G4IT::GetPrevious ( ) const
inline

Definition at line 241 of file G4IT.hh.

242 {
243  return fpPreviousIT;
244 }
G4Track * G4IT::GetTrack ( )
inline

Definition at line 219 of file G4IT.hh.

220 {
221  return fpTrack;
222 }
G4Track * fpTrack
Definition: G4IT.hh:168

Here is the caller graph for this function:

const G4Track * G4IT::GetTrack ( ) const
inline

Definition at line 224 of file G4IT.hh.

225 {
226  return fpTrack;
227 }
G4Track * fpTrack
Definition: G4IT.hh:168
G4TrackingInformation* G4IT::GetTrackingInfo ( )
inline

Definition at line 144 of file G4IT.hh.

145  {
146  return fpTrackingInformation;
147  }

Here is the caller graph for this function:

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

Definition at line 203 of file G4IT.cc.

204 {
205  return !(this->operator==(right));
206 }
G4bool operator==(const G4IT &right) const
Definition: G4IT.cc:194

Here is the call graph for this function:

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

Definition at line 181 of file G4IT.cc.

182 {
183  if (GetITType() == right.GetITType())
184  {
185  return (this->diff(right));
186  }
187  else
188  {
189  return (GetITType() < right.GetITType());
190  }
191  return false;
192 }
virtual G4bool diff(const G4IT &right) const =0
virtual const G4ITType GetITType() const =0

Here is the call graph for this function:

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

Definition at line 98 of file G4IT.cc.

99 {
100  G4ExceptionDescription exceptionDescription;
101  exceptionDescription
102  << "The assignment operator of G4IT should not be used, "
103  "this feature is not supported."
104  << "If really needed, please contact the developers.";
105  G4Exception("G4IT::operator=(const G4IT& right)",
106  "G4IT001",
108  exceptionDescription);
109 
110  if (this == &right) return *this;
111 
112  fpTrack = nullptr;
113  fpITBox = nullptr;
114  fpPreviousIT = nullptr;
115  fpNextIT = nullptr;
116  fpKDNode = nullptr;
117  fParentID_A = 0;
118  fParentID_B = 0;
119  fpTrackingInformation = nullptr;
120  fpTrackNode = nullptr;
121 
122  return *this;
123 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4Track * fpTrack
Definition: G4IT.hh:168
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

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

Definition at line 194 of file G4IT.cc.

195 {
196  if (GetITType() == right.GetITType())
197  {
198  return this->equal(right);
199  }
200  return false;
201 }
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:

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

Definition at line 208 of file G4IT.cc.

209 {
210  return fpTrack->GetPosition()[i];
211 }
const G4ThreeVector & GetPosition() const
G4Track * fpTrack
Definition: G4IT.hh:168

Here is the call graph for this function:

virtual void G4IT::Print ( void  ) const
inlinevirtual

Reimplemented from G4VUserTrackInformation.

Reimplemented in G4Molecule.

Definition at line 98 of file G4IT.hh.

99  {
100  ;
101  }
void G4IT::RecordCurrentPositionNTime ( )

Definition at line 221 of file G4IT.cc.

222 {
223  if (fpTrack)
224  {
225  fpTrackingInformation->RecordCurrentPositionNTime(fpTrack);
226  }
227 }
void RecordCurrentPositionNTime(G4Track *)
G4Track * fpTrack
Definition: G4IT.hh:168

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IT::SetITBox ( G4ITBox aITBox)
inline

Definition at line 189 of file G4IT.hh.

190 {
191  fpITBox = aITBox;
192 }

Here is the caller graph for this function:

void G4IT::SetListNode ( G4TrackListNode node)
inline

Definition at line 153 of file G4IT.hh.

154  {
155  fpTrackNode = node;
156  }

Here is the caller graph for this function:

void G4IT::SetNext ( G4IT aIT)
inline

Definition at line 199 of file G4IT.hh.

200 {
201  fpNextIT = aIT;
202 }

Here is the caller graph for this function:

void G4IT::SetNode ( G4KDNode_Base aNode)
inline

Definition at line 251 of file G4IT.hh.

252 {
253  fpKDNode = aNode;
254 }
void G4IT::SetParentID ( int  p_a,
int  p_b 
)
inline

Definition at line 229 of file G4IT.hh.

230 {
231  fParentID_A = p_a;
232  fParentID_B = p_b;
233 }

Here is the caller graph for this function:

void G4IT::SetPrevious ( G4IT aIT)
inline

Definition at line 194 of file G4IT.hh.

195 {
196  fpPreviousIT = aIT;
197 }

Here is the caller graph for this function:

void G4IT::SetTrack ( G4Track track)
inline

Definition at line 214 of file G4IT.hh.

215 {
216  fpTrack = track;
217 }
G4Track * fpTrack
Definition: G4IT.hh:168
void G4IT::TakeOutBox ( )

Definition at line 140 of file G4IT.cc.

141 {
142  if(fpITBox)
143  {
144  fpITBox->Extract(this);
145  fpITBox = nullptr;
146  }
147 
148  if(fpTrackNode)
149  {
150  delete fpTrackNode;
151  fpTrackNode = nullptr;
152  }
153 
154  if(fpKDNode)
155  {
156  InactiveNode(fpKDNode);
157  fpKDNode = nullptr;
158  }
159 }
void InactiveNode(G4KDNode_Base *)
Definition: G4KDNode.cc:58
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

G4Track* G4IT::fpTrack
protected

Definition at line 168 of file G4IT.hh.


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