icemc
Functions
Tools Namespace Reference

Functions to make life easier. Many of these probably exist other places. More...

Functions

double dMax (double, double)
 
double dMax (const double *, int)
 
double dvMax (const vector< double >)
 
double dsMax (TSpline5 *sp)
 
double dMin (const double *, int)
 
double dMinNotZero (const double *, int)
 
double dMin (double, double)
 
double getMaxMagnitude (vector< double > v)
 
int Getifreq (double freq, double freq_low, double freq_high, int n)
 
void InterpolateReal (double *array, const unsigned n)
 
void InterpolateComplex (double *array, const unsigned n)
 
void four1 (double *data, const int isign, int nsize)
 
void realft (double *data, const int isign, int nsize)
 
void SWAP (double &a, double &b)
 
void NormalTimeOrdering (const int n, double *volts)
 
void reverseTimeOrdering (const int n, double *bitsin, double *bitsout)
 
void reverseTimeOrdering (const int n, int *bitsin, int *bitsout)
 
void ShiftLeft (double *x, const int n, int ishift)
 
void ShiftRight (double *x, const int n, int ishift)
 
double GetFWHM (TH1 *h1)
 
void MakeGraph (int index, int n, double *time, double *volts, TGraph *&mygraph, TH2F *&h2, double scalex, double scaley, string xaxistitle, string yaxistitle)
 
double dDot (double *, double *, int)
 
void dCross (double *, double *, double *)
 
double dSquare (double *)
 
double Step (double x)
 
double dGetTheta (double *)
 
double dGetPhi (double *)
 
int WhichIsMax (double *x, int n)
 
int WhichIsMin (double *x, int n)
 
double dSum (double *, int)
 
int iSum (int *, int)
 
void Print (double *, int)
 
void Print (int *, int)
 
void Zero (double *anarray, int n)
 
void Zero (int *anarray, int n)
 
int NonZero (double *anarray, int n)
 
void GetNumbersAsStringArray (ifstream &fin, ofstream &fout, vector< string > &vnumbers, int nelements)
 
void GetNext2NumbersAsString (ifstream &fin, ofstream &fout, string &number1, string &number2, string &stherest)
 
void GetNextNumberAsString (ifstream &fin, ofstream &fout, string &number)
 
int findIndex (double *freqlab, double freq, int npoints, double min, double max)
 
void get_random_rician (double signal, double signal_phase, double sigma, double &amplitude, double &phase)
 
void get_circular_bivariate_normal_random_variable (double &rand_gauss_a, double &rand_gauss_b)
 
int round (double number)
 
double AbbyPhiCalc (double x_abby, double y_abby)
 
TGraph * getInterpolatedGraph (TGraph *grIn, Double_t deltaT)
 
double calculateSNR (double justSig[512], double justNoise[512])
 
void ConvertHVtoLRTimedomain (const int nfour, double *vvolts, double *hvolts, double *left, double *right)
 
template<class T , class U >
void vector_element_convert (const vector< T > &input, vector< U > &output)
 
template<class T , class U >
void nested_vector_element_convert (const vector< vector< T > > &input, vector< vector< U > > &output)
 

Detailed Description

Functions to make life easier. Many of these probably exist other places.

Function Documentation

◆ AbbyPhiCalc()

double Tools::AbbyPhiCalc ( double  x_abby,
double  y_abby 
)

◆ calculateSNR()

double Tools::calculateSNR ( double  justSig[512],
double  justNoise[512] 
)

◆ ConvertHVtoLRTimedomain()

void Tools::ConvertHVtoLRTimedomain ( const int  nfour,
double *  vvolts,
double *  hvolts,
double *  left,
double *  right 
)

Convert H and V components to left and right circular polarization in time domain

Parameters
nfour:: const int - number of fourier points
vvolts:: double * - array of voltage values (VPOL)
hvolts:: double * - array of voltage values (HPOL)
left:: double * - array of voltage values (LCP)
right:: double * - array of voltage values (RCP)

◆ dCross()

void Tools::dCross ( double *  ,
double *  ,
double *   
)

◆ dDot()

double Tools::dDot ( double *  ,
double *  ,
int   
)

◆ dGetPhi()

double Tools::dGetPhi ( double *  )

◆ dGetTheta()

double Tools::dGetTheta ( double *  )

◆ dMax() [1/2]

double Tools::dMax ( double  a,
double  b 
)

◆ dMax() [2/2]

double Tools::dMax ( const double *  x,
int  n 
)

◆ dMin() [1/2]

double Tools::dMin ( const double *  x,
int  n 
)

◆ dMin() [2/2]

double Tools::dMin ( double  x,
double  y 
)

◆ dMinNotZero()

double Tools::dMinNotZero ( const double *  x,
int  n 
)

◆ dsMax()

double Tools::dsMax ( TSpline5 *  sp)

◆ dSquare()

double Tools::dSquare ( double *  p)

◆ dSum()

double Tools::dSum ( double *  anarray,
int  n 
)

◆ dvMax()

double Tools::dvMax ( const vector< double >  x)

◆ findIndex()

int Tools::findIndex ( double *  freqlab,
double  freq,
int  npoints,
double  min,
double  max 
)

◆ four1()

void Tools::four1 ( double *  data,
const int  isign,
int  nsize 
)

◆ get_circular_bivariate_normal_random_variable()

void Tools::get_circular_bivariate_normal_random_variable ( double &  rand_gauss_a,
double &  rand_gauss_b 
)

◆ get_random_rician()

void Tools::get_random_rician ( double  signal,
double  signal_phase,
double  sigma,
double &  amplitude,
double &  phase 
)

◆ GetFWHM()

double Tools::GetFWHM ( TH1 *  h1)

◆ Getifreq()

int Tools::Getifreq ( double  freq,
double  freq_low,
double  freq_high,
int  n 
)

◆ getInterpolatedGraph()

TGraph * Tools::getInterpolatedGraph ( TGraph *  grIn,
Double_t  deltaT 
)

◆ getMaxMagnitude()

double Tools::getMaxMagnitude ( vector< double >  v)

◆ GetNext2NumbersAsString()

void Tools::GetNext2NumbersAsString ( ifstream &  fin,
ofstream &  fout,
string &  number1,
string &  number2,
string &  stherest 
)

◆ GetNextNumberAsString()

void Tools::GetNextNumberAsString ( ifstream &  fin,
ofstream &  fout,
string &  number 
)

◆ GetNumbersAsStringArray()

void Tools::GetNumbersAsStringArray ( ifstream &  fin,
ofstream &  fout,
vector< string > &  vnumbers,
int  nelements 
)

◆ InterpolateComplex()

void Tools::InterpolateComplex ( double *  array,
const unsigned  n 
)

◆ InterpolateReal()

void Tools::InterpolateReal ( double *  array,
const unsigned  n 
)

◆ iSum()

int Tools::iSum ( int *  thisarray,
int  n 
)

◆ MakeGraph()

void Tools::MakeGraph ( int  index,
int  n,
double *  time,
double *  volts,
TGraph *&  mygraph,
TH2F *&  h2,
double  scalex,
double  scaley,
string  xaxistitle,
string  yaxistitle 
)

◆ nested_vector_element_convert()

template<class T , class U >
void Tools::nested_vector_element_convert ( const vector< vector< T > > &  input,
vector< vector< U > > &  output 
)

◆ NonZero()

int Tools::NonZero ( double *  anarray,
int  n 
)

◆ NormalTimeOrdering()

void Tools::NormalTimeOrdering ( const int  n,
double *  volts 
)

◆ Print() [1/2]

void Tools::Print ( double *  p,
int  i 
)

◆ Print() [2/2]

void Tools::Print ( int *  p,
int  i 
)

◆ realft()

void Tools::realft ( double *  data,
const int  isign,
int  nsize 
)

◆ reverseTimeOrdering() [1/2]

void Tools::reverseTimeOrdering ( const int  n,
double *  bitsin,
double *  bitsout 
)

◆ reverseTimeOrdering() [2/2]

void Tools::reverseTimeOrdering ( const int  n,
int *  bitsin,
int *  bitsout 
)

◆ round()

int Tools::round ( double  number)

◆ ShiftLeft()

void Tools::ShiftLeft ( double *  x,
const int  n,
int  ishift 
)

◆ ShiftRight()

void Tools::ShiftRight ( double *  x,
const int  n,
int  ishift 
)

◆ Step()

double Tools::Step ( double  x)

◆ SWAP()

void Tools::SWAP ( double &  a,
double &  b 
)

◆ vector_element_convert()

template<class T , class U >
void Tools::vector_element_convert ( const vector< T > &  input,
vector< U > &  output 
)

◆ WhichIsMax()

int Tools::WhichIsMax ( double *  x,
int  n 
)

◆ WhichIsMin()

int Tools::WhichIsMin ( double *  x,
int  n 
)

◆ Zero() [1/2]

void Tools::Zero ( double *  anarray,
int  n 
)

◆ Zero() [2/2]

void Tools::Zero ( int *  anarray,
int  n 
)