Complex example showing ALICE ESD track visualization.
alice_esd.C - a simple event-display for ALICE ESD tracks and clusters
Only standard ROOT is used to process the ALICE ESD files.
No ALICE code is needed, only four simple coordinate-transformation functions declared in this macro.
A simple geometry of 10KB, extracted from the full TGeo-geometry, is used to outline the central detectors of ALICE.
All files are access from the web by using the "CACHEREAD" option.
ALICE ESD is a TTree containing tracks and other event-related information with one entry per event. All these classes are part of the AliROOT offline framework and are not available to standard ROOT.
To be able to access the event data in a natural way, by using data-members of classes and object containers, the header files and class dictionaries are automatically generated from the TStreamerInfo classes stored in the ESD file by using the TFile::MakeProject() function. The header files and a shared library is created in the aliesd/ directory and can be loaded dynamically into the ROOT session.
See the run_alice_esd.C macro.
Most common use of the event-display is to browse through a collection of events. Thus a simple GUI allowing this is created in the function make_gui().
Eve uses the configurable ROOT-browser as its main window and so we create an extra tab in the left working area of the browser and provide backward/forward buttons.
As this is a simple macro, we store the information about the current event in the global variable 'Int_t esd_event_id'. The functions for event-navigation simply modify this variable and call the load_event() function which does the following:
This is performed in alice_esd_read() function, with the following steps:
Definition in file alice_esd.C.