alignment vs "good practice"

From: Michał Dwużnik <>
Date: Sun, 27 Nov 2005 19:36:26 +0100

Hi Rooters!

I'm building a viewer for some geometry, which shall provide means for viewing real (moved from ideal position) modules. Recently I found the possibility
of using TGeoPhysicalNode (well, I'm a bit curious why User's Guide does not mention
physical nodes at all?). As far as I understood the geodemo.C and its' vicinity using TGeoPhysicalNode::Align lets you "move" the nodes in a already closed geometry,
which is a very nice feature, cause you may easily show the user an ideal geometry and then Align(..) the physical nodes. The problem is following - for me creating the geometry with ~10000 nodes takes +/- ten seconds (which is reasonable), and than invoking

        TGeoPhysicalNode t[ncorr];
        for (idx=0 ; idx < ncorr ; idx++)

geometry->MakePhysicalNode(boxname[idx]); t[idx] = geometry->GetPhysicalNode(idx); } cout << " Done." <<endl; for (idx=0 ; idx < ncorr ; idx++)
t[idx]->Align(placement[idx]); // cout <<idx <<endl; }

takes next to infinity (few nodes per second).

So, the first question is if I'm doing the alignment in _that_ non optomal way, or it's just as slow as it gets ?

So, for now I'm stuck with building one set of nodes (ideal) and another with "real"

Another question is :
what's the correct way of computing e.g. a TGeoCombiTrans expressed in a global frame, when I have it expressed in the local frame of a module ?

Let's assume a module is a rectangular box (really a TRD1), and

TGeoCombiTrans *ideal_position (global frame)
TGeoCombiTrans *correction (local module (node) frame)
TGeoCombiTrans *real_position

 What is "nice" way of finding the real_position ?


PS:Sorry, the appropriate User's Guide chapter coupled with Master2Local gave me some
nice time but I can't get it right, so please forgive me the question above... Received on Sun Nov 27 2005 - 19:36:39 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET