Eve and toroidal tracks

Hi Matevz et al,

I’m planning to display some LHC events with the help of Eve. I found the Alice macro in the tutorials (thanks!) from which I will start. The first thing I want to implement are tracks. Now, I’ve seen that the TEveTrack and TEveTrackPropagator class support solenoidal tracks only. Some of the LHC detectors have toroidal magnetic fields in addition. Is there a simple workaround here? I’m working with root_5.18.00.

Many thanks,

Hi Oliver,

A simple workaround would be to use TEveLine instead of TEveTrack and provide all the points along the track, provided that you have the track extrapolation code.

  TEveLine* track = new TEveLine("Track 1");
  while (step())
    track->SetNextPoint(x, y, z);

Ideally, TEveTrackPropagator should support arbitrary magnetic field, given as an external function, something similar to:

  void get_field(const double* xyz, double* field);

Knowing the magnitude of the field gradient could help us reduce the number of calls to this function while preserving reasonable precision.

Probably it would be the easiest to sub-class TEveTrackPropagator and reimplement HelixToBounds() and HelixToVertex() functions. In the existing TEveTrackPropagator these two are complicated by the fact that it was used also for rendering of kinematics, including very low momentum secondary particles.

We were already thinking about this extension and even planned to provide a method of extraction of field-maps from experiment-specific format into a “ROOT native representation” consisting from a set of fitted Chebyshev polynomials.

Unfortunately I will not be able to work on that for at least next two months as we are now expanding Eve with high-level functionality (selection, compound objects, multi-view displays).

But if you (or anyone else) is willing to look into this I’d be really glad to provide help and guidance. This would be a significant contribution.


Hello Matevz,

thanks for your fast answer. I will try the TEveLine workaround.

No problem. It is not urgent at all.

Yeah, that would be fun. My schedule is telling different, however :frowning:
Anyway, my plan is to implement event classes used for physics analyses. The classes should be detector-independent as much as possible. Maybe we can share some of the code.

Best Regards,

Hi Oliver,

Absolutely, that would be great. Let me know when you’re at CERN next time so that we can discus this in detail.


We have arbitrary field propagators in eve now, see classes
TEveTrackPropagator and TEveMagFieldXyzz
and tutorial