10 #include <TRefArray.h> 14 #include "TClonesArray.h" 15 #include "TGraphErrors.h" 16 #include "TPostScript.h" 22 #include "TPolyLine.h" 33 char SMP2Name[][100]={
"SMA0",
"SMC0",
"SMA1",
"SMC1",
"SMA2",
"SMC2",
"SMA3",
"SMC3",
"SMA4",
"SMC4",
"SMA5",
"SMC5",
"SMA9",
"SMC9",
"SMA10",
"SMC10",
"SMA11",
"SMC11",
"SMA12",
"SMC12"};
34 char SMnumber[][100]={
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19"};
40 int SMdetType[]={
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCAL,
kEMCALthird,
kEMCALthird,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCAL,
kDCALthird,kDCALthird};
80 {
int iSM,iCol,iRow,sm,col,row,k,offset;
88 if ((nbSM != 18) && (nbSM != 19))
89 {printf(
"Wrong SM number.\n");
94 fch = fopen(
"/cebaf/cebaf/EMCAL/calibPi0_run2/createOCDB_4_with2015data/multiplyPi0CalibrationFactors_TextToHisto_Final.txt",
"r");
98 {
for (iCol=0;iCol<kTabNbCol[
SMdetType[iSM]];iCol++)
99 {
for (iRow=0;iRow<kTabNbRow[SMdetType[iSM]];iRow++)
100 {fscanf(fch,
" %d %d %d %lf\n",&sm,&col,&row,&coeff);
101 if ((sm != iSM) || (col != iCol) || (row != iRow)) printf(
"=========== Out of sync OCDB (%d %d %d) vs (%d %d %d) ============\n",sm,col,row,iSM,iCol,iRow);
102 if (nbSM == 18) tabCoeffs[sm][col][row]=1./coeff;
103 else tabCoeffs[sm][(kTabNbCol[SMdetType[iSM]]-1)-col][(kTabNbRow[SMdetType[iSM]]-1)-row]=1./coeff;
110 fch = fopen(
"/cebaf/cebaf/EMCAL/calibPi0_run2/recalculateHV_4_with2015data/output_HVrecalculation_pass2_createSetBiasScripts/SMA12/NewBias.txt",
"r");
114 if (nbSM == 18) offset=16;
115 for (iCol=0;iCol<kTabNbCol[
SMdetType[nbSM]];iCol++)
117 {fscanf(fch,
" %d %d %lf\n",&col,&row,&hv);
118 if ((col != iCol) || (row != iRow)) printf(
"=========== Out of sync HV (%d %d %d) vs (%d %d %d) ============\n",nbSM,col,row,nbSM,iCol,iRow);
119 tabHV[nbSM][col][row]=hv;
125 for (iCol=0;iCol<kTabNbCol[SMdetType[nbSM]];iCol++)
127 {coeff=tabCoeffs[nbSM][iCol][iRow];
128 hv=tabHV[nbSM][iCol][iRow+offset];
129 printf(
"%d %d %d %d coeff %f prevHV %7.3f",nbSM,iCol,iRow,iRow+16,coeff,hv);
130 if (coeff == 1.) printf(
" no HV change");
134 {printf(
" %6.2f",hv+log(coeff)/tabP2[k]);
135 if (k == 1) printf(
"**");
const int kNbRowDCALthird
const int kNbRowEMCALthird
const int kNbColDCALthird
const int kNbSMEMCALthird
const int kNbColEMCALthird
void PrepareHV_SM1819(int nbSM)
const int kNbColOffsetDCAL
char detTypeString[][100]