1.1 General
At the CELSIUS storage ring in Uppsala an experiment called WASA is under
preparation. The goal of this experiment is to investigate the production and decays of light neutral mesons [1]. When reconstructing all the particles in a meson production event a large amount of measurements of track positions and of deposited energies are required. This is done by using a large number of sensors, about 5000, with attached signal handling devices. One of the devices extensively used in the experiment is a specially designed 16-channel discriminator. A discriminator compares the amplitude of a signal with a predefined value. The output can only be true or false, i.e. 1 or 0. There are about 60 discriminator cards to be arranged in different crates (card holders ).
Together with the discriminators there will be other types of cards. There will be nine crates in the experiment, each holding between 14 to 21 cards. To the crates a computer is connected for control and monitoring of all cards in the system for triggering the readout of data. A GUI (Graphical User Interface) of the crates and their contents is provided to simplify the monitoring. The whole setup can be seen schematically in figure 1.
crate crate CPU user
Figure 1. Setup of cards, crates and computer.
The interface between the computer and the crates consists of I
2C interfaces. Philips semiconductors developed the I
2C interface standard. It is a simple bi-directional 2-wire, serial data and serial clock bus for inter-IC control [1].
1.2 The Trigger system
A trigger system initiates the collection of data. It is required for extracting interesting events from an often high level of background events. A matrix of CsI scintillating crystals is used to detect primarly the meson decay photons. High energy photon cause showers of secondary electron; positrons and photons in the CsI. This may result in signals from several crystals for a single incoming photon. Discriminators are connected to the CsI crystals to compare the signals with preset thresholds. The discriminators are connected to cluster multiplicity modules and adders [2]. The last two components mentioned are not being further discussed in this report [1]. When hits occur in the CsI matrix the discriminators generate patterns resembling the position of the decay particles.
Then pattern recognition is used to decide if the data in an event is of interest or not, see
figure 2.
CsI crystal matrix discriminators
Figure 2. Block diagram of a trigger. The cluster in the bottom of the CsI matrix is of interest.
As seen in figure 2 several hits have occurred (grayed). The trigger suppresses the two
“single” hits but the cluster of hits is considered as interesting data. The trigger system consists of different levels. In the first level one finds out if there are any interesting data in fast plastic scintillators. The decision time is about 150 ns. The slower detectors signals can then be used in level two decisions that take 300-500 ns. It is very important to keep the handling time as short as possible and that the efficiency of the trigger is high because new events can occur during the data handling. The data handling time is
sometimes called deadtime (means busy not dead).
1.3 The Discriminators
Another name for a discriminator is comparator. A comparator compares a preset value with an input signal and the output is true or false. True if the input signal amplitude is higher than the preset value or the threshold, see figure 3.
a) b)
noise discriminator signal discriminator
false true
Figure 3. Output from a discriminator.
a) Noise with lower amplitude than threshold.
b) Signal with higher amplitude than threshold.
For the WASA experiment a special type of discriminator boards has been built
consisting of 16 discriminator channels. The discriminator boards are placed in crates. A crate is a cardholder often used with a bus system connected to it, allowing users to access specific card(s) register and memories. The bus system used with the discriminator cards is following the I
2C standard developed by Philips [1]. Each card has its own
internal board address. The addresses are set manually when installing the cards. This way it is possible to access a specific card. The crates used can hold 14 – 21 cards. One crate can hold different types of cards depending on what measurement or experiment being executed. There are nine crates connected to each other, each crate holding its own set of cards.
Cluster multiplicity modules and adders
1.4 The Program
A program can be used to test and control the discriminator cards. Each card type has its own range of addresses. By scanning through the crate the program can detect different cards by the addresses they are responding to. Providing the users with a GUI with this information and other tests it is possible to check if all channels in a card are working.
Sending a test-pulse with known amplitude to all discriminator channels performs a test.
If one or more channels are “dead” a pop-up window alarms the user. The program also provides the users with the ability to perform a visual check of when the channels react.
This gives the information of which channels are “dead” and if all channels react uniformly. All channels on a card are drawn in a chart form that is presented in a new pop-up window. A specific card chart can be viewed on user command.
The programming language used in building the discriminator control program was Visual C++ [3, 4]. Visual C++ is event driven, which means that the user or inner events like interrupts etc steers the route a program takes. The program waits for an event to happen. When an event occurs, e.g. a user selects a menu option the program executes this request. See figure 4.
1. Waits for an event 2. Gets a request and executes it 3. Waits for an event request
Figure 4. Execution of a request in an event driven program.
A single event can trigger off several other events. Drawing a line in a paint program triggers an event to redraw the window updating the window with the line in it.
A Visual C++ program contains different classes depending on what type of program is created. Each class is like a small program. There is no main() function as there is in C/C++. In Visual C++ the on-going loop polling for events could be called the main function but that part is hidden for the user and a programmer do not have to bother about it. Each class is started on request. Because Visual C++ is a windows program it is often used when creating GUIs. It has many predefined classes as windows, buttons and user friendly controls collected in what is called the MFC library (Microsoft Foundation Classes). If the program is created in a pedagogical way it is very self-instructing. Hence users does not need to have much experience about programming or computers to use the program.
The goal of the design of the computer program interfacing the discriminator boards has been to monitor and control each crate over the I
2C bus. Each I
2C bus is connected to a PC-station or a VME-station, making it possible to reach the system from any terminal on an Ethernet network. This part is not described here but is a very important part.
idling execute idling
In document
Visual C++ software for testing the discriminators in the WASA-experiment. a, b
(Page 3-6)