Implementation in ORCA of new graphics objects for CMS Tracker Visualization

M.S. Mennea, G. Zito
Features of the plugin to be implemented in Orca

In this plugin we implement the full set of five objects proposed. These five objects allow to

Access to the new objects from the COBRA plugin of iguana

The access to the new objects is made by selecting one or more entries in the branch CustomTracker. The object TwigTk2D implements this branch of the Twig Tree creating the main window for tracker parts selection.
A branch CustomTracker is also present in the event subtree. These should be the items available to the user in these two branches:

In the Orca Repository the new objects are contained respectively in

Main window for tracker parts selection

This window is implemented in a TkSelectionWindow which contains in the center the schematic representation of the Tracker implemented with an object TkSelection. When the user selects the green little squares a new window appears containing the 2D representation of the layer or disk.

Windows for single module selection in a disk/cylinder

This window is implemented in a TkLayerSelectionWindow which contains in the center a 2D representation of the layer implemented with an object TkLayerSelection.

Updating the scenegraph displayed in the 3D window

The object TkSceneUpdate is in charge for the scene graph updating as a consequence of user interaction with the 2D selection windows. This object must be instantiated in a single copy and has a certain number of slots that must be used in order to update the scene graph.
The signals connected to these slots will send also the information about the kind of updating needed(remove/add to scene graph) and the single module or detector part interested. To make easier access to detector information, this class will create a map of DetUnits that has as key the number of layer,ring and module. This will make access to layer and ring immediate. On the other hand ,access to barrel rods and endcap petals is facilitated,although not immediate.
This object must also know which parts of the tracker are present in the scenegraph. This is done using three sets containing the address of the scenegraph node for each module,ring,rod,petal and layer displayed.
The same object will take care of retrieving the relevant information when a module in the 3D window is picked: this is obtained by building a tkModulePickedMap.

TkSceneUpdate:Module numbering and access to module information

Orca provides containers of layers that return all the barrel layers in the radius size order, and all the forward disks in the z order.

For each layer a DetUnit container is provided that returns the modules in the layer apparently unordered. There is no way in Orca to get the module number 5 in the ring 6 of layer 2. For this reason, we have implemented a numbering scheme to identify and access the DetUnit of each module.

Each module is identified by three numbers.

To implement this scheme we use the STL map tkModuleMap. This map is built by the method loadTkModuleMap of the class TkSceneUpdate. The key to identify the module is obtained by (layer number)x100,000+(ring number)x1000+(module number). The content is the pointer to the DetUnit of the module. By using the methods of the DetUnit object, it is possible to access any kind of information about the module .

TkSceneUpdate:Handling of user selection of parts or single module

The TkSceneUpdate class has the slots which update the scene graph allowing to

TkSceneUpdate:Keeping track of selected modules

The class TkSelectionSet keeps track of the selected modules using three STL sets

TkSceneUpdate:Keeping track of picked modules

When a user picks in the OpenInventor window, a single module, he gets all the relevant information taken from the corresponding DetUnit. To obtain this information, another STL map has been created: tkPickedModuleMap. The key for this map is the address of the OpenInventor node representing the module, the value being the DetUnit adress.
The class TkSceneUpdate is responsible for the updating of this map through a method addWafer which is called every time a new module is added to the scene graph. This map is used in the method printInfo of TwigTk2D
Another use of the same map is to iterate through the selected DetUnits when ,for example, we want to draw the SimHits in the selected parts.

Automatic selection of all modules crossed by a single track

This is obtained with a modified version of TwigTkSimTracks In this version during the loop on tracks, a STL set crossedDetUnitSet containing all the DetUnits of crossed modules is built. At the end of the loop, the method updateSet is called to add the display of the crossed modules. This method must be implemented in the future as a slot of the class tkSceneUpdate. You can also select/deselect single tracks by picking at them.

Window for theta-phi selection

As a result of the CustomTracker.ThetaphiSelection branch selection a new window will appear. This is implemented as a TkThetaPhiWindow which contains in the center the object TkThetaPhi. This is a zoomable thetaphi representation of all SimHits. The window contains also a button that allow you to display in the 3D window only the modules in the present selection. This is carried out by scanning all the modules and returning the set with a phi and a theta inside the selected region.As usual is the TkSceneUpdate that carries out the display through the slot updateSet.

Window for 2D detailed representation

By selecting CustomTracker.TrackerDetailed a new window will open. This is implemented by TkDetailedWindow containing TkDtetailed in the center. This is a planar map of the whole tracker. You can zoom in and out. Since the map is too big to be seen at once on the screen you have it enclosed in a scrollpane with horizontal and vertical scrollbars used to examine it.
You can however print the whole map ( the size in pixels is more or less what can be represented in a single sheet of A4 paper).
The first image that you get is in fact only a schematic image with the 41 parts drawn as rectangles(barrel) or disks (endcap). At this level it is possible to decide for the display of a single part (for example only pixel or strip tracker, only endcap or barrel, only a single one of the 41 layers).
It will be possible to display details about single modules by using the window buttons and menu:

The details displayed for each event depend on what you select in the branch "CustomEvent":

Path from the demo to the complete implementation in Orca

All classes,including those already implemented in the demo, should be rewritten from scratch. Anyhow we can use the demo to train ourselves in some good object oriented programming practice and to solve some problems:

  1. The demo works with ORCA_6_2_3 . Starting with ORCA_6_3_0 a new Iguana architecture has been implemented. So the first thing to do , is to reimplement the demo with the new Iguana architecture.
  2. Remove all unnecessary public data members
  3. Implement TkSceneUpdate as a singleton avoiding the need to pass its adress in the class constructor .
  4. Remove bugs in the demo using the DDD debugger
  5. Remove hard-coded detector data.
  6. Define a destructor for each object.

Here you can access an early version of the software.

Here you can access released code on afs.

Cross Reference

CVS browser

Class Documentation here

Repository structure