Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AllITFinder Class Reference

#include <G4AllITFinder.hh>

Public Member Functions

 ~G4AllITFinder ()
 
G4VITFinderGetInstance (G4ITType)
 
G4ITBoxGetBox (const G4Track *)
 
void RegisterManager (G4VITFinder *manager)
 
void Push (G4Track *track)
 
void SetVerboseLevel (G4int level)
 
G4int GetVerboseLevel ()
 
void UpdatePositionMap ()
 
template<typename T >
G4KDTreeResultHandle FindNearest (const G4ThreeVector &pos, const T *it)
 
template<typename T >
G4KDTreeResultHandle FindNearest (const T *it0, const T *it)
 
template<typename T >
G4KDTreeResultHandle FindNearestInRange (const G4ThreeVector &pos, const T *it, G4double range)
 
template<typename T >
G4KDTreeResultHandle FindNearestInRange (const T *it0, const T *it, G4double range)
 

Static Public Member Functions

static G4AllITFinderInstance ()
 
static void DeleteInstance ()
 

Detailed Description

Holds all IT Manager, and take care of deleting them when AllITManager is deleted Set general verbose for all IT Manager

Definition at line 70 of file G4AllITFinder.hh.

Constructor & Destructor Documentation

◆ ~G4AllITFinder()

G4AllITFinder::~G4AllITFinder ( )

To delete the Instance you should use DeleteInstance() rather than the destructor

Definition at line 61 of file G4AllITFinder.cc.

62{
63 std::map<G4ITType, G4VITFinder*>::iterator it;
64 std::map<G4ITType, G4VITFinder*>::iterator it_tmp;
65
66 for (it = fITSubManager.begin(); it != fITSubManager.end();)
67 {
68 if (it->second) delete it->second;
69 it_tmp = it;
70 it++;
71 fITSubManager.erase(it_tmp);
72 }
73 fpInstance = 0;
74}

Member Function Documentation

◆ DeleteInstance()

void G4AllITFinder::DeleteInstance ( )
static

Definition at line 52 of file G4AllITFinder.cc.

53{
54 if (fpInstance)
55 {
56 delete fpInstance;
57 fpInstance = 0;
58 }
59}

Referenced by G4Scheduler::ClearList().

◆ FindNearest() [1/2]

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearest ( const G4ThreeVector pos,
const T *  it 
)
inline

Definition at line 126 of file G4AllITFinder.hh.

128 {
129 return G4ITFinder<T>::Instance()->FindNearest(pos, it);
130 }
G4KDTreeResultHandle FindNearest(const G4ThreeVector &, G4int key)
static G4ITFinder * Instance()

◆ FindNearest() [2/2]

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

Definition at line 133 of file G4AllITFinder.hh.

135 {
136 return G4ITFinder<T>::Instance()->FindNearest(it0, it);
137 }

◆ FindNearestInRange() [1/2]

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearestInRange ( const G4ThreeVector pos,
const T *  it,
G4double  range 
)
inline

Definition at line 140 of file G4AllITFinder.hh.

143 {
144 return G4ITFinder<T>::Instance()->FindNearestInRange(pos, it, range);
145 }
G4KDTreeResultHandle FindNearestInRange(const T *point, G4int key, G4double)

◆ FindNearestInRange() [2/2]

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearestInRange ( const T *  it0,
const T *  it,
G4double  range 
)
inline

Definition at line 148 of file G4AllITFinder.hh.

151 {
152 return G4ITFinder<T>::Instance()->FindNearestInRange(it0, it, range);
153 }

◆ GetBox()

G4ITBox * G4AllITFinder::GetBox ( const G4Track )

◆ GetInstance()

G4VITFinder * G4AllITFinder::GetInstance ( G4ITType  type)

Definition at line 86 of file G4AllITFinder.cc.

87{
88 map<G4ITType, G4VITFinder*>::iterator it = fITSubManager.find(type);
89
90 if (it == fITSubManager.end()) return 0;
91
92 return it->second;
93}

◆ GetVerboseLevel()

G4int G4AllITFinder::GetVerboseLevel ( )
inline

Definition at line 96 of file G4AllITFinder.hh.

97 {
98 return fVerbose;
99 }

◆ Instance()

G4AllITFinder * G4AllITFinder::Instance ( )
static

Definition at line 46 of file G4AllITFinder.cc.

47{
48 if (!fpInstance) fpInstance = new G4AllITFinder();
49 return fpInstance;
50}

◆ Push()

void G4AllITFinder::Push ( G4Track track)

Definition at line 100 of file G4AllITFinder.cc.

101{
102 fITSubManager[GetIT(track)->GetITType()]->Push(track);
103}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
virtual const G4ITType GetITType() const =0

◆ RegisterManager()

void G4AllITFinder::RegisterManager ( G4VITFinder manager)

Definition at line 95 of file G4AllITFinder.cc.

96{
97 fITSubManager[manager->GetITType()] = manager;
98}
virtual G4ITType GetITType()=0

◆ SetVerboseLevel()

void G4AllITFinder::SetVerboseLevel ( G4int  level)
inline

Set General verbose for all IT Manager See ITManager builder

Definition at line 92 of file G4AllITFinder.hh.

93 {
94 fVerbose = level;
95 }

◆ UpdatePositionMap()

void G4AllITFinder::UpdatePositionMap ( )

Definition at line 76 of file G4AllITFinder.cc.

77{
78 std::map<G4ITType, G4VITFinder*>::iterator it = fITSubManager.begin();
79
80 for (; it != fITSubManager.end(); it++)
81 {
82 it->second->UpdatePositionMap();
83 }
84}

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