Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoChecker Class Reference

Geometry checking package.

TGeoChecker class provides several geometry checking methods. There are two types of tests that can be performed. One is based on random sampling or ray-tracing and provides a visual check on how navigation methods work for a given geometry. The second actually checks the validity of the geometry definition in terms of overlapping/extruding objects. Both types of checks can be done for a given branch (starting with a given volume) as well as for the geometry as a whole.

TGeoChecker::CheckPoint(Double_t x, Double_t y, Double_t z)

This method can be called directly from the TGeoManager class and print a report on how a given point is classified by the modeller: which is the full path to the deepest node containing it, and the (under)estimation of the distance to the closest boundary (safety).

TGeoChecker::RandomPoints(Int_t npoints)

Can be called from TGeoVolume class. It first draws the volume and its content with the current visualization settings. Then randomly samples points in its bounding box, plotting in the geometry display only the points classified as belonging to visible volumes.

TGeoChecker::RandomRays(Int_t nrays, Double_t startx, starty, startz)

Can be called and acts in the same way as the previous, but instead of points, rays having random isotropic directions are generated from the given point. A raytracing algorithm propagates all rays until they exit geometry, plotting all segments crossing visible nodes in the same color as these.

TGeoChecker::Test(Int_t npoints)

Implementation of TGeoManager::Test(). Computes the time for the modeller to find out "Where am I?" for a given number of random points.

TGeoChecker::LegoPlot(ntheta, themin, themax, nphi, phimin, phimax,...)

Implementation of TGeoVolume::LegoPlot(). Draws a spherical radiation length lego plot for a given volume, in a given theta/phi range.

TGeoChecker::Weight(Double_t precision)

Implementation of TGeoVolume::Weight(). Estimates the total weight of a given volume by material sampling. Accepts as input the desired precision.

Definition at line 37 of file TGeoChecker.h.

Public Member Functions

 TGeoChecker ()
 Default constructor.
 
 TGeoChecker (TGeoManager *geom)
 Constructor for a given geometry.
 
virtual ~TGeoChecker ()
 Destructor.
 
virtual void CheckBoundaryErrors (Int_t ntracks=1000000, Double_t radius=-1.)
 Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNextBoundary.
 
virtual void CheckBoundaryReference (Int_t icheck=-1)
 Check the boundary errors reference file created by CheckBoundaryErrors method.
 
void CheckGeometry (Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const
 Shoot nrays with random directions from starting point (startx, starty, startz) in the reference frame of this volume.
 
void CheckGeometryFull (Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=NULL)
 Geometry checking.
 
void CheckOverlaps (const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option="")
 Check illegal overlaps for volume VOL within a limit OVLP.
 
void CheckOverlapsBySampling (TGeoVolume *vol, Double_t ovlp=0.1, Int_t npoints=1000000) const
 Check illegal overlaps for volume VOL within a limit OVLP by sampling npoints inside the volume shape.
 
void CheckPoint (Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="")
 Draw point (x,y,z) over the picture of the daughters of the volume containing this point.
 
void CheckShape (TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
 Test for shape navigation methods.
 
Double_t CheckVoxels (TGeoVolume *vol, TGeoVoxelFinder *voxels, Double_t *xyz, Int_t npoints)
 count voxel timing
 
TH2FLegoPlot (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="")
 Generate a lego plot fot the top volume, according to option.
 
TGeoOverlapMakeCheckOverlap (const char *name, TGeoVolume *vol1, TGeoVolume *vol2, TGeoMatrix *mat1, TGeoMatrix *mat2, Bool_t isovlp, Double_t ovlp)
 Check if the 2 non-assembly volume candidates overlap/extrude. Returns overlap object.
 
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="")
 Print current operation progress.
 
void PrintOverlaps () const
 Print the current list of overlaps held by the manager class.
 
void RandomPoints (TGeoVolume *vol, Int_t npoints, Option_t *option)
 Draw random points in the bounding box of a volume.
 
void RandomRays (Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE)
 Randomly shoot nrays from point (startx,starty,startz) and plot intersections with surfaces for current top node.
 
TGeoNodeSamplePoints (Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path)
 shoot npoints randomly in a box of 1E-5 around current point.
 
void SetNmeshPoints (Int_t npoints=1000)
 Set number of points to be generated on the shape outline when checking for overlaps.
 
void SetSelectedNode (TGeoNode *node)
 
void ShapeDistances (TGeoShape *shape, Int_t nsamples, Option_t *option)
 Test TGeoShape::DistFromInside/Outside.
 
void ShapeNormal (TGeoShape *shape, Int_t nsamples, Option_t *option)
 Check of validity of the normal for a given shape.
 
void ShapeSafety (TGeoShape *shape, Int_t nsamples, Option_t *option)
 Check of validity of safe distance for a given shape.
 
Double_tShootRay (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
 Shoot one ray from start point with direction (dirx,diry,dirz).
 
void Test (Int_t npoints, Option_t *option)
 Check time of finding "Where am I" for n points.
 
void TestOverlaps (const char *path)
 Geometry overlap checker based on sampling.
 
Bool_t TestVoxels (TGeoVolume *vol, Int_t npoints=1000000)
 Returns optimal voxelization type for volume vol.
 
Double_t Weight (Double_t precision=0.01, Option_t *option="v")
 Estimate weight of top level volume with a precision SIGMA(W)/W better than PRECISION.
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Private Member Functions

void CleanPoints (Double_t *points, Int_t &numPoints) const
 Number of points on mesh to be checked.
 
Int_t NChecksPerVolume (TGeoVolume *vol)
 Compute number of overlaps combinations to check per volume.
 
Int_t PropagateInGeom (Double_t *, Double_t *)
 Propagate from START along DIR from boundary to boundary until exiting geometry.
 
void Score (TGeoVolume *, Int_t, Double_t)
 Score a hit for VOL.
 
Double_t TimingPerVolume (TGeoVolume *)
 Compute timing per "FindNextBoundary" + "Safety" call.
 

Private Attributes

TBuffer3DfBuff1
 
TBuffer3DfBuff2
 
Bool_tfFlags
 Array of timing per volume.
 
Bool_t fFullCheck
 
TGeoManagerfGeoManager
 
Int_t fNchecks
 Selected node for overlap checking.
 
Int_t fNmeshPoints
 Number of checks for current volume.
 
TGeoNodefSelectedNode
 Timer.
 
TStopwatchfTimer
 Array of flags per volume.
 
Double_tfVal1
 
Double_tfVal2
 Array of number of crossings per volume.
 
TGeoVolumefVsafe
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

#include <TGeoChecker.h>

Inheritance diagram for TGeoChecker:
[legend]

Constructor & Destructor Documentation

◆ TGeoChecker() [1/2]

TGeoChecker::TGeoChecker ( )

Default constructor.

Definition at line 95 of file TGeoChecker.cxx.

◆ TGeoChecker() [2/2]

TGeoChecker::TGeoChecker ( TGeoManager geom)

Constructor for a given geometry.

Definition at line 115 of file TGeoChecker.cxx.

◆ ~TGeoChecker()

TGeoChecker::~TGeoChecker ( )
virtual

Destructor.

Definition at line 137 of file TGeoChecker.cxx.

Member Function Documentation

◆ CheckBoundaryErrors()

void TGeoChecker::CheckBoundaryErrors ( Int_t  ntracks = 1000000,
Double_t  radius = -1. 
)
virtual

Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNextBoundary.

If radius is not mentioned the full bounding box will be sampled.

Definition at line 238 of file TGeoChecker.cxx.

◆ CheckBoundaryReference()

void TGeoChecker::CheckBoundaryReference ( Int_t  icheck = -1)
virtual

Check the boundary errors reference file created by CheckBoundaryErrors method.

The shape for which the crossing failed is drawn with the starting point in red and the extrapolated point to boundary (+/- failing push/pull) in yellow.

Definition at line 381 of file TGeoChecker.cxx.

◆ CheckGeometry()

void TGeoChecker::CheckGeometry ( Int_t  nrays,
Double_t  startx,
Double_t  starty,
Double_t  startz 
) const

Shoot nrays with random directions from starting point (startx, starty, startz) in the reference frame of this volume.

Track each ray until exiting geometry, then shoot backwards from exiting point and compare boundary crossing points.

Definition at line 774 of file TGeoChecker.cxx.

◆ CheckGeometryFull()

void TGeoChecker::CheckGeometryFull ( Bool_t  checkoverlaps = kTRUE,
Bool_t  checkcrossings = kTRUE,
Int_t  ntracks = 10000,
const Double_t vertex = NULL 
)

Geometry checking.

Optional overlap checkings (by sampling and by mesh). Optional boundary crossing check + timing per volume.

STAGE 1: extensive overlap checking by sampling per volume. Stdout need to be checked by user to get report, then TGeoVolume::CheckOverlaps(0.01, "s") can be called for the suspicious volumes.

STAGE 2: normal overlap checking using the shapes mesh - fills the list of overlaps.

STAGE 3: shooting NRAYS rays from VERTEX and counting the total number of crossings per volume (rays propagated from boundary to boundary until geometry exit). Timing computed and results stored in a histo.

STAGE 4: shooting 1 mil. random rays inside EACH volume and calling FindNextBoundary() + Safety() for each call. The timing is normalized by the number of crossings computed at stage 2 and presented as percentage. One can get a picture on which are the most "burned" volumes during transportation from geometry point of view. Another plot of the timing per volume vs. number of daughters is produced.

All histos are saved in the file statistics.root

Definition at line 474 of file TGeoChecker.cxx.

◆ CheckOverlaps()

void TGeoChecker::CheckOverlaps ( const TGeoVolume vol,
Double_t  ovlp = 0.1,
Option_t option = "" 
)

Check illegal overlaps for volume VOL within a limit OVLP.

Definition at line 1352 of file TGeoChecker.cxx.

◆ CheckOverlapsBySampling()

void TGeoChecker::CheckOverlapsBySampling ( TGeoVolume vol,
Double_t  ovlp = 0.1,
Int_t  npoints = 1000000 
) const

Check illegal overlaps for volume VOL within a limit OVLP by sampling npoints inside the volume shape.

Definition at line 1139 of file TGeoChecker.cxx.

◆ CheckPoint()

void TGeoChecker::CheckPoint ( Double_t  x = 0,
Double_t  y = 0,
Double_t  z = 0,
Option_t option = "" 
)

Draw point (x,y,z) over the picture of the daughters of the volume containing this point.

Generates a report regarding the path to the node containing this point and the distance to the closest boundary.

Definition at line 1583 of file TGeoChecker.cxx.

◆ CheckShape()

void TGeoChecker::CheckShape ( TGeoShape shape,
Int_t  testNo,
Int_t  nsamples,
Option_t option 
)

Test for shape navigation methods.

Summary for test numbers:

  • 1: DistFromInside/Outside. Sample points inside the shape. Generate directions randomly in cos(theta). Compute DistFromInside and move the point with bigger distance. Compute DistFromOutside back from new point. Plot d-(d1+d2)
  • 2: Safety test. Sample points inside the bounding and compute safety. Generate directions randomly in cos(theta) and compute distance to boundary. Check if distance to boundary is bigger than safety

Definition at line 1638 of file TGeoChecker.cxx.

◆ CheckVoxels()

Double_t TGeoChecker::CheckVoxels ( TGeoVolume vol,
TGeoVoxelFinder voxels,
Double_t xyz,
Int_t  npoints 
)

count voxel timing

Definition at line 2777 of file TGeoChecker.cxx.

◆ CleanPoints()

void TGeoChecker::CleanPoints ( Double_t points,
Int_t numPoints 
) const
private

Number of points on mesh to be checked.

Clean-up the mesh of pcon/pgon from useless points.

Definition at line 950 of file TGeoChecker.cxx.

◆ LegoPlot()

TH2F * TGeoChecker::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 = "" 
)

Generate a lego plot fot the top volume, according to option.

Definition at line 2043 of file TGeoChecker.cxx.

◆ MakeCheckOverlap()

TGeoOverlap * TGeoChecker::MakeCheckOverlap ( const char *  name,
TGeoVolume vol1,
TGeoVolume vol2,
TGeoMatrix mat1,
TGeoMatrix mat2,
Bool_t  isovlp,
Double_t  ovlp 
)

Check if the 2 non-assembly volume candidates overlap/extrude. Returns overlap object.

Definition at line 971 of file TGeoChecker.cxx.

◆ NChecksPerVolume()

Int_t TGeoChecker::NChecksPerVolume ( TGeoVolume vol)
private

Compute number of overlaps combinations to check per volume.

Definition at line 1263 of file TGeoChecker.cxx.

◆ OpProgress()

void TGeoChecker::OpProgress ( const char *  opname,
Long64_t  current,
Long64_t  size,
TStopwatch watch = 0,
Bool_t  last = kFALSE,
Bool_t  refresh = kFALSE,
const char *  msg = "" 
)

Print current operation progress.

Definition at line 147 of file TGeoChecker.cxx.

◆ PrintOverlaps()

void TGeoChecker::PrintOverlaps ( ) const

Print the current list of overlaps held by the manager class.

Definition at line 1570 of file TGeoChecker.cxx.

◆ PropagateInGeom()

Int_t TGeoChecker::PropagateInGeom ( Double_t start,
Double_t dir 
)
private

Propagate from START along DIR from boundary to boundary until exiting geometry.

Fill array of hits.

Definition at line 643 of file TGeoChecker.cxx.

◆ RandomPoints()

void TGeoChecker::RandomPoints ( TGeoVolume vol,
Int_t  npoints,
Option_t option 
)

Draw random points in the bounding box of a volume.

Definition at line 2121 of file TGeoChecker.cxx.

◆ RandomRays()

void TGeoChecker::RandomRays ( Int_t  nrays,
Double_t  startx,
Double_t  starty,
Double_t  startz,
const char *  target_vol = 0,
Bool_t  check_norm = kFALSE 
)

Randomly shoot nrays from point (startx,starty,startz) and plot intersections with surfaces for current top node.

Definition at line 2193 of file TGeoChecker.cxx.

◆ SamplePoints()

TGeoNode * TGeoChecker::SamplePoints ( Int_t  npoints,
Double_t dist,
Double_t  epsil,
const char *  g3path 
)

shoot npoints randomly in a box of 1E-5 around current point.

return minimum distance to points outside make sure that path to current node is updated get the response of tgeo

Definition at line 2333 of file TGeoChecker.cxx.

◆ Score()

void TGeoChecker::Score ( TGeoVolume vol,
Int_t  ifield,
Double_t  value 
)
private

Score a hit for VOL.

Definition at line 680 of file TGeoChecker.cxx.

◆ SetNmeshPoints()

void TGeoChecker::SetNmeshPoints ( Int_t  npoints = 1000)

Set number of points to be generated on the shape outline when checking for overlaps.

Definition at line 695 of file TGeoChecker.cxx.

◆ SetSelectedNode()

void TGeoChecker::SetSelectedNode ( TGeoNode node)
inline

Definition at line 88 of file TGeoChecker.h.

◆ ShapeDistances()

void TGeoChecker::ShapeDistances ( TGeoShape shape,
Int_t  nsamples,
Option_t option 
)

Test TGeoShape::DistFromInside/Outside.

Sample points inside the shape. Generate directions randomly in cos(theta). Compute d1 = DistFromInside and move the point on the boundary. Compute DistFromOutside and propagate with d2 making sure that the shape is not re-entered. Swap direction and call DistFromOutside that should fall back on the same point on the boundary (at d2). Propagate back on boundary then compute DistFromInside that should be bigger than d1. Plot d-(d1+d2)

Definition at line 1664 of file TGeoChecker.cxx.

◆ ShapeNormal()

void TGeoChecker::ShapeNormal ( TGeoShape shape,
Int_t  nsamples,
Option_t option 
)

Check of validity of the normal for a given shape.

Sample points inside the shape. Generate directions randomly in cos(theta) and propagate to boundary. Compute normal and safety at crossing point, plot the point and generate a random direction so that (dir) dot (norm) <0.

Definition at line 1889 of file TGeoChecker.cxx.

◆ ShapeSafety()

void TGeoChecker::ShapeSafety ( TGeoShape shape,
Int_t  nsamples,
Option_t option 
)

Check of validity of safe distance for a given shape.

Sample points inside the 2x bounding box and compute safety. Generate directions randomly in cos(theta) and compute distance to boundary. Check if distance to boundary is bigger than safety.

Definition at line 1819 of file TGeoChecker.cxx.

◆ ShootRay()

Double_t * TGeoChecker::ShootRay ( Double_t start,
Double_t  dirx,
Double_t  diry,
Double_t  dirz,
Double_t array,
Int_t nelem,
Int_t dim,
Double_t endpoint = 0 
) const

Shoot one ray from start point with direction (dirx,diry,dirz).

Fills input array with points just after boundary crossings.

Definition at line 2443 of file TGeoChecker.cxx.

◆ Test()

void TGeoChecker::Test ( Int_t  npoints,
Option_t option 
)

Check time of finding "Where am I" for n points.

Definition at line 2534 of file TGeoChecker.cxx.

◆ TestOverlaps()

void TGeoChecker::TestOverlaps ( const char *  path)

Geometry overlap checker based on sampling.

Definition at line 2584 of file TGeoChecker.cxx.

◆ TestVoxels()

Bool_t TGeoChecker::TestVoxels ( TGeoVolume vol,
Int_t  npoints = 1000000 
)

Returns optimal voxelization type for volume vol.

  • kFALSE - cartesian
  • kTRUE - cylindrical

Definition at line 2814 of file TGeoChecker.cxx.

◆ TimingPerVolume()

Double_t TGeoChecker::TimingPerVolume ( TGeoVolume vol)
private

Compute timing per "FindNextBoundary" + "Safety" call.

Volume must be in the current path.

Definition at line 707 of file TGeoChecker.cxx.

◆ Weight()

Double_t TGeoChecker::Weight ( Double_t  precision = 0.01,
Option_t option = "v" 
)

Estimate weight of top level volume with a precision SIGMA(W)/W better than PRECISION.

Option can be "v" - verbose (default).

Definition at line 2702 of file TGeoChecker.cxx.

Member Data Documentation

◆ fBuff1

TBuffer3D* TGeoChecker::fBuff1
private

Definition at line 43 of file TGeoChecker.h.

◆ fBuff2

TBuffer3D* TGeoChecker::fBuff2
private

Definition at line 44 of file TGeoChecker.h.

◆ fFlags

Bool_t* TGeoChecker::fFlags
private

Array of timing per volume.

Definition at line 48 of file TGeoChecker.h.

◆ fFullCheck

Bool_t TGeoChecker::fFullCheck
private

Definition at line 45 of file TGeoChecker.h.

◆ fGeoManager

TGeoManager* TGeoChecker::fGeoManager
private

Definition at line 41 of file TGeoChecker.h.

◆ fNchecks

Int_t TGeoChecker::fNchecks
private

Selected node for overlap checking.

Definition at line 51 of file TGeoChecker.h.

◆ fNmeshPoints

Int_t TGeoChecker::fNmeshPoints
private

Number of checks for current volume.

Definition at line 52 of file TGeoChecker.h.

◆ fSelectedNode

TGeoNode* TGeoChecker::fSelectedNode
private

Timer.

Definition at line 50 of file TGeoChecker.h.

◆ fTimer

TStopwatch* TGeoChecker::fTimer
private

Array of flags per volume.

Definition at line 49 of file TGeoChecker.h.

◆ fVal1

Double_t* TGeoChecker::fVal1
private

Definition at line 46 of file TGeoChecker.h.

◆ fVal2

Double_t* TGeoChecker::fVal2
private

Array of number of crossings per volume.

Definition at line 47 of file TGeoChecker.h.

◆ fVsafe

TGeoVolume* TGeoChecker::fVsafe
private

Definition at line 42 of file TGeoChecker.h.

Libraries for TGeoChecker:

The documentation for this class was generated from the following files: