GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Geometry input in ROOT (TGeo) format
Re: Reading from TGeoManager does not work [message #13713 is a reply to message #13712] Thu, 05 July 2012 18:30 Go to previous messageGo to previous message
Volker Friese is currently offline  Volker Friese
Messages: 365
Registered: April 2004
Location: GSI CBM
first-grade participant
From: *gsi.de
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
n=v1->GetNode(0);

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Questions on HIts in detector and MCPoint
Next Topic: step length for VMC
Goto Forum:
  


Current Time: Fri Mar 29 16:05:21 CET 2024

Total time taken to generate the page: 0.01086 seconds