| 2 |
* FTrkScanQlook_EXPERT.cxx |
* FTrkScanQlook_EXPERT.cxx |
| 3 |
* |
* |
| 4 |
* autor: D.Fedele |
* autor: D.Fedele |
| 5 |
* version v1r04 |
* version v1r10 |
| 6 |
* Parameters: |
* Parameters: |
| 7 |
* file - the path to the root file to analyze |
* file - the path to the root file to analyze |
| 8 |
* outdir - total path of output file |
* outdir - total path of output file |
| 123 |
|
|
| 124 |
// |
// |
| 125 |
// obtain information about the data file and select the output file |
// obtain information about the data file and select the output file |
|
const string filepath=file.Data(); |
|
| 126 |
Int_t dwpos = file.Last('/'); |
Int_t dwpos = file.Last('/'); |
| 127 |
Int_t dwpos1 = file.Last('.'); |
Int_t dwpos1 = file.Last('.'); |
| 128 |
TString base,ffile ; |
TString base,ffile ; |
| 173 |
printf(" Number of Header Entries: %d\n",neventH); |
printf(" Number of Header Entries: %d\n",neventH); |
| 174 |
|
|
| 175 |
Long64_t obt=0; |
Long64_t obt=0; |
| 176 |
|
Int_t ev[2]; |
| 177 |
|
TString cal=""; |
| 178 |
|
|
| 179 |
|
ev[0]=0; |
| 180 |
|
ev[1]=0; |
| 181 |
for(Int_t i=0;i<neventH;i++){ |
for(Int_t i=0;i<neventH;i++){ |
| 182 |
otr->GetEntry(i); |
otr->GetEntry(i); |
| 183 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
| 184 |
if(reh->TRK_CALIB_USED!=104){ |
if(reh->TRK_CALIB_USED!=104){ |
| 185 |
obt = pH->GetOrbitalTime(); |
obt = pH->GetOrbitalTime(); |
| 186 |
|
cal="Event with online calibration"; |
| 187 |
break; |
break; |
| 188 |
} |
} |
| 189 |
if(i==neventH-1){ |
if(i==neventH-1){ |
| 190 |
printf("\n\n ****** ONLINE CALIBRATION NOT FOUND IN THIS FILE ******\n\n"); |
cal="***** ONLINE CALIBRATION NOT FOUND IN THIS FILE *****"; |
| 191 |
return; |
ev[0]=2; |
| 192 |
|
ev[1]=3; |
| 193 |
} |
} |
| 194 |
} |
} |
| 195 |
Int_t ev[2]; |
if(ev[0]==0){ |
| 196 |
for(Int_t i=0;i<nevents;i++){ |
for(Int_t i=0;i<nevents;i++){ |
| 197 |
tr->GetEntry(i); |
tr->GetEntry(i); |
| 198 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 199 |
if(ph->GetOrbitalTime()>obt){ |
if(ph->GetOrbitalTime()>obt){ |
| 200 |
ev[0]=i+2; |
ev[0]=i+2; |
| 201 |
ev[1]=i+3; |
ev[1]=i+3; |
| 202 |
break; |
break; |
| 203 |
|
} |
| 204 |
} |
} |
| 205 |
} |
} |
| 206 |
|
|
| 212 |
|
|
| 213 |
for(Int_t e=0;e<2;e++){ |
for(Int_t e=0;e<2;e++){ |
| 214 |
event=ev[e]; |
event=ev[e]; |
| 215 |
printf("Scan of Entry %d\n",event-1); |
printf("Scan of Entry %d\n",event); |
| 216 |
|
|
| 217 |
tr->GetEntry(event-1); |
tr->GetEntry(event); |
| 218 |
//============================================================================ |
//============================================================================ |
| 219 |
|
|
| 220 |
gStyle->SetLabelSize(0.06,"x"); |
gStyle->SetLabelSize(0.06,"x"); |
| 236 |
c1[e]->SetFillColor(10); |
c1[e]->SetFillColor(10); |
| 237 |
c1[e]->Range(0,0,1,1); |
c1[e]->Range(0,0,1,1); |
| 238 |
stringstream fromfile; |
stringstream fromfile; |
| 239 |
fromfile<<"FTrkScanQLook_EXPERT File: "<<ffile<<" ----> Entry "<<event-1; |
fromfile<<"FTrkScanQLook_EXPERT File: "<<ffile<<" ----> Entry "<<event; |
| 240 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
| 241 |
t->SetTextFont(32); |
t->SetTextFont(32); |
| 242 |
t->SetTextColor(1); |
t->SetTextColor(1); |
| 243 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
| 244 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
| 245 |
t->DrawLatex(0.02,0.98,fromfile.str().c_str()); |
t->DrawLatex(0.02,0.98,fromfile.str().c_str()); |
| 246 |
|
t->DrawLatex(0.60,0.98,cal.Data()); |
| 247 |
|
|
| 248 |
// draw pads |
// draw pads |
| 249 |
TPad *trkpad[12]; //pad for histos |
TPad *trkpad[12]; //pad for histos |
| 462 |
} |
} |
| 463 |
|
|
| 464 |
TBox b; |
TBox b; |
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
| 465 |
|
|
| 466 |
c1[e]->cd(); |
c1[e]->cd(); |
| 467 |
trkpadtext[nn]->Draw(); |
trkpadtext[nn]->Draw(); |
| 490 |
if(imax[nn]==1) histomax[nn][e]->Draw("same]["); |
if(imax[nn]==1) histomax[nn][e]->Draw("same]["); |
| 491 |
histocomp[nn][e]->Draw("axis same"); |
histocomp[nn][e]->Draw("axis same"); |
| 492 |
if(nn==1){ |
if(nn==1){ |
| 493 |
b.DrawBox(2816.,-500.,3060.,4500.); |
b.SetFillColor(6); |
| 494 |
|
b.SetFillStyle(3945); |
| 495 |
|
b.DrawBox(2944.,-500.,3060.,4500.); |
| 496 |
|
|
| 497 |
|
b.SetFillColor(107); |
| 498 |
|
b.SetFillStyle(3954); |
| 499 |
|
b.DrawBox(2816.,-500.,2944.,4500.); |
| 500 |
|
b.DrawBox(2048.,-500.,2176.,4500.); |
| 501 |
|
} |
| 502 |
|
else if(nn==4){ |
| 503 |
|
b.SetFillColor(107); |
| 504 |
|
b.SetFillStyle(3954); |
| 505 |
|
b.DrawBox(384.,-500.,512.,4500.); |
| 506 |
} |
} |
| 507 |
else if(nn==6){ |
else if(nn==6){ |
| 508 |
|
b.SetFillColor(6); |
| 509 |
|
b.SetFillStyle(3945); |
| 510 |
b.DrawBox(2560.,-500.,2816.,4500.); |
b.DrawBox(2560.,-500.,2816.,4500.); |
|
b.DrawBox(512.,-500.,768.,4500.); |
|
| 511 |
b.DrawBox(1024.,-500.,1792.,4500.); |
b.DrawBox(1024.,-500.,1792.,4500.); |
| 512 |
|
|
| 513 |
|
b.SetFillColor(107); |
| 514 |
|
b.SetFillStyle(3954); |
| 515 |
|
b.DrawBox(512.,-500.,768.,4500.); |
| 516 |
|
} |
| 517 |
|
else if(nn==7){ |
| 518 |
|
b.SetFillColor(107); |
| 519 |
|
b.SetFillStyle(3954); |
| 520 |
|
b.DrawBox(512.,-500.,768.,4500.); |
| 521 |
} |
} |
| 522 |
else if(nn==11){ |
else if(nn==11){ |
| 523 |
|
b.SetFillColor(6); |
| 524 |
|
b.SetFillStyle(3945); |
| 525 |
b.DrawBox(768.,-500.,1024.,4500.); |
b.DrawBox(768.,-500.,1024.,4500.); |
| 526 |
|
|
| 527 |
|
b.SetFillColor(107); |
| 528 |
|
b.SetFillStyle(3954); |
| 529 |
|
b.DrawBox(0.,-500.,512.,4500); |
| 530 |
|
b.DrawBox(1920.,-500.,2048.,4500); |
| 531 |
} |
} |
| 532 |
c1[e]->Update(); |
c1[e]->Update(); |
| 533 |
|
|