1 #include "calibFmsShow.C"
3 void TestShow(
bool PRINT =
true)
7 map<int, int> iToCh[4];
8 map<int, int> chToBS[4];
9 map<int, int> chToCellStat[4];
10 map<int, float> chToGainCorr[4];
11 map<int, float> chToGain[4];
12 map<int, st_pos> chToPos[4];
13 GetMapIndexToCh (
"./FmsMapBase.txt", iToCh);
14 GetMapChToBS (
"./FmsMapBitShift.txt", chToBS);
15 GetMapChToCellStat(
"./FmsCellStat.txt", chToCellStat);
16 GetMapChToGainCorr(
"./FmsGainCorr.txt", chToGainCorr);
17 GetMapChToGain (
"./FmsMapBase.txt", chToGain);
18 GetMapChToPos (
"./FmsMapBase.txt", chToPos);
21 vector<int> Marked[4];
22 Marked[0].push_back(22);
23 Marked[0].push_back(45);
24 Marked[2].push_back(46);
25 Marked[2].push_back(52);
26 Marked[3].push_back(11);
33 map<int, string> cellInfo[4];
34 for (
unsigned int a=0; a<4; a++)
35 for (
unsigned int b=0; b<iToCh[a].size(); b++)
37 const int ch = iToCh[a][b];
38 const int bs = chToBS[a][ch];
39 string tempInfo = Form(
"d%i_ch%i, BS=%i", a+8, ch, bs);
40 cellInfo[a].insert(pair<int, string>(ch, tempInfo));
44 vector<int> MarkedBad[4];
45 for (
unsigned int a=0; a<4; a++)
46 for (
unsigned int b=0; b<iToCh[a].size(); b++)
48 const int ch = iToCh[a][b];
49 const int cs = chToCellStat[a][ch];
50 if (cs == BAD) MarkedBad[a].push_back(ch);
54 const char* inFile =
"/star/u/ckimstar/work/fms_calib/RUN15pptrans_final/xChecks/fmsCalib_day8081.root";
55 TFile* F = TFile::Open(inFile);
57 for (
int a=0; a<4; a++) H2_mass[a] = (TH2F*)F->Get(Form(
"mass_d%i_fine", a+8));
60 const char* inList =
"./inListQa_day8081.txt";
72 bool smallOnly =
false;
74 DrawMap(iToCh, chToPos,
"Test1");
75 DrawMap(iToCh, chToPos,
"Test2", smallOnly, showEta, PRINT, DumMapF, chToCellStat, Marked);
76 DrawMap(iToCh, chToPos,
"Test3", smallOnly, showEta, PRINT, chToGainCorr, DumMapI, Marked);
77 DrawMap(iToCh, chToPos,
"Test4", smallOnly, showEta, PRINT, chToGainCorr, chToCellStat, DumVecI);
78 DrawMap(iToCh, chToPos,
"TestA", smallOnly, showEta, PRINT, chToGainCorr, chToCellStat, Marked);
85 map<int, int> chToCS[2][4];
86 map<int, float> chToGC[2][4];
87 const char* inPath =
"/star/u/ckimstar/work/fms_calib/RUN15pptrans_final";
88 GetMapChToCellStat(Form(
"%s/cellStat/FmsCellStat_day7779.txt", inPath), chToCS[0]);
89 GetMapChToCellStat(Form(
"%s/cellStat/FmsCellStat_day8081.txt", inPath), chToCS[1]);
90 GetMapChToGainCorr(Form(
"%s/gainCorr/FmsGainCorr_day7779_fin.txt", inPath), chToGC[0]);
91 GetMapChToGainCorr(Form(
"%s/gainCorr/FmsGainCorr_day8081_fin.txt", inPath), chToGC[1]);
93 bool excBadDead =
true;
95 DrawCompGainCorr(iToCh, chToCS, chToGC,
"Sample1",
"Sample2", PRINT, excBadDead, convOnly);
104 TH2F* H2_mass[nComp][4];
107 for (
int i=0; i<nComp; i++)
109 const char* inPath =
"/gpfs01/star/subsysg/FPS/ckimstar/out_iterations/Iterations_day8081_0820";
110 F[i] = TFile::Open(Form(
"%s/fmsCalib_%i.root", inPath, i));
111 for (
int a=0; a<4; a++)
113 H2_mass[i][a] = (TH2F*)F[i]->Get(Form(
"mass_d%i_fine", a+8));
114 H2_mass[i][a]->SetTitle(Form(
"Test_%i", i));
119 map<int, string> cellInfo[4];
120 for (
unsigned int a=0; a<4; a++)
121 for (
unsigned int b=0; b<iToCh[a].size(); b++)
123 const int ch = iToCh[a][b];
124 const int bitShift = chToBS[a][ch];
125 const int cellStat = chToCellStat[a][ch];
126 const float gainCorr = chToGainCorr[a][ch];
127 string tempInfo = Form(
"d%i_ch%i, BS=%i, STAT=%i, GC=%4.3f", a+8, ch, bitShift, cellStat, gainCorr);
128 cellInfo[a].insert(pair<int, string>(ch, tempInfo));
141 const char* inPath =
"/gpfs01/star/subsysg/FPS/ckimstar/out_iterations/Iterations_day8081_0820";
142 bool excBadDead =
true;
156 const char* inPath =
"/gpfs01/star/subsysg/FPS/ckimstar/out_iterations/Iterations_day8081_0820";
157 map<int, int> chToCSIter[4];
158 GetMapChToCellStat(Form(
"%s/FmsCellStat_fin.txt", inPath), chToCSIter);
169 const char* inPath =
"/gpfs01/star/subsysg/FPS/ckimstar/out_iterations/Iterations_day8081_0820";
180 const char* inPath =
"/gpfs01/star/subsysg/FPS/ckimstar/out_iterations/Iterations_day8081_0820";