| 1 |
// |
// |
| 2 |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
| 3 |
// |
// |
| 4 |
// FCaloQLOOK.c version 1.12 (2006-09-22) |
// FCaloQLOOK.c version 1.14 (2006-09-29) |
| 5 |
// |
// |
| 6 |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
| 7 |
// |
// |
| 8 |
// Changelog: |
// Changelog: |
| 9 |
// |
// |
| 10 |
|
// 1.13 - 1.14 (2006-09-29): Flag the last entry in the txt file, count missing section when checking for DSP entries correspondence. |
| 11 |
|
// |
| 12 |
|
// 1.12 - 1.13 (2006-09-28): Give wrong number of events in compress mode, fixed. |
| 13 |
|
// |
| 14 |
// 1.11 - 1.12 (2006-09-22): Check for different number of events, put output in a file and write down errors for each event. Fixed jumpev bug. |
// 1.11 - 1.12 (2006-09-22): Check for different number of events, put output in a file and write down errors for each event. Fixed jumpev bug. |
| 15 |
// |
// |
| 16 |
// 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. |
// 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. |
| 98 |
printf("PSCU-Pkt N. %u - OBT %u ms\n",pkt_num,obt); |
printf("PSCU-Pkt N. %u - OBT %u ms\n",pkt_num,obt); |
| 99 |
printf("Total events %u\n",totev); |
printf("Total events %u\n",totev); |
| 100 |
printf("(ROOT-tree entry %u )\n",entry); |
printf("(ROOT-tree entry %u )\n",entry); |
| 101 |
|
if ( (totev-1) == entry ) printf("NOTICE: this is last entry! \n"); |
| 102 |
printf("=================================================\n"); |
printf("=================================================\n"); |
| 103 |
evdone = true; |
evdone = true; |
| 104 |
}; |
}; |
| 309 |
Int_t pdone, bdone; |
Int_t pdone, bdone; |
| 310 |
pdone = 0; |
pdone = 0; |
| 311 |
bdone = 0; |
bdone = 0; |
| 312 |
bool isCOMP = 0; |
bool isCOMP = false; |
| 313 |
bool isFULL = 0; |
bool isFULL = false; |
| 314 |
bool isRAW = 0; |
bool isRAW = false; |
| 315 |
Int_t alldexy=0; |
Int_t alldexy=0; |
| 316 |
Int_t alldexy2=0; |
Int_t alldexy2=0; |
| 317 |
Int_t planebases=0; |
Int_t planebases=0; |
| 466 |
se = 1; |
se = 1; |
| 467 |
pl = (ii-1)/2; |
pl = (ii-1)/2; |
| 468 |
pdone = 0; |
pdone = 0; |
| 469 |
}; |
}; |
| 470 |
|
isCOMP = false; |
| 471 |
isCOMP = 0; |
isFULL = false; |
| 472 |
isFULL = 0; |
isRAW = false; |
| 473 |
isRAW = 0; |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = true; |
| 474 |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = true; |
| 475 |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; |
if ( ce->stwerr[se] & (1 << 3) ) isRAW = true; |
|
if ( ce->stwerr[se] & (1 << 3) ) isRAW = 1; |
|
| 476 |
bl = -1; |
bl = -1; |
| 477 |
for (Int_t kk = 0; kk < 96 ; kk++ ){ |
for (Int_t kk = 0; kk < 96 ; kk++ ){ |
| 478 |
if ( kk%16 == 0 ){ |
if ( kk%16 == 0 ){ |
| 609 |
}; |
}; |
| 610 |
cshit = 0; |
cshit = 0; |
| 611 |
for (Int_t k = 0; k < 4 ; k++ ){ |
for (Int_t k = 0; k < 4 ; k++ ){ |
| 612 |
isCOMP = 0; |
isCOMP = false; |
| 613 |
isFULL = 0; |
isFULL = false; |
| 614 |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; |
cestw=0; |
| 615 |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; |
if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; |
| 616 |
|
if ( ce->stwerr[k] & (1 << 16) && !(cestw & (1 << 3)) ) isCOMP = true; |
| 617 |
|
if ( ce->stwerr[k] & (1 << 17) && !(cestw & (1 << 3)) ) isFULL = true; |
| 618 |
|
// |
| 619 |
if ( isCOMP ) ver[k][16]++; |
if ( isCOMP ) ver[k][16]++; |
| 620 |
if ( isFULL ) ver[k][17]++; |
if ( isFULL ) ver[k][17]++; |
| 621 |
cshit += (int)ce->calstriphit[k]; |
cshit += (int)ce->calstriphit[k]; |
|
cestw=0; |
|
|
if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; |
|
| 622 |
if ( cestw ){ |
if ( cestw ){ |
| 623 |
if ( cestw & (1 << 0) ){ |
if ( cestw & (1 << 0) ){ |
| 624 |
ver[k][6]++ ; |
ver[k][6]++ ; |
| 1308 |
// |
// |
| 1309 |
Bool_t redevent = true; |
Bool_t redevent = true; |
| 1310 |
// |
// |
| 1311 |
if ( ver[0][3]+ver[0][16]+ver[0][17] == ver[1][3]+ver[1][16]+ver[1][17] && ver[1][3]+ver[1][16]+ver[1][17] == ver[2][3]+ver[2][16]+ver[2][17] && ver[2][3]+ver[2][16]+ver[2][17] == ver[3][3]+ver[3][16]+ver[3][17] ){ |
if ( ver[0][3]+ver[0][16]+ver[0][17]+ver[0][8] == ver[1][3]+ver[1][16]+ver[1][17]+ver[1][8] && ver[1][3]+ver[1][16]+ver[1][17]+ver[1][8] == ver[2][3]+ver[2][16]+ver[2][17]+ver[2][8] && ver[2][3]+ver[2][16]+ver[2][17]+ver[2][8] == ver[3][3]+ver[3][16]+ver[3][17]+ver[3][8] ){ |
| 1312 |
redevent = false; |
redevent = false; |
| 1313 |
}; |
}; |
| 1314 |
if ( redevent ) check = true; |
if ( redevent ) check = true; |