| 2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
| 3 |
* |
* |
| 4 |
* autor: D.Fedele |
* autor: D.Fedele |
| 5 |
* version v1r16 |
* version v1r25 |
| 6 |
* Parameters: |
* Parameters: |
| 7 |
* file - the data file to analyze |
* file - the data file to analyze |
| 8 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
| 143 |
|
|
| 144 |
// |
// |
| 145 |
// information about the RunHeader |
// information about the RunHeader |
| 146 |
ULong64_t HOBT[neventH]; |
ULong_t HOBT[neventH]; |
| 147 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
| 148 |
ULong_t acq_info[neventH]; |
ULong_t acq_info[neventH]; |
| 149 |
Int_t countnboot=1; |
Int_t countnboot=1; |
| 180 |
} |
} |
| 181 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
| 182 |
Int_t tempt[tsize][5]; |
Int_t tempt[tsize][5]; |
| 183 |
ULong64_t xt[tsize]; |
ULong_t xt[tsize]; |
| 184 |
|
|
| 185 |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
| 186 |
// |
// |
| 212 |
} |
} |
| 213 |
const Int_t bsize=maxsize; |
const Int_t bsize=maxsize; |
| 214 |
Int_t magt[bsize][5]; |
Int_t magt[bsize][5]; |
| 215 |
ULong64_t xb[bsize]; |
ULong_t xb[bsize]; |
| 216 |
siztmp=0; |
siztmp=0; |
| 217 |
// |
// |
| 218 |
// information about the magnetic field |
// information about the magnetic field |
| 249 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
| 250 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
| 251 |
else{ |
else{ |
| 252 |
Long64_t obt=0; |
ULong_t obt=0; |
| 253 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
| 254 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
| 255 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
| 256 |
|
|
| 257 |
if(ph->GetOrbitalTime()<obt && ev>0) |
if((ULong_t)ph->GetOrbitalTime()<obt && ev>0) |
| 258 |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
| 259 |
obt=ph->GetOrbitalTime(); |
obt=ph->GetOrbitalTime(); |
| 260 |
|
|
| 261 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
| 262 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
| 263 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
| 264 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
| 265 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
| 266 |
|
|
| 366 |
|
|
| 367 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
| 368 |
TLatex *t1=new TLatex(); |
TLatex *t1=new TLatex(); |
|
|
|
| 369 |
|
|
| 370 |
|
TLine li,liva1; |
| 371 |
|
|
| 372 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
| 373 |
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
| 374 |
|
|
| 534 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
| 535 |
isfile.str(""); |
isfile.str(""); |
| 536 |
|
|
|
TLine li; |
|
| 537 |
li.SetLineStyle(1); |
li.SetLineStyle(1); |
| 538 |
li.SetLineWidth(1); |
li.SetLineWidth(1); |
| 539 |
li.SetLineColor(190); |
li.SetLineColor(190); |
| 737 |
// and fill graphs and histos |
// and fill graphs and histos |
| 738 |
|
|
| 739 |
Int_t al=0; |
Int_t al=0; |
| 740 |
|
ULong_t obtx=0; |
| 741 |
Double_t x[MAXSTORAGE]; |
Double_t x[MAXSTORAGE]; |
| 742 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
| 743 |
Double_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
| 751 |
|
|
| 752 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
| 753 |
|
|
| 754 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
if(((ULong_t)ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
| 755 |
maxev=ev; |
maxev=ev; |
| 756 |
break; |
break; |
| 757 |
} |
} |
| 758 |
else{ |
else{ |
| 759 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
obtx = ph->GetOrbitalTime(); |
| 760 |
|
x[(ev-minev)]=(Double_t)obtx; |
| 761 |
ALARM=0; |
ALARM=0; |
| 762 |
Int_t dsp=0; |
Int_t dsp=0; |
| 763 |
Int_t noacq=0; |
Int_t noacq=0; |
| 891 |
al=1; |
al=1; |
| 892 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
| 893 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
| 894 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
| 895 |
alarm << "Total events "<<nevent<<endl; |
alarm << "Total events "<<nevent<<endl; |
| 896 |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
| 897 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
| 972 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
| 973 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
| 974 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
| 975 |
|
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
| 976 |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
| 977 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
| 978 |
oss1.str(""); |
oss1.str(""); |
| 998 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
| 999 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
| 1000 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
| 1001 |
|
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
| 1002 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
| 1003 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
| 1004 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
| 1116 |
|
|
| 1117 |
TBox b; |
TBox b; |
| 1118 |
|
|
| 1119 |
Float_t maxhist=0; |
Float_t maxhist=0,va1x=0; |
| 1120 |
LandauCanv1->cd(); |
LandauCanv1->cd(); |
| 1121 |
pad1[i]->SetFillColor(10); |
pad1[i]->SetFillColor(10); |
| 1122 |
pad1[i]->SetFrameFillColor(10); |
pad1[i]->SetFrameFillColor(10); |
| 1147 |
landau3[i]->Draw(""); |
landau3[i]->Draw(""); |
| 1148 |
LandauCanv3->Update(); |
LandauCanv3->Update(); |
| 1149 |
|
|
| 1150 |
|
|
| 1151 |
|
li.SetLineColor(38); |
| 1152 |
|
li.SetLineStyle(4); |
| 1153 |
|
li.SetLineWidth(2); |
| 1154 |
|
liva1.SetLineColor(42); |
| 1155 |
|
liva1.SetLineStyle(3); |
| 1156 |
|
liva1.SetLineWidth(1); |
| 1157 |
|
|
| 1158 |
IlluminaCanv->cd(); |
IlluminaCanv->cd(); |
| 1159 |
pad2[i]->SetFillColor(10); |
pad2[i]->SetFillColor(10); |
| 1160 |
pad2[i]->SetFrameFillColor(10); |
pad2[i]->SetFrameFillColor(10); |
| 1164 |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
| 1165 |
illuminazione[i]->GetXaxis()->CenterTitle(); |
illuminazione[i]->GetXaxis()->CenterTitle(); |
| 1166 |
illuminazione[i]->Draw(""); |
illuminazione[i]->Draw(""); |
| 1167 |
|
maxhist= illuminazione[i]->GetMaximum(); |
| 1168 |
if(i==0){ |
if(i==0){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
| 1169 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1170 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1171 |
|
b.DrawBox(256.,0.,384.,maxhist); |
| 1172 |
b.DrawBox(768.,0.,2047.,maxhist); |
b.DrawBox(768.,0.,2047.,maxhist); |
| 1173 |
} |
} |
| 1174 |
else if(i==1){ |
else if(i==1){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
| 1175 |
b.SetFillColor(6); |
b.SetFillColor(6); |
| 1176 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
| 1177 |
b.DrawBox(2944.,0.,3060.,maxhist); |
b.DrawBox(2944.,0.,3070.,maxhist); |
| 1178 |
|
|
| 1179 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1180 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1181 |
|
b.DrawBox(384.,0.,512.,maxhist); |
| 1182 |
|
b.DrawBox(2048.,0.,2432.,maxhist); |
| 1183 |
b.DrawBox(2816.,0.,2944.,maxhist); |
b.DrawBox(2816.,0.,2944.,maxhist); |
| 1184 |
b.DrawBox(2048.,0.,2176.,maxhist); |
} |
| 1185 |
|
else if(i==3){ |
| 1186 |
|
b.SetFillColor(107); |
| 1187 |
|
b.SetFillStyle(3954); |
| 1188 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
| 1189 |
} |
} |
| 1190 |
else if(i==4){ |
else if(i==4){ |
|
maxhist=illuminazione[i]->GetMaximum(); |
|
| 1191 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1192 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1193 |
b.DrawBox(384.,0.,512.,maxhist); |
b.DrawBox(256.,0.,512.,maxhist); |
| 1194 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
| 1195 |
|
} |
| 1196 |
|
else if(i==5){ |
| 1197 |
|
b.SetFillColor(107); |
| 1198 |
|
b.SetFillStyle(3954); |
| 1199 |
|
b.DrawBox(896.,0.,1024.,maxhist); |
| 1200 |
} |
} |
| 1201 |
else if(i==6){ |
else if(i==6){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
|
b.DrawBox(2560.,0.,2816.,maxhist); |
|
|
b.DrawBox(1024.,0.,1535.,maxhist); |
|
|
|
|
| 1202 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1203 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1204 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 1205 |
b.DrawBox(1536.,0.,1792.,maxhist); |
b.DrawBox(1024.,0.,1280.,maxhist); |
| 1206 |
} |
b.DrawBox(1280.,0.,1792.,maxhist); |
| 1207 |
|
b.DrawBox(2560.,0.,2816.,maxhist); |
| 1208 |
|
} |
| 1209 |
else if(i==7){ |
else if(i==7){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
| 1210 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1211 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1212 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 1213 |
|
b.DrawBox(896.,0.,1535.,maxhist); |
| 1214 |
|
b.DrawBox(2024.,0.,2280.,maxhist); |
| 1215 |
} |
} |
| 1216 |
else if(i==8){ |
else if(i==8){ |
|
maxhist=illuminazione[i]->GetMaximum(); |
|
| 1217 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1218 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1219 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 1220 |
} |
} |
| 1221 |
else if(i==9){ |
else if(i==9){ |
|
maxhist=illuminazione[i]->GetMaximum(); |
|
| 1222 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1223 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1224 |
b.DrawBox(256.,0.,384.,maxhist); |
b.DrawBox(256.,0.,384.,maxhist); |
| 1225 |
|
b.DrawBox(1280.,0.,1535.,maxhist); |
| 1226 |
|
b.DrawBox(1792.,0.,1920.,maxhist); |
| 1227 |
|
} |
| 1228 |
|
else if(i==10){ |
| 1229 |
|
b.SetFillColor(107); |
| 1230 |
|
b.SetFillStyle(3954); |
| 1231 |
|
b.DrawBox(1024.,0.,1152.,maxhist); |
| 1232 |
|
b.DrawBox(2048.,0.,3070.,maxhist); |
| 1233 |
} |
} |
| 1234 |
else if(i==11){ |
else if(i==11){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
| 1235 |
b.SetFillColor(6); |
b.SetFillColor(6); |
| 1236 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
| 1237 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(768.,0.,1024.,maxhist); |
| 1241 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
| 1242 |
b.DrawBox(1920.,0.,2560.,maxhist); |
b.DrawBox(1920.,0.,2560.,maxhist); |
| 1243 |
} |
} |
| 1244 |
|
for(int va=1; va<24; va++){ |
| 1245 |
|
va1x=128*va; |
| 1246 |
|
liva1.DrawLine(va1x,0.,va1x,maxhist); |
| 1247 |
|
} |
| 1248 |
|
li.DrawLine(1024.5,0,1024.5,maxhist); |
| 1249 |
|
li.DrawLine(2048.5,0,2048.5,maxhist); |
| 1250 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
| 1251 |
} |
} |
| 1252 |
|
|