Commit 4be5d929 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

TPX3EvLoader: access vectors as vectors

parent 10a5f933
Pipeline #289775 passed with stages
in 7 minutes and 19 seconds
......@@ -12,14 +12,14 @@ The hit timestamps are derived from the 40 MHz TOA counter and the fast on-pixel
#### Parameters
* `inputDirectory`: Path to the directory above the data directory for each device. The device name is added to the path during the algorithm.
* `minNumberOfPlanes`: Minimum number of planes with loaded data required for each event to be stored. Default value is `1`.
* `eventLength`: Length in time for each event. Default value is `0.0`. Event legnth is only used if this parameter is present in the configuration file, otherwise the data is split into events using the `number_of_pixelhits` parameter.
* `eventLength`: Length in time for each event. Default value is `0.0`. Event length is only used if this parameter is present in the configuration file, otherwise the data is split into events using the `number_of_pixelhits` parameter.
* `number_of_pixelhits`: Maximum number of pixel hits on each detector per event. Default value is `2000`. This is only used if `eventLength` is not present in the configuration file, otherwise the data is split into events using the `eventLength` parameter.
* `calibrationPath`: Path to the calibration directory. If this parameter is set, calibration will be applied to the DUT. Assumed folder structure is `"[calibrationPath]/[detector name]/cal_thr_[thr dac]_ik_[ikrum dac]/[detector name]_cal_[tot/toa].txt"`. The assumed file structure is `[col | row | val1 | val2 | etc.]`.
* `DUT`: Name of the DUT plane.
#### Plots produced
* Histogram with pixel ToT before and after calibration
* Map for each calibration paramater if calibration is used
* Map for each calibration parameter if calibration is used
#### Usage
```toml
......
......@@ -213,13 +213,13 @@ void Timepix3EventLoader::initialise() {
for(int row = 0; row < 256; row++) {
for(int col = 0; col < 256; col++) {
float a = vtot[256 * row + col][2];
float b = vtot[256 * row + col][3];
float c = vtot[256 * row + col][4];
float t = vtot[256 * row + col][5];
float toa_c = vtoa[256 * row + col][2];
float toa_t = vtoa[256 * row + col][3];
float toa_d = vtoa[256 * row + col][4];
float a = vtot.at(256 * row + col).at(2);
float b = vtot.at(256 * row + col).at(3);
float c = vtot.at(256 * row + col).at(4);
float t = vtot.at(256 * row + col).at(5);
float toa_c = vtoa.at(256 * row + col).at(2);
float toa_t = vtoa.at(256 * row + col).at(3);
float toa_d = vtoa.at(256 * row + col).at(4);
pixelTOTParameterA->Fill(col, row, a);
pixelTOTParameterB->Fill(col, row, b);
......@@ -629,14 +629,14 @@ bool Timepix3EventLoader::loadData(Clipboard* clipboard, Detector* detector, Pix
// Apply calibration if applyCalibration is true
if(applyCalibration && detectorID == m_config.get<std::string>("DUT")) {
LOG(DEBUG) << "Applying calibration to DUT";
float a = vtot[256 * row + col][2];
float b = vtot[256 * row + col][3];
float c = vtot[256 * row + col][4];
float t = vtot[256 * row + col][5];
float toa_c = vtoa[256 * row + col][2];
float toa_t = vtoa[256 * row + col][3];
float toa_d = vtoa[256 * row + col][4];
float a = vtot.at(256 * row + col).at(2);
float b = vtot.at(256 * row + col).at(3);
float c = vtot.at(256 * row + col).at(4);
float t = vtot.at(256 * row + col).at(5);
float toa_c = vtoa.at(256 * row + col).at(2);
float toa_t = vtoa.at(256 * row + col).at(3);
float toa_d = vtoa.at(256 * row + col).at(4);
// Calculating calibrated tot and toa
float fvolts =
......
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