Hi all,
I’m trying to use TGeoPhysicalNode to represent misalignment in my geometry.
I see in documentation that you supply c’tor with path name:
TGeoPhysicalNode(const char *path);
Well, that’s fine. The point that is preventing me to use misalignment is how to retreive the path information. In examples you provide (e.g. $ROOTSYS/tutorials/geom/building.C) or in the documentation it looks you really type by hand every time the path you are looking at.
I would expect something like this:
If there was possible to have a 1 to 1 correspondence between logical nodes (TGeoNode) and physical nodes why would we need a physical node at all ? No, you cannot make a physical node from a logical one simply because the logical one may be used to position a volume in different parts of the geometry. If you do not want to use the string, you can alternatively use:
gGeoManager->CdDown(i); // moved down on the i-th branch of current volume;
gGeoManager->MakePhysicalNode();
That is navigating the geometry hierarchy (which is not flat - so no indexing) using CdDown()/CdUp()
Marco, a TGeoNode knows nothing about the current branch, e.g:
/TOP_1/A_1/B_5/C_3.
C_3 is positioned in B_5 but also in B_1, B_2, … (it is in B volume). We could put this sort of method in TGeoNode but it would have to ask also TGeoManager/TGeoNodeCache for the current state/path (which is a global thing)… You are maybe confused by names, but there is a big difference between TGeoNode and TGeoPhysicalNode - the first is just a generic object while the second is a precise placement of it.
Yoiu can always navigate by node index (as pointed in my previous post) if you think it is more suitable.
B.t.w, no offense taken (why would I???)
Best,