This module measures the efficiency of the device under test by comparing its cluster positions with the interpolated track position at the DUT.

This module measures the efficiency of the DUT by comparing its cluster positions with the interpolated track position at the DUT.

It also comprises a range of histograms to investigate where inefficiencies might come from.

### Parameters

...

...

@@ -14,27 +14,21 @@ It also comprises a range of histograms to investigate where inefficiencies migh

*`inpixel_bin_size`: Parameter to set the bin size of the in-pixel 2D efficiency histogram. This should be given in units of distance and the same value is used in both axes. Defaults to `1.0um`.

### Plots produced

For the DUT, the following plots are produced:

* 2D histograms:

* 2D Map of in-pixel efficiency

* 2D Map of the chip efficiency in local coordinates, filled at the position of the track intercept point

* 2D Map of the chip efficiency on global coordinates, filled at the position of the track intercept point

* 2D Map of the chip efficiency in local coordinates, filled at the position of the associated cluster centre

* 2D Map of the chip efficiency on global coordinates, filled at the position of the associated cluster centre

* 2D Map of the position difference of a track (with associated cluster) to the previous track

* 2D Map of the position difference of a track (without associated cluster) to the previous track

* 2D Maps of chip efficiency in local and global coordinates, filled at the position of the track intercept point or at the position of the associated cluster center

* 2D Maps of the position difference of a track with and without associated cluster to the previous track

* 1D histograms:

* Histogram of all single-pixel efficiencies

* Histogram of time difference of the matched track time (with associated cluster) to the previous track

* Histogram of time difference of the non-matched track time (without associated cluster) to the previous track

* Histogram of row difference of the matched track time (with associated cluster) to the previous track

* Histogram of row difference of the non-matched track time (without associated cluster) to the previous track

* Histogram of column difference of the matched track time (with associated cluster) to the previous track

* Histogram of column difference of the non-matched track time (without associated cluster) to the previous track

* Histogram of the time difference of a matched cluster (with associated cluster) to a previous hit (not matter if noise or track)

* Histogram of the time difference of a non-matched cluster (without associated cluster) to a previous hit (not matter if noise or track)

* Histograms of time difference of the matched and non-matched track time to the previous track

* Histograms of the row and column difference of the matched and non-matched track time to the previous track

* Histograms of the time difference of a matched (non-matched) cluster to a previous hit (not matter if noise or track)

* Other:

* Value of total efficiency as `TEfficiency` including (asymmetric) error bars

* Value of total efficency as `TName` so it can be read off easily by eye from the root file

* Value of total efficiency as `TName` so it can be read off easily by eye from the root file

**Maintainer**: Simon Spannagel (<simon.spannagel@cern.ch>)

**Module Type**: *GLOBAL*

**Status**: Work in progress

**Status**: Functional

### Description

This module produces reference histograms for the telescope performance used for tracking. It produces local and global biased residuals for each of the telescope planes, and if Monte Carlo information is available, calculates the residuals between track and Monte Carlo particle.

...

...

@@ -9,17 +9,18 @@ This module produces reference histograms for the telescope performance used for

Furthermore, the telescope resolution at the position of the DUT detector is plotted of Monte Carlo information is available. The Monte Carlo particle position is compared with the track interception with the DUT.

### Parameters

*`chi2ndof_cut`: Chi2 over number of degrees of freedom for the track to be taken into account. Tracks with a larger value are discarded. Default value is `3`.

*`chi2ndof_cut`: Track chi2/ndf for the track to be taken into account. Tracks with a larger value are discarded. Default value is `3`.

### Plots produced

For the DUT, the following plots are produced:

* Telescope resolution at position of DUT

For each detector participating in tracking, the following plots are produced:

* Biased local track residual, for X and Y;

* Biased global track residual, for X and Y;

* Local residuals with track and Monte Carlo particle, for X and Y;

* Global residuals with track and Monte Carlo particle, for X and Y;

* Biased local and global track residuals, in X and Y;

* Local and global residuals with track and Monte Carlo particle, in X and Y;

This module contains everything that's necessary for an in-depth timing analysis of the ATLASpix, including row and timewalk corrections.

This module can be used for an in-depth timing analysis of the ATLASpix, including row and timewalk corrections.

The ATLASpix shows a row-dependent shift of the time residuals which can be corrected for.

Timewalk describes a shift of the time residual depending on the signal strength which can be deduced from the time-over-threshold in the ATLASpix.

Also this can be corrected for for an improved time resolution.

Before being able to apply the row and timewalk correction, correction files need to be provided.

These can be generated by setting `calc_corrections=true`.

The calculation of the timewalk correction is based on a row-corrected histogram such that this procedure needs to be performed in 2 steps.

The calculation of the timewalk correction is based on a row-corrected histogram such that this procedure needs to be performed in two steps.

1. Calculated row correction.

2. Use row correction file and calculated timewalk correction.

After this both corrections can be applied on top of each other.

The row correction should be generally valid whereas the timewalk correction is threshold dependent and thus needs to be repeated each time the threshold is changed.

1. Calculate row correction.

2. Use row correction file and calculate timewalk correction.

After this both corrections can be applied consecutively.

### Parameters

*`time_cut_rel`: Number of standard deviations the `time_resolution` of the detector plane will be multiplied by. This value then defines the range of the track time correlation histograms and should be set according to the value chosen for the `[DUTAssociation]`. By default, a relative time cut is applied. Absolute and relative time cuts are mutually exclusive. Defaults to `3.0`.

...

...

@@ -33,58 +39,35 @@ After this both corrections can be applied on top of each other.

*`correction_graph_timewalk`: Name of the TGraphErrors including its path in the root file used for row correction. E.g. "AnalysisTimingATLASpix/apx_0/gTimeCorrelationVsTot". No default.

### Plots produced

For the DUT, the following plots are produced:

* 1D histograms

* Track time correlation (all clusters)

* Track time correlation (track-associated clusters)

* Track time correlation (after row correction)

* Track time correlation (after row and timewalk correction)

* Track time correlation (after row and timewalk correction) for clusterToT < 25 lsb

* Track time correlation (after row and timewalk correction) for clusterToT < 40 lsb

* Track time correlation (after row and timewalk correction) for clusterToT > 40 lsb

* Track time correlations for all clusters, track-associated clusters, after row correction, after row and timewalk correction ( all, for clusterToT <25lsb,forclusterToT<40lsb,forclusterToT> 40 lsb)

* Track time correlation example slice of 2D plot to investigate quality of Gaussian fit

* Cluster time minus pixel time (for all pixels in cluster) to confirm that cluster time = time of earliest pixel

* Pixel ToT for left tail events in time correlation (track timestamp - cluster timestamp < left_tail_cut)

* Pixel ToT for main peak events in time correlation (track timestamp - cluster timestamp > left_tail_cut)

* Pixel timestamp for left tail events in time correlation (track timestamp - cluster timestamp < left_tail_cut)

* Pixel timestamp main peak events in time correlation (track timestamp - cluster timestamp > left_tail_cut)

* Cluster size for left tail events in time correlation (track timestamp - cluster timestamp < left_tail_cut)

* Cluster size for main peak events in time correlation (track timestamp - cluster timestamp > left_tail_cut)

* Pixel ToT for main peak and left tail events in time correlation (track timestamp - cluster timestamp <left_tail_cut),(tracktimestamp-clustertimestamp> left_tail_cut)

* Pixel timestamp for main peak and left tail events in time correlation (track timestamp - cluster timestamp <left_tail_cut),(tracktimestamp-clustertimestamp> left_tail_cut)

* Cluster size for main peak and left tail events in time correlation (track timestamp - cluster timestamp <left_tail_cut),(tracktimestamp-clustertimestamp> left_tail_cut)

* 2D histograms

* Track time correlation vs. time (track-associated clusters)

* Track time correlation vs. column (only control plot)

* Track time correlation vs. cluster row (for row correction)

* Track time correlation vs. cluster row (only single pixel clusters)

* Track time correlation vs. cluster row (only multi-pixel clusters)

* Track time correlation vs. cluster row (after row correction)

* Track time correlation vs. seed pixel ToT (for timewalk correction)

* Track time correlation vs. seed pixel ToT (only single pixel clusters)

* Track time correlation vs. seed pixel ToT (only multi-pixel clusters)

* Track time correlation vs. cluster row (after row correction)

* Track time correlation vs. cluster row (after row correction, only single pixel clusters)

* Track time correlation vs. cluster row (after row correction, only multi-pixel clusters)

* Track time correlation vs. cluster row (after row and timewalk correction)

* Track time correlation vs. seed pixel (after row and timewalk correction)

* Track time correlation vs. time (track-associated clusters), column (only control plot), cluster row (for row correction), cluster row (only single pixel clusters, only multi-pixel clusters, after row correction), seed pixel ToT (for timewalk correction, only single pixel clusters, only multi-pixel clusters)

* Track time correlation vs. cluster row (after row correction), (after row correction, only single pixel clusters), (after row correction, only multi-pixel clusters), (after row and timewalk correction), (after row and timewalk correction)

* Cluster size vs. cluster ToT (only associated clusters)

* Hit map of all pixels from associated clusters

* Hit map of all pixels from associated clusters with high ToT

* In-pixel distribution of tracks

* In-pixel distribution of tracks (for clusters with high ToT)

* Hit map of all pixels from associated clusters with/without high ToT

* In-pixel distribution of tracks for clysters with/without high ToT

* Map of associated clusters

* Pixel ToT vs. time for all clusters

* Pixel ToT vs. time for high ToT clusters

* Cluster map for left tail events in time correlation (track timestamp - cluster timestamp < left_tail_cut)

* Cluster map for main peak events in time correlation (track timestamp - cluster timestamp > left_tail_cut)

* Pixel ToT vs. time for all clusters and for high ToT clusters

* Cluster map for main peak and left tail events in time correlation (track timestamp - cluster timestamp <left_tail_cut),(tracktimestamp-clustertimestamp> left_tail_cut)

* TGraphErrors

* Peak of time correlation vs. row

* Peak of time correlation vs. ToT (after row correction)

* Peak of time correlation vs. row (after row correction, only single pixel clusters)

* Peak of time correlation vs. row (after row correction, only multi-pixel clusters)

* Peak of time correlation vs. row (after row correction, only single pixel clusters), (after row correction, only multi-pixel clusters)

**Maintainer**: Daniel Hynds (<daniel.hynds@cern.ch>)

**Module Type**: *DETECTOR*

**Detector Type**: *all*

**Maintainer**: Daniel Hynds (<daniel.hynds@cern.ch>)

**Module Type**: *DETECTOR*

**Detector Type**: *all*

**Status**: Functioning

### Description

This module clusters the input data of a detector without individual hit timestamps.

The clustering method only uses positional information: either charge-weighted centre-of-gravity or arithmetic mean calculation using touching neighbours method, and no timing information.

The clustering method only uses positional information: either charge-weighted center-of-gravity or arithmetic mean calculation using touching neighbors method, and no timing information.

If the pixel information is binary (i.e. no valid charge-equivalent information is available), the arithmetic mean is calculated for the position.

Also, if one pixel of a cluster has charge zero, the arithmetic mean is calculated even if charge-weighting is selected because it is assumed that the zero-reading is false and does not to represent a low charge but an unknown value.

These clusters are stored on the clipboard for each device.

### Parameters

*`use_trigger_timestamp`: If true, set trigger timestamp of Corryvreckan event as cluster timestamp. If false, set pixel timestamp. Default value is `false`.

*`charge_weighting`: If true, calculate a charge-weighted mean for the cluster centre. If false, calculate the simple arithmetic mean. Defaults to `true`.

*`charge_weighting`: If true, calculate a charge-weighted mean for the cluster center. If false, calculate the simple arithmetic mean. Defaults to `true`.

### Plots produced

For each detector the following plots are produced:

* Cluster size histogram

* Cluster seed charge histogram

* Cluster width (rows, in X) histogram

* Cluster width (columns, in Y) histogram

* Histograms for cluster size, seed charge, width (rows/X and columns/Y)

* Cluster charge histogram

* 2D cluster positions in global coordinates

* 2D cluster positions in local coordinates

* 2D cluster positions in global and local coordinates