sipm-characterisation 0.1.0
SiPM characterisation for ePIC — IV/DCR/gain, laser, readout, irradiation
Loading...
Searching...
No Matches
deltat.C File Reference

Classes

struct  hit_t
 

Enumerations

enum  type_t { alcor_hit = 1 , trigger_tag = 9 , start_spill = 7 , end_spill = 15 }
 This macro measures the time distance between two consecutive ALCOR hits in the same channel. More...
 

Functions

void deltat (const std::string filename, int channel, const std::string calibfilename="")
 

Enumeration Type Documentation

◆ type_t

This macro measures the time distance between two consecutive ALCOR hits in the same channel.

It also allows the user to upload ALCOR TDC fine calibration parameters of the channel.

The fine correction of each of the four TDCs on one ALCOR channel is defined as

corr = offset_i + slope_i * fine

where i is the TDC index. The calibration parameters are stores in a double[8] array as follows

{ offset_0, offset_1, offset_2, offset_3, slope_0, slope_1, slope_2, slope_3 }

Enumerator
alcor_hit 
trigger_tag 
start_spill 
end_spill 

Function Documentation

◆ deltat()

void deltat ( const std::string  filename,
int  channel,
const std::string  calibfilename = "" 
)

open input file and get tree

create hit and connect variables to branches

open calibration file and load calibration parameters

loop over tree entries

reset when start of spill is detected

must be a ALCOR hit

from the desired channel

calculate corrected time

is this is the first hit in the spill, store it and continue

compute time difference wrt. previous hit

store current hit