Hi Clark,
1-bis. If for ID you use: TGeoManager::GetCurrentNodeId() - don't do it
anymore (or not like that): this is quasi-unique but only for a session.
It is used for internal TGeoManager purposes and with TFluka interface
in correlation with a special caching option:
TGeoManager::CloseGeometry("di").
Using this will insure :
So, if your geometry is simple enough and WILL NOT change (!) you can stick with 1-bis (that I don't advice anyway), if not you should try to find an alternative solution... I can help you with more advice if you give me a bit more details on the usage of these ID's for your specific needs.
Regards,
Andrei
Clark McGrew wrote:
> Hello All,
>
> I'm using TGeoManager to handle the T2K near detector geometries, and
> I'm trying to chase down a problem being reported by collaboration
> members with the use of TGeoNode identifiers in our code.
>
> My questions:
>
> 1) Is it a safe assumption that a particular value of a node ID will
> always refer to the same TGeoNode in a geometry, even when the geometry
> has been written and re-read? [The geometry *shouldn't* be changing]
>
> 2) If it's not a save assumption that a node ID will uniquely specify a
> particular TGeoNode, what is the correct way to specify a particular
> volume?
>
> In my current code, I'm using the TGeoNode id's as an identifier for the
> volume element corresponding to a hit so that the class is generically
>
> class Hit {
> int fNodeId;
> float fTime;
> float fCharge;
> };
>
> The geometry for a specific set of events is then saved in the file with
> a tree of events. During analysis, the geometry is first read from an
> input file, and then re-saved in an output file. [This a temporary
> situation. Eventually I expect to save the geometries separately].
>
> I've been getting reports from collaboration members, that the TGeoNode
> associated with a node id is changing between files and as a result hits
> are being assigned to the wrong geometry element. I personally haven't
> been able to reproduce the problem, and before I spend a lot of time
> debugging my code, I would like to check ROOT's intended behavior.
>
> Thanks,
> Clark
Received on Mon Feb 26 2007 - 09:24:31 CET
This archive was generated by hypermail 2.2.0 : Mon Feb 26 2007 - 17:50:01 CET