28#ifndef G4OctreeFinder_hh
29#define G4OctreeFinder_hh 1
54template<
typename CONTAINER>
60 return (*it)->GetPosition();
62 std::function<
G4bool(
const std::pair<typename CONTAINER::iterator,G4double>,
63 const std::pair<typename CONTAINER::iterator,G4double>)>
64 compareInterval = [](
const std::pair<typename CONTAINER::iterator,G4double>& iter1,
65 const std::pair<typename CONTAINER::iterator,G4double>& iter2)
68 return (std::get<1>(iter1) < std::get<1>(iter2));
73template<
class T,
typename CONTAINER>
78 using OctreeHandle = G4shared_ptr<Octree>;
79 using TreeMap = std::map<int, OctreeHandle>;
120 std::vector<std::pair<
typename
121 CONTAINER::iterator,
G4double>>& result,
122 G4bool isSort =
false)
const;
127 std::vector<std::pair<
typename
128 CONTAINER::iterator,
G4double>>& result,
129 G4bool isSort =
false)
const;
134 std::vector<std::pair<
typename
135 CONTAINER::iterator,
G4double>>& result,
136 G4bool isSort =
false)
const;
140 std::vector<std::pair<
141 typename CONTAINER::iterator,
G4double> >&
146#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