12 #ifndef ROOT_TGeoVoxelFinder
13 #define ROOT_TGeoVoxelFinder
20 class TGeoVoxelFinder :
public TObject
24 kGeoInvalidVoxels = BIT(15),
25 kGeoRebuildVoxels = BIT(16)
29 TGeoVoxelFinder(
const TGeoVoxelFinder&);
30 TGeoVoxelFinder& operator=(
const TGeoVoxelFinder&);
69 void BuildVoxelLimits();
70 Int_t *GetExtraX(Int_t islice, Bool_t left, Int_t &nextra)
const;
71 Int_t *GetExtraY(Int_t islice, Bool_t left, Int_t &nextra)
const;
72 Int_t *GetExtraZ(Int_t islice, Bool_t left, Int_t &nextra)
const;
73 Bool_t GetIndices(
const Double_t *point, TGeoStateInfo &td);
74 Int_t GetPriority(Int_t iaxis)
const {
return fPriority[iaxis];}
75 Int_t GetNcandidates( TGeoStateInfo &td)
const;
76 Int_t *GetValidExtra(Int_t *list, Int_t &ncheck, TGeoStateInfo &td);
77 Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t *list, Int_t &ncheck, TGeoStateInfo &td);
78 Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2, Int_t *list, Int_t &ncheck, TGeoStateInfo &td);
79 Int_t *GetVoxelCandidates(Int_t i, Int_t j, Int_t k, Int_t &ncheck, TGeoStateInfo &td);
80 Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t &nf, Int_t *result);
81 Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
82 Int_t &nf, Int_t *result);
83 Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
84 Int_t n3, UChar_t *array3, Int_t &nf, Int_t *result);
85 Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, TGeoStateInfo &td);
86 Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2, TGeoStateInfo &td);
87 Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
88 Int_t n3, UChar_t *array3, TGeoStateInfo &td);
89 void SortAll(Option_t *option=
"");
90 Bool_t Union(Int_t n1, UChar_t *array1, TGeoStateInfo &td);
91 Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2, TGeoStateInfo &td);
92 Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
93 Int_t n3, UChar_t *array3, TGeoStateInfo &td);
96 TGeoVoxelFinder(TGeoVolume *vol);
97 virtual ~TGeoVoxelFinder();
98 void DaughterToMother(Int_t
id,
const Double_t *local, Double_t *master)
const;
99 virtual Double_t Efficiency();
100 virtual Int_t *GetCheckList(
const Double_t *point, Int_t &nelem, TGeoStateInfo &td);
101 Int_t *GetCheckList(Int_t &nelem, TGeoStateInfo &td)
const;
102 virtual Int_t *GetNextCandidates(
const Double_t *point, Int_t &ncheck, TGeoStateInfo &td);
103 virtual void FindOverlaps(Int_t inode)
const;
104 Bool_t IsInvalid()
const {
return TObject::TestBit(kGeoInvalidVoxels);}
105 Bool_t NeedRebuild()
const {
return TObject::TestBit(kGeoRebuildVoxels);}
106 Double_t *GetBoxes()
const {
return fBoxes;}
107 Bool_t IsSafeVoxel(
const Double_t *point, Int_t inode, Double_t minsafe)
const;
108 virtual void Print(Option_t *option=
"")
const;
109 void PrintVoxelLimits(
const Double_t *point)
const;
110 void SetInvalid(Bool_t flag=kTRUE) {TObject::SetBit(kGeoInvalidVoxels, flag);}
111 void SetNeedRebuild(Bool_t flag=kTRUE) {TObject::SetBit(kGeoRebuildVoxels, flag);}
112 virtual Int_t *GetNextVoxel(
const Double_t *point,
const Double_t *dir, Int_t &ncheck, TGeoStateInfo &td);
113 virtual void SortCrossedVoxels(
const Double_t *point,
const Double_t *dir, TGeoStateInfo &td);
114 virtual void Voxelize(Option_t *option=
"");
116 ClassDef(TGeoVoxelFinder, 4)