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

Functions

template<typename arg_type >
void swap_values (arg_type &first_element, arg_type &second_element)
 
template<typename arg_type >
arg_type sq_sum (arg_type value)
 
template<typename arg_type , typename... Args>
arg_type sq_sum (arg_type first, Args... args)
 
template<typename T >
T round_digits (T value, int digits)
 
template<typename T >
std::vector< Tmerge (const std::vector< T > &vec1, const std::vector< T > &vec2)
 
std::vector< std::string > get_folders (const std::string &dir_path)
 
void readFileToMap (const std::string &filename, std::map< std::string, std::vector< std::string > > &dataMap)
 
void readTxtToMap (const std::string &filename, std::map< std::string, std::vector< std::string > > &dataMap)
 
void readCsvToMap (const std::string &filename, std::map< std::string, std::vector< std::string > > &dataMap)
 
std::array< std::array< float, 2 >, 2 > get_intercept (float x0_1, float ex0_1, float x1_1, float ex1_1, float x0_2, float ex0_2, float x1_2, float ex1_2)
 
std::array< std::array< float, 2 >, 2 > get_intercept_pol1_pol1 (float x0_1, float ex0_1, float x1_1, float ex1_1, float x0_2, float ex0_2, float x1_2, float ex1_2)
 
std::array< std::array< float, 2 >, 2 > get_intercept (std::array< float, 2 > m1, std::array< float, 2 > q1, std::array< float, 2 > m2, std::array< float, 2 > q2)
 
std::array< std::array< float, 2 >, 2 > get_intercept_x (float m, float em, float q, float eq)
 
std::array< std::array< float, 2 >, 2 > get_intercept_y (float m, float em, float q, float eq)
 
std::array< std::array< float, 2 >, 2 > get_intercept_pol1_pol2 (float x0_1, float ex0_1, float x1_1, float ex1_1, float x0_2, float ex0_2, float x1_2, float ex1_2, float x2_2, float ex2_2)
 
std::array< std::array< float, 2 >, 2 > get_intercept_tf1 (TF1 *first_target, TF2 *second_target, double first_guess, double starting_coarse, double req_precision)
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::map< std::string, std::array< T, 2 > > average (std::vector< std::array< T, 2 > > list_of_measurements, bool skip_unfit_skim=false)
 
template<bool negative_search = false>
std::pair< float, floatfind_first_above (TGraph *gTarget, float threshold)
 
template<bool negative_search = false>
std::pair< float, floatfind_last_above (TGraph *gTarget, float threshold)
 
void fill_profile (TProfile *hTarget, TGraph *gSource)
 
void fill_persistance (TH2F *hTarget, TGraph *gSource)
 
void fill_persistance (TH2F *hTarget, TF1 *fSource)
 
void fill_from_interval (TH1F *hTarget, TGraph *gSource, float min, float max)
 
void fill_from_interval (TH1F *hTarget, TProfile *gSource, float min, float max)
 
template<bool negative_search = false>
std::pair< float, floatget_graph_max (TGraph *gTarget, float min_point=-1., float max_point=-1.)
 
template<int average_over_n_points = 2>
TGraphmoving_average (TGraph *gTarget)
 
template<int average_over_n_points = 2>
TGraphmaximum_filter (TGraph *gTarget)
 
template<int window_of_n_points = 2>
TGraphgauss_filter (TGraph *gTarget, float alpha_parameter=2.5)
 
TGraphderivate (TGraph *gTarget, double sign=1.)
 
TGraphTProfile_to_TGraphErorrs (TProfile *gSource)
 
template<int power = 1, bool bin_width = false>
float integrate (TGraph *gTarget, float min_point=-1., float max_point=-1.)
 
template<int n_parameter = 2, int n_averaging = 10>
std::pair< float, floatmeasure_noisepower (TGraph *gTarget)
 
template<int n_parameter = 2, int n_averaging = 10>
std::pair< float, floatmeasure_noisepower (TProfile *hTarget)
 
template<int window_of_n_points = 10, int average_over_n_points = 20, bool negative_search = false>
std::vector< std::array< float, 3 > > find_peaks (TGraph *gTarget, float min_height=10.)
 

Function Documentation

◆ average()

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::map< std::string, std::array< T, 2 > > utility::average ( std::vector< std::array< T, 2 > >  list_of_measurements,
bool  skip_unfit_skim = false 
)

◆ derivate()

TGraph * utility::derivate ( TGraph gTarget,
double  sign = 1. 
)

◆ fill_from_interval() [1/2]

void utility::fill_from_interval ( TH1F hTarget,
TGraph gSource,
float  min,
float  max 
)

◆ fill_from_interval() [2/2]

void utility::fill_from_interval ( TH1F hTarget,
TProfile gSource,
float  min,
float  max 
)

◆ fill_persistance() [1/2]

void utility::fill_persistance ( TH2F hTarget,
TF1 fSource 
)

◆ fill_persistance() [2/2]

void utility::fill_persistance ( TH2F hTarget,
TGraph gSource 
)

◆ fill_profile()

void utility::fill_profile ( TProfile hTarget,
TGraph gSource 
)

◆ find_first_above()

template<bool negative_search = false>
std::pair< float, float > utility::find_first_above ( TGraph gTarget,
float  threshold 
)

◆ find_last_above()

template<bool negative_search = false>
std::pair< float, float > utility::find_last_above ( TGraph gTarget,
float  threshold 
)

◆ find_peaks()

template<int window_of_n_points = 10, int average_over_n_points = 20, bool negative_search = false>
std::vector< std::array< float, 3 > > utility::find_peaks ( TGraph gTarget,
float  min_height = 10. 
)

◆ gauss_filter()

template<int window_of_n_points = 2>
TGraph * utility::gauss_filter ( TGraph gTarget,
float  alpha_parameter = 2.5 
)

◆ get_folders()

std::vector< std::string > utility::get_folders ( const std::string &  dir_path)

◆ get_graph_max()

template<bool negative_search = false>
std::pair< float, float > utility::get_graph_max ( TGraph gTarget,
float  min_point = -1.,
float  max_point = -1. 
)

◆ get_intercept() [1/2]

std::array< std::array< float, 2 >, 2 > utility::get_intercept ( float  x0_1,
float  ex0_1,
float  x1_1,
float  ex1_1,
float  x0_2,
float  ex0_2,
float  x1_2,
float  ex1_2 
)

◆ get_intercept() [2/2]

std::array< std::array< float, 2 >, 2 > utility::get_intercept ( std::array< float, 2 >  m1,
std::array< float, 2 >  q1,
std::array< float, 2 >  m2,
std::array< float, 2 >  q2 
)

◆ get_intercept_pol1_pol1()

std::array< std::array< float, 2 >, 2 > utility::get_intercept_pol1_pol1 ( float  x0_1,
float  ex0_1,
float  x1_1,
float  ex1_1,
float  x0_2,
float  ex0_2,
float  x1_2,
float  ex1_2 
)

◆ get_intercept_pol1_pol2()

std::array< std::array< float, 2 >, 2 > utility::get_intercept_pol1_pol2 ( float  x0_1,
float  ex0_1,
float  x1_1,
float  ex1_1,
float  x0_2,
float  ex0_2,
float  x1_2,
float  ex1_2,
float  x2_2,
float  ex2_2 
)

◆ get_intercept_tf1()

std::array< std::array< float, 2 >, 2 > utility::get_intercept_tf1 ( TF1 first_target,
TF2 second_target,
double  first_guess,
double  starting_coarse,
double  req_precision 
)

◆ get_intercept_x()

std::array< std::array< float, 2 >, 2 > utility::get_intercept_x ( float  m,
float  em,
float  q,
float  eq 
)

◆ get_intercept_y()

std::array< std::array< float, 2 >, 2 > utility::get_intercept_y ( float  m,
float  em,
float  q,
float  eq 
)

◆ integrate()

template<int power = 1, bool bin_width = false>
float utility::integrate ( TGraph gTarget,
float  min_point = -1.,
float  max_point = -1. 
)

◆ maximum_filter()

template<int average_over_n_points = 2>
TGraph * utility::maximum_filter ( TGraph gTarget)

◆ measure_noisepower() [1/2]

template<int n_parameter = 2, int n_averaging = 10>
std::pair< float, float > utility::measure_noisepower ( TGraph gTarget)

◆ measure_noisepower() [2/2]

template<int n_parameter = 2, int n_averaging = 10>
std::pair< float, float > utility::measure_noisepower ( TProfile hTarget)

◆ merge()

template<typename T >
std::vector< T > utility::merge ( const std::vector< T > &  vec1,
const std::vector< T > &  vec2 
)

◆ moving_average()

template<int average_over_n_points = 2>
TGraph * utility::moving_average ( TGraph gTarget)

◆ readCsvToMap()

void utility::readCsvToMap ( const std::string &  filename,
std::map< std::string, std::vector< std::string > > &  dataMap 
)

◆ readFileToMap()

void utility::readFileToMap ( const std::string &  filename,
std::map< std::string, std::vector< std::string > > &  dataMap 
)

◆ readTxtToMap()

void utility::readTxtToMap ( const std::string &  filename,
std::map< std::string, std::vector< std::string > > &  dataMap 
)

◆ round_digits()

template<typename T >
T utility::round_digits ( T  value,
int  digits 
)

◆ sq_sum() [1/2]

template<typename arg_type , typename... Args>
arg_type utility::sq_sum ( arg_type  first,
Args...  args 
)
inline

◆ sq_sum() [2/2]

template<typename arg_type >
arg_type utility::sq_sum ( arg_type  value)
inline

◆ swap_values()

template<typename arg_type >
void utility::swap_values ( arg_type first_element,
arg_type second_element 
)
inline

◆ TProfile_to_TGraphErorrs()

TGraph * utility::TProfile_to_TGraphErorrs ( TProfile gSource)