Q: Is there any way to get pointer to a node by using path?

Hi,

Now I can get the pointer to a TGeoNode by using path.
Since TGeoNode represents positioned volume, it seemed that the attributes could be set separately. Thus I tried to divide a box in geodemo.C

TGeoVolume *sliceY = sliceX->Divide(“SLICEZ”, ndiv=8, start=0, step=0);

gGeoManager->cd("/TOP_1/BOX_1/SLICEX_1/SLICEY_1/SLICEZ_1");
gGeoManager->GetCurrentNode()->GetVolume()->SetLineColor(kBlue);

gGeoManager->cd("/TOP_1/BOX_1/SLICEX_1/SLICEY_2/SLICEZ_3");
gGeoManager->GetCurrentNode()->GetVolume()->SetLineColor(kBlue);
top->Draw();

As a result the whole box becomes green. Then I tried blindly to create TGeoPhysicalNode and tried again

TGeoPhysicalNode *node1 = gGeoManager->cd("/TOP_1/BOX_1/SLICEX_1/SLICEY_1/SLICEZ_1");
node1->GetVolume()->SetLineColor(kBlue);

node2->GetVolume()->SetLineColor(kGreen);

The result was the same. It seems that it has something to do with GetVolume() which returns volume group “SLICEZ”.

Could you please let me know how to get correct result; set attributes separately, for example, different color and visibility.

Thanks in advance,
Yun-Ha