Project

General

Profile

Interpreting Wire Chamber TDC Data

The main heart of the Wire Chamber TDC data structure is a triple nested vector:

  std::vector<std::vector<TdcEventData>> tdcEvents; 
  class TdcEventData
  {
  public:
    struct TdcEventHeader tdcEventHeader;
    // Vector of Hits within a single trigger/event and this TDC
    std::vector<struct TDCFragment::TdcHit> tdcHits;  
  };

For tdcEvents, the outer vector is a loop over all the events/triggers for the whole
spill. The second level vector is a loop over the 16 (up to 16) TDCs in the
event. Then the data element TdcEventData has a TdcEventHeader with the
trigger time and a final vector of the hits found during the trigger window.

The other data members are:

  struct TdcControllerHeader controllerHeader;
  std::vector<struct TdcSpillHeader> tdcSpillHeaders; 

The controllerHeader comes from the TDC controller once per spill; the
TdcSpillHeaders come once per TDC per spill. They contain mostly
diagnostic information likes status flags; for data interpretation, the
most important items is the trigger counters. Controller and all TDCs
have separate counters in their spill headers, and they all must match,
otherwise the data are suspect.

The TDCFragment.cc print() method has an example of how to iterate
over the vectors, which can be a skosh confusing.

The DumpTDCData.cc application demonstrates how to call LariatFragment::fillFromBuffer()
in order to package the raw data into the vectors shown above, given
an input raw data file. The fillFromBuffer() can also be called from the
ArtDaq framework on a raw data fragment, as demonstrated in EVB_module.cc

MWC TDC mapping

// channel            wires
//   0   |-----------| 1
// TDC 3 |           |
//   63  |           |
//       |           | Wire Chamber 1
//   0   |           |
// TDC 4 |           |
//   63  |-----------| 128
//       TDC1     TDC2
//       0  63   0  63 channel
// wires 1         128

// channel            wires
//   0   |-----------| 1
// TDC 7 |           |
//   63  |           |
//       |           | Wire Chamber 2
//   0   |           |
// TDC 8 |           |
//   63  |-----------| 128
//       TDC5     TDC6
//       0  63   0  63 channel
// wires 1         128

// channel            wires
//   0   |-----------| 1
// TDC 11|           |
//   63  |           |
//       |           | Wire Chamber 3
//   0   |           |
// TDC 12|           |
//   63  |-----------| 128
//       TDC9     TDC10
//       0  63   0  63 channel
// wires 1         128

// channel            wires
//   0   |-----------| 1
// TDC 15|           |
//   63  |           |
//       |           | Wire Chamber 4
//   0   |           |
// TDC 16|           |
//   63  |-----------| 128
//       TDC13    TDC14
//       0  63   0  63 channel
// wires 1         128