# Presentation: 265042

## The Pixel/Micro-strip test-bench, test-beam DAQ system

## The Pixel/Silicon Strip DAQ

-   A DAQ has been developed in Milano to read-out these kind of detectors,    both at test-beam facilities and in laboratory tests.
-   Makes use of  modern PCI interface to the computer (low cost, well    documented and highly portable)   -  Requires ad-hoc mezzanine cards to interface read-out chips   -  a PCI extender allows a single PC to read several detectors at      once through individual PCI cards (more on this later)

- Project goals

-   The Pixel and Silicon Strip Detector share the same kind of read-out chip

## Project goals (cont)

- Provide a read-out environment for detector characterization inbench-test assemblies (already used for this purpose)
- Validation of the benefits of an Object Oriented design in a small scale project within the BTeV collaboration

-    The System has already been deployed and released to users.
-    Fully tested in Milano and operational at MTEST.

## Main system components

- External subsystem

-  Hardware components developed
-    at FERMILAB
-  Overall DAQ software developed  in Milano

## Data Flow Schematics

- Sensor

- FPIX...
- Read Out
- Chip

## Architecture

**A data driven DAQ**: data are produced by an external subsystem (PMC+ROC) at a variable rate while the host computer receives them at its own rate (depending upon CPU clock and processor current activity).
- The **PTA** FPGA has been programmed to get data from the external subsystem and to act as an intermediate *rate-balancing* buffer. This is accomplished by a periodic switching of the data flow between two RAM banks
- The architecture has been designed to allow for a **continuous, lossless** sustained data-rate

- FPGA

- Interrupt

- FPGA

## DAQ time evolution (0/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- 0

## DAQ time evolution(1/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- 0

- Shared
- memory

- PTA

## DAQ time evolution(2/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(3/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(4/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

- User limit

## DAQ time evolution(5/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(6/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(7/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(8/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(9/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(10/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(11/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(12/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(13/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(14/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## DAQ time evolution(15/15)

-   Basic mechanism of operation of the PCI card and the read-out:

- Bank0

- Time

- 0

- Bank1

- Shared
- memory

## The complete layout

**FPGA**

**FPGA**

- Interrupt
- handler

- Interrupt
- handler

**producer**

- Shared
- memory

**consumer**

- mass storage

- In a test-beam setup
- several detectors will
- be read-out
- simultaneously and
- data made available
- to the even-builder.

## A data driven DAQ

- Hits from the detectors are sent to read-out as soon as they areabove threshold (the process is driven by a clock synchronizedwith the accelerator clock)

- Each hit is tagged by PMC cards with a hardware generated time-stamp.

- An event, defined as “***a collection of equal time-stamp hits from multiple detectors***”, is built by the consumer process using an efficient sorting algorithm.

-    The DAQ framework (C++) allows adding and replacing different     event-building algorithms by defining an abstract interface to     the appropriate implementation. This allows for different detectors,    with different event-building strategies, to be read-out by the same     DAQ system.

## DAQ control

- The complete control of the DAQ system is performed through User Interfaces
- Both a command line and a graphical user interface (based on the QT library, _http://www.trolltech.com_) have been developed

## DAQ monitor

- Acquired data and related DAQ information are streamed through sockets to the network, where client code on remote machines can suitably make use of those informations for histogram and event display. The graphics and histogramming package of choice is ROOT (_http://root.cern.ch_).

## Full documentation is

- Automatically generated
- from source code and
- available on the WEB

## Slide 28

## Slide 29

## Conclusions

-    A multi-purpose DAQ system has been developed to be used by the    pixel and silicon strip detector communities

-   The system is flexible enough to accommodate other kind of detectors    as well as different event-building strategies:    -  provide a suitable PMC card
-     -  provide an implementation of the abstract *event-builder* class

-  The system will be used extensively in the upcoming test-beam as well   as in various laboratories to characterize detector performancies   (in use also by the group of Sergio Zimmerman at Berkely)

-   It has already been thoroughly and successfully tested both in Milano    and MTEST

-   Development of this DAQ has been an excellent ground to acquire
-    valuable expertise in modern software techniques. This experience
-    will be highly profitable to contribute to the development of the control
-    monitoring system of the detector

## Conclusions (cont)

- The project has been a useful teaching ground to explore the suitabilityof different hardware and software tecnologies
-   PCI has proven to be a useful, low cost and efficient approach to read-out   detectors in demanding environments like bench test and beam test
-   Design and implementation of a low/mid-size DAQ system in C++ has been    a good exercise (developed many useful ideas for a general DAQ)
-   Acquired much valued expertise in modern technologies such as:   -  FPGA programming   -  XML
-    -  GUI design in Qt (signal-slot approach)   -  Device driver development for the Linux Kernel
-    -  ...