I have now stopped working on SMT clustering at Level 3.
Please contact Michele Petteni (mpetteni@fnal.gov) wrt these packages.
The lastest changes to the unpacker are here.

References:
D0Note 3822 (Clustering)
D0Note 3829 (Rawdata)

Level 3 clustering in the SMT


The level 3 clustering for the SMT comprises three packages:

(a) l3fsmtunptool: unpacking and 2d clustering
(b) l3fsmtcluster: 3d clustering
(c) l3fsmtanalyze: analysis of the results of (a) and (b).


Results for l3fsmtunptool (by Robert Illingworth)
(Questions/comments/complaints/etc. about the MC matching to me (Daniela), please.)

The l3fsmtunptool groups the fired strips into clusters and determines the centroid position for each cluster.
Axial (p) and stereo (n) side of the ladder are clustered separately. The centroid position is derived from the centroid strip number (weighted mean):
centroid stripnumber = sum of pulseheight*stripnumber for all strips incluster/sum of pulseheights for strips cluster
The actual position is calculated by:

centroid_position = (centroid_stripnumber-1) * pitch (a)
                             + adjust_parameter (b)
                             + strip0 (c)

(a) -1: Strip numbering starts at 1
(b) adjust parameter to compensate for magnetic field
(c) strip0: location of the first strip (at the most positive local x positon of the ladder)

Local and global coordinates etc. are explained in SMT local coordinate system and indexing scheme by Meenakshi Narain.

The l3fsmtunptool produces L3SmtBarrelClusters.
These are two-dimensional clusters, e.g. clusters on axial layers provide (useful) information in x and y and clusters on 90 deg stereo layers in z. The missing dimensions are set to the values at the center of the ladder. Clusters on the 2 deg stereo layers do not provide much useful information at this point. For these hits z is set to the position at the center of the ladder, x and y are derived from x_local= centroid position*cos(2 deg). The hits are sorted by ladder (and each ladder is sorted in phi). This is the output format as needed by the l3fsmtcluster package. If you need the clusters sorted in by layer and phi, try this bit of code. If you need them overall sorted by phi you'll have to sort them yourself, or you can try and hassle (but nicely please !!!!) Robert as this isn't written yet.

Description of the Monte-Carlo matching. The MC matching is done by the l3famtanalyze package. The separation of the tools and their evaluation is necessary as most of the offline/simulation packages which are necessary for the MC matching will never (just an educated guess) run on NT.
As a consequence L3SmtBarrelClusters themselves do not contain any Monte Carlo information. If you want to match a L3SmtBarrelCluster to a SimTkHit you can use the methods provided by the L3Smt2dMatch class in l3fsmtanalyze. I put some example code here.
NEW:
As of l3fsmtanalyze v00-02-09 there exists an equivalent feature for L3Smt3dHits (see below). The code is identical, just replace L3Smt2dMatch with L3Smt3dMatch. Please be aware that the MC matching can only be used for barrel hits.


The following plots are for a ttbar sample without minimum bias events.

Resolution in x-y (axial layers) for SmtBarrelClusters. (This is the difference between the reconstructed local x and the local x of the matched MC hit.)

Resolution in z (90 deg stereo layers) for SmtBarrelClusters.

Resolution in strips (2 deg stereo layers) for SmtBarrelClusters. (I use the offline smt_digimatch package to determine the MC centroid position.)

Efficiencies per layer.
A Monte-Carlo hit is considered matched if:
a) axial layers: Distance to closest reconstructed hit is less than 100 microns in x-y.
b) stereo layers 90 deg (layer 1,2,5,6): Distance to closest reconstructed hit is less than 100 microns in z.
c) stereo layers 2 deg (layer 3,4,7,8): Distance to closest reconstructed hit is less than 1 strip.
Efficiency is defined as number of matched MC hits divided by the total number of MC hits. Only MC hits with a GEANT code > 4 are taken into account (this has changed for newer releases). The total number of MC hits is different for the p and n sides, as occasionally an MC hit only fires strips on one side.

Efficiency for a Z-> ee sample.

Timing:
ttbar: 20 ms on d0mino for an average of 566 clusters per event.
zee: 10 ms for an average of 191 clusters per event.


Running l3fsmtunptool:
Please read Robert's instructions. (For more detailed information try Robert's unpacking tool page)
You might get away with trial and error and copying the following files to the directory you are running from:
$SRT_PUBLIC_CONTEXT/rundata/d0sim/cfg.dat
$SRT_PUBLIC_CONTEXT/l3fsmtunptool/bin/translate.map (for really new versions you don't need to copy that)
trigger lists (in l3fsmtunptool/bin/) and tools.rcp.
You'll have to remove the reference to the L3RunConfigMgr from the trigger list, otherwise you are trying to initialize the run configuration twice and the program will fail.


Results for l3fsmtcluster (by Daniela Bauer)

The l3fsmtcluster package uses the output of the l3fsmtunptool to form true 3d clusters.
The algorithm is described here.

The l3fsmtcluster package produces L3Smt3dHits. These are true 3d hits (meaningful information in x,y,z) made out of an axial and a stereo cluster on the same ladder. All hits derived from the same axial cluster belong to one collection. Each collection given a number > 0. If there are only p or only n clusters on a ladder, these hits are kept as well (pseudo 3 d clusters), but their collection number is set to 0. The function nCollect() which return the collection number can therefore also be used to distinguish between true and pseudo 3d clusters.


If you want to run the binary for l3fsmtcluster (L3TsmtClustAna), you'll need to 'un-comment' geometry_managment, smtraw and unpack_reco in LIBRARIES and RegSmtData2RawUnp, RegPackReco and RegisterGeometryManagment in OBJECTS. (Yet another annoying feature brought to you by Windows NT.)


The resolutions are for the Z->ee file.

Resolution for 90 deg stereo clusters.

Resolution for 2 deg stereo clusters.
(Note that for layer 3 and 8 the angle is -2 deg, while it is +2 deg for layer 4 and 7. Nevertheless (if I got that right) all the 2 deg strips are parallel as layer 3 and 8 are 'flipped', i.e. p and n side are swapped.)

Efficiencies (see below) per layer:
Z->ee
ttbar

A Monte-Carlo hit is considered matched if:
a) On a layer with a 90 deg stereo layer, the distance to closest reconstructed hit is less than 1000 microns.
b) On a layer with a 2 deg stereo layer, the weighted distance (sqrt((x_reco-x_mc)**2+(y_reco-y_mc)**2+ 0.1*(z_reco-z_mc)**2)) to closest reconstructed hit is less than 1000 microns.

Only MC hits which fire strips on both sides of one layer are taken into account. This should also eliminate MC hits which are produced in the support structures.

Timing:
ttbar: 27 ms on d0mino for an average of 1068 clusters per event.
Zee: 4 ms for an average of 198 clusters per event.


The cluster tool also produces clusters for the disks. Up to relase t01.24.00 the default DoThisTool() will only reconstruct clusters in the barrel. From relase t01.25.00 DoThisTool() will cluster the whole detector. If you only need the barrels please use DoThisTool("barrels") instead to save time. To retrieve the disk clusters, please use:

_smt_cluster->DoThisTool("fdisks");       or
_smt_cluster->DoThisTool("hdisks");
and then:
const l3vector< L3Smt3dHit > & _fdiskclusters = _smt_cluster->getFdiskHits();
const l3vector< L3Smt3dHit > & _hdiskclusters = _smt_cluster->getHdiskHits();

The algorithm is (almost) the same as for the barrels.

Here are some preliminary results for the Z->ee file. (There is obviously a problem with the H-Disks, it is probably related to geometry problems, but maybe I am just doing something stupid.):

F-Disk: x-y and z view of the reconstructed clusters. The high number of unmatched clusters is partially due to ghosts.
F-Disk: Resolution in global x,y,z.
F-Disk: Absolute distance between reconstructed and matched hit, delta phi and efficiency. A MC hit is considered matched if the clostest reconstructed hit is less than 50 microns away. I don't take MC hits into account which 'get stuck' in the silicon (stepsize < 0.02). These hits usually fire the same strips as a 'real' hit, e.g. the same combination of strips is fired twice (or more) by the 'real' hit and its shower.
F-Disk: Resolution in x_local.
F-Disk: Resolution in z_local.

H-Disk: x-y and z view of the reconstructed clusters.
H-Disk: Resolution in global x,y,z.
H-Disk: Absolute distance between reconstructed and matched hit, delta phi and efficiency. A MC hit is considered matched if the clostest reconstructed hit is less than 300 microns away.
H-Disk: Resolution in x_local.
H-Disk: Resolution in z_local.



Geometry:
The description of the SMT geometry has changed for files generated with pmc03/d0sim (compared to files generated with pmc02). It now (p08?) has changed further, according to results of the 10% test. The geometry to be used for the unpacker is now a trigger list parameter. Please see the unpacker UserGuide and l3fsmtanalyze for further details. (Or ask Robert.) Sorry for any inconvenience. Have a nice day :-)



Daniela Bauer



Last update: 13/03/2001 (that date is in European notation :-)