7 doSmdGains(
int sectID ,
int iU) {
9 TString iPath=
"iter5-pp/sect";
10 if (sectID<10) iPath+=
"0";
11 iPath+=sectID; iPath+=
"/";
13 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
14 loadSharedLibraries();
16 gStyle->SetPalette(1,0);
18 gSystem->Load(
"StEEmcUtil");
19 gSystem->Load(
"StEzSmdCal");
20 printf(
"loaded libraries\n");
26 sprintf(tt,
"%ssum-sect%d.hist.root",iPath.Data(),sectID);
33 task->set(HList,sectID,
'U'+iU);
36 int str1=267,str2=270;
41 for(str1=1;str1<288;str1+=30) {
43 if(str2>288) str2=288;
44 task->fitSlopesSmd(str1,str2,1);
47 task-> doSlopesOnly(850./1.4);
56 task->doGainCorr(str1,str2,12,1);
57 task->plTGraph(
"pol0",1,1);
62 task->plTGraph(
"pol0",0);
73 sprintf(tt,
"smd%02d%c.dat",sectID,
'U'+iU);
74 FILE *fd=fopen(tt,
"w"); assert(fd);
75 fprintf(fd,
"# gains for SMD plain %02d%c, inverted slopes\n# stripName, gain[ch/GeV], erGain, anything\n",sectID,
'U'+iU);
88 char cT[4]={
'P',
'Q',
'R',
'T'};
91 task->fitSlopesTile(1,6,cT[iT],3);
92 task->fitSlopesTile(7,6,cT[iT],3);