D0 GROUP LEVEL 3
ONLINE LESSONS

Paul Balm

Fermilab, MS # 357
Tel: +1 (630) 840 5034 
Last Update:
29/6/2001
by Paul Balm

Episode XIX: Using L3Display

Contents

Not interested in how it all works, just want to run it with whatever is available? Skip ahead to Running L3Display. You will need some basic knowledge about the D0 environment. Please refer to the user's corner on the Algorithms page. There should be some help available (the Run II coding for professors Guide for example).

Introduction

L3Display is a package based on the d0ve display. The code is located in the CVS package d0ve_l3. d0ve is a visualization package designed for debugging of reconstruction code, written by Toby Burnett and Andy Haas. It defines a 3-d display of lines, surfaces, and character data, and implements a default wire-frame viewer with keyboard control of orientation, perspective, and magnification of four independent views, which can be displayed simultaneously or individually. It allows the user run the program as a framework package. Also, the user can stop the program from his own code, and display final or intermediate results from e.g. a tool or algorithm.

What is being displayed, is given by the DisplayList of the singleton d0ve object (i.e. the display). The DisplayList contains the representations (or Reps) of the objects to be displayed. A representation is something that tells the display how to draw an object. For example, the representation of a track maybe something that tells d0ve to connect the hits with a line. What the user has to do is to make sure the DisplayList contains the representations that he/she wants displayed. L3Display is set up to help with that, by providing a number of example Reps of the DebugInfo (see online lesson 16) of some tools and adding those Reps to the DisplayList. However, there’s only a very limited number of Reps available, so it’s very likely the user will have write his/her own Rep(s). Secondly, L3Display gets the information to be put on the DisplayList (the DebugInfo) from the L3DebugChunk, which holds generally only the final results of the tool, no intermediate steps. If intermediate steps within the algorithm need to be displayed, the user will have to modify the DisplayList from his/her own code. I have appended a short note about that at the end of the next section.

How to display your tool’s results -- or how to write a Rep

We take the example of L3TMuoUnpack, the muon unpacking tool. The results of the tool are stored in the tool’s DebugInfo, called L3TMuoUnpackDebugInfo. The representation class is called L3TMuoUnpackDebugInfoRep and lives in the d0ve namespace (all by convention). L3TMuoUnpackDebugInfoRep has to inherit from DisplayRep, and it has to implement/overload three methods.

The results of L3TMuoUnpack are three sets of hits: PDTHits, MDTHits and MSCHits. To display these, I chose to give L3TMuoUnpackDebugInfoRep three datamembers: one vector of PDTHitReps, one vector of MDTHitReps, and one vector of MSCHitReps. The setEvent method, that the user has to implement, gets the DebugInfo from the L3DebugChunk, and fills the vectors of HitReps, using the hits in the DebugInfo.

The HitRep classes are predefined in the package d0ve_muon, together with representations for MuoSegment, MuoTrack, MuoMCTrack and more. Reps for other datatypes or detector-elements are defined in d0ve_smt, d0ve_caldis, d0ve_vertex and d0ve_cft. Also, for more general Reps, like Box, Circle and Point, see the package d0ve_rep.

This is the function that actually draws the object on the display. That can be done in two ways:

Remove all the information from the old event. For L3TMuoUnpackDebugInfoRep, this means clearing of the vectors of Reps.

When you're done writing your Rep, you'll have to modify L3Display to actually use it. For an example of all the step, see L3Display.hpp, but here are the steps you have to take:

As said, it is also possible to display intermediate results within an algorithm. To do this, the user has take the following steps:

Running L3Display

The d0ve package is composed of three elements:

  1. The framework package D0veSetup, that clears the window and resets the DisplayList.
  2. All packages modifying the DisplayList, such as L3Display or d0ve_muon. Or perhaps a package containing a user algorithm that modifies the DisplayList.
  3. The framework package D0veEndSetup, that draws everything on the DisplayList on the display by calling the update method of all Reps, and call d0ve-pause(). The pause interval is determined by user settings. The user can set a time that the program should wait at every event.

If you want to use the program L3Display, first create it by creating a release area, addpkg’ing the package d0ve_l3 and do ‘gmake d0ve_l3.all’. Then cd to the bin area of d0ve_l3 and call ‘runL3Display’. This will make softlinks to all the files needed by the program: default triggerlist, tools.rcp, filters.rcp, run configuration, etc. Then it will start the program using the framework RCP RcpL3Display.rcp that’s in that bin area.

You can recenter the display by clicking on it, zoom with page-up and page-down, rotate with smaller-than and greater-than signs.

The program will run tsim_l3, and tsim_l3 will run the tools and filters as determined by the triggerlist. It will also write out DebugInfo for the tools it runs. In the default setup L3Display will read back the DebugInfo for the muon unpacking tool L3TMuoUnpack and the muon local tracking tool L3TMuoLocal, and display the results for each event.

Example screenshots

Below are some links to displays of results of L3TMuoCentralMatch. This is a tool that finds tracks in the muon system, predicts a region in the central tracker and tries to match it with a track from the central tracker. In the following pictures, the silicon disks are shown in green, the barrels in blue, the muon detector in grey. The central track is blue, the region is orange and the muon track is green.

Finally, if you have any questions, contact me.

Main Page Next Episode