Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arsenal.h File Reference
#include <cmath>
#include "stdlib.h"
#include <vector>
#include <string>
+ Include dependency graph for arsenal.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double sixPoint2dInterp (double x, double y, double v00, double v01, double v02, double v10, double v11, double v20)
 
double interpCubicDirect (vector< double > *x, vector< double > *y, double xx)
 
double interpCubicMono (vector< double > *x, vector< double > *y, double xx)
 
double interpLinearDirect (vector< double > *x, vector< double > *y, double xx)
 
double interpLinearMono (vector< double > *x, vector< double > *y, double xx)
 
double interpNearestDirect (vector< double > *x, vector< double > *y, double xx)
 
double interpNearestMono (vector< double > *x, vector< double > *y, double xx)
 
double invertFunc (double(*func)(double), double y, double xL, double xR, double dx, double x0, double relative_accuracy=1e-10)
 
double invertTableDirect_hook (double xx)
 
double invertTableDirect (vector< double > *x, vector< double > *y, double y0, double x0, double relative_accuracy=1e-10)
 
double stringToDouble (string)
 
vector< doublestringToDoubles (string)
 
string toLower (string str)
 
string trim (string str)
 
vector< vector< double > * > * readBlockData (istream &stream_in)
 
void releaseBlockData (vector< vector< double > * > *data)
 
double adaptiveSimpsonsAux (double(*f)(double), double a, double b, double epsilon, double S, double fa, double fb, double fc, int bottom)
 
double adaptiveSimpsons (double(*f)(double), double a, double b, double epsilon=1e-15, int maxRecursionDepth=50)
 
double qiu_simpsons (double(*f)(double), double a, double b, double epsilon=1e-15, int maxRecursionDepth=50)
 
double qiu_simpsonsRel (double(*f)(double), double a, double b, double epsilon=1e-15, int maxRecursionDepth=50)
 
long binarySearch (vector< double > *A, double value, bool skip_out_of_range=false)
 
void formatedPrint (ostream &, int count,...)
 
long double gamma_function (long double x)
 
long double log_gamma_function (long double x)
 
double beta_function (double, double)
 
double binomial_coefficient (double n, double k)
 
void print_progressbar (double percentage, int length=50, string symbol="#")
 
void display_logo (int which=1)
 
long irand (long LB, long RB)
 
double drand (double LB, double RB)
 
bool is_integer (double x, double tolerance=1e-30)
 
void GaussLegendre_getWeight (int npts, double *x, double *w, double A, double B, int opt)
 
void get_bin_average_and_count (istream &is, ostream &os, vector< double > *bins, long col_to_bin=0, void(*func)(vector< double > *)=NULL, long wanted_data_columns=-1, bool silence=false)
 

Function Documentation

double adaptiveSimpsons ( double(*)(double f,
double  a,
double  b,
double  epsilon = 1e-15,
int  maxRecursionDepth = 50 
)

Definition at line 519 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 519 of file arsenal.cpp

References adaptiveSimpsonsAux(), KFPMath::b, Acts::PhysicalConstants::c, f, fc, h, and S().

+ Here is the call graph for this function:

double adaptiveSimpsonsAux ( double(*)(double f,
double  a,
double  b,
double  epsilon,
double  S,
double  fa,
double  fb,
double  fc,
int  bottom 
)

Definition at line 503 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 503 of file arsenal.cpp

References adaptiveSimpsonsAux(), KFPMath::b, Acts::PhysicalConstants::c, Acts::UnitConstants::e, f, fd, and h.

Referenced by adaptiveSimpsons(), and adaptiveSimpsonsAux().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double beta_function ( double  ,
double   
)

Definition at line 875 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 875 of file arsenal.cpp

References log_gamma_function().

Referenced by binomial_coefficient().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

long binarySearch ( vector< double > *  A,
double  value,
bool  skip_out_of_range = false 
)

Definition at line 644 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 644 of file arsenal.cpp

References ambiguity_solver_full_chain::idx, G4PLUGDOOR::length, and value.

Referenced by get_bin_average_and_count(), interpCubicMono(), interpLinearMono(), and interpNearestMono().

+ Here is the caller graph for this function:

double binomial_coefficient ( double  n,
double  k 
)

Definition at line 886 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 886 of file arsenal.cpp

References beta_function().

+ Here is the call graph for this function:

void display_logo ( int  which = 1)

Definition at line 960 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 960 of file arsenal.cpp

double drand ( double  LB,
double  RB 
)
inline

Definition at line 66 of file arsenal.h.

View newest version in sPHENIX GitHub at line 66 of file arsenal.h

References Acts::UnitConstants::e, and width.

void formatedPrint ( ostream &  ,
int  count,
  ... 
)

Definition at line 946 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 946 of file arsenal.cpp

References test_fpe::count, j, and OUTPUT_PRECISION.

long double gamma_function ( long double  x)

Definition at line 680 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 680 of file arsenal.cpp

References Acts::UnitConstants::g, gr, i, k, Acts::UnitConstants::m, physmon_track_finding_ttbar::r, ambiguity_solver_full_chain::x, and physmon_track_finding_ttbar::z.

void GaussLegendre_getWeight ( int  npts,
double x,
double w,
double  A,
double  B,
int  opt 
)

Definition at line 1000 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 1000 of file arsenal.cpp

References A, i, j, Acts::UnitConstants::m, N, t, ambiguity_solver_full_chain::t1, and Acts::Test::tmp().

+ Here is the call graph for this function:

void get_bin_average_and_count ( istream &  is,
ostream &  os,
vector< double > *  bins,
long  col_to_bin = 0,
void(*)(vector< double > *)  func = NULL,
long  wanted_data_columns = -1,
bool  silence = false 
)

Definition at line 1112 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 1112 of file arsenal.cpp

References binarySearch(), Acts::UnitConstants::e, i, j, OUTPUT_PRECISION, and stringToDoubles().

+ Here is the call graph for this function:

double interpCubicDirect ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 58 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 58 of file arsenal.cpp

References Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, and size.

Referenced by invertTableDirect_hook().

+ Here is the caller graph for this function:

double interpCubicMono ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 172 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 172 of file arsenal.cpp

References binarySearch(), Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, size, and x0.

+ Here is the call graph for this function:

double interpLinearDirect ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 110 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 110 of file arsenal.cpp

References Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, and size.

double interpLinearMono ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 258 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 258 of file arsenal.cpp

References binarySearch(), Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, and size.

+ Here is the call graph for this function:

double interpNearestDirect ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 141 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 141 of file arsenal.cpp

References Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, and size.

double interpNearestMono ( vector< double > *  x,
vector< double > *  y,
double  xx 
)

Definition at line 288 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 288 of file arsenal.cpp

References binarySearch(), Acts::UnitConstants::e, ambiguity_solver_full_chain::idx, and size.

+ Here is the call graph for this function:

double invertFunc ( double(*)(double func,
double  y,
double  xL,
double  xR,
double  dx,
double  x0,
double  relative_accuracy = 1e-10 
)

Definition at line 318 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 318 of file arsenal.cpp

References F1, F2, F3, Acts::Test::tolerance, and x0.

Referenced by invertTableDirect().

+ Here is the caller graph for this function:

double invertTableDirect ( vector< double > *  x,
vector< double > *  y,
double  y0,
double  x0,
double  relative_accuracy = 1e-10 
)

Definition at line 391 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 391 of file arsenal.cpp

References invertFunc(), invertTableDirect_hook(), size, ambiguity_solver_full_chain::x, y, zq_x_global, and zq_y_global.

+ Here is the call graph for this function:

double invertTableDirect_hook ( double  xx)

Definition at line 390 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 390 of file arsenal.cpp

References interpCubicDirect(), zq_x_global, and zq_y_global.

Referenced by invertTableDirect().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

long irand ( long  LB,
long  RB 
)
inline

Definition at line 60 of file arsenal.h.

View newest version in sPHENIX GitHub at line 60 of file arsenal.h

References Acts::UnitConstants::e.

bool is_integer ( double  x,
double  tolerance = 1e-30 
)
inline

Definition at line 75 of file arsenal.h.

View newest version in sPHENIX GitHub at line 75 of file arsenal.h

References round(), and Acts::Test::tolerance.

+ Here is the call graph for this function:

long double log_gamma_function ( long double  x)

Definition at line 763 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 763 of file arsenal.cpp

References Acts::PhysicalConstants::c, corr, D1, D2, D4, FRTBIG, MACHINE_EPSILON, merge_hashes::p, PNT68, SQRTPI, ambiguity_solver_full_chain::x, and XBIG.

Referenced by beta_function().

+ Here is the caller graph for this function:

void print_progressbar ( double  percentage,
int  length = 50,
string  symbol = "#" 
)

Definition at line 898 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 898 of file arsenal.cpp

References i, G4PLUGDOOR::length, and utils::status.

double qiu_simpsons ( double(*)(double f,
double  a,
double  b,
double  epsilon = 1e-15,
int  maxRecursionDepth = 50 
)

Definition at line 531 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 531 of file arsenal.cpp

References KFPMath::a, test_fpe::count, f, f_1, i, G4PLUGDOOR::length, and step.

double qiu_simpsonsRel ( double(*)(double f,
double  a,
double  b,
double  epsilon = 1e-15,
int  maxRecursionDepth = 50 
)

Definition at line 574 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 574 of file arsenal.cpp

References KFPMath::a, test_fpe::count, f, f_1, i, G4PLUGDOOR::length, and step.

vector< vector<double>* >* readBlockData ( istream &  stream_in)

Definition at line 437 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 437 of file arsenal.cpp

References configureMap::data, i, and stringToDoubles().

+ Here is the call graph for this function:

void releaseBlockData ( vector< vector< double > * > *  data)

Definition at line 487 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 487 of file arsenal.cpp

References configureMap::data, and i.

double sixPoint2dInterp ( double  x,
double  y,
double  v00,
double  v01,
double  v02,
double  v10,
double  v11,
double  v20 
)

Definition at line 33 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 33 of file arsenal.cpp

References Acts::PhysicalConstants::c.

double stringToDouble ( string  )

Definition at line 425 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 425 of file arsenal.cpp

Referenced by ParameterReader::phraseEquationWithoutComments().

+ Here is the caller graph for this function:

vector<double> stringToDoubles ( string  )

Definition at line 407 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 407 of file arsenal.cpp

Referenced by get_bin_average_and_count(), and readBlockData().

+ Here is the caller graph for this function:

string toLower ( string  str)

Definition at line 618 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 618 of file arsenal.cpp

References it, str, and Acts::Test::tmp().

Referenced by ParameterReader::find(), and ParameterReader::setVal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string trim ( string  str)

Definition at line 627 of file arsenal.cpp.

View newest version in sPHENIX GitHub at line 627 of file arsenal.cpp

References str, and Acts::Test::tmp().

Referenced by ParameterReader::find(), Fun4AllMonitoring::Get_Memory(), ParameterReader::phraseEquationWithoutComments(), ParameterReader::phraseOneLine(), and ParameterReader::setVal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: