21 #include <TApplication.h> 29 #include <TPostScript.h> 33 #include <TGraphErrors.h> 41 namespace std {}
using namespace std;
50 char SMP2Name[][100]={
"SMA0",
"SMC0",
"SMA1",
"SMC1",
"SMA2",
"SMC2",
"SMA3",
"SMC3",
"SMA4",
"SMC4",
"SMA5",
"SMC5",
"SMA9",
"SMC9",
"SMA10",
"SMC10",
"SMA11",
"SMC11",
"SMA12",
"SMC12"};
51 char SMcalibName[][100]={
"US2",
"US1",
"EU2",
"EU1",
"US3",
"US5",
"US4",
"EU3",
"US7",
"US6",
"US8C0",
"US8C2",
"DCN1",
"DJP1",
"DUS2",
"DUS1",
"DJP2",
"DUS3",
"CN1A",
"CN1C"};
52 char SMnumber[][100]={
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19"};
57 int SMdetType[]={
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCALthird,
kEMCALthird,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCALthird,kDCALthird};
97 {
int iCol,iRow,col,row;
102 FILE *fileIn_0to7,*fileIn_16to23,*fileOut;
104 const char fchNameIn_0to7[] =
"/cebaf/cebaf/EMCAL/calibPi0_run2/recalculateHV_4_with2015data/output_HVrecalculation_EMCALthirds_pass2/SMA5/NewBias.txt";
105 const char fchNameIn_16to23[] =
"/cebaf/cebaf/EMCAL/calibPi0_run2/recalculateHV_4_with2015data/output_HVrecalculation_EMCALthirds_pass2/SMC5/NewBias.txt";
106 const char fchNameOut[] =
"NewFile_merged.txt";
108 printf(
"\nRunning with : \n");
109 printf(
" - file rows 0-7 : %s\n",fchNameIn_0to7);
110 printf(
" - file rows 16-23 : %s\n",fchNameIn_16to23);
112 fileIn_0to7 = fopen(fchNameIn_0to7,
"r");
113 if (!fileIn_0to7) {printf(
"File %s can not be found\n",fchNameIn_0to7); exit(-1);}
114 while (fscanf(fileIn_0to7,
" %d %d %lf\n",&col,&row,&value) > 0)
115 {tabValueSM_0to7[col][row]=value;
119 fileIn_16to23 = fopen(fchNameIn_16to23,
"r");
120 if (!fileIn_16to23) {printf(
"File %s can not be found\n",fchNameIn_16to23); exit(-1);}
121 while (fscanf(fileIn_16to23,
" %d %d %lf\n",&col,&row,&value) > 0)
122 {tabValueSM_16to23[col][row]=value;
124 fclose(fileIn_16to23);
126 fileOut = fopen(fchNameOut,
"w");
129 {
if (iRow <
kNbRowEMCALthird) fprintf(fileOut,
"%d %d %7.3f\n",iCol,iRow,tabValueSM_0to7[iCol][iRow]);
const int kNbColOffsetDCAL
const int kNbRowDCALthird
const int kNbSMEMCALthird
const int kNbColDCALthird
void MergeThirdSMfilesIntoOne()
const int kNbColEMCALthird
const int kNbRowEMCALthird
char detTypeString[][100]
const double coefFactorWanted