Muon Segment Reconstruction

Linked List Algorithm

Author: O. Peters (opeters@fnal.gov)

Introduction

Segment reconstruction is part of the muon reconstruction code in which the pattern recognition is done. Hits in the muon chambers are combined, and a straight line is fitted through the hits. This line is called a segment. Input to the segment reconstruction is a collection of reconstructed hits; the output is a collection of segments. Originally, the segment reconstruction was based on a combinatorial segment reconstruction algorithm, written by Alexander Kozelov et al. However, multiple algorithms were desired, and a linked list algorithm was consequently developed.

Recent Changes

16 Oct 2000

Initial documentation

17 Oct, 2000

Added RCP parameter for different χ2 cut options

Fixed PDT LinkIndices

Added scintillator matching for PDT segments

18 Oct 2000

Fixed MSC LinkIndices

Started MDT segment building

Algorithm

The algorithm is divided in XXX steps:

  1. Transformation of ‘global’ hits to ‘local’ hits
  2. Creation of links between hits
  3. Matching of links to local segments
  4. Fitting of local segments
  5. Fit of global segment to scintillator hits
  6. χ2 cut
  7. Transformation of local segments to global segments
  8. Fitting of global segments to other global segments

In the first step, we move the hits from their global coordinate system to a local coordinate system. This is done so we can work in a coordinate space where the drift ‘circles’ are in the x-y plane, and the wire direction is in the z direction. The plane in which the wires are located is transformed such that it is parallel to the y-axis. The hits in the local system are called PDTSegmentHits for the PDT system, and MDTSegmentHits for the MDT system. Also, because of the left-right ambiguity of the wire hits, two local hits are created for each wire hit: one on each side.

Then, the links between the hits are made. These links are lines between the local hits, whereby the position of the local hit is updated for the angle of the link. The created link is assigned to the leftmost hit. Links are not only made between hits on planes that are lying next to each other but also skipping planes. This is to make sure that when the track does not create a hit on one of the planes, the segment can still be found. At this point, a cut could be made to determine with which links to continue (which links are ‘physical’, e.g. pointing to the origin), so the process can be sped up. Such a cut is not yet in place however.

After finishing the links between the hits, the links are matched with one another. This is done in a specific way: each hit has a list of all the links, which are made with that hit. The hit on the other (right) side of the link might or might not have associated links of itself. If it has, it is first checked if the links of this ‘end-hit’ are matched already. If not, then the links of this hit are matched, and then the link on the left side of the hit is matched. In essence, links are matched from right to left. Matching is done in the following way: first it is checked if the difference in the angle between the two links is not too big. Too big is defined as the parameter: pdt_max_angle_diff for the PDT's and mdt_max_angle_diff for the MDT's. If the angles are compatible, it is checked if the separation in y between both links is not too large, as defined by the parameter pdt_max_y_diff and mdt_max_y_diff for respectively the PDT's and MDT's.

In step 4, when all links have been matched with other links, the links are first fitted with the hits that they are made from, to get a correct estimate for the position and direction of the segment. After this fit, a fit is done with all the hits which are used to find the segments. Note that the wire hits still have the left-right ambiguity, and that only the local hit closest to the segment is taken for the fit, not all local hits. After the fit, the segment is fitted with scintillator hits. Only scintillator hits which are in the same region, layer and octant (or one octant difference) are matched with the segment. A scintillator hit is said to match with the segment, if the combined error on the segment and scintillator hit in the plane of the scintillator is smaller than the difference in distance between the segment and the scintillator hit (this is done separately for the y and z direction). If multiple matching scintillators are found for the segment, the first one is fitted with the existing segment. For all the other scintillator hits, a new segment is created for each scintillator hit and fitted with the scintillator hit. However, most of the time only one scintillator hit is found to be matching with the segment. For the MDT's, the fitting with the scintillator is a bit more elaborate, for when the position of the segment along the wire is known, the axial and drift times of the MDT hit can be updated, and the fit should be redone. (This is currently not implemented; the scintillator hit is simply fitted with the present segment).

After the scintillator fit, the local segment is transformed back to the global system. At this point, a χ2 cut can be made. There are currently three options available, steered by the pdt_segment_cut_mode rcp parameter:

Finally, in the last step, segments can be combined. For example, segments in the B and C layer can be combined into a single segment, and the fit over their hits can then be redone. Also, single hits in the B layer with a matching segment in the C layer or vice versa can be matched (note, that in the segment reconstruction, single hits are (well, not yet) kept as potential segments). Or, a segment in the WAMUS A layer can be combined with a FAMUS A layer segment, and similar for B/C layers.

Implementation of algorithm

 The muon hits are divided in three ‘species’:

Because of the difference between PDT hits and MDT hits (angle dependence of drifttime to driftdistance relation for PDT, but not for MDT, see documentation for package muo_hit) we need a partly different algorithm for both types. The basic segment builder is called CombinatorialSegmentBuilder. This object contains two other 'builders': PDTCombinatorialSegmentBuilder and MDTCombinatorialSegmentBuilder, which, respectively, build segments in the central and forward system. The CombinatorialSegmentBuilder is given the different hit collections (namely PDTHitCollection, MDTHitCollection and MSCHitCollection), and first calls the PDTCombinatorialSegmentBuilder with the PDTHitCollection and the MSCHitCollection, so that the segments in the PDT chambers are made, and matched with the scintillators. Then the MDTCombinatorialSegmentBuilder is called with the MDTHitCollection and the MSCHitCollection, so that the segment in the MDT chambers are made and matched with the scintillators. After this, (which is not implemented yet), the 'GlobalSegmentMatcher' is called, which matches the different segments in the different layers and subsystems.

How to run segment reconstruction with the Linked List algorithm

To run the segment reconstruction with the Linked List algorithm, change the file muo_segmentreco/rcp/MuoSegmentReco.rcp:

string PackageName = "MuoSegmentReco"

//string SegmentAlgorithm = "Combinatorial"

string SegmentAlgorithm = "LinkedList"

int DebugLevel = 0

// --- Combinatorial algorithm parameters ---

bool combineBC = true

// Wamus

float MaxWamusDriftRes = 5.

float MaxWamusAxialRes = 30.

// Famus

float MaxFamusDriftRes = 0.5

float MaxFamusAxialRes = 30.

 

// --- Linked List algorithm parameters ---

double pdt_max_angle_diff = 0.1; // radians

double pdt_max_y_diff = 1; // cm 

 

Make sure that the string SegmentAlgorithm is set to "LinkedList".

Important difference

Note that the Linked List algorithm uses a different definition of a segment than the Combinatorial algorithm. The Linked List creates Segments, while the Combinatorial creates MuoSegments. Also, Segments are stored in a SegmentChunk, and not in a MuoSegmentChunk. This is to prevent any clashes in the future, which could happen if the MuoSegmentChunk would be modified.

RCP parameters

The RCP parameters needed for the Linked List algorithm are held in muo_segmentreco/rcp/MuoSegmentReco.rcp. They are listed under the header 'Linked List algorithm parameters'.

pdt_max_angle_diff

The maximum angle difference between two links between hits

pdt_max_y_diff

The maximum y difference at the hit which both links share

pdt_segment_cut_mode

The mode to use to cut on fitted segments. Options are: "all", "best", "cut"

pdt_segment_cut_chi2

The maximum χ2 of the segments to keep. Only used in conjunction with option "cut" for pdt_segment_cut_mode

mdt_max_angle_diff

The maximum angle difference between two links between hits

mdt_max_y_diff

The maximum y difference at the hit which both links share

mdt_segment_cut_mode

The mode to use to cut on fitted segments. Options are: "all", "best", "cut"

mdt_segment_cut_chi2

The maximum χ2 of the segments to keep. Only used in conjunction with option "cut" for mdt_segment_cut_mode

Not all parameters are put in the RCP file yet; there are some variables which still need to be modifiable through the RCP system. As the code is still under development, these options will increase.