GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » How to get a volume path by id's
How to get a volume path by id's [message #5913] Tue, 19 February 2008 16:03 Go to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Hello everybody,

I would like to get the complete path of a volume by its ID.
I have a simulation file containing the CBMGeom and a branch with CbmMCPoints. There is a reference to the detectors via the GetDetectorID() method.
I could get a volume by TGeoVolume* vol = geoMan->GetVolume(detid); but when calling for the vol->GetName(); I just get one name and not the complete Path:
Quote:

"NewLayer3oHalfBarrel"

instead of

/cave_1/MVDoOption1_0/NewLayer3oHalfBarrel_1/NewLayer3Stave_2/Moduleo4FE _1/FullSensoro4FE_1/SensorActiveAreao[NrFE=4]oPartAss_1/SensorActiveArea o[NrFE=4]_1

Now I'm somehow lost inbetween the geometry classes.

In fact for the MVD there is an additional string stored in the PndMvdMCPoint. Is this because cbmsoft does not store the full path via the volume ID?

Kind regards, Ralf.
Re: How to get a volume path by id's [message #5914 is a reply to message #5913] Tue, 19 February 2008 16:40 Go to previous messageGo to next message
Pablo Genova is currently offline  Pablo Genova
Messages: 32
Registered: May 2007
continuous participant
From: *PV.INFN.IT
Hi Ralf,

I only know that with

gMC->CurrentVolPath()

you can call the "basic" virtualmontecarlo routine that should give you the FULL path of the volume in which you are.

I used it in the past, if I remember correctly...

I do not know if there are other ways....

Tschuess, Pablo
Re: How to get a volume path by id's [message #5927 is a reply to message #5913] Wed, 20 February 2008 08:42 Go to previous message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Ralf,

you are right. I have introduced the additional string in PndMvdMCPoint to store the (encoded) full path of a detector hit. Another way to get the volume which was hit is by the function geoManager->FindNode(x,y,z).

Take the pos and posOut position and calculate the mean of these two . With this position you can use FindNode to give you the node of your volume.

Cheers,

Tobias
Previous Topic: Requirements for an analysis toolset
Next Topic: DPG Group Talk
Goto Forum:
  


Current Time: Sun Dec 01 12:24:59 CET 2024

Total time taken to generate the page: 0.00436 seconds