Commit af59a58c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Update another 10 modules from CLICdp-Note-2019-006

parent e8eb170c
Pipeline #1262269 passed with stages
in 12 minutes and 27 seconds
# EventLoaderMuPixTelescope
**Maintainer**: Lennart Huth (lennart.huth@desy.de)
**Maintainer**: Lennart Huth (lennart.huth@desy.de)
**Module Type**: *GLOBAL*
**Status**: work in progress with some hard coded parts - needs polishing
**Status**: Work in progress
### Description
This module reads in and converts data taken with the MuPix-Telescope.
This module reads in and converts data taken with the MuPix telescope.
It requires one input file which contains the data of all planes in the telescope.
The data contains time-ordered readout frames.
For frame, the module loops over all hits and stores the row, column, timestamp, and ToT are stored on the clipboard.
It cannot be combined with other event loaders and does not require a `Metronome`.
### Parameters
* `input_directory`: Defines the input file. No default
* `Run`: not in use. Defaults to `-1`
* `is_sorted`: Defines if data recorded is on FPGA timestamp
sorted. Defaults to `false`
* `is_sorted`: Defines if data recorded is on FPGA timestamp sorted. Defaults to `false`
* `ts2_is_gray`: Defines if the timestamp is gray encoded or not. Defaults to `false`.
### Plots produced
For all detectors, the following plots are produced:
* 2D histogram of pixel hit positions
* 1D histogram of the pixel timestamps
......
......@@ -5,7 +5,7 @@
**Status**: Functional
### Description
This module loads raw data from a Timepix3 device and adds it to the clipboard. The input file must have extension `.dat` and are sorted into time order via the data file serial numbers. This code also identifies `trimdac` files and applies this mask to the pixels.
This module loads raw data from a Timepix3 [@timepix3] device and adds it to the clipboard. The input file must have extension `.dat` and are sorted into time order via the data file serial numbers. This code also identifies `trimdac` files and applies this mask to the pixels.
The data can be split into events using an event length in time, or using a maximum number of hits on a detector plane. `SpidrSignal` and `pixel` objects are loaded to the clipboard for each detector.
......@@ -15,15 +15,25 @@ This mode is used in the CLICdp telescope, and thus, the column-to-column phase
See also the Timepix3 chip manual version 1.9, section 3.2.1 and/or [@timepix3-talk], slides 25 and 48.
This module requires either another event loader of another detector type before which defines the event start and end times (Event object on the clipboard) or an instance of the Metronome module which provides this information.
The frame-based readout mode of the Timepix3 is not supported.
The calibration is performed as described in [@Pitters_2019] [@cds-timepix3-calibration] and requires a Timepix3 plane to be set as `role = DUT`.
### Parameters
* `input_directory`: Path to the directory above the data directory for each device. The device name is added to the path during the module.
* `trigger_latency`:
* `calibration_path`: Path to the calibration directory. If this parameter is set, calibration will be applied to the DUT. Assumed folder structure is `[calibration_path]/[detector name]/cal_thr_[threshold]_ik_[ikrum dac]/[detector name]_cal_[tot/toa].txt`. The assumed file structure is `[col | row | val1 | val2 | etc.]`.
* `calibration_path`: Path to the calibration directory. If this parameter is set, a calibration will be applied to the Timepix3 plane set as `role = DUT`. The assumed folder structure is `[calibration_path]/[detector name]/cal_thr_[threshold]_ik_[ikrum dac]/`. In this directory the two files `[detector name]_cal_[tot/toa].txt` have to exist.
For the ToT calibration, the file format needs to be `col | row | row | a (ADC/mV) | b (ADC) | c (ADC*mV) | t (mV) | chi2/ndf`.
For the ToA calibration, it needs to be `column | row | c (ns*mV) | t (mV) | d (ns) | chi2/ndf`.
* `threshold`: String defining the `[threshold]` DAC value for loading the appropriate calibration file, See above.
### Plots produced
* 2D map of pixel hits
For all detectors, the following plots are produced:
* 2D map of pixel positions
* Histogram with pixel ToT before and after calibration
* Map for each calibration parameter if calibration is used
......@@ -36,4 +46,7 @@ threshold = 1148
number_of_pixelhits = 0
```
[@timepix-talk] X. Llopart, The Timepix3 chip, EP-ESE seminar, https://indico.cern.ch/event/267425,
[@timepix3]: https://doi.org/10.1088/1748-0221/9/05/c05013
[@timepix-talk]: X. Llopart, The Timepix3 chip, EP-ESE seminar, https://indico.cern.ch/event/267425,
[@Pitters_2019]: https://doi.org/10.1088%2F1748-0221%2F14%2F05%2Fp05022
[@cds-timepix3-calibration]: https://cds.cern.ch/record/2649493
......@@ -8,7 +8,7 @@ Converts all object data stored in the ROOT data file produced by the FileWriter
If the requested number of events for the run is less than the number of events the data file contains, all additional events in the file are skipped. If more events than available are requested, a warning is displayed and the other events of the run are skipped.
Currently it is not yet possible to exclude objects from being read. In case not all objects should be converted to messages, these objects need to be removed from the file before the simulation is started.
Currently it is not yet possible to exclude objects from being read. In case not all objects should be converted to clipboard objects, these objects need to be removed from the file before the reconstruction is started.
### Parameters
* `file_name` : Location of the ROOT file containing the trees with the object data.
......
......@@ -9,7 +9,7 @@ Replaces the existing reference timestamp (earliest hit on reference plane) by e
### Parameters
* `improvement_method`: Determines which method to use. Trigger timestamp is 0, average track timestamp is 1. Default value is `1`.
* `signal_source`: Determines which detector plane carries the trigger signals. Only relevant for method 0. Default value is `"W0013_G02"`.
* `trigger_latency`: Adds a latency to the trigger timestamp and shifts time histogrammes back to zero. Default value is `0`.
* `trigger_latency`: Adds a latency to the trigger timestamp to shift time histograms. Default value is `0`.
### Usage
```toml
......
......@@ -7,26 +7,33 @@
### Description
This module reads in `pixel` objects for each device from the clipboard, and masks pixels considered noisy.
Currently, two methods are available. The `localdensity` noise estimation method is taken from the [Proteus framework](https://gitlab.cern.ch/unige-fei4tel/proteus) developed by Université de Genève.
Currently, two methods are available. The `localdensity` noise estimation method is taken from the Proteus framework [@proteus-repo] developed by Université de Genève.
It uses a local estimate of the expected hit rate to find pixels that are a certain number of standard deviations away from this estimate.
The second method, `frequency`, is a simple cut on a global pixel firing frequency which masks pixels with a hit rate larger than `frequency_cut` times the mean global hit rate.
The module writes new mask file with all masked pixels for each device. Already existing masks are maintained. No masks are applied as this is done by other modules directly when reading input data. The file with the mask is either replacing the detector's mask file (if set) or is stored in the globally configured output directory.
The module appends the pixels to be masked to the mask files provided in the geometry file for each device.
If no mask file is specified there, a new file `mask_<detector_name>.txt` is created in the globally configured output directory.
Already existing masked pixels are maintained.
No masks are applied in this module as this is done by the respective event loader modules when reading input data.
### Parameters
* `method`: Select the method to evaluate noisy pixels. Can be either `localdensity` or `frequency`, where the latter is chosen by default.
* `frequency_cut`: Frequency threshold to declare a pixel as noisy, defaults to 50. This means, if a pixel exhibits 50 times more hits than the average pixel on the sensor, it is considered noisy and is masked. Only used in `frequency` mode.
* `bins_occupancy`: Number of bins for occupancy distribution histograms, defaults to 128.
* `density_bandwidth`: Bandwidth for local density estimator, defaults to `2` and is only used in `localdensity` mode.
* `sigma_above_avg_max`: Cut for noisy pixels, sigma above average, defaults to `5`. Only used in `localdensity` mode.
* `sigma_above_avg_max`: Cut for noisy pixels, number of standard deviations above average, defaults to `5`. Only used in `localdensity` mode.
* `rate_max`: Maximum rate, defaults to `1`. Only used in `localdensity` mode.
### Plots produced
For each detector the following plots are produced:
* Map of masked pixels
* 2D histogram of occupancy
### Usage
```toml
[MaskCreator]
frequency_cut = 10
```
[@proteus-repo]: https://gitlab.cern.ch/proteus/proteus
......@@ -5,12 +5,13 @@
**Status**: Functional
### Description
This module reads in `pixel` objects for each device from the clipboard, masks all pixels with a hit rate larger than 10 times the mean hit rate, and updates the trimdac file for the device with these masked pixels.
This module reads in `pixel` objects for each device from the clipboard, masks all pixels with a hit rate larger than 10 times the mean hit rate, and updates the trimdac chip configuration file for the device with these masked pixels.
If this file does not exist yet, a new file named `<detectorID>_trimdac_masked.txt` will be created.
### Parameters
No parameters are used from the configuration file.
### Usage
```toml
[Timepix3MaskCreator]
[MaskCreatorTimepix3]
```
......@@ -10,6 +10,7 @@ A new Event object is created and stored on the clipboard, with the begin and en
The module also provides the option to add trigger IDs to the generated event by specifying the number of triggers to be set per event via the `trigger`.
Trigger IDs are consecutive numbers, starting at zero.
With a setting of `triggers = 2`, the first event would receive trigger IDs 0 and 1, the subsequent event 2 and 3 and so forth.
A more detailed description is provided in the event building chapter of the user manual.
### Parameters
* `event_length`: Length of the event to be defined in physical units (not clock cycles of a specific device). Default value is `10us`.
......
......@@ -5,7 +5,7 @@
### Description
This module opens a GUI to monitor the progress of the reconstruction.
Since Linux allows concurrent (reading) file access, this can already e started while a run is recorded to disk and thus serves as online monitoring tool during data taking.
Since Linux allows concurrent (reading) file access, this can already be started while a run is recorded to disk and thus serves as online monitoring tool during data taking.
A set of canvases is available to display a variety of information ranging from hitmaps and basic correlation plots to more advances results such as tracking quality and track angles.
The plots on each of the canvases contain real time data, automatically updated every `update` events.
......@@ -47,16 +47,16 @@ The "corryvreckan" namespace is not required to be added to the plot path.
* `event_times`: List of plots to be placed on the "EventTimes" canvas of the online monitor. By default, this canvas displays `Correlations/%DETECTOR%/eventTimes` for all detectors.
### Plots produced
Overview canvas:
* Cluster ToT of reference plane
* 2D hitmap of reference plane
* Residual in X of reference plane
The following plots are displayed by default (can be configured):
Tracking canvas:
* Track chi^2
* Track angle in X
* Overview canvas:
* Histogram of the cluster ToT of reference plane
* 2D hit map of reference plane
* Histogram of the residual in X of reference plane
* Tracking canvas:
* Histogram of the track $\chi^2$
* Histogram of the track angle in X
### Usage
```toml
......
......@@ -5,11 +5,13 @@
**Status**: Functional
### Description
This module performs translational telescope plane alignment.
This module performs translational telescope plane alignment. The rotational alignment is not changed.
This initial alignment along the X and Y axes is designed to be performed before the `Alignment` module, which carries out translational and rotational alignment of the planes. To not include the DUT in this transaltional alignment, it will need to be masked in the configuration file.
The required translational shifts in X and Y are calculated for each detector as the mean of the 1D correlation histogram along the axis.
As described in the alignment chapter of the user manual, the spatial correlations in X and Y should not be forced to be centered around zero for the final alignment as they correspond to the *physical displacement* of the detector plane in X and Y with respect to the reference plane.
However, for the prealignment this is a an acceptable estimation which works without any tracking.
### Parameters
* `damping_factor`: A factor to change the percentage of the calculated shift applied to each detector. Default value is `1`.
......@@ -18,14 +20,11 @@ The required translational shifts in X and Y are calculated for each detector as
* `time_cut_abs`: Specifies an absolute value for the maximum time difference between a cluster on the current detector and a cluster on the reference plane to be considered in the prealignment. Absolute and relative time cuts are mutually exclusive. No default value.
### Plots Created
For each detector the following plots are produced:
* 1D correlation plot for X
* 1D correlation plot for Y
* 2D correlation plot for X in local coordinates (comparing to reference plane)
* 2D correlation plot for Y in local coordinates
* 2D correlation plot for X in global coordinates
* 2D correlation plot for Y in global coordinates
* 1D histograms of the correlations in X/Y (comparing to the reference plane)
* 2D histograms of the correlation plot for X/Y in local/global coordinates (comparing to the reference
### Usage
```toml
......
# TextWriter
**Maintainer**: Paul Schuetze (paul.schuetze@desy.de)
**Maintainer**: Paul Schuetze (paul.schuetze@desy.de)
**Module Type**: *GLOBAL*
**Status**: Testing
**Status**: Functional
### Description
This module writes objects to an ASCII text file. For this, the data content of the selected objects available on the clipboard are printed to the specified file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment