library: libGeomPainter
#include "TGeoChecker.h"


class description - header file - source file
viewCVS header - viewCVS source

class TGeoChecker: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
TGeoChecker(TGeoManager* geom)
TGeoChecker(const TGeoChecker&)
TGeoChecker(const char* treename, const char* filename)
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidCheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const
voidCheckOverlaps(const TGeoVolume* vol, Double_t ovlp = 0.1, Option_t* option = "") const
voidCheckOverlapsBySampling(TGeoVolume* vol, Double_t ovlp = 0.1, Int_t npoints = 1000000) const
voidCheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t* option = "")
Double_tCheckVoxels(TGeoVolume* vol, TGeoVoxelFinder* voxels, Double_t* xyz, Int_t npoints)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
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 = "")
virtual voidTObject::ls(Option_t* option = "") const
TGeoOverlap*MakeCheckOverlap(const char* name, TGeoVolume* vol1, TGeoVolume* vol2, TGeoMatrix* mat1, TGeoMatrix* mat2, Bool_t isovlp, Double_t ovlp)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TGeoChecker&operator=(const TGeoChecker&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
voidPrintOverlaps() const
voidRandomPoints(TGeoVolume* vol, Int_t npoints, Option_t* option)
voidRandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
TGeoNode*SamplePoints(Int_t npoints, Double_t& dist, Double_t epsil, const char* g3path)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidShootRay(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
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
voidTest(Int_t npoints, Option_t* option)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidTestOverlaps(const char* path)
Bool_tTestVoxels(TGeoVolume* vol, Int_t npoints = 1000000)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
Double_tWeight(Double_t precision = 0.01, Option_t* option = "v")
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidCleanPoints(Double_t* points, Int_t& numPoints) const

Data Members

enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
TGeoManager*fGeoManagerpointer to geometry manager
TGeoVolume*fVsafevolume to which a safety sphere node was added
TBuffer3D*fBuff1Buffer containing mesh vertices for first volume
TBuffer3D*fBuff2Buffer containing mesh vertices for second volume

Class Description

   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.

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

 This method can be called direcly 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).

 2. 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. 

 3. 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 untill they exit geometry, plotting
 all segments crossing visible nodes in the same color as these.

 4. 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.

 5. 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.

 6. TGeoChecker::Weigth(Double_t precision)

 Implementation of TGeoVolume::Weigth(). Estimates the total weigth of a given 
 volume by matrial sampling. Accepts as input the desired precision.

 Overlap checker

  -> add it from the doc.

<img src="gif/t_checker.jpg">
 Default constructor
TGeoChecker(TGeoManager *geom)
 Constructor for a given geometry
TGeoChecker(const char * /*treename*/, const char * /*filename*/)
void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz)
 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.
void CleanPoints(Double_t *points, Int_t &numPoints)
 Clean-up the mesh of pcon/pgon from useless points
TGeoOverlap * 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.
void CheckOverlapsBySampling(TGeoVolume *vol, Double_t ovlp, Int_t npoints)
 Check illegal overlaps for volume VOL within a limit OVLP by sampling npoints
 inside the volume shape.
void CheckOverlaps(const TGeoVolume *vol, Double_t ovlp, Option_t *option)
 Check illegal overlaps for volume VOL within a limit OVLP.
void PrintOverlaps()
 Print the current list of overlaps held by the manager class.
void CheckPoint(Double_t x, Double_t y, Double_t z, Option_t *)
--- Draw point (x,y,z) over the picture of the daughers 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.
TH2F * LegoPlot(Int_t ntheta, Double_t themin, Double_t themax, Int_t nphi, Double_t phimin, Double_t phimax, Double_t /*rmin*/, Double_t /*rmax*/, Option_t *option)
 Generate a lego plot fot the top volume, according to option.
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)
 Randomly shoot nrays from point (startx,starty,startz) and plot intersections 
 with surfaces for current top node.
TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char* g3path)
 shoot npoints randomly in a box of 1E-5 arround current point.
 return minimum distance to points outside
 make sure that path to current node is updated
 get the response of tgeo
void 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)
 Shoot one ray from start point with direction (dirx,diry,dirz). Fills input array
 with points just after boundary crossings.
   Int_t array_dimension = 3*dim;
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. 
Double_t Weight(Double_t precision, Option_t *option)
 Estimate weight of top level volume with a precision SIGMA(W)/W
 better than PRECISION. Option can be "v" - verbose (default).
Double_t CheckVoxels(TGeoVolume *vol, TGeoVoxelFinder *voxels, Double_t *xyz, Int_t npoints)
 count voxel timing
Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints)
 Returns optimal voxelization type for volume vol.
   kFALSE - cartesian
   kTRUE  - cylindrical

Author: Andrei Gheata 01/11/01
Last update: root/geom:$Name: $:$Id: TGeoChecker.cxx,v 1.46 2006/11/03 21:22:32 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

ROOT page - Class index - Class Hierarchy - Top of the page

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.