Muon Indexing

M. Fortner

0.0 Introduction

The muon index is general purpose container for the parameters to describe an address of any part of the muon system. MuoIndex contains two smaller containers: MuoSectionIndex and MuoCellIndex to hold coarse and fine detector address information.

A translator class MuoIndexTrans contains the rules to translate a MuoIndex into addresses used in other parts of reconstruction: eg. GEANT, Geometry, and Unpacking. The class also provides a means to get a MuoIndex from the addressing of those other packages

1.0 General Description

Indexing of muon data encompasses many users, including offline and online data. For general offline applications there is an agreed upon set of parameters which are contained in the MuoIndex class. Specialized offline index formats exist for historical reasons for geometry and monte carlo data and there are conversions available from the MuoIndex format. Online formats are associated with the real-time applications at L2 and L3 triggering. These online formats must meet the needs of specific hardware and limited time budgets to manipulate and utilize the data.

At the broadest level the muon system is divided into a central region (WAMUS) and two forward regions (FAMUS north and south). In each region there are wire devices and scintillator devices. The proportional drift tube (PDT) is the central wire device, and the mini drift tube (MDT) is the forward wire device. The muon scintillator (MSC) has common properties in all regions of the muon system, differing only in physical size and number of photomultiplier tubes attached to a single scintillator.

At the next level the muon system is organized into three layers: an A-layer between the calorimeter and iron toroid magnet, a B-layer immediately outside the toroid, and a C-layer at the outer limit of the detector. The muon structures divide into 8 octants each covering a 45 degree section of the detector. In the central region, the structure are also split into 3, 4, or 5 barrels along the z-axis of the detector.

At the finest level of the muon system the wire devices are split into 3 or 4 planes and segmented in a fashion that roughly corresponds to the pseudorapidity, eta. The scintillator effective resides in a single plane and is divided in both the eta and phi directions. MDT units are in eight-wire groups and scintillator can have either one or two tubes associated with one physical piece.

2.0 Muon Index

The offline muon index is a package of classes designed for use with all muon software applications. The package resides in CVS as muon_index. Within the package are four classes: MuoIndex, MuoSectionIndex, MuoCellIndex, and MuoIndexTrans. The first three classes are used to contain the standard index, act as keys for standard library classes such as a map, and permit iteration from one index to nearby indices. The final class MuoIndexTrans contains static data and methods to convert the standard MuoIndex into other offline and online formats.

2.1 MuoIndex

This is a container to hold the parameters that describe a complete address in the muon system. It contains a MuoSectionIndex and MuoCellIndex. Indices are equal only if both the section and cell indices are equal. Indices can be arranged in order from least to greatest with a less-than operation based on the values of the section first then the cell. The index parameters in the MuoIndex are global in nature and skip values to represent missing elements.

The section describes a rigid group of elements in the muon system: one WAMUS PDT chamber, one FAMUS MDT octant, or the set of scintillators mounted on one PDT chamber or one MDT octant. The cell describes an individual readout channel within one section.

2.2 MuoSectionIndex

This is a container to hold the coarse address information. Section indices are equal if all parameters are equal. The parameters are arranged hierarchically so that they may be ordered from least to greatest using the less-than operation. The container can self-test for validity and iterate to adjacent sections in any of its parameters. The defined index parameters in order from most significant to least significant are as follows:

_region // Central: 0, north: 1, south: 2
_type // Wire: 0, scint: 1
_layer // A: 0, B: 1, C: 2
_octant // Increasing phi, 0 - 7
_barrel // Forward: 0, Central: increasing z, 0-4

2.3 MuoCellIndex

This is a container to hold the fine address information. Cell indices are equal if all parameters are equal. The parameters are arranged hierarchically so that they may be ordered from least to greatest using the less-than operation. The container can self-test for validity and iterate to adjacent cells in any of its parameters. The defined index parameters in order from most significant to least significant are as follows:

_plane // Scint: 0, Wire: increasing away from origin, 0 - 3
_eta // Central: increasing in z, Forward: increasing in r
_phi // Wire: 0, Scint: increasing in phi
_tube // Central scint C-layer: 0-1, Forward wire: 0-7

2.4 MuoIndexTrans

This class is designed to translate between MuoIndex and other addressing schemes used in the muon system. The methods only couple to MuoIndex and standard structures like vector.

Monte Carlo events are based on a simple vector of integers and conversions to and from MuoIndex are supported.

The geometry package is based on ``modules'' which correspond to sections, and ``channels'' which correspond to cells. The geometry package expects a single integer for each of these functions which MuoIndexTrans can extract from a MuoIndex. In addition, the PDT geometry is based on the Run I geometry which is given by a local coordinate system, supported by MuoIndexTrans.

Raw data is in the L3 format and is also defined by integer ``modules'' and ``channels'', but are not the same as those used by geometry. L3 format modules correspond to individual readout devices (1/2 a Muon Readout Card) and contain multiple sections for MDT and MSC data. L2 format appears for the purposes of simulation and diagnostics in the offline software and differs from the L3 format due to the severe time constraints at L2, but are also supported by the MuoIndexTrans class.

2.5 Classes
MuoIndex : .cpp .hpp

MuoIndexTrans : .cpp .hpp

3.0 Monte Carlo Addressing

The GEANT Monte Carlo has an index format that pre-dates the MuoIndex definition. It consists of a simple STL vector of six integers. The contents, and map to MuoIndex parameters, are defined as follows:

= _layer
= _barrel, for _region = 0
= 6, for _region = 1
= 8, for _type = 2
= _octant
= _plane, for _type = 0
= 4, for _type = 1
= _eta, for _region = 0 or _type = 1
= _eta * 8 + _tube, for _region > 0 and _type = 0
= _phi
The Monte Carlo index does not distinguish between different phototubes on the same scintillator.

4.0 Muon Geometry

The muon geometry index is used to access infromation from the geometry database. It consists of two parts: one integer to index a rigid body with defined position and alignment corrections, and one integer to index the fixed offsets to detector elements within the rigid body.

The PDT geometry was defined in Run I and is in a coordinate system local to each PDT chamber. The local coordinate system is based on an orientation of the PDT chamber such that the readout electronics is up and at the near end. Within the local coordinate system planes count with 0 at the top and 2 or 3 at the bottom, and wires in a plane count from 0 at left.

The MDT geometry ignores the eight-wire groupings and counts each wire in the plane individually from 0 at the end nearest the beam line to a maximum of 383 in some C-layer octants.

The MSC geometry ignores the parameter for the number of tubes, and treats all tubes on the same piece in the same way.

5.0 Online Raw Data

5.1 L3 Format

The L3 format is generated by the readout DSPs on the detector front ends. Each readout DSP send its data to a Muon Readout Card. The data includes a header block with a module id that uniquely identifies the readout DSP where the data originated. After the header comes data for each active channel and includes a channel id that uniquely identifies the readout channel from all others with the same module id.

Time constraints in L3, make it highly desirable to have certain channels readout directly after one another. This includes readout of the PDT channels that share the same connected wire and readout of MSC channels that come from to the same piece of scintillator. Readout of eight-tube units of the MDT may also be in this category.

In order to diagnose DSP data readout problems, the channels are read in increasing order of their channel id. This order is set by the physical location of the input cables. For the PDTs the cables arrive in an order prescibed by the local geometry, but that order does maintain the rule that keeps both channels from the same connected wire in direct succession.

5.2 L2 Format

The L2 format is based on the L3 format and comes from the same readout DSP at the front end. L2 data includes a header in the same form as the L3 format with a module id. The hits correspond to individual channels from the front end.

The L2 trigger has the constraint that each 4-byte hit sent to the system should have sufficient address information to distinguish it from other hits that might come from other front ends into the same trigger card. This often requires duplicating some of the module id information in the L2 hit address.

Within the L2 trigger card the address is routed based on the address and the bits may be remapped internally into a scheme that provides the fastest lookups within the L2 DSPs. To facilitae routing and remapping the hit addresses are split into bit fields as much as possible.

The following hit addresses are the current proposal.

5.2.1 PDT Hit Addresses

The hit address follows much of the local geometry descibed under muon geometry in a preceding section. The one exception is that two connected wires make up a pair where the local left side of the pair is ``even'' and the local right side of the pair is ``odd''. This pairing reduces the number of wire in the eta coordinate by a factor of two.

bit 0 : pair member
bit 1-2 : local plane
bit 3-6 : local wire in plane divided by 2
bit 7-9 : barrel
bit 10-12 : octant
bit 13-14 : layer
bit 15 : type ( = 0 )

5.2.2 MDT Hit Addresses

The hit address follows the standard index down to the level of the plane and eta indices. If the L2 data format includes all eight wires in a unit, then the address would stop there. If the L2 data format includes a single wire only, an additional three bits are required in a second word to identify the hit.

bit 0-1 : plane
bit 2-7 : eta
bit 8-10 : octant
bit 11-12 : layer
bit 13-14 : region
bit 15 : type ( = 0 )

5.2.3 MSC Hit Addresses

The hit address generally follows the standard index. A special parameter called the suboctant is introduced to represent the electronics card (SFE) that serves a set of up to 48 phototubes designated by PMT #. The map of the suboctant and PMT # to eta and phi of the index depends on the region, layer, and octant.

bit 0-6 : PMT #
bit 7 : suboctant
bit 8-10 : octant
bit 11-12 : layer
bit 13-14 : region
bit 15 : type ( = 1 )


Last Modified: 12:41am , July 24, 1998