Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITManager< T > Class Template Reference

#include <G4ITManager.hh>

+ Inheritance diagram for G4ITManager< T >:

Public Member Functions

virtual ~G4ITManager ()
 
virtual void Push (G4Track *)
 
G4int NbElements (const G4IT *)
 
void EraseABox (T *)
 
void EraseABox (G4ITBox *)
 
void SetVerboseLevel (G4int level)
 
G4int GetVerboseLevel ()
 
virtual void UpdatePositionMap ()
 
G4KDTreeResultHandle FindNearestInRange (const T *, const T *, G4double)
 
G4KDTreeResultHandle FindNearest (const G4ThreeVector &, const T *it)
 
G4KDTreeResultHandle FindNearest (const T *it0, const T *it)
 
G4KDTreeResultHandle FindNearestInRange (const G4ThreeVector &, const T *, G4double)
 
G4ITBoxGetBox (const T *IT)
 
virtual G4ITBoxGetBox (const G4IT *IT)
 
virtual G4ITBoxGetFirstBox ()
 
virtual G4ITBoxGetNextBox (G4ITBox *box)
 
virtual G4ITBoxGetLastBox ()
 
- Public Member Functions inherited from G4VITManager
 G4VITManager ()
 
virtual ~G4VITManager ()
 
void SetVerboseLevel (G4int level)
 
G4int GetVerboseLevel ()
 
virtual void UpdatePositionMap ()=0
 
virtual void CreateTree ()
 
virtual void Push (G4Track *)=0
 
G4ITType GetITType ()
 
G4ITBoxGetBox (const G4Track *track)
 
virtual G4ITBoxGetBox (const G4IT *)=0
 
virtual G4ITBoxGetFirstBox ()=0
 
virtual G4ITBoxGetNextBox (G4ITBox *)=0
 
virtual G4ITBoxGetLastBox ()=0
 

Static Public Member Functions

static G4ITManager< T > * Instance ()
 
static void iUpdatePositionMap ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VITManager
G4ITType fType
 
G4int fVerbose
 

Detailed Description

template<typename T>
class G4ITManager< T >

G4ITManager is able to save into different boxes the ITs that will be used in the simulation. It is a stack-like. Those boxes are used to fill a tree which helps finding the closest neighboor.

Definition at line 151 of file G4ITManager.hh.

Constructor & Destructor Documentation

◆ ~G4ITManager()

template<typename T >
virtual G4ITManager< T >::~G4ITManager ( )
virtual

Member Function Documentation

◆ EraseABox() [1/2]

template<typename T >
void G4ITManager< T >::EraseABox ( G4ITBox )

◆ EraseABox() [2/2]

template<typename T >
void G4ITManager< T >::EraseABox ( T *  )

◆ FindNearest() [1/2]

template<typename T >
G4KDTreeResultHandle G4ITManager< T >::FindNearest ( const G4ThreeVector ,
const T *  it 
)

◆ FindNearest() [2/2]

template<typename T >
G4KDTreeResultHandle G4ITManager< T >::FindNearest ( const T *  it0,
const T *  it 
)

◆ FindNearestInRange() [1/2]

template<typename T >
G4KDTreeResultHandle G4ITManager< T >::FindNearestInRange ( const G4ThreeVector ,
const T *  ,
G4double   
)

◆ FindNearestInRange() [2/2]

template<typename T >
G4KDTreeResultHandle G4ITManager< T >::FindNearestInRange ( const T *  ,
const T *  ,
G4double   
)

◆ GetBox() [1/2]

template<typename T >
virtual G4ITBox * G4ITManager< T >::GetBox ( const G4IT IT)
inlinevirtual

Implements G4VITManager.

Definition at line 198 of file G4ITManager.hh.

199 {
200 const T* myIT = dynamic_cast<const T*>(IT);
201
202 if(myIT == 0)
203 {
204 G4ExceptionDescription exceptionDescription ("You are requested a bad IT");
205 G4Exception("G4ITManager::GetBox","ITManager001",
206 FatalErrorInArgument,exceptionDescription);
207 return 0; // coverity
208 }
209
210 return GetBox(myIT);
211 }
@ FatalErrorInArgument
G4ITBox * GetBox(const T *IT)
Definition: G4ITManager.hh:191
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76

◆ GetBox() [2/2]

template<typename T >
G4ITBox * G4ITManager< T >::GetBox ( const T *  IT)
inline

Definition at line 191 of file G4ITManager.hh.

192 {
193 typename BoxMap::const_iterator it = fBox.find(*IT);
194 if(it == fBox.end()) return 0;
195 return it->second;
196 }

Referenced by G4ITManager< T >::GetBox().

◆ GetFirstBox()

template<typename T >
virtual G4ITBox * G4ITManager< T >::GetFirstBox ( )
inlinevirtual

Implements G4VITManager.

Definition at line 213 of file G4ITManager.hh.

214 {
215 typename BoxMap::iterator it = fBox.begin();
216 if(it != fBox.end())
217 {
218 return it->second;
219 }
220 return 0;
221 }

◆ GetLastBox()

template<typename T >
virtual G4ITBox * G4ITManager< T >::GetLastBox ( )
inlinevirtual

Implements G4VITManager.

Definition at line 232 of file G4ITManager.hh.

233 {
234 typename BoxMap::reverse_iterator it = fBox.rbegin();
235 if(it != fBox.rend())
236 {
237 return it->second;
238 }
239 return 0;
240 }

◆ GetNextBox()

template<typename T >
virtual G4ITBox * G4ITManager< T >::GetNextBox ( G4ITBox box)
inlinevirtual

Implements G4VITManager.

Definition at line 223 of file G4ITManager.hh.

224 {
225 if(box)
226 {
227 return box->GetNextBox();
228 }
229 return 0;
230 }
G4ITBox * GetNextBox()
Definition: G4ITBox.hh:127

◆ GetVerboseLevel()

template<typename T >
G4int G4ITManager< T >::GetVerboseLevel ( )
inline

Definition at line 178 of file G4ITManager.hh.

179 {
180 return fVerbose;
181 }
G4int fVerbose
Definition: G4ITManager.hh:59

◆ Instance()

◆ iUpdatePositionMap()

template<typename T >
static void G4ITManager< T >::iUpdatePositionMap ( )
static

◆ NbElements()

template<typename T >
G4int G4ITManager< T >::NbElements ( const G4IT )

◆ Push()

template<typename T >
virtual void G4ITManager< T >::Push ( G4Track )
virtual

Implements G4VITManager.

◆ SetVerboseLevel()

template<typename T >
void G4ITManager< T >::SetVerboseLevel ( G4int  level)
inline

Definition at line 174 of file G4ITManager.hh.

175 {
176 fVerbose = level;
177 }

◆ UpdatePositionMap()

template<typename T >
virtual void G4ITManager< T >::UpdatePositionMap ( )
virtual

Implements G4VITManager.


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