This document only addresses the acquisition services of the new timing system, related to the superconducting LINAC (previously called LCLS2 timing). BSA and BLD from the normal conducting LINAC timing system (previously LCLS1 timing system) are not in the scope. That said, the information described here has multiple overlaps with the normal conducting timing system and may be useful for the ones aiming to understand them.
BSA, BSSS, BLD, and BSAS. All of them are part of something called acquisition services. They all achieve the same goal but present the data in different formats. So, let's start by understanding what is the goal of these services.
Let's take a look at a small accelerator, containing 4 detectors: a Bunch Length, a BPM (Beam Position Monitor), a Bunch Charge, and a GMD (gas monitor detector). The diagram below tells the tragic story of an electron bunch that was born violently by an Electron Cannon, ran close to the speed of light, passed through each of the sensors along the time, and found its end by hitting a wall in the Electron Beam Dump. Before being diverted, the electron bunch created a photon bunch, which kept a straight trajectory, crossing detectors that measured the photon bunch.
Disclaimers for people that need things more precise:
Continuing... Once the electron bunch is created, it receives a timestamp from the timing system. The timestamp can be simplified into a number called Pulse ID (PID). This will be the electron bunch SSN (Social Security Number) during its entire 10 microseconds of life. As it crosses each sensor, the systems operating there can measure the different bunch characteristics and attribute them to the PID. The photon bunch created from the electron bunch inherits its PID and continues carrying that stamp.
This is useful because now we can answer the following question: what was the X and Y position, and the charge of the electron bunch 1234? You can put together in a table different aspects of the bunch, seeing the entire picture.
Bunch Length | BPM | Bunch Charge | Gas Monitor Detector (GMD) | ||||||
---|---|---|---|---|---|---|---|---|---|
PID | ASUM | AIMAX | BSUM | BIMAX | X | Y | TMIT | Charge | Photon Energy |
1234 | 2.34 | 5.67 | 1.23 | 4.56 | 0.57 | 0.47 | 2.89 | 2.9 | 1.2 |
Now, there're other questions that the acquisition services can answer: what were the characteristics of a sequence of electron bunches? How did they compare? Is there a tendency over time? This is useful to diagnose a problem or to check if a new tunning made the accelerator improve performance, for example.
The diagram below shows 3 different electron bunches, with different PIDs, and the measurements from each sensor.
Now we can place every measurement in a table and compare them, make calculations, and put them on charts. You got the idea.
Bunch Length | BPM | Bunch Charge | Gas Monitor Detector (GMD) | ||||||
---|---|---|---|---|---|---|---|---|---|
PID | ASUM | AIMAX | BSUM | BIMAX | X | Y | TMIT | Charge | Photon Energy |
1234 | 2.34 | 5.67 | 1.23 | 4.56 | 0.57 | 0.47 | 2.89 | 2.9 | 1.2 |
1345 | 2.89 | 5.12 | 1.58 | 4.23 | 0.51 | 0.43 | 2.32 | 2.16 | 1.04 |
1456 | 2.92 | 4.97 | 1.67 | 4.10 | 0.49 | 0.41 | 2.04 | 1.94 | 0.94 |
An important thing about the location of the data: there's no central area where you can find a table like this. The system responsible for each sensor holds its own data and makes it available so someone can collect them and build a table like this.
How do you, as an interested person, have access to the data so you can study the accelerator status over time? Here's where the Acquisition Services come in for your help. There are four ways in which someone can retrieve the data. They are:
BSA - Beam Synchronous Acquisition
BSSS - Beam Synchronous Scalar Service
BLD - Beam Line Data
BSAS - Beam Synchronous Acquisition Service
A note of advice: don't try to understand what each service is just by looking at the acronym definition. They give only a clue of what to expect. Just think of the acronyms as the service name and don't think about what each letter represents.
But before explaining each service, there's an important concept that is used by all of the services: the timing filter.
For the timing system provided for the superconducting accelerator, there's a way to configure a timing rate that is identical throughout all the systems, no matter if you are configuring a BSA acquisition, a global BLD configuration, or a trigger for a device.
The first main choice to make is the mode of frequency rate that you want. There are 3 of them:
The rate mode will be detailed soon after we talk about another important concept.
The second main choice is the destination where the electron bunch is going. You chose a frequency before and now you can add an additional filter with the destination. This filter allows you to combine things like 10 kHz frequency, but consider only the bunches going to the HXR undulator. This filter is optional. Here are the choices to activate or deactivate it:
What are the possible destinations that you can add to your list? At the moment of this writing, this is the list:
This nice screen allows you to check your destinations to add to the list. Internally, they are translated into something called a destination mask. The table below is here just in case a geek person wants you to tell your destination mask of choice, and then you can show how smart you are:
Destination | Destination Mask Hexadecimal | Destination Mask Decimal |
---|---|---|
LASER | 0x1 | 1 |
SC_DIAG0 | 0x2 | 2 |
SC_BSYD | 0x4 | 4 |
SC_HXR | 0x8 | 8 |
SC_SXR | 0x10 | 16 |
SC_DASEL | 0x20 | 32 |
If you want more than one destination, then just add the numbers. Example: SC_BSYD and SC_SXR. 4 + 16 = 20. In hexadecimal this is 0x14.
The screen below does all the math:
If you are not an EPICS engineer you are free to jump this section.
So far, these are the PVs for the choices we've described:
The first thing to do if you want to define a fixed rate mode is to select Fixed Rate as shown in the previous image. The next thing is just to choose from one of the available rates.
And that's all. Your fixed rate filter is complete.
The AC rate mode uses the same logic from the original timing system available in the normal conducting LINAC. For an introduction to the concept of time slot, please read LCLS 1 Event Generator for Dummies.
The first thing to do when working with AC Rate mode is to choose this mode:
Next, you need to choose one frequency from the list:
Last, select the time slots associated with the selected frequency:
Make sure you understand the result of selecting more than one time slot. For example, if you select 60 Hz, and TS1 and TS4, it will sum up the 60 Hz from both time slots, resulting in a 120 Hz frequency.
In the same way we have a mask for the destination, here we have a mask for the timeslots, too.
Time Slot | Time Slot Mask Hexadecimal | Time Slot Mask Decimal |
---|---|---|
TS1 | 0x1 | 1 |
TS2 | 0x2 | 2 |
TS3 | 0x4 | 4 |
TS4 | 0x8 | 8 |
TS5 | 0x10 | 16 |
TS6 | 0x20 | 32 |
The logic is the same as the destination mask: add the selected time slot masks when you want more than one. Here's the screen calculating the mask for TS1 and TS4 selected at the same time:
As we did with Fixed Rate and AC Rate, to start using the Experiment Sequence mode, the first thing is to select it on the list:
This is an EPICS engineer exclusive. But you can look at it if you want.
As mentioned in the Big Picture section, each system holds its own measured signals related to a pulse ID (PID). Thinking of the BPM as an example, BSA has this organization for the data:
Observing this we can make a few conclusions. One is that data is stored in lists or arrays. There's only one array for the pulse ID and each signal has its own array. All arrays have 20,000 elements available to store data. The Bunch Lenght will have the pulse ID array plus 4 additional arrays for the signals. The GMD and Bunch Charge have only one array for one signal, plus the pulse ID.
So, each system will have a different number of arrays, depending on how many signals it needs to make available. The maximum number of signals allowed is 31.
In row 1 of each signal array is all the data collected during the pulse ID in row 1, so far so on. So, if you need to know what is the pulse ID for TMIT in row 34, you just need to go to the PID array and look at the content of row 34.
If you don't want to sound like a snake or spit on someone, we recommend pronouncing this service name as B-triple-S.