You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,20 +14,141 @@ The schematics of the LCS is shown below. Per laser pulse, there will be two sig
14
14
15
15
More information about the LCS and the hardware side of the aging monitoring can be found [here](https://indico.cern.ch/event/1229241/contributions/5172798/attachments/2561719/4420583/Ageing-related%20tasks.pdf).
16
16
17
-
### `AgingLaserTask` configuration
17
+
---
18
18
19
-
An example configuration can be found in `etc/ft0-aging-laser.json`. The task parameters are:
19
+
### AgingLaserTask
20
20
21
-
-`detectorChannelIDs`: list of detector channels to be monitored. Omit this parameter to use all.
22
-
-`referenceChannelIDs`: the reference channel IDs, should be: "208, 209, 210, 211".
23
-
-`detectorAmpCut`: Lower cut on the detector amplitude in ADC ch, default "0". **TODO**: this has no effect at the moment.
24
-
-`referenceAmpCut`: Lower cut on the reference channel amplitude in ADC ch to ignore cross talk, default "100".
25
-
-`laserTriggerBCs`: list of BCs when the laser fires, should be "0, 1783".
26
-
-`detectorBCdelay`: amount of BCs after the laser trigger BCs when the laser pulse is expected in the detector, should be "131".
27
-
-`referencePeak1BCdelays`: amount of BCs after the laser trigger BCs when the first laser pulse is expected in the reference channels, should be "115, 115, 115, 115". One value per reference channel, even though they will be the same with the current LCS setup.
28
-
-`referencePeak2BCdelays`: amount of BCs after the laser trigger BCs when the second laser pulse is expected in the reference channels, should be "136, 142, 135, 141". One value per reference channel.
29
-
-`debug`: If true, an additional set of plots can be produced for debugging purposes, default "false".
21
+
#### What it does (high level)
30
22
31
-
The channel ID and BC values delays are rather fixed and should not change unless the LCS changes significantly.
23
+
* Selects laser events in specific bunch crossings (BCs).
24
+
* Separately identifies:
32
25
33
-
**TODO**: should we apply the amplitude cuts in the SliceTrendingTask instead?
26
+
* detector-channel laser signals,
27
+
* reference-channel peak-1 and peak-2 signals (two per laser shot).
28
+
* Fills per-channel **amplitude** and **time** histograms, split by ADC where relevant.
29
+
* (Optional) Produces a rich set of debug histograms.
30
+
31
+
This task is the *producer* of the raw per-channel spectra used later by post-processing.
32
+
33
+
#### Inputs
34
+
35
+
* Digits and channel streams (from workflow config), e.g.
Reduce the raw per-channel amplitude spectra to **one scalar per channel** representing the **weighted-mean amplitude**, normalized to the reference channels. Output is split into two histograms: A-side (channels 0–95) and C-side (channels 96–207).
97
+
98
+
#### Inputs
99
+
100
+
* From the QC repository path `FT0/MO/AgingLaser`:
101
+
102
+
*`AmpPerChannel` (TH2): amplitude (ADC) vs channel, aggregated by the task.
103
+
*(If you renamed the source MO, adjust the retrieval in the task config.)*
104
+
105
+
#### Algorithm (per update)
106
+
107
+
1.**Reference normalization**
108
+
109
+
* For each configured reference channel:
110
+
111
+
* Project its slice `AmpPerChannel(ch)` → `TH1`.
112
+
* In `[adcSearchMin, adcSearchMax]` find the maximum `x_max`.
113
+
* Fit a Gaussian in `[(1−a)·x_max, (1+b)·x_max]` → mean `μ_ref`.
114
+
*`norm = average(μ_ref)` over all successful fits.
115
+
2.**Per-channel value**
116
+
117
+
* For **every** detector channel:
118
+
119
+
* Find the global maximum `x_max`.
120
+
* In the same fractional window around `x_max`, compute **weighted mean**
121
+
`⟨x⟩ = Σ w_i x_i / Σ w_i` with weights `w_i = bin content`.
Having two output MOs, allows us to create two time series, one per side. An example workflow that accomplishes this is in `etc/ft0-aging-laser-postproc.json`.
149
+
150
+
#### Notes & gotchas
151
+
152
+
***Off-by-one binning (C side)**: for channels `96–207` you need **112 bins** and an **exclusive** upper edge at `208`. Using `207` with 112 bins yields non-unit bin width and will trip histogram helpers.
153
+
***Reference fits**: if all Gaussian fits fail, the post-proc update exits early and publishes nothing for that cycle.
154
+
***Amplitude cuts**: `detectorAmpCut` is currently not used by the task’s filling logic; if you need a cut in the derived quantity, apply it in post-processing or trending.
0 commit comments