Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualGeoChecker.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9#ifndef ROOT_TVirtualGeoChecker
10#define ROOT_TVirtualGeoChecker
11
12#include <vector>
13
14#include "TObject.h"
16
17class TGeoVolume;
18class TGeoShape;
19class TGeoNode;
20class TGeoManager;
21class TH2F;
22class TStopwatch;
23
25protected:
26 static TVirtualGeoChecker *fgGeoChecker; // Pointer to checker instance
27 Int_t fNmeshPoints{1000}; // Number of mesh points per shape
28public:
30 ~TVirtualGeoChecker() override;
31
32 virtual void BuildMeshPointsCache(const std::vector<TGeoOverlapCandidate> &candidates) = 0;
33 virtual void
34 CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t *option = "", Double_t safety = 0.) = 0;
36 virtual void CheckBoundaryErrors(Int_t ntracks = 1000000, Double_t radius = -1.) = 0;
37 virtual void CheckBoundaryReference(Int_t icheck = -1) = 0;
39 const Double_t *vertex = nullptr) = 0;
41 virtual void CheckOverlapsBySampling(const TGeoVolume *vol, Double_t ovlp = 0.1, Int_t npoints = 1000000) const = 0;
44 std::vector<TGeoOverlapCandidate> &out) = 0;
45 Int_t GetNmeshPoints() const { return fNmeshPoints; }
46 virtual TH2F *LegoPlot(Int_t ntheta = 60, Double_t themin = 0., Double_t themax = 180., Int_t nphi = 90,
47 Double_t phimin = 0., Double_t phimax = 360., Double_t rmin = 0., Double_t rmax = 9999999,
48 Option_t *option = "") = 0;
49 virtual void PrintOverlaps() const = 0;
52 const char *target_vol = nullptr, Bool_t check_norm = kFALSE) = 0;
53 virtual void MaterializeOverlap(const TGeoOverlapResult &r) = 0;
54 virtual void OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch = nullptr,
55 Bool_t last = kFALSE, Bool_t refresh = kFALSE, const char *msg = "") = 0;
56 virtual TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path) = 0;
57 virtual void SetSelectedNode(TGeoNode *node) = 0;
58 void SetNmeshPoints(Int_t npoints = 1000);
59 virtual void Test(Int_t npoints, Option_t *option) = 0;
60 virtual void TestOverlaps(const char *path) = 0;
61 virtual Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints = 1000000) = 0;
62 virtual Double_t Weight(Double_t precision = 0.01, Option_t *option = "v") = 0;
63
65
66 ClassDefOverride(TVirtualGeoChecker, 0) // Abstract interface for geometry painters
67};
68
69#endif
#define c(i)
Definition RSha256.hxx:101
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
The manager class for any TGeo geometry.
Definition TGeoManager.h:46
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
Base abstract class for all shapes.
Definition TGeoShape.h:25
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
2-D histogram with a float per channel (see TH1 documentation)
Definition TH2.h:345
Mother of all ROOT objects.
Definition TObject.h:41
Stopwatch class.
Definition TStopwatch.h:28
Abstract class for geometry checkers.
virtual void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const =0
virtual void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="", Double_t safety=0.)=0
virtual Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints=1000000)=0
static TVirtualGeoChecker * fgGeoChecker
virtual void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=nullptr)=0
virtual void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)=0
TVirtualGeoChecker * GeoChecker()
Static function returning a pointer to the geometry checker.
virtual void RandomPoints(TGeoVolume *vol, Int_t npoints, Option_t *option)=0
virtual void BuildMeshPointsCache(const std::vector< TGeoOverlapCandidate > &candidates)=0
void SetNmeshPoints(Int_t npoints=1000)
Set number of points to be generated on the shape outline when checking for overlaps.
virtual void Test(Int_t npoints, Option_t *option)=0
virtual void MaterializeOverlap(const TGeoOverlapResult &r)=0
virtual void CheckBoundaryReference(Int_t icheck=-1)=0
virtual Double_t Weight(Double_t precision=0.01, Option_t *option="v")=0
virtual void CheckOverlapsBySampling(const TGeoVolume *vol, Double_t ovlp=0.1, Int_t npoints=1000000) const =0
~TVirtualGeoChecker() override
Geometry checker destructor.
virtual Bool_t ComputeOverlap(const TGeoOverlapCandidate &c, TGeoOverlapResult &out) const =0
virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)=0
virtual void PrintOverlaps() const =0
virtual TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path)=0
virtual void SetSelectedNode(TGeoNode *node)=0
virtual void TestOverlaps(const char *path)=0
virtual TH2F * LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180., Int_t nphi=90, Double_t phimin=0., Double_t phimax=360., Double_t rmin=0., Double_t rmax=9999999, Option_t *option="")=0
virtual void OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=nullptr, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg="")=0
virtual Int_t EnumerateOverlapCandidates(const TGeoVolume *vol, Double_t ovlp, Option_t *option, std::vector< TGeoOverlapCandidate > &out)=0
TVirtualGeoChecker()
Geometry checker default constructor.
Int_t GetNmeshPoints() const
virtual void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol=nullptr, Bool_t check_norm=kFALSE)=0
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17