Eve Questions & Issues

Hello,

I have a couple questions about using the Eve event display in ROOT…

I use the following ROOT macro for testing:

{
    TEveManager::Create();
    gEve->RegisterGeometryAlias("Default", "http://www.slac.stanford.edu/~jeremym/ldmx/detector.root");

    gGeoManager = gEve->GetDefaultGeometry();

    TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode("em_calorimeters_PV");
    TEveGeoTopNode* ecal = new TEveGeoTopNode(gGeoManager, node1);
    gEve->AddGlobalElement(ecal);

    TGeoNode* node2 = gGeoManager->GetTopVolume()->FindNode("hadronic_calorimeter_PV");
    TEveGeoTopNode* hcal = new TEveGeoTopNode(gGeoManager, node2);
    gEve->AddGlobalElement(hcal);
    gEve->Redraw3D(kTRUE);
}

A geometry does load but there are some issues with it:

  1. For some reason, my macro doesn’t function similarly to the examples I have seen in tutorials when adding elements to the scene. Instead of seeing multiple top elements, I only end up seeing one of the them in the GL viewer (the hcal which is the last added so I assume it is overriding the other element for some reason). Though I can see both geometry components in the left-hand list. I can’t get both to display.

  2. None of my visualization options that I set on the nodes, such as wireframe, hiding/showing daughters, etc. seem to have any affect even when I redraw. How do I get the scene to update when I set options? Redrawing doesn’t seem to do the trick.

  3. I get this message when I start using the right click menus on the geom window:

Warning in <TGLRnrCtx::EndSelection>: Select buffer size (1024) insufficient. This is maximum.

Any advice on how to solve these issues?

Thanks.

–Jeremy

Hi, @matevz will most probably be able to help you

Hi Jeremy,

Sorry for late response.

  1. TEveGeoNode (base class of TEveGeoTopNode) does not automatically populate with children … there could be milions of those. You have to double-click on it.
    If you know you want the items expanded, you can call this:
    https://root.cern.ch/doc/master/classTEveGeoNode.html#a8c73097217e63ece1940c8b65019df56

The ecal is fully encapsulated in hcal. If you un-check hcal, you’ll see ecal.

You might benefit from grouping several hcal layers into intermediate mothers. Then you could turn on/off blocks (especailly the front/back so one could see ecal inside). This should also speed up simulation as there will be less volumes to consider when crossing boundaries.

  1. TEveGeoTopNode uses TGeo painting so it should honour whatever is honoured by tgeo. You should call gEve->Redraw3D(reset-camera - false or true, kTRUE) after changing parameters to enforce full repaint.

  2. Yes, there is a bug there preventing the automatic growth of selection buffer. I’ll need to push the fix into root. It would still show you a warning but already at next size, 2048, the warning goes away.

Cheers,
Matevz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.