A proposal for TkrDigi's

February 8, 2001 Software Meeting -- LSR

Generally speaking, the TKR digis are the objects which represent the raw data or MC hit data in the TDS, and get converted by the clustering algorithm into clusters.

Yesterday, at the core software meeting, I proposed  a structure like ("list" could be "vector"):

A TkrDigi contains a list of  TkrLayers.
   
A TkrLayer contains a layer Id (layer number and X/Y) and a list of TkrTowers.
   
     A TkrTower contains a tower Id, 2-length list of TOT's and a list of TkrLadders.
           
A TkrLadder contains a ladder Id and a list of hit Idents.
                An hit Ident contains the info about a hit strip: layer, tower, controller, strip#, etc.

I came up with this structure because it automatically encodes the rule for not continuing clusters over ladders and towers:

    Iterate over layers {
        Iterate over towers {
            Iterate over ladders {
                Sort the hits in this ladder;
                Cluster the hits;
                Add the clusters to the list of clusters for this layer;
            }
        }
    }

Toby responded with another idea, which goes something like::

A TkrDigi is an contained object consisting of:
    a tower number;
    a plane ID;
    2 TOT's; and
    a list of hit Idents.
        A hit Ident is as above.

The list of TkrDigis (I don't know what it's name is!) makes up the input to the clustering algorithm. The structure is a lot simpler, and clustering occurs by simply looping over this list. The order of the items in the list is irrelevant; the output clusters for all towers in each plane are collected into a global plane, and then sorted afterwards, as necessary. Ladder boundaries need to be handled in the algorithm, but it is the essentially the same work that would have been done before in the data converter.

I'm now inclined to go with Toby's idea, or something like it. If there are no objections, we can start implementing it.