112 Error(
"ctor",
"volume not specified");
157 static Int_t icall = 0;
160 if (unique_volumes) {
195 Info(
"CheckOverlaps",
"Checking overlaps for %s and daughters within %g",
fVolume->
GetName(),ovlp);
197 Info(
"CheckOverlaps",
"Checking overlaps by sampling <%s> for %s and daughters", option,
fVolume->
GetName());
198 Info(
"CheckOverlaps",
"=== NOTE: Extrusions NOT checked with sampling option ! ===");
210 while ((node=next())) {
225 for (i=0; i<novlps; i++) {
230 Info(
"CheckOverlaps",
"Number of illegal overlaps/extrusions : %d\n", novlps);
243 if (!painter)
return dist;
255 if (!painter)
return;
266 if (!painter)
return 0;
284 printf(
"== Inspecting node %s ",
GetName());
289 printf(
" possibly overlapping with : ");
294 printf(
"Transformation matrix:\n");
337 if (!
fNovlp) {printf(
"node %s is ONLY\n",
GetName());
return;}
342 for (i=0; i<nd; i++) {
347 for (i=0; i<
fNovlp; i++) {
363 Int_t istart = ifree;
365 for (
Int_t id=0;
id<nd;
id++) {
367 array[istart+
id] = ifree;
368 array[ifree++] = ++nodeid;
383 while ((daughter=(
TGeoNode*)next())) {
384 if (daughter==node) {
391 while ((daughter=(
TGeoNode*)next())) {
392 new_level = daughter->
FindNode(node, level+1);
412 out <<
" vol = gGeoManager->GetVolume("<<quote<<
fVolume->
GetName()<<quote<<
");"<<std::endl;
415 out <<
" vol->SetVisDaughters(kFALSE);"<<std::endl;
426 out <<
" vol->SetVisibility(kFALSE);"<<std::endl;
433 for (
Int_t i=0; i<nd; i++) {
438 out <<
" vol = gGeoManager->GetVolume("<<quote<<
fVolume->
GetName()<<quote<<
");"<<std::endl;
439 out<<
" node = vol->GetNode("<<i<<
");"<<std::endl;
441 out<<
" node->VisibleDaughters(kFALSE);"<<std::endl;
446 out<<
" node->SetVisibility(kFALSE);"<<std::endl;
560 if (!painter)
return;
571 printf(
" Local : %g, %g, %g\n", point[0], point[1], point[2]);
573 printf(
"current point not inside this\n");
579 printf(
"current node divided\n");
582 printf(
"point not inside division element\n");
585 printf(
"inside division element %s\n", node->
GetName());
590 printf(
"volume not voxelized\n");
600 printf(
"no candidates for current point\n");
604 for (
Int_t id=0;
id<ncheck;
id++) {
607 else overlap =
"ONLY";
608 printf(
"%i %s %s\n", check_list[
id], node->
GetName(), overlap.
Data());
619 printf(
"Overlaps for node %s :\n",
GetName());
623 printf(
" %s\n", node->
GetName());
642 Int_t *ovlps =
nullptr;
643 if (src && (novlp > 0)) {
644 ovlps =
new Int_t[novlp];
645 memcpy(ovlps, src, novlp*
sizeof(
Int_t));
718 Int_t count = 40 + 4;
974 if (&iter ==
this)
return *
this;
1013 for (i=2; i<
fLevel+1; i++) {
1099 if (!level || level>
fLevel)
return 0;
1138 if (top)
fTop = top;
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Using a TBrowser one can browse all ROOT objects.
Bool_t IsVisStreamed() const
Bool_t TestAttBit(UInt_t f) const
Bool_t IsVisTouched() const
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Bool_t IsVisDaughters() const
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
ABC for user objects attached to TGeoVolume or TGeoNode.
virtual TGeoExtension * Grab()=0
virtual void Release() const =0
Matrix class used for computing global transformations Should NOT be used for node definition.
void Clear(Option_t *option="")
clear the data for this matrix
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
void SetIterator(const TGeoIterator *iter)
virtual void ProcessNode()=0
TGeoIterator & operator=(const TGeoIterator &iter)
Assignment.
TGeoIteratorPlugin * fPlugin
virtual ~TGeoIterator()
Destructor.
const TGeoMatrix * GetCurrentMatrix() const
Returns global matrix for current node.
void SetTopName(const char *name)
Set the top name for path.
void Reset(TGeoVolume *top=0)
Resets the iterator for volume TOP.
void GetPath(TString &path) const
Returns the path for the current node.
void IncreaseArray()
Increase by 30 the size of the array.
TGeoNode * GetNode(Int_t level) const
Returns current node at a given level.
TGeoNode * operator()()
Returns next node.
Int_t GetIndex(Int_t i) const
TGeoNode * Next()
Returns next node.
void SetUserPlugin(TGeoIteratorPlugin *plugin)
Set a plugin.
void Skip()
Stop iterating the current branch.
TGeoVolume * GetTopVolume() const
The manager class for any TGeo geometry.
TObjArray * GetListOfOverlaps()
void CdUp()
Go one level up in geometry.
void ClearOverlaps()
Clear the list of overlaps.
TGeoNavigator * GetCurrentNavigator() const
Returns current navigator for the calling thread.
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
TObjArray * GetListOfNodes()
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
void SetCheckingOverlaps(Bool_t flag=kTRUE)
void SetCurrentPoint(Double_t *point)
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Returns deepest node containing current point.
const Double_t * GetCurrentPoint() const
void ModifiedPad() const
Send "Modified" signal to painter.
TGeoVolume * GetCurrentVolume() const
TVirtualGeoPainter * GetPainter() const
void MasterToLocal(const Double_t *master, Double_t *local) const
void SortOverlaps()
Sort overlaps by decreasing overlap distance. Extrusions comes first.
Geometrical transformation package.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
virtual const Double_t * GetTranslation() const =0
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
Bool_t IsRotAboutZ() const
Returns true if no rotation or the rotation is about Z axis.
void Print(Option_t *option="") const
print the matrix in 4x4 format
Class providing navigation API for TGeo geometries.
TGeoNodeCache * GetCache() const
TGeoStateInfo * GetInfo()
Get next state info pointer.
void ReleaseInfo()
Release last used state info pointer.
A node containing local transformation.
virtual Int_t GetOptimalVoxels() const
Returns type of optimal voxelization for this node.
void SetMatrix(const TGeoMatrix *matrix)
Matrix setter.
virtual ~TGeoNodeMatrix()
Destructor.
virtual Int_t GetByteCount() const
return the total size in bytes of this node
TGeoNodeMatrix()
Default constructor.
virtual TGeoNode * MakeCopyNode() const
Make a copy of this node.
Node containing an offset.
void SetFinder(TGeoPatternFinder *finder)
TGeoPatternFinder * fFinder
virtual TGeoNode * MakeCopyNode() const
Make a copy of this node.
virtual ~TGeoNodeOffset()
Destructor.
TGeoNodeOffset()
Default constructor.
virtual TGeoPatternFinder * GetFinder() const
virtual Int_t GetIndex() const
Get the index of this offset.
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Bool_t IsOverlapping() const
void SetFWExtension(TGeoExtension *ext)
Connect framework defined extension to the node.
Bool_t IsVisDaughters() const
Bool_t IsOnScreen() const
check if this node is drawn. Assumes that this node is current
TGeoVolume * GetVolume() const
void SaveAttributes(std::ostream &out)
save attributes for this node
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute mouse actions on this volume.
virtual void Paint(Option_t *option="")
Paint this node and its content according to visualization settings.
void Draw(Option_t *option="")
draw current node according to option
void CheckShapes()
check for wrong parameters in shapes
void PrintOverlaps() const
print possible overlapping nodes
TGeoExtension * fFWExtension
Transient user-defined extension to volumes.
TGeoNode()
Default constructor.
TGeoExtension * fUserExtension
void SetOverlapping(Bool_t flag=kTRUE)
TGeoExtension * GrabFWExtension() const
Get a copy of the framework extension pointer.
void SetOverlaps(Int_t *ovlp, Int_t novlp)
set the list of overlaps for this node (ovlp must be created with operator new)
void PrintCandidates() const
print daughters candidates for containing current point
Int_t GetNdaughters() const
TGeoNode * GetDaughter(Int_t ind) const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute the closest distance of approach from point px,py to this node
virtual TGeoMatrix * GetMatrix() const =0
Bool_t MayOverlap(Int_t iother) const
Check the overlab between the bounding box of the node overlaps with the one the brother with index I...
void CopyOverlaps(Int_t *ovlp, Int_t novlp)
Transient framework-defined extension to volumes.
void SetMotherVolume(TGeoVolume *mother)
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the node.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
Convert a vector from local reference system to mother reference.
void DrawOverlaps()
Method drawing the overlap candidates with this node.
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
Convert the point coordinates from local reference system to mother reference.
Int_t CountDaughters(Bool_t unique_volumes=kFALSE)
Returns the number of daughters.
void DrawOnly(Option_t *option="")
draw only this node independently of its vis options
void SetVisibility(Bool_t vis=kTRUE)
Set visibility of the node (obsolete).
void SetNumber(Int_t number)
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
Convert the point coordinates from mother reference to local reference system.
TGeoExtension * GrabUserExtension() const
Get a copy of the user extension pointer.
Int_t FindNode(const TGeoNode *node, Int_t level)
Search for a node within the branch of this one.
void VisibleDaughters(Bool_t vis=kTRUE)
Set visibility of the daughters (obsolete).
void FillIdArray(Int_t &ifree, Int_t &nodeid, Int_t *array) const
Fill array with node id. Recursive on node branch.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Get node info for the browser.
virtual ~TGeoNode()
Destructor.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
Convert a vector from mother reference to local reference system.
virtual void ls(Option_t *option="") const
Print the path (A/B/C/...) to this node on stdout.
void SetCloned(Bool_t flag=kTRUE)
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check overlaps bigger than OVLP hierarchically, starting with this node.
void Browse(TBrowser *b)
How-to-browse for a node.
void InspectNode() const
Inspect this node.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape
Base finder class for patterns.
virtual TGeoNode * FindNode(Double_t *, const Double_t *=0)
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const =0
virtual Bool_t IsCylType() const =0
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual void Print(Option_t *option="") const
Print volume info.
Bool_t IsSelected() const
TGeoManager * GetGeoManager() const
Bool_t Contains(const Double_t *point) const
Int_t GetNdaughters() const
void SelectVolume(Bool_t clear=kFALSE)
Select this volume as matching an arbitrary criteria.
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
void CheckShapes()
check for negative parameters in shapes.
TGeoPatternFinder * GetFinder() const
TGeoVoxelFinder * GetVoxels() const
Getter for optimization structure.
TGeoShape * GetShape() const
virtual void Draw(Option_t *option="")
draw top volume according to option
virtual void DrawOnly(Option_t *option="")
draw only this volume
virtual Bool_t IsVisible() const
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="") const
Overlap checking tool.
Finder class handling voxels.
virtual Int_t * GetCheckList(const Double_t *point, Int_t &nelem, TGeoStateInfo &td)
get the list of daughter indices for which point is inside their bbox
void PrintVoxelLimits(const Double_t *point) const
print the voxel containing point
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
TObject * At(Int_t idx) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void ToLower()
Change string to lower-case.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Abstract class for geometry painters.
virtual 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="")=0
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py)=0
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=0)=0
virtual const char * GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const =0
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py)=0
double dist(Rotation3D const &r1, Rotation3D const &r2)
constexpr Double_t E()
Base of natural log:
Statefull info for the current geometry level.