Obtaining S-curves for all pixels of TDCPix matrix
The second version of plotting S-curve for all pixels. This algorithm is faster and more effective. This version is stable.
The executable is .../TDCPixReadOut/Tools/bin/calibration2
.
Although it is literally called calibration2
, in reality it is just a first step - plotting S-curve for all pixels.
Before using this app it is recommended to launch from the same directory:
./matrix_check <Qcal> <Vth> <Acc>
where Acc
is the deviation value in % from which we consider pixel to be bad.
It allows for excluding problematic pixels that makes software more stable.
Usage of the app
./calibration2 <starting_row> <Qcal> [<range> <step>]
where
starting_row = 0..44
- address of the row from what to start the algorithm.
Qcal = int
- charge injection level in Voltage steps. The range is 0 - 255
. One voltage step corresponds injection charge step of 0.0436 fC
(see TDCPix manual s. 3.11 for more info).
range
is an optional argument 30
by default. Responsible for S-curve plotting range.
step
is an optional argument 2
by default. This is an increment for S-curve plotting.
Recommended usage example
./calibration2 0 40
This command launches scan for getting s-curve for all pixels with injected charge of 40 * 0.0436 fC = 1.744 fC
.
Code
Code structure is slightly different from version 1.
Main loop.
Step 1. For each pixel in a certain row find optimal Vth
range: Coarse scan with increment dVt
of 10 steps. The first threshold voltage where number of received hits equals 0 is set to be ending point. Start point is <range>
units lower.
Step 2. For each pixel in a row the code gives s-curve in obtained optimal range.
Step 3. Row number++
Step 4. Subcolumn++
Output
The output is a set of text files - two for each row: arrays of Vth for every column and arrays of numbers of received hits. Combining these two files it is possible to plot S-curve for each pixel in a chosen row. Also the program delivers output.root
file in Run
directory that contains s-curves in TGraph
for all pixels and TH2D
for all columns.