Quote: |
if you look at this same method few lines below you see:
TGeoMatrix* M = n->GetMatrix();
and when v1 is added to the cave you see:
Cave->AddNode(v1,0, M);
So this is not really a problem and the right matrix is used.
|
I think that is not correct. Imagine my TGeoManager containing the hierarchy cave - STS - station01. Then
NewGeo->cd();
volume=(TGeoVolume*)NewGeo->GetNode(0)->GetDaughter(0)->GetVolume();
will give me the volume of the node STS. This is copied into the volume v1:
v1=volume->MakeCopyVolume(volume->GetShape());
and then the node n is set to
which is the first daughter node of STS, i.e. station01. So,
TGeoMatrix* M = n->GetMatrix();
is the transformation matrix of station01 into the STS, but what you want to have is the transformation from STS to cave. This matters only in case of reading from a TGeoManager (which does not work anyway at the moment); in case of reading from a TGeoVolume, the implementation is correct.
This is corrected now, if the media is not found in Media file or TGeoManager, it is a FATAL and it exit.
Very good, thank you!
Best regards,
Volker