Hi Andi, Are you using one of the functions from TGeoManager: TGeoNode *FindNode(Bool_t safe_start=kTRUE); TGeoNode *FindNode(Double_t x, Double_t y, Double_t z); TGeoNode *SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=0); etc.. det->GetPath() returns something like "top/subdetector/sub_sub_detector/etc" Via the result TGeoNode* node of FindNode (or equivalent), you can use node->GetName() or better node->GetVolume()->GetName(); Rene Brun andi klein wrote: > > Hi Andrei > > I have set up a detector with TGeoManager to simulate tracks in my > experminet. (det is my geomanager). After doing a > det->GetPath(); I know what my next detector will be. I am wondering if > there is a way how I can compare this with the name of one of my volumes > to see if I should continue tracking;i.e. something like > if(det->GetPath == "element name") continue, where element name > would be the name of the node. > Maybe I just haven't found it, but any help would be appreiated. > > Thanks, andi
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET