3 void writeParams(FILE *fOut,
int ibin,
int icharge,
char **paramNames,
double *chisq,
double *
params,
double *errors,
int nCent,
int nParams ) {
4 const char* binName[]={
"all",
"soft",
"neck",
"hard",
"softHard"};
5 const char* chargeName[] = {
"LS",
"US",
"CD",
"CI"};
7 fprintf(fOut,
" Fits for %s, %s\n",binName[ibin],chargeName[icharge]);
8 for (
int ip=0;ip<=nParams;ip++) {
9 fprintf(fOut,
"%s",paramNames[ip]);
13 printf(
" Fits for %s, %s\n",binName[ibin],chargeName[icharge]);
14 for (
int ip=0;ip<=nParams;ip++) {
15 printf(
"%s",paramNames[ip]);
20 for (
int ic=0;ic<nCent;ic++) {
22 fprintf(fOut,
"%2i%5.0f ",ic,chisq[ic]);
23 for (
int ip=0;ip<nParams;ip++) {
24 fprintf(fOut,
"%7.3f(%3.0f)",params[ic*nParams+ip],1000*errors[ic*nParams+ip]);
28 printf(
"%2i%5.0f ",ic,chisq[ic]);
29 for (
int ip=0;ip<nParams;ip++) {
30 printf(
"%7.3f(%3.0f)",params[ic*nParams+ip],1000*errors[ic*nParams+ip]);