Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IT Class Referenceabstract

#include <G4IT.hh>

+ Inheritance diagram for G4IT:

Public Member Functions

 G4IT ()
 
 G4IT (G4Track *)
 
virtual ~G4IT ()
 
void * operator new (size_t)
 
void operator delete (void *aIT)
 
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 ()
 
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 *)
 
void SetParentID (int, int)
 
void GetParentID (int &, int &)
 
const G4ThreeVectorGetPreStepPosition () const
 
G4double GetPreStepLocalTime () const
 
G4double GetPreStepGlobalTime () const
 
G4KDNodeGetNode () const
 
G4TrackingInformationGetTrackingInfo ()
 
G4TrackListNodeGetTrackListNode ()
 
void SetTrackListNode (G4TrackListNode *node)
 
virtual const G4ITType GetITType () const =0
 
- Public Member Functions inherited from G4VUserTrackInformation
 G4VUserTrackInformation ()
 
 G4VUserTrackInformation (const G4String &infoType)
 
 G4VUserTrackInformation (const G4VUserTrackInformation &)
 
G4VUserTrackInformationoperator= (const G4VUserTrackInformation &)
 
virtual ~G4VUserTrackInformation ()
 
virtual void Print () const
 
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 included in ITManager for the search of nearest neighbour
  • to be tracked using G4ITStepManager 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 82 of file G4IT.hh.

Constructor & Destructor Documentation

◆ G4IT() [1/3]

G4IT::G4IT ( )

Definition at line 61 of file G4IT.cc.

62 fpTrack (0),
63 fpPreviousIT(0), fpNextIT(0),
64 fTrackingInformation()
65// fpTrackingInformation(new G4TrackingInformation())
66{
67 fpITBox=0;
68 fpKDNode = 0 ;
69 fpTrackNode = 0;
70 fParentID_A = 0;
71 fParentID_B = 0;
72}
G4Track * fpTrack
Definition: G4IT.hh:144

◆ G4IT() [2/3]

G4IT::G4IT ( G4Track aTrack)

Definition at line 111 of file G4IT.cc.

111 : G4VUserTrackInformation("G4IT"),
112 fpPreviousIT(0), fpNextIT(0),
113 fTrackingInformation()
114// fpTrackingInformation(new G4TrackingInformation())
115{
116 fpITBox = 0;
117 fpTrack = aTrack;
118 fpKDNode = 0 ;
119 fpTrackNode = 0;
120 fParentID_A = 0;
121 fParentID_B = 0;
123}
void RecordCurrentPositionNTime()
Definition: G4IT.cc:157

◆ ~G4IT()

G4IT::~G4IT ( )
virtual

Definition at line 139 of file G4IT.cc.

140{
141 TakeOutBox();
142
143// if(fpTrackingInformation)
144// {
145// delete fpTrackingInformation;
146// fpTrackingInformation = 0;
147// }
148
149 // Note :
150 // G4ITTrackingManager will delete fTrackNode.
151 // fKDNode will be deleted when the KDTree is rebuilt
152}
void TakeOutBox()
Definition: G4IT.cc:125

◆ G4IT() [3/3]

G4IT::G4IT ( const G4IT )
protected

Definition at line 75 of file G4IT.cc.

76 fpTrack (0),
77 fpPreviousIT(0), fpNextIT(0),
78 fTrackingInformation()
79// fpTrackingInformation(new G4TrackingInformation())
80{
81 fpITBox=0;
82 fpKDNode = 0 ;
83 fpTrackNode = 0;
84 fParentID_A = 0;
85 fParentID_B = 0;
86}

Member Function Documentation

◆ diff()

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

Referenced by operator<().

◆ equal()

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

Referenced by operator==().

◆ GetITBox()

const G4ITBox * G4IT::GetITBox ( ) const
inline

Definition at line 172 of file G4IT.hh.

173{
174 return fpITBox ;
175}

◆ GetITType()

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

◆ GetName()

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

◆ GetNext() [1/2]

G4IT * G4IT::GetNext ( )
inline

Definition at line 197 of file G4IT.hh.

198{
199 return fpNextIT;
200}

Referenced by G4ITBox::Extract(), G4ITBox::TransferTo(), and G4ITBox::~G4ITBox().

◆ GetNext() [2/2]

const G4IT * G4IT::GetNext ( ) const
inline

Definition at line 249 of file G4IT.hh.

250{
251 return fpNextIT ;
252}

◆ GetNode()

G4KDNode * G4IT::GetNode ( ) const
inline

Definition at line 259 of file G4IT.hh.

260{
261 return fpKDNode ;
262}

◆ GetParentID()

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

Definition at line 223 of file G4IT.hh.

224{
225 p_a = fParentID_A;
226 p_b = fParentID_B ;
227}

◆ GetPreStepGlobalTime()

G4double G4IT::GetPreStepGlobalTime ( ) const
inline

Definition at line 229 of file G4IT.hh.

230{
231 return fTrackingInformation.GetPreStepGlobalTime();
232}
G4double GetPreStepGlobalTime() const

◆ GetPreStepLocalTime()

G4double G4IT::GetPreStepLocalTime ( ) const
inline

Definition at line 234 of file G4IT.hh.

235{
236 return fTrackingInformation.GetPreStepLocalTime();
237}
G4double GetPreStepLocalTime() const

◆ GetPreStepPosition()

const G4ThreeVector & G4IT::GetPreStepPosition ( ) const
inline

Definition at line 239 of file G4IT.hh.

240{
241 return fTrackingInformation.GetPreStepPosition();
242}
const G4ThreeVector & GetPreStepPosition() const

◆ GetPrevious() [1/2]

G4IT * G4IT::GetPrevious ( )
inline

Definition at line 192 of file G4IT.hh.

193{
194 return fpPreviousIT;
195}

Referenced by G4ITBox::Extract(), and G4ITBox::FindIT().

◆ GetPrevious() [2/2]

const G4IT * G4IT::GetPrevious ( ) const
inline

Definition at line 244 of file G4IT.hh.

245{
246 return fpPreviousIT ;
247}

◆ GetTrack() [1/2]

G4Track * G4IT::GetTrack ( )
inline

Definition at line 207 of file G4IT.hh.

208{
209 return fpTrack;
210}

Referenced by G4ITStepProcessor::FindTransportationStep().

◆ GetTrack() [2/2]

const G4Track * G4IT::GetTrack ( ) const
inline

Definition at line 212 of file G4IT.hh.

213{
214 return fpTrack;
215}

◆ GetTrackingInfo()

◆ GetTrackListNode()

G4TrackListNode * G4IT::GetTrackListNode ( )
inline

Definition at line 136 of file G4IT.hh.

136{return fpTrackNode;}

Referenced by G4TrackList::Flag(), and G4TrackList::Unflag().

◆ operator delete()

void G4IT::operator delete ( void *  aIT)
inline

Definition at line 169 of file G4IT.hh.

170{ aITAllocator.FreeSingle((G4IT *) aIT);}
G4DLLIMPORT G4Allocator< G4IT > aITAllocator
Definition: G4IT.cc:43
Definition: G4IT.hh:83

◆ operator new()

void * G4IT::operator new ( size_t  )
inline

Definition at line 162 of file G4IT.hh.

163{
164 void *aIT;
165 aIT = (void *) aITAllocator.MallocSingle();
166 return aIT;
167}

◆ operator!=()

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

Definition at line 187 of file G4IT.cc.

188{
189 return !(this->operator==(right));
190}
G4bool operator==(const G4IT &right) const
Definition: G4IT.cc:178

◆ operator<()

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

Definition at line 165 of file G4IT.cc.

166{
167 if(GetITType() == right.GetITType() )
168 {
169 return (this->diff(right)) ;
170 }
171 else
172 {
173 return (GetITType() < right.GetITType());
174 }
175 return false;
176}
virtual const G4ITType GetITType() const =0
virtual G4bool diff(const G4IT &right) const =0

◆ operator=()

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

Definition at line 89 of file G4IT.cc.

90{
91 G4ExceptionDescription exceptionDescription;
92 exceptionDescription << "The assignment operator of G4IT should not be used, this feature is not supported."
93 << "If really needed, please contact the developers.";
94 G4Exception("G4IT::operator=(const G4IT& right)","G4IT001",FatalException,exceptionDescription);
95
96 if(this == &right) return *this;
97
98 fpTrack = 0;
99 fpITBox = 0;
100 fpPreviousIT = 0;
101 fpNextIT = 0;
102 fpKDNode = 0 ;
103 fParentID_A = 0;
104 fParentID_B = 0;
105// fpTrackingInformation = 0;
106 fpTrackNode = 0;
107
108 return *this;
109}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76

◆ operator==()

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

Definition at line 178 of file G4IT.cc.

179{
180 if(GetITType() == right.GetITType() )
181 {
182 return this->equal(right);
183 }
184 return false;
185}
virtual G4bool equal(const G4IT &right) const =0

Referenced by operator!=().

◆ Print()

virtual void G4IT::Print ( ) const
inlinevirtual

Reimplemented from G4VUserTrackInformation.

Definition at line 92 of file G4IT.hh.

92{}

◆ RecordCurrentPositionNTime()

void G4IT::RecordCurrentPositionNTime ( )

Definition at line 157 of file G4IT.cc.

158{
159 if(fpTrack)
160 {
161 fTrackingInformation.RecordCurrentPositionNTime(fpTrack);
162 }
163}
void RecordCurrentPositionNTime(G4Track *)

Referenced by G4IT().

◆ SetITBox()

void G4IT::SetITBox ( G4ITBox aITBox)
inline

Definition at line 177 of file G4IT.hh.

178{
179 fpITBox = aITBox;
180}

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

◆ SetNext()

void G4IT::SetNext ( G4IT aIT)
inline

Definition at line 187 of file G4IT.hh.

188{
189 fpNextIT = aIT;
190}

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

◆ SetNode()

void G4IT::SetNode ( G4KDNode aNode)
inline

Definition at line 254 of file G4IT.hh.

255{
256 fpKDNode = aNode ;
257}

◆ SetParentID()

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

Definition at line 217 of file G4IT.hh.

218{
219 fParentID_A = p_a;
220 fParentID_B = p_b;
221}

◆ SetPrevious()

void G4IT::SetPrevious ( G4IT aIT)
inline

Definition at line 182 of file G4IT.hh.

183{
184 fpPreviousIT = aIT;
185}

Referenced by G4ITBox::Extract(), and G4ITBox::Push().

◆ SetTrack()

void G4IT::SetTrack ( G4Track track)
inline

Definition at line 202 of file G4IT.hh.

203{
204 fpTrack = track;
205}

◆ SetTrackListNode()

void G4IT::SetTrackListNode ( G4TrackListNode node)
inline

Definition at line 137 of file G4IT.hh.

137{ fpTrackNode = node;}

Referenced by G4TrackList::EraseTrackListNode(), and G4TrackList::Flag().

◆ TakeOutBox()

void G4IT::TakeOutBox ( )

Definition at line 125 of file G4IT.cc.

126{
127 if(fpITBox)
128 {
129 fpITBox->Extract(this);
130 }
131
132 if(fpKDNode)
133 {
134 InactiveNode(fpKDNode);
135 fpKDNode = 0;
136 }
137}
void InactiveNode(G4KDNode *)
Definition: G4KDNode.cc:57
void Extract(G4IT *)
Definition: G4ITBox.cc:87

Referenced by ~G4IT().

Member Data Documentation

◆ fpTrack

G4Track* G4IT::fpTrack
protected

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