28#ifndef G4OctreeFinder_hh
29#define G4OctreeFinder_hh 1
57template<
typename CONTAINER>
63 return (*it)->GetPosition();
65 std::function<
G4bool(
const std::pair<typename CONTAINER::iterator,G4double>,
66 const std::pair<typename CONTAINER::iterator,G4double>)>
67 compareInterval = [](
const std::pair<typename CONTAINER::iterator,G4double>& iter1,
68 const std::pair<typename CONTAINER::iterator,G4double>& iter2)
71 return (std::get<1>(iter1) < std::get<1>(iter2));
76template<
class T,
typename CONTAINER>
82 using TreeMap = std::map<int, OctreeHandle>;
88 G4bool fIsOctreeUsed{
false};
89 G4bool fIsOctreeBuit{
false};
123 std::vector<std::pair<
typename
124 CONTAINER::iterator,
G4double>>& result,
125 G4bool isSort =
false)
const;
130 std::vector<std::pair<
typename
131 CONTAINER::iterator,
G4double>>& result,
132 G4bool isSort =
false)
const;
137 std::vector<std::pair<
typename
138 CONTAINER::iterator,
G4double>>& result,
139 G4bool isSort =
false)
const;
143 std::vector<std::pair<
144 typename CONTAINER::iterator,
G4double> >&
149#include "G4OctreeFinder.icc"
void FindNearestInRange(const G4ThreeVector &position, const G4int &key, G4double R, std::vector< std::pair< typename CONTAINER::iterator, G4double > > &result, G4bool isSort=false) const
void BuildTreeMap(const std::map< G4int, CONTAINER * > &listMap)
G4ITType GetITType() override
void SetOctreeUsed(G4bool used)
static G4OctreeFinder * Instance()
void FindNearestInRange(const G4Track &track, const int &key, G4double R, std::vector< std::pair< typename CONTAINER::iterator, G4double > > &result, G4bool isSort=false) const
G4bool IsOctreeUsed() const
G4int GetVerboseLevel() override
void FindNearest(const G4Track &track, const int &key, G4double R, std::vector< std::pair< typename CONTAINER::iterator, G4double > > &result, G4bool isSort=false) const
void SetVerboseLevel(G4int level) override
void FindNearestInRange(const G4ThreeVector &, G4double R, std::vector< std::pair< typename CONTAINER::iterator, G4double > > &result, G4bool isSorted) const
~G4OctreeFinder() override
void SetOctreeBuilt(G4bool used)
G4bool IsOctreeBuilt() const
virtual G4ITType GetITType()=0
virtual ~G4VFinder()=default
virtual void SetVerboseLevel(G4int level)=0
virtual G4int GetVerboseLevel()=0