12 #ifndef ROOT_TGeoChecker
13 #define ROOT_TGeoChecker
21 class TGeoVoxelFinder;
37 class TGeoChecker :
public TObject
41 TGeoManager *fGeoManager;
50 TGeoNode *fSelectedNode;
54 void CleanPoints(Double_t *points, Int_t &numPoints)
const;
55 Int_t NChecksPerVolume(TGeoVolume *vol);
56 Int_t PropagateInGeom(Double_t *, Double_t *);
57 void Score(TGeoVolume *, Int_t, Double_t);
58 Double_t TimingPerVolume(TGeoVolume *);
62 TGeoChecker(TGeoManager *geom);
64 virtual ~TGeoChecker();
66 virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.);
67 virtual void CheckBoundaryReference(Int_t icheck=-1);
68 void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000,
const Double_t *vertex=NULL);
69 void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz)
const;
70 void CheckOverlaps(
const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option=
"");
71 void CheckOverlapsBySampling(TGeoVolume *vol, Double_t ovlp=0.1, Int_t npoints=1000000)
const;
72 void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option=
"");
73 void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option);
74 Double_t CheckVoxels(TGeoVolume *vol, TGeoVoxelFinder *voxels, Double_t *xyz, Int_t npoints);
75 TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180.,
76 Int_t nphi=90, Double_t phimin=0., Double_t phimax=360.,
77 Double_t rmin=0., Double_t rmax=9999999, Option_t *option=
"");
78 void PrintOverlaps()
const;
79 void RandomPoints(TGeoVolume *vol, Int_t npoints, Option_t *option);
80 void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz,
const char *target_vol=0, Bool_t check_norm=kFALSE);
81 TGeoOverlap *MakeCheckOverlap(
const char *name, TGeoVolume *vol1, TGeoVolume *vol2, TGeoMatrix *mat1, TGeoMatrix *mat2, Bool_t isovlp, Double_t ovlp);
82 void OpProgress(
const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE,
const char *msg=
"");
83 TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil,
const char* g3path);
84 void ShapeDistances(TGeoShape *shape, Int_t nsamples, Option_t *option);
85 void ShapeSafety(TGeoShape *shape, Int_t nsamples, Option_t *option);
86 void ShapeNormal(TGeoShape *shape, Int_t nsamples, Option_t *option);
87 Double_t *ShootRay(Double_t *start, Double_t dirx, Double_t diry, Double_t dirz, Double_t *array, Int_t &nelem, Int_t &dim, Double_t *enpoint=0)
const;
88 void SetSelectedNode(TGeoNode *node) {fSelectedNode=node;}
89 void SetNmeshPoints(Int_t npoints=1000);
90 void Test(Int_t npoints, Option_t *option);
91 void TestOverlaps(
const char *path);
92 Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints=1000000);
93 Double_t Weight(Double_t precision=0.01, Option_t *option=
"v");
95 ClassDef(TGeoChecker, 2)