sipm-characterisation 0.1.0
SiPM characterisation for ePIC — IV/DCR/gain, laser, readout, irradiation
Loading...
Searching...
No Matches
signal_basic.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)
 
void signal_basic (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
 

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 
)

open input file and get tree

create hit and connect variables to branches

open calibration file and load calibration parameters

loop over tree entries

increment spill

reset start of spill

must be ALCOR hit

from the desired channel

calculate corrected time

define frame

push hit

close input file

◆ signal_basic()

void signal_basic ( 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

◆ frame_size

const int frame_size = 256