#ifndef ROOT_TGeoVoxelFinder
#define ROOT_TGeoVoxelFinder
#ifndef ROOT_TObject
#include "TObject.h"
#endif
class TGeoVoxelFinder : public TObject
{
public:
enum EVoxelsType {
   kGeoInvalidVoxels = BIT(15),
   kGeoRebuildVoxels = BIT(16)
};
protected:
   TGeoVolume      *fVolume;          
   Int_t             fNcandidates;    
   Int_t             fCurrentVoxel;   
   Int_t             fIbx;            
   Int_t             fIby;            
   Int_t             fIbz;            
   Int_t             fNboxes;         
   Int_t             fNox;            
   Int_t             fNoy;            
   Int_t             fNoz;            
   Int_t             fNex;            
   Int_t             fNey;            
   Int_t             fNez;            
   Int_t             fNx;             
   Int_t             fNy;             
   Int_t             fNz;             
   Int_t             fPriority[3];    
   Int_t             fSlices[3];      
   Int_t             fInc[3];         
   Double_t          fInvdir[3];      
   Double_t          fLimits[3];      
   Double_t         *fBoxes;          
   Double_t         *fXb;             
   Double_t         *fYb;             
   Double_t         *fZb;             
   Int_t            *fOBx;            
   Int_t            *fOBy;            
   Int_t            *fOBz;            
   Int_t            *fOEx;            
   Int_t            *fOEy;            
   Int_t            *fOEz;            
   Int_t            *fIndX;           
   Int_t            *fIndY;           
   Int_t            *fIndZ;           
   Int_t            *fExtraX;         
   Int_t            *fExtraY;         
   Int_t            *fExtraZ;         
   Int_t            *fCheckList;      
   UChar_t          *fBits1;          
   TGeoVoxelFinder(const TGeoVoxelFinder&);
   TGeoVoxelFinder& operator=(const TGeoVoxelFinder&);
   
   virtual void        BuildVoxelLimits();
   Int_t              *GetExtraX(Int_t islice, Bool_t left, Int_t &nextra) const;
   Int_t              *GetExtraY(Int_t islice, Bool_t left, Int_t &nextra) const;
   Int_t              *GetExtraZ(Int_t islice, Bool_t left, Int_t &nextra) const;
   Bool_t              GetIndices(Double_t *point);
   Int_t               GetPriority(Int_t iaxis) const {return fPriority[iaxis];}
   Int_t               GetNcandidates() const         {return fNcandidates;}
   Int_t              *GetValidExtra(Int_t *list, Int_t &ncheck);
   Int_t              *GetValidExtra(Int_t n1, UChar_t *array1, Int_t *list, Int_t &ncheck);
   Int_t              *GetValidExtra(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2, Int_t *list, Int_t &ncheck);
   virtual Int_t      *GetVoxelCandidates(Int_t i, Int_t j, Int_t k, Int_t &ncheck);
   Bool_t              Intersect(Int_t n1, UChar_t *array1, Int_t &nf, Int_t *result); 
   Bool_t              Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
                             Int_t &nf, Int_t *result); 
   Bool_t              Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
                             Int_t n3, UChar_t *array3, Int_t &nf, Int_t *result); 
   Bool_t              IntersectAndStore(Int_t n1, UChar_t *array1); 
   Bool_t              IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2); 
   Bool_t              IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
                             Int_t n3, UChar_t *array3); 
   virtual void        SortAll(Option_t *option="");
   Bool_t              Union(Int_t n1, UChar_t *array1);
   Bool_t              Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2);
   Bool_t              Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *array2,
                             Int_t n3, UChar_t *array3);
public :
   TGeoVoxelFinder();
   TGeoVoxelFinder(TGeoVolume *vol);
   virtual ~TGeoVoxelFinder();
   void                CreateCheckList();
   void                DaughterToMother(Int_t id, Double_t *local, Double_t *master) const;
   virtual Double_t    Efficiency();
   virtual Int_t      *GetCheckList(Double_t *point, Int_t &nelem);
   Int_t              *GetCheckList(Int_t &nelem) const {nelem=fNcandidates; return fCheckList;}
   virtual Int_t      *GetNextCandidates(Double_t *point, Int_t &ncheck); 
   virtual void        FindOverlaps(Int_t inode) const;
   Bool_t              IsInvalid() const {return TObject::TestBit(kGeoInvalidVoxels);}
   Bool_t              NeedRebuild() const {return TObject::TestBit(kGeoRebuildVoxels);}
   Double_t           *GetBoxes() const {return fBoxes;}
   Bool_t              IsSafeVoxel(Double_t *point, Int_t inode, Double_t minsafe) const;
   virtual void        Print(Option_t *option="") const;
   void                PrintVoxelLimits(Double_t *point) const;
   void                SetInvalid(Bool_t flag=kTRUE) {TObject::SetBit(kGeoInvalidVoxels, flag);}
   void                SetNeedRebuild(Bool_t flag=kTRUE) {TObject::SetBit(kGeoRebuildVoxels, flag);}
   virtual Int_t      *GetNextVoxel(Double_t *point, Double_t *dir, Int_t &ncheck);
   void                SortCrossedVoxels(Double_t *point, Double_t *dir);
   virtual void        Voxelize(Option_t *option="");
   ClassDef(TGeoVoxelFinder, 2)                
};
class TGeoCylVoxels : public TGeoVoxelFinder
{
private:
   virtual void        SortAll(Option_t *option="");
   virtual void        BuildVoxelLimits();
public:
   TGeoCylVoxels();
   TGeoCylVoxels(TGeoVolume *vol);
   virtual ~TGeoCylVoxels();
   
   virtual Double_t    Efficiency();
   virtual void        FindOverlaps(Int_t inode) const;
   virtual Int_t      *GetCheckList(Double_t *point, Int_t &nelem);
   virtual Int_t      *GetNextVoxel(Double_t *point, Double_t *dir, Int_t &ncheck);
   Int_t               IntersectIntervals(Double_t vox1, Double_t vox2, Double_t phi1, Double_t phi2) const;
   virtual void        Print(Option_t *option="") const;
   virtual void        Voxelize(Option_t *option);
   ClassDef(TGeoCylVoxels, 2)                
};
class TGeoFullVoxels : public TGeoVoxelFinder
{
private:
   Int_t               fNvoxels;
   Int_t               fNvx;          
   Int_t               fNvy;          
   Int_t               fNvz;          
   UChar_t            *fVox;          
   TGeoFullVoxels(const TGeoFullVoxels&); 
   TGeoFullVoxels& operator=(const TGeoFullVoxels&); 
public:
   TGeoFullVoxels();
   TGeoFullVoxels(TGeoVolume *vol);
   virtual ~TGeoFullVoxels();
   
   virtual Int_t      *GetCheckList(Double_t *point, Int_t &nelem);
   UChar_t            *GetVoxel(Int_t i, Int_t j, Int_t k) const {return &fVox[(i*fNvy+j)*fNvz+k];}
   virtual Int_t      *GetVoxelCandidates(Int_t i, Int_t j, Int_t k, Int_t &ncheck);
   virtual void        Print(Option_t *option="") const;
   virtual void        Voxelize(Option_t *option);
   ClassDef(TGeoFullVoxels, 1)                
};
#endif
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.