TEveTracks not being drawn in ortographic projection

Dear ROOTers,
I’m trying to draw a crude projective event display to debug some track reconstruction code, and I’ve run into a particularly strange issue.

I’m able to define and draw hits as a TEvePointSet for every projection (I’m working with ortho XZ, YZ, and XY projections) but when I try to draw tracks, they only show up in the XZ and YZ projections, but not in the XY projection. Even though there is no particular difference in how they are handled.
Any help is welcome… :sweat_smile:
I’m attaching a small reproducer of the issue and a screenshot.


EDdebug.root (4.7 KB)
ParamGeo.root (314.5 KB)
reproducer.cpp (5.3 KB)

ROOT Version: 6.14/04
Platform: OSX Mojave 10.14.3
Compiler: Apple LLVM version 10.0.1 (clang-1001.0.46.3)

If my past experience taught me anything, this is a question to be directed at @matevz :innocent:

Hi Valerio,

There is nothing obviously wrong on first sight, will try it out later tonight. Sorry for not noticing your post sooner, just ping me right away next time :slight_smile:


OK, I have a problem … I’m traveling and have a new laptop that would need some configuration work I’m not able to do right now :frowning: Have you figured out anything new?


Unfortunately no, I’ve been stuck with this issue for quite some time now. The problem is that all the objects on the user side seem to be OK, so I don’t really know where to go from here.
I can try to dig around but I need some directions :sweat_smile:

OK, so I found a magnifying glass here (my new laptop is 4k and root gui opens with 12 pixel fonts, loads of fun).

So, I did the following on your example

// Open scene XOYE in tree browser, do "Export to CINT" on track object, name it xx
root [1] xx->Print("all")
TPolyMarker3D N=2, Option=all
 x[0]=-97.3266, y[0]=22.9681, z[0]=0
 x[1]=-97.3266, y[1]=22.9681, z[1]=0

It turns out track only has two points and they are the same … so all you get is a mini point.

Can you check on your full example?


I can confirm on the reproducer. I was trying to do the same on the full compiled code but I don’t have an interpreter instance available. I strongly suspect that it would be the same, though.


Have you figured it out? I somewhat assumed you don’t need my help anymore :slight_smile:


Actually I have been a bit overwhelmed today, but I should be able to take a good look at it tomorrow morning :sweat_smile:


So… after getting XCode to attach to the process I was able to fiddle around a bit in the memory of my process.

What I can see is that already in the propagator of the TEveTrack there are these two points (which I can only guess are the two endpoints of the track? the ones you got to print from CINT)

(lldb) print $15
(TEveTrack *) $15 = 0x000000013748e2c0

(lldb) print $15->fPropagator->fPoints
(std::__1::vector<TEveVector4T<double>, std::__1::allocator<TEveVector4T<double> > >) $18 = size=2 {
  [0] = {
    TEveVectorT<double> = (fX = -97.326591491699218, fY = 22.968130111694336, fZ = 0)
    fT = 0
  [1] = {
    TEveVectorT<double> = (fX = -97.326591491699218, fY = 22.968130111694336, fZ = 0)
    fT = 0

but I don’t know what the cause of the issue could be… if I dump the TEveTrack object I can’t see anything strange

==> Dumping object at: 0x000000013748e2c0, name=XY Track 0, class=TEveTrack

fV                            ->13748e4f0         Starting vertex
fV.fX                         -97.3266            Components of the vector.
fV.fY                         22.9681             Components of the vector.
fV.fZ                         0                   Components of the vector.
fP                            ->13748e508         Starting momentum
fP.fX                         0.965948            Components of the vector.
fP.fY                         -0.258736           Components of the vector.
fP.fZ                         0                   Components of the vector.
fPEnd                         ->13748e520         Momentum at the last point of extrapolation
fPEnd.fX                      0.965948            Components of the vector.
fPEnd.fY                      -0.258736           Components of the vector.
fPEnd.fZ                      0                   Components of the vector.
fBeta                         1                   Relativistic beta factor
fDpDs                         0                   Momentum loss over distance
fPdg                          0                   PDG code
fCharge                       0                   Charge in units of e0
fLabel                        -1                  Simulation label
fIndex                        0                   Reconstruction index
fStatus                       0                   Status-word, user-defined.
fLockPoints                   false               Lock points that are currently in - do nothing in MakeTrack().
fPathMarks                    ->13748e560         TEveVector of known points along the track
fLastPMIdx                    0                   !Last path-mark index tried in track-propagation.
*fPropagator                  ->1203629d0         Pointer to shared render-style
fRnrLine                      true                
fRnrPoints                    false               
fSmooth                       false               
fTitle                        Index=0, Label=-1
ChTitle/tooltip of the TEvePointSet.
fTitle.fRep                   ->13748e4b8         ! String data
fTitle.fRep.                  ->13748e4b8         
*fIntIds                      ->0                 Optional array of integer ideices.
fIntIdsPerPoint               0                   Number of integer indices assigned to each point.
fParents                      ->13748e2c8         List of parents.
fChildren                     ->13748e2e0         List of children.
*fCompound                    ->0                 Compound this object belongs to.
*fVizModel                    ->0                 ! Element used as model from VizDB.
fVizTag                                           Tag used to query VizDB for model element.
fVizTag.fRep                  ->13748e310         ! String data
fVizTag.fRep.                 ->13748e310         
fNumChildren                  0                   !
fParentIgnoreCnt              1                   ! Counter for parents that are ignored in ref-counting.
fTopItemCnt                   0                   ! Counter for top-level list-tree items that prevent automatic destruction.
fDenyDestroy                  0                   ! Deny-destroy count.
fDestroyOnZeroRefCnt          true                Auto-destruct when ref-count reaches zero.
fRnrSelf                      true                Render this element.
fRnrChildren                  true                Render children of this element.
fCanEditMainColor             false               Allow editing of main color.
fCanEditMainTransparency      false               Allow editing of main transparency.
fCanEditMainTrans             false               Allow editing of main transformation.
fMainTransparency                                 Main-transparency variable.
*fMainColorPtr                400                 Pointer to main-color variable.
*fMainTrans                   ->0                 Pointer to main transformation matrix.
fItems                        ->13748e348         ! Set of list-tree-items.
fSource                       ->13748e360         External object that is represented by this element.
fSource.*fPID                 ->0                 !Pointer to ProcessID when TRef was written
fSource.fUniqueID             0                   object unique identifier
fSource.fBits                 0x03000000          bit field status word
*fUserData                    ->0                 ! Externally assigned and controlled user data.
fPickable                     true                
fSelected                     true                !
fHighlighted                  false               !
fImpliedSelected              0                   !
fImpliedHighlighted           0                   !
fChangeBits                                       !
fDestructing                                      !
fOwnIds                       false               Flag specifying id-objects are owned by the point-set
fIds                          ->13748e418         User-provided point identifications
fIds.*fPID                    ->10065fbf0         Pointer to Process Unique Identifier
fIds.*fUIDs                   ->0                 [fSize] To store uids of referenced objects
fIds.fLowerBound              0                   Lower bound of the array
fIds.fLast                    -1                  Last element in array containing an object
fIds.fSorted                  false               true if collection has been sorted
fIds.fName                                        name of the collection
fIds.fName.fRep               ->13748e430         ! String data
fIds.fName.fRep.              ->13748e430         
fIds.fSize                    0                   number of elements in collection
fIds.fUniqueID                0                   object unique identifier
fIds.fBits                    0x03000000          bit field status word
fN                            2                   Number of allocated points
*fP                           -97.3266            [3*fN] Array of X,Y,Z coordinates
fOption                                           Options
fOption.fRep                  ->13748e3d0         ! String data
fOption.fRep.                 ->13748e3d0         
fLastPoint                    1                   The index of the last filled point
fName                         XY Track 0          Name of polymarker
fName.fRep                    ->13748e3f0         ! String data
fName.fRep.                   ->13748e3f0         
fUniqueID                     0                   object unique identifier
fBits                         0x03000001          bit field status word
fMarkerColor                  400                 Marker color
fMarkerStyle                  20                  Marker style
fMarkerSize                   1                   Marker size
*fBBox                        -97.3266            ! Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
fSourceCS                     0                   Coordinate-System of the source tree variables
fProjectedList                ->13748e478         references to projected instances.
*fListOfSignals               ->0                 ! list of signals from this object
*fListOfConnections           ->0                 ! list of connections to this object
fSignalsBlocked               false               ! flag used for suppression of signals
fLineColor                    400                 Line color
fLineStyle                    1                   Line style
fLineWidth                    2                   Line width

I’ll keep looking into this, but any suggestion is more than welcome


Spending some hours stepping into the internals of TEveTrackPropagator it seems that at the end of TEveTrackPropagator::LineToBounds the TEveVectorD nv is equal to fV, which means either that the track momentum is 0 (and I just checked that it’s not 0) or that tB = 0

Unfortunately XCode refuses to load debugging symbols for libEve.so (I suspect that it’s because of the extension) so it’s impossible for me to check why, here’s where I actually really need help from @matevz

If possible :sweat_smile:


Sorry, I dropped the ball on this :frowning:

What are your bounds in the track propagator? Is the example you posted initially still valid?


yes I think the example is still totally valid. I’m not sure if this is what you asked, but for the track propagator I get

  std::cout << "TEveTrackPropagator::GetMaxR() = " << _trListXY->GetPropagator()->GetMaxR() << std::endl;
  std::cout << "TEveTrackPropagator::GetMaxZ() = " << _trListXY->GetPropagator()->GetMaxZ() << std::endl;


TEveTrackPropagator::GetMaxR() = 350
TEveTrackPropagator::GetMaxZ() = 450


Yay, found the problem, we have pz = 0 and LineToBounds doesn’t handle this case correctly :frowning: It should set time_Z to infinity in this case (or there should be an additional if later on).

As a workaround, set pz to 1e-16, this works on reproducer.

What release are you using? I’ll put a fix into master.


Great! I can confirm that the fix works also in the main executable!

Right now I’m working on 6.14/04, but we try to update our SW stack whenever we can, since we’re in early development :sweat_smile:

Thanks again,

I made a PR, probably we missed the release that is in preparation:

Why do you do “gEve = new TEveManager(…)”? It gave me some trouble with browser widget borders so I had to replace it with TEveManager::Create().

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