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

Classes

struct  hit_t
 

Typedefs

typedef std::array< int, 2 > frame_t
 
typedef std::map< frame_t, std::vector< hit_t > > hitmap_t
 

Enumerations

enum  type_t { alcor_hit = 1 , trigger_tag = 9 , start_spill = 7 , end_spill = 15 }
 

Functions

void collect_hits (hitmap_t &hits, const std::string filename, int channel, const std::string calibfilename, bool aps=false)
 
void signal_aps (const std::string reference_filename, int reference_channel, const std::string reference_calibfilename, const std::string target_filename, int target_channel, const std::string target_calibfilename, const std::string outfilename)
 

Variables

const int frame_size = 256
 
const bool afterpulse_suppression = false
 
const double dead_time = 32.
 

Typedef Documentation

◆ frame_t

◆ hitmap_t

Enumeration Type Documentation

◆ type_t

Enumerator
alcor_hit 
trigger_tag 
start_spill 
end_spill 

Function Documentation

◆ collect_hits()

void collect_hits ( hitmap_t hits,
const std::string  filename,
int  channel,
const std::string  calibfilename,
bool  aps = false 
)

open input file and get tree

create hit and connect variables to branches

open calibration file and load calibration parameters

temporary hit vector

loop over tree entries

end of spill

sort hits in increasing time order

push hits to the output hit map

reset start of spill

must be ALCOR hit

from the desired channel

calculate corrected time

define frame

push hit

close input file

◆ signal_aps()

void signal_aps ( const std::string  reference_filename,
int  reference_channel,
const std::string  reference_calibfilename,
const std::string  target_filename,
int  target_channel,
const std::string  target_calibfilename,
const std::string  outfilename 
)

collect hits from reference and target data

loop over reference frames

loop over reference hits in frame

loop over target hits in frame

normalise to number of triggers

apply geometrical acceptance function to obtain corrected distribution

Variable Documentation

◆ afterpulse_suppression

const bool afterpulse_suppression = false

◆ dead_time

const double dead_time = 32.

◆ frame_size

const int frame_size = 256