72 |
#include <color.h> |
#include <color.h> |
73 |
// |
// |
74 |
extern Bool_t existfile(TString); |
extern Bool_t existfile(TString); |
75 |
|
extern Bool_t NODB; |
76 |
// |
// |
77 |
|
|
78 |
using namespace std; |
using namespace std; |
98 |
var.showac = false; |
var.showac = false; |
99 |
} |
} |
100 |
|
|
101 |
|
void FEVdetector::Reset(){ |
102 |
|
L2 = NULL; |
103 |
|
} |
104 |
|
|
105 |
void FEVdetector::checkctrlword(){ |
void FEVdetector::checkctrlword(){ |
106 |
var.SHOWDEC = 0; |
var.SHOWDEC = 0; |
107 |
var.TOF = 0; |
var.TOF = 0; |
117 |
var.INFOS = 0; |
var.INFOS = 0; |
118 |
var.VINFOS = 0; |
var.VINFOS = 0; |
119 |
var.PALETTE = 0; |
var.PALETTE = 0; |
120 |
|
var.PATTRIG = 1; |
121 |
if ( *ctrlword & (1<<0) ) { |
if ( *ctrlword & (1<<0) ) { |
122 |
var.PALETTE = 1; |
var.PALETTE = 1; |
123 |
}; |
}; |
145 |
if ( *ctrlword & (1<<8) ) { |
if ( *ctrlword & (1<<8) ) { |
146 |
var.TOF = 1; |
var.TOF = 1; |
147 |
}; |
}; |
148 |
|
if ( *ctrlword & (1<<9) ) { |
149 |
|
var.PATTRIG = 1; |
150 |
|
}; |
151 |
} |
} |
152 |
|
|
153 |
void FEVdetector::SetDDEC(TString de){ |
void FEVdetector::SetDDEC(TString de){ |
215 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
216 |
thisentry = i; |
thisentry = i; |
217 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
218 |
L2->Clear(); |
// L2->Clear(); |
219 |
// printf("qui\n"); |
// printf("qui\n"); |
220 |
L2->GetEntry(i); |
L2->GetEntry(i); |
221 |
if ( var.showall ){ |
if ( var.showall ){ |
403 |
Int_t dlen = 10; |
Int_t dlen = 10; |
404 |
// |
// |
405 |
char o[200000]; |
char o[200000]; |
406 |
|
char zz[200000]; |
407 |
char col[13]; |
char col[13]; |
408 |
char col2[13]; |
char col2[13]; |
409 |
// |
// |
410 |
setcolor(col,RESET, GREEN, WHITE); |
setcolor(col,RESET, GREEN, WHITE); |
411 |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
412 |
|
sprintf(zz,"======> EVENT:%i\n", thisentry); |
413 |
// |
// |
414 |
setcolor(col,RESET, RED, WHITE); |
setcolor(col,RESET, RED, WHITE); |
415 |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
416 |
|
sprintf(zz,"%sBranch %s\n",zz,b1->GetName()); |
417 |
setcolor(col,RESET, BLACK, WHITE); |
setcolor(col,RESET, BLACK, WHITE); |
418 |
sprintf(o,"%s%s",o,col); |
sprintf(o,"%s%s",o,col); |
419 |
// |
// |
441 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
442 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
443 |
sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2); |
sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2); |
444 |
|
sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName()); |
445 |
// |
// |
446 |
j = 0; |
j = 0; |
447 |
// |
// |
454 |
while ( j < length ){ |
while ( j < length ){ |
455 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
456 |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
457 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0)); |
458 |
} else { |
} else { |
459 |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
460 |
|
sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0)); |
461 |
}; |
}; |
462 |
j++; |
j++; |
463 |
}; |
}; |
469 |
while ( j < length ){ |
while ( j < length ){ |
470 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
471 |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
472 |
|
sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0)); |
473 |
} else { |
} else { |
474 |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
475 |
|
sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0)); |
476 |
}; |
}; |
477 |
j++; |
j++; |
478 |
}; |
}; |
484 |
while ( j < length ){ |
while ( j < length ){ |
485 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
486 |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
487 |
|
sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0)); |
488 |
} else { |
} else { |
489 |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
490 |
|
sprintf(zz,"%s %f",zz,tb->GetValue(j,0)); |
491 |
}; |
}; |
492 |
j++; |
j++; |
493 |
}; |
}; |
522 |
// printf("ciao %s \n",pr->Data()); |
// printf("ciao %s \n",pr->Data()); |
523 |
// }; |
// }; |
524 |
sprintf(o,"%s TString - not implemented yet -",o); |
sprintf(o,"%s TString - not implemented yet -",o); |
525 |
|
sprintf(zz,"%s TString - not implemented yet -",zz); |
526 |
}; |
}; |
527 |
// |
// |
528 |
// TArray |
// TArray |
623 |
// sprintf(o,"%s\n",o); |
// sprintf(o,"%s\n",o); |
624 |
// |
// |
625 |
sprintf(o,"%s TArray - not implemented yet -",o); |
sprintf(o,"%s TArray - not implemented yet -",o); |
626 |
|
sprintf(zz,"%s TArray - not implemented yet -",zz); |
627 |
// |
// |
628 |
}; |
}; |
629 |
// |
// |
630 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
631 |
|
sprintf(zz,"%s\n",zz); |
632 |
break; |
break; |
633 |
case 3: |
case 3: |
634 |
// |
// |
637 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
638 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
639 |
sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata()); |
sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata()); |
640 |
|
sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata()); |
641 |
|
|
642 |
// |
// |
643 |
if ( tb->GetNdata() ){ |
if ( tb->GetNdata() ){ |
688 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
689 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
690 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
691 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
692 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
693 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
694 |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
695 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength)); |
696 |
} else { |
} else { |
697 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
698 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength)); |
699 |
}; |
}; |
700 |
j++; |
j++; |
701 |
}; |
}; |
708 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
709 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
710 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
711 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
712 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
713 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
714 |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
715 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength)); |
716 |
} else { |
} else { |
717 |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
718 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,slength)); |
719 |
}; |
}; |
720 |
j++; |
j++; |
721 |
}; |
}; |
728 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
729 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
730 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
731 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
732 |
Bool_t bold = true; |
Bool_t bold = true; |
733 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
734 |
if ( bold ){ |
if ( bold ){ |
742 |
while ( jj < slength ){ |
while ( jj < slength ){ |
743 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
744 |
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
745 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true)); |
746 |
} else { |
} else { |
747 |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
748 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true)); |
749 |
}; |
}; |
750 |
jj++; |
jj++; |
751 |
}; |
}; |
752 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
753 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
754 |
if ( !bold ){ |
if ( !bold ){ |
755 |
bold = true; |
bold = true; |
756 |
} else { |
} else { |
771 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
772 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
773 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
774 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
775 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
776 |
Int_t jj = 0; |
Int_t jj = 0; |
777 |
while ( jj < slength ){ |
while ( jj < slength ){ |
778 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
779 |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
780 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true)); |
781 |
} else { |
} else { |
782 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
783 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true)); |
784 |
}; |
}; |
785 |
jj++; |
jj++; |
786 |
}; |
}; |
787 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
788 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
789 |
j++; |
j++; |
790 |
}; |
}; |
791 |
}; |
}; |
818 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
819 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
820 |
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
821 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
822 |
// |
// |
823 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
824 |
// |
// |
829 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
830 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
831 |
sprintf(o,"%s %i ,",o,arr->At(jj)); |
sprintf(o,"%s %i ,",o,arr->At(jj)); |
832 |
|
sprintf(zz,"%s %i ,",zz,arr->At(jj)); |
833 |
} else { |
} else { |
834 |
sprintf(o,"%s %i",o,arr->At(jj)); |
sprintf(o,"%s %i",o,arr->At(jj)); |
835 |
|
sprintf(zz,"%s %i",zz,arr->At(jj)); |
836 |
}; |
}; |
837 |
jj++; |
jj++; |
838 |
}; |
}; |
839 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
840 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
841 |
j++; |
j++; |
842 |
}; |
}; |
843 |
}; |
}; |
855 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
856 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
857 |
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
858 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
859 |
// |
// |
860 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
861 |
// |
// |
866 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
867 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
868 |
sprintf(o,"%s %f ,",o,arr->At(jj)); |
sprintf(o,"%s %f ,",o,arr->At(jj)); |
869 |
|
sprintf(zz,"%s %f ,",zz,arr->At(jj)); |
870 |
} else { |
} else { |
871 |
sprintf(o,"%s %f",o,arr->At(jj)); |
sprintf(o,"%s %f",o,arr->At(jj)); |
872 |
|
sprintf(zz,"%s %f",zz,arr->At(jj)); |
873 |
}; |
}; |
874 |
jj++; |
jj++; |
875 |
}; |
}; |
876 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
877 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
878 |
j++; |
j++; |
879 |
}; |
}; |
880 |
}; |
}; |
881 |
}; |
}; |
882 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
883 |
|
sprintf(zz,"%s\n",zz); |
884 |
break; |
break; |
885 |
}; |
}; |
886 |
}; |
}; |
889 |
break; |
break; |
890 |
}; |
}; |
891 |
}; |
}; |
|
// pamgui->DIALOG(0,o); |
|
892 |
printf("%s\n",o); |
printf("%s\n",o); |
893 |
|
pamgui->DIALOG(4,zz); |
894 |
}; |
}; |
895 |
|
|
896 |
|
|
1062 |
// |
// |
1063 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1064 |
cintcom.str(""); |
cintcom.str(""); |
1065 |
cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex; |
cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona |
1066 |
cintcom << L2; |
cintcom << L2; |
1067 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1068 |
|
// printf(" comando: %s \n",cintcom.str().c_str()); |
1069 |
} else { |
} else { |
1070 |
cintcom.str(""); |
cintcom.str(""); |
1071 |
cintcom << "TTree *otr = (TTree*)0x" << hex; |
cintcom << "TTree *otr = (TTree*)" << hex; |
1072 |
cintcom << otr; |
cintcom << otr; |
1073 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1074 |
// |
// |
1075 |
cintcom.str(""); |
cintcom.str(""); |
1076 |
cintcom << "struct Variables &var = (struct Variables &)0x" << hex; |
cintcom << "struct Variables &var = (struct Variables &)" << hex; |
1077 |
cintcom << &var; |
cintcom << &var; |
1078 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1079 |
}; |
}; |
1104 |
// |
// |
1105 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1106 |
// |
// |
1107 |
printf(" %s \n",ddec.Data()); |
// printf(" %s \n",ddec.Data()); |
1108 |
if ( !L2 ){ |
if ( !L2 ){ |
1109 |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
1110 |
|
if ( NODB ) L2->NoDBconnections(); |
1111 |
otr = L2->GetPamTree(); |
otr = L2->GetPamTree(); |
1112 |
printf(" l2 constructor\n"); |
// printf(" l2 constructor\n"); |
1113 |
// printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot); |
// printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot); |
1114 |
} else { |
} else { |
1115 |
// |
// |
1116 |
printf(" l2 already exist \n"); |
// printf(" l2 already exist \n"); |
1117 |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
1118 |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
1119 |
// |
// |
1264 |
// |
// |
1265 |
} |
} |
1266 |
|
|
1267 |
|
bool bit(int decimal, char pos) |
1268 |
|
{ |
1269 |
|
return( (decimal>>pos)%2 ); |
1270 |
|
} |
1271 |
|
// |
1272 |
|
// THE PATTERN TRIGGER |
1273 |
|
// |
1274 |
|
void FEVdetector::ShowTRG(){ |
1275 |
|
// |
1276 |
|
// |
1277 |
|
if ( !var.TRG ) return; |
1278 |
|
// |
1279 |
|
int S11[8]; |
1280 |
|
S11[0] = 0; |
1281 |
|
S11[1] = 0; |
1282 |
|
S11[2] = 0; |
1283 |
|
S11[3] = 0; |
1284 |
|
S11[4] = 0; |
1285 |
|
S11[5] = 0; |
1286 |
|
S11[6] = 0; |
1287 |
|
S11[7] = 0; |
1288 |
|
|
1289 |
|
int S12[6]; |
1290 |
|
S12[0] = 0; |
1291 |
|
S12[1] = 0; |
1292 |
|
S12[2] = 0; |
1293 |
|
S12[3] = 0; |
1294 |
|
S12[4] = 0; |
1295 |
|
S12[5] = 0; |
1296 |
|
|
1297 |
|
int S21[2]; |
1298 |
|
S21[0] = 0; |
1299 |
|
S21[1] = 0; |
1300 |
|
|
1301 |
|
int S22[2]; |
1302 |
|
S22[0] = 0; |
1303 |
|
S22[1] = 0; |
1304 |
|
|
1305 |
|
int S31[3]; |
1306 |
|
S31[0] = 0; |
1307 |
|
S31[1] = 0; |
1308 |
|
S31[2] = 0; |
1309 |
|
|
1310 |
|
int S32[3]; |
1311 |
|
S32[0] = 0; |
1312 |
|
S32[1] = 0; |
1313 |
|
S32[2] = 0; |
1314 |
|
|
1315 |
|
//S3 |
1316 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],0) ) S31[0]++; |
1317 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],1) ) S31[1]++; |
1318 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],2) ) S31[2]++; |
1319 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],3) ) S31[0]++; |
1320 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],4) ) S31[1]++; |
1321 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],5) ) S31[2]++; |
1322 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],6) ) S32[0]++; |
1323 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],7) ) S32[1]++; |
1324 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],8) ) S32[2]++; |
1325 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],9) ) S32[0]++; |
1326 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],10) ) S32[1]++; |
1327 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],11) ) S32[2]++; |
1328 |
|
//S2 |
1329 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],0) ) S21[0]++; |
1330 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],1) ) S21[1]++; |
1331 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],2) ) S21[0]++; |
1332 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],3) ) S21[1]++; |
1333 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],4) ) S22[0]++; |
1334 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],5) ) S22[1]++; |
1335 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],6) ) S22[0]++; |
1336 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],7) ) S22[1]++; |
1337 |
|
//S12 |
1338 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],0) ) S12[0]++; |
1339 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],1) ) S12[1]++; |
1340 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],2) ) S12[2]++; |
1341 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],3) ) S12[3]++; |
1342 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],4) ) S12[4]++; |
1343 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],5) ) S12[5]++; |
1344 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],6) ) S12[0]++; |
1345 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],7) ) S12[1]++; |
1346 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],8) ) S12[2]++; |
1347 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],9) ) S12[3]++; |
1348 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],10) ) S12[4]++; |
1349 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],11) ) S12[5]++; |
1350 |
|
//S11 |
1351 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],0) ) S11[0]++; |
1352 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],1) ) S11[1]++; |
1353 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],2) ) S11[2]++; |
1354 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],3) ) S11[3]++; |
1355 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],4) ) S11[4]++; |
1356 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],5) ) S11[5]++; |
1357 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],6) ) S11[6]++; |
1358 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],7) ) S11[7]++; |
1359 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],8) ) S11[0]++; |
1360 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],9) ) S11[1]++; |
1361 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],10) ) S11[2]++; |
1362 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],11) ) S11[3]++; |
1363 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],12) ) S11[4]++; |
1364 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],13) ) S11[5]++; |
1365 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],14) ) S11[6]++; |
1366 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],15) ) S11[7]++; |
1367 |
|
|
1368 |
|
|
1369 |
|
// |
1370 |
|
Int_t rj = 0; |
1371 |
|
Float_t xs2x = var.xxvc; |
1372 |
|
Float_t ys2x = var.yxvc + 0.36*var.sfy; |
1373 |
|
Float_t xs2y = var.xyvc; |
1374 |
|
Float_t ys2y = var.yyvc + 0.36*var.sfy; |
1375 |
|
Float_t ws2 = 0.005; |
1376 |
|
Float_t ws13 = 0.007; |
1377 |
|
Int_t noadc; |
1378 |
|
if ( var.bw ){ |
1379 |
|
noadc=12; |
1380 |
|
} else { |
1381 |
|
noadc=kRed; |
1382 |
|
}; |
1383 |
|
// |
1384 |
|
// S11 X-view |
1385 |
|
// |
1386 |
|
Float_t s11p = 0.051; |
1387 |
|
TPolyLine *ftrg11x[8]; |
1388 |
|
for ( Int_t j=0; j<8; j++){ |
1389 |
|
Float_t nxc1[5]={ (s11p*j), (s11p*j), s11p*(j+1), s11p*(j+1), (s11p*j)}; |
1390 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
1391 |
|
Float_t nxc[5]; |
1392 |
|
Float_t nyc[5]; |
1393 |
|
for (Int_t i = 0; i<5 ; i++) { |
1394 |
|
nxc[i]= xs2x + (-0.204+nxc1[i])*var.sfx; |
1395 |
|
nyc[i] = ys2x + (0.295+nyc1[i])*var.sfy; |
1396 |
|
}; |
1397 |
|
ftrg11x[j] = new TPolyLine(5,nxc,nyc); |
1398 |
|
ftrg11x[j]->SetLineColor(noadc); |
1399 |
|
ftrg11x[j]->SetLineWidth(S11[j]); |
1400 |
|
if ( S11[j] ) ftrg11x[j]->Draw(); |
1401 |
|
}; |
1402 |
|
// |
1403 |
|
// S12 Y-view |
1404 |
|
// |
1405 |
|
Float_t s12p = 0.055; |
1406 |
|
TPolyLine *ftrg12y[6]; |
1407 |
|
rj = 6; |
1408 |
|
for ( Int_t j=0; j<6; j++){ |
1409 |
|
rj--; |
1410 |
|
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
1411 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
1412 |
|
Float_t nxc[5]; |
1413 |
|
Float_t nyc[5]; |
1414 |
|
for (Int_t i = 0; i<5 ; i++) { |
1415 |
|
nxc[i]= xs2y + (-0.165+nxc1[i])*var.sfx; |
1416 |
|
nyc[i] = ys2y + (0.295+nyc1[i])*var.sfy; |
1417 |
|
}; |
1418 |
|
ftrg12y[j] = new TPolyLine(5,nxc,nyc); |
1419 |
|
ftrg12y[j]->SetLineColor(noadc); |
1420 |
|
ftrg12y[j]->SetLineWidth(S12[rj]); |
1421 |
|
if ( S12[rj] ) ftrg12y[j]->Draw(); |
1422 |
|
}; |
1423 |
|
|
1424 |
|
|
1425 |
|
// |
1426 |
|
// S21 Y-view |
1427 |
|
// |
1428 |
|
Float_t s21p = 0.075; |
1429 |
|
TPolyLine *ftrg21y[2]; |
1430 |
|
rj=2; |
1431 |
|
for ( Int_t j=0; j<2; j++){ |
1432 |
|
rj--; |
1433 |
|
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
1434 |
|
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
1435 |
|
Float_t nxc[5]; |
1436 |
|
Float_t nyc[5]; |
1437 |
|
for (Int_t i = 0; i<5 ; i++) { |
1438 |
|
nxc[i]= xs2y + nxc1[i]*var.sfx; |
1439 |
|
nyc[i] = ys2y + nyc1[i]*var.sfy; |
1440 |
|
// printf(" TRG i %i x %f y %f \n",i,nxc[i],nyc[i]); |
1441 |
|
}; |
1442 |
|
ftrg21y[j] = new TPolyLine(5,nxc,nyc); |
1443 |
|
ftrg21y[j]->SetLineColor(noadc); |
1444 |
|
ftrg21y[j]->SetLineWidth(S21[j]); |
1445 |
|
if ( S21[j]) ftrg21y[j]->Draw(); |
1446 |
|
}; |
1447 |
|
|
1448 |
|
// |
1449 |
|
// S22 X-view |
1450 |
|
// |
1451 |
|
Float_t s22p = 0.090; |
1452 |
|
TPolyLine *ftrg22x[2]; |
1453 |
|
for ( Int_t j=0; j<2; j++){ |
1454 |
|
Float_t nxc1[5]={ s22p*(j-1), s22p*(j-1), s22p*j, s22p*j, s22p*(j-1)}; |
1455 |
|
Float_t nyc1[5]={ -ws2, 0., 0., -ws2, -ws2}; |
1456 |
|
Float_t nxc[5]; |
1457 |
|
Float_t nyc[5]; |
1458 |
|
for (Int_t i = 0; i<5 ; i++) { |
1459 |
|
nxc[i]= xs2x + nxc1[i]*var.sfx; |
1460 |
|
nyc[i] = ys2x + nyc1[i]*var.sfy; |
1461 |
|
}; |
1462 |
|
ftrg22x[j] = new TPolyLine(5,nxc,nyc); |
1463 |
|
ftrg22x[j]->SetLineColor(noadc); |
1464 |
|
ftrg22x[j]->SetLineWidth(S22[j]); |
1465 |
|
if ( S22[j] ) ftrg22x[j]->Draw(); |
1466 |
|
}; |
1467 |
|
// |
1468 |
|
// S31 X-view |
1469 |
|
// |
1470 |
|
Float_t s31p = 0.060; |
1471 |
|
TPolyLine *ftrg31x[3]; |
1472 |
|
for ( Int_t j=0; j<3; j++){ |
1473 |
|
Float_t nxc1[5]={ (s31p*j), (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
1474 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
1475 |
|
Float_t nxc[5]; |
1476 |
|
Float_t nyc[5]; |
1477 |
|
for (Int_t i = 0; i<5 ; i++) { |
1478 |
|
nxc[i]= xs2x + (-0.090+nxc1[i])*var.sfx; |
1479 |
|
nyc[i] = ys2x + (-0.488+nyc1[i])*var.sfy; |
1480 |
|
}; |
1481 |
|
ftrg31x[j] = new TPolyLine(5,nxc,nyc); |
1482 |
|
ftrg31x[j]->SetLineColor(noadc); |
1483 |
|
ftrg31x[j]->SetLineWidth(S31[j]); |
1484 |
|
if ( S31[j] ) ftrg31x[j]->Draw(); |
1485 |
|
}; |
1486 |
|
|
1487 |
|
// |
1488 |
|
// S32 Y-view |
1489 |
|
// |
1490 |
|
Float_t s32p = 0.050; |
1491 |
|
TPolyLine *ftrg32y[3]; |
1492 |
|
rj = 3; |
1493 |
|
for ( Int_t j=0; j<3; j++){ |
1494 |
|
rj--; |
1495 |
|
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
1496 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
1497 |
|
Float_t nxc[5]; |
1498 |
|
Float_t nyc[5]; |
1499 |
|
for (Int_t i = 0; i<5 ; i++) { |
1500 |
|
nxc[i]= xs2y + (-0.075+nxc1[i])*var.sfx; |
1501 |
|
nyc[i] = ys2y + (-0.488+nyc1[i])*var.sfy; |
1502 |
|
}; |
1503 |
|
ftrg32y[j] = new TPolyLine(5,nxc,nyc); |
1504 |
|
ftrg32y[j]->SetLineColor(noadc); |
1505 |
|
ftrg32y[j]->SetLineWidth(S32[rj]); |
1506 |
|
if ( S32[rj] ) ftrg32y[j]->Draw(); |
1507 |
|
} |
1508 |
|
} |
1509 |
|
|
1510 |
void FEVdetector::DisplayEvent(){ |
void FEVdetector::DisplayEvent(){ |
1511 |
TLatex *text=new TLatex(); |
TLatex *text=new TLatex(); |
1512 |
stringstream testo; |
stringstream testo; |
1522 |
thefigure->cd(); |
thefigure->cd(); |
1523 |
ShowTOF(); |
ShowTOF(); |
1524 |
// |
// |
1525 |
|
// show pattern trigger if the case |
1526 |
|
// |
1527 |
|
thefigure->cd(); |
1528 |
|
if ( var.PATTRIG ){ |
1529 |
|
ShowTRG(); |
1530 |
|
thefigure->Modified(); |
1531 |
|
thefigure->Update(); |
1532 |
|
} |
1533 |
|
// |
1534 |
// show anticounters |
// show anticounters |
1535 |
// |
// |
1536 |
thefigure->cd(); |
thefigure->cd(); |
1748 |
text->DrawLatex(var.xxvc+0.17*var.sfx,var.yxvc-0.08*var.sfy,"CAS1"); |
text->DrawLatex(var.xxvc+0.17*var.sfx,var.yxvc-0.08*var.sfy,"CAS1"); |
1749 |
text->DrawLatex(var.xyvc-0.192*var.sfx,var.yyvc-0.08*var.sfy,"CAS4"); |
text->DrawLatex(var.xyvc-0.192*var.sfx,var.yyvc-0.08*var.sfy,"CAS4"); |
1750 |
text->DrawLatex(var.xyvc+0.17*var.sfx,var.yyvc-0.08*var.sfy,"CAS3"); |
text->DrawLatex(var.xyvc+0.17*var.sfx,var.yyvc-0.08*var.sfy,"CAS3"); |
1751 |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.48*var.sfy,"CARD2"); |
text->DrawLatex(var.xxvc-0.222*var.sfx,var.yxvc+0.48*var.sfy,"CARD2"); |
1752 |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.48*var.sfy,"CARD3"); |
text->DrawLatex(var.xxvc+0.185*var.sfx,var.yxvc+0.48*var.sfy,"CARD3"); |
1753 |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.48*var.sfy,"CARD1"); |
text->DrawLatex(var.xyvc-0.190*var.sfx,var.yyvc+0.48*var.sfy,"CARD1"); |
1754 |
text->DrawLatex(var.xyvc+0.13*var.sfx,var.yyvc+0.48*var.sfy,"CARD4"); |
text->DrawLatex(var.xyvc+0.16*var.sfx,var.yyvc+0.48*var.sfy,"CARD4"); |
1755 |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.39*var.sfy,"CAT3"); |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.39*var.sfy,"CAT3"); |
1756 |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.39*var.sfy,"CAT4"); |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.39*var.sfy,"CAT4"); |
1757 |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.39*var.sfy,"CAT2"); |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.39*var.sfy,"CAT2"); |
1879 |
// |
// |
1880 |
// print infos on terminal |
// print infos on terminal |
1881 |
// |
// |
1882 |
|
// if ( !var.selex ){ |
1883 |
printf(" File: %s \n",var.thefilename.Data()); |
printf(" File: %s \n",var.thefilename.Data()); |
1884 |
if ( !s4pulser && !calotrig ){ |
if ( !s4pulser && !calotrig ){ |
1885 |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
1890 |
if ( calotrig ){ |
if ( calotrig ){ |
1891 |
printf(" Pkt_num: %i - Progressive number: %i - CALO trigger -\n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i - CALO trigger -\n",(int)headc,thisentry+1); |
1892 |
}; |
}; |
1893 |
printf(" On Board Time: %i (delta %i) [ms]\n",OBT,DOBT); |
printf(" On Board Time: %u (delta %i) [ms]\n",OBT,DOBT); |
1894 |
const char *trc2 = trcs; |
const char *trc2 = trcs; |
1895 |
printf(" TRIGGER: %s \n",trc2); |
printf(" TRIGGER: %s \n",trc2); |
1896 |
printf(" AC: CARD hit = %i CAT hit = %i CAS hit = %i \n",var.hcard,var.hcat,var.hcas); |
printf(" AC: CARD hit = %i CAT hit = %i CAS hit = %i \n",var.hcard,var.hcat,var.hcas); |
1902 |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
1903 |
printf(" S4: %.2f [MIP] TOF: beta = %.2f \n",var.s4sig,var.beta[4]); |
printf(" S4: %.2f [MIP] TOF: beta = %.2f \n",var.s4sig,var.beta[4]); |
1904 |
printf(" ND: Trigger: neutrons = %i - Background: upper = %i lower = %i \n",var.trup,var.bkup,var.bkbo); |
printf(" ND: Trigger: neutrons = %i - Background: upper = %i lower = %i \n",var.trup,var.bkup,var.bkbo); |
1905 |
|
// }; |
1906 |
// |
// |
1907 |
} |
} |
1908 |
|
|
2213 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
2214 |
// |
// |
2215 |
Int_t tt = 0; |
Int_t tt = 0; |
2216 |
|
Int_t rj = 0; |
2217 |
// |
// |
2218 |
// force level0, i.e. show patterntrig variable! |
// force level0, i.e. show patterntrig variable! |
2219 |
// |
// |
2243 |
Float_t mt31[2][3]; |
Float_t mt31[2][3]; |
2244 |
Float_t mt32[2][3]; |
Float_t mt32[2][3]; |
2245 |
// |
// |
2246 |
|
memset(mt11,0,2*8*sizeof(Float_t)); |
2247 |
|
memset(mt12,0,2*6*sizeof(Float_t)); |
2248 |
|
memset(mt21,0,2*2*sizeof(Float_t)); |
2249 |
|
memset(mt22,0,2*2*sizeof(Float_t)); |
2250 |
|
memset(mt31,0,2*3*sizeof(Float_t)); |
2251 |
|
memset(mt32,0,2*3*sizeof(Float_t)); |
2252 |
|
// |
2253 |
Int_t S3 = 0; |
Int_t S3 = 0; |
2254 |
Int_t S2 = 0; |
Int_t S2 = 0; |
2255 |
Int_t S12 = 0; |
Int_t S12 = 0; |
2414 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
2415 |
ocolo = 10; |
ocolo = 10; |
2416 |
TPolyLine *ftof12ya[6]; |
TPolyLine *ftof12ya[6]; |
2417 |
|
rj=6; |
2418 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2419 |
|
rj--; |
2420 |
Float_t xc1[4]={ (s12p*j), s12p*(j), s12p*(j+1), (s12p*j)}; |
Float_t xc1[4]={ (s12p*j), s12p*(j), s12p*(j+1), (s12p*j)}; |
2421 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2422 |
Float_t xc[4]; |
Float_t xc[4]; |
2432 |
} else { |
} else { |
2433 |
colo = 1; |
colo = 1; |
2434 |
}; |
}; |
2435 |
ColorMIP(ms12a[j],colo); |
ColorMIP(ms12a[rj],colo); |
2436 |
// |
// |
2437 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2438 |
if ( mt12[0][j] == 4095. ) colo = noadc; |
if ( mt12[0][rj] == 4095. ) colo = noadc; |
2439 |
// |
// |
2440 |
ftof12ya[j]->SetFillColor(colo); |
ftof12ya[j]->SetFillColor(colo); |
2441 |
ftof12ya[j]->SetLineWidth(1); |
ftof12ya[j]->SetLineWidth(1); |
2445 |
// B |
// B |
2446 |
s12p = 0.055; |
s12p = 0.055; |
2447 |
TPolyLine *ftof12yb[6]; |
TPolyLine *ftof12yb[6]; |
2448 |
|
rj=6; |
2449 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2450 |
|
rj--; |
2451 |
Float_t xc1[4]={ (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
Float_t xc1[4]={ (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
2452 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2453 |
Float_t xc[4]; |
Float_t xc[4]; |
2463 |
} else { |
} else { |
2464 |
colo = 1; |
colo = 1; |
2465 |
}; |
}; |
2466 |
ColorMIP(ms12b[j],colo); |
ColorMIP(ms12b[rj],colo); |
2467 |
// |
// |
2468 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2469 |
if ( mt12[1][j] == 4095. ) colo = noadc; |
if ( mt12[1][rj] == 4095. ) colo = noadc; |
2470 |
// |
// |
2471 |
ftof12yb[j]->SetFillColor(colo); |
ftof12yb[j]->SetFillColor(colo); |
2472 |
ftof12yb[j]->SetLineWidth(1); |
ftof12yb[j]->SetLineWidth(1); |
2500 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
2501 |
ocolo = 10; |
ocolo = 10; |
2502 |
TPolyLine *ftof21ya[2]; |
TPolyLine *ftof21ya[2]; |
2503 |
|
rj=2; |
2504 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2505 |
|
rj--; |
2506 |
Float_t xc1[4]={ s21p*(j-1), s21p*(j-1), s21p*j, s21p*(j-1)}; |
Float_t xc1[4]={ s21p*(j-1), s21p*(j-1), s21p*j, s21p*(j-1)}; |
2507 |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
2508 |
Float_t xc[4]; |
Float_t xc[4]; |
2518 |
} else { |
} else { |
2519 |
colo = 1; |
colo = 1; |
2520 |
}; |
}; |
2521 |
ColorMIP(ms21a[j],colo); |
ColorMIP(ms21a[rj],colo); |
2522 |
// |
// |
2523 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2524 |
if ( mt21[0][j] == 4095. ) colo = noadc; |
if ( mt21[0][rj] == 4095. ) colo = noadc; |
2525 |
// |
// |
2526 |
ftof21ya[j]->SetFillColor(colo); |
ftof21ya[j]->SetFillColor(colo); |
2527 |
ftof21ya[j]->SetLineWidth(1); |
ftof21ya[j]->SetLineWidth(1); |
2531 |
// B |
// B |
2532 |
s21p = 0.075; |
s21p = 0.075; |
2533 |
TPolyLine *ftof21yb[2]; |
TPolyLine *ftof21yb[2]; |
2534 |
|
rj=2; |
2535 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2536 |
|
rj--; |
2537 |
Float_t xc1[4]={ s21p*(j-1), s21p*j, s21p*j, s21p*(j-1)}; |
Float_t xc1[4]={ s21p*(j-1), s21p*j, s21p*j, s21p*(j-1)}; |
2538 |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
2539 |
Float_t xc[4]; |
Float_t xc[4]; |
2549 |
} else { |
} else { |
2550 |
colo = 1; |
colo = 1; |
2551 |
}; |
}; |
2552 |
ColorMIP(ms21b[j],colo); |
ColorMIP(ms21b[rj],colo); |
2553 |
// |
// |
2554 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2555 |
if ( mt21[1][j] == 4095. ) colo = noadc; |
if ( mt21[1][rj] == 4095. ) colo = noadc; |
2556 |
// |
// |
2557 |
ftof21yb[j]->SetFillColor(colo); |
ftof21yb[j]->SetFillColor(colo); |
2558 |
ftof21yb[j]->SetLineWidth(1); |
ftof21yb[j]->SetLineWidth(1); |
2667 |
Float_t s31p = 0.060; |
Float_t s31p = 0.060; |
2668 |
ocolo = 10; |
ocolo = 10; |
2669 |
TPolyLine *ftof31xa[3]; |
TPolyLine *ftof31xa[3]; |
2670 |
|
rj=3; |
2671 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2672 |
|
rj--; |
2673 |
Float_t xc1[4]={ (s31p*j), (s31p*j), s31p*(j+1), (s31p*j)}; |
Float_t xc1[4]={ (s31p*j), (s31p*j), s31p*(j+1), (s31p*j)}; |
2674 |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
2675 |
Float_t xc[4]; |
Float_t xc[4]; |
2685 |
} else { |
} else { |
2686 |
colo = 1; |
colo = 1; |
2687 |
}; |
}; |
2688 |
ColorMIP(ms31a[j],colo); |
ColorMIP(ms31a[rj],colo); |
2689 |
// |
// |
2690 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2691 |
if ( mt31[0][j] == 4095. ) colo = noadc; |
if ( mt31[0][rj] == 4095. ) colo = noadc; |
2692 |
// |
// |
2693 |
ftof31xa[j]->SetFillColor(colo); |
ftof31xa[j]->SetFillColor(colo); |
2694 |
ftof31xa[j]->SetLineWidth(1); |
ftof31xa[j]->SetLineWidth(1); |
2698 |
// B |
// B |
2699 |
s31p = 0.060; |
s31p = 0.060; |
2700 |
TPolyLine *ftof31xb[3]; |
TPolyLine *ftof31xb[3]; |
2701 |
|
rj=3; |
2702 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2703 |
|
rj--; |
2704 |
Float_t xc1[4]={ (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
Float_t xc1[4]={ (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
2705 |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
2706 |
Float_t xc[4]; |
Float_t xc[4]; |
2716 |
} else { |
} else { |
2717 |
colo = 1; |
colo = 1; |
2718 |
}; |
}; |
2719 |
ColorMIP(ms31b[j],colo); |
ColorMIP(ms31b[rj],colo); |
2720 |
// |
// |
2721 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2722 |
if ( mt31[1][j] == 4095. ) colo = noadc; |
if ( mt31[1][rj] == 4095. ) colo = noadc; |
2723 |
// |
// |
2724 |
ftof31xb[j]->SetFillColor(colo); |
ftof31xb[j]->SetFillColor(colo); |
2725 |
ftof31xb[j]->SetLineWidth(1); |
ftof31xb[j]->SetLineWidth(1); |
2751 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
2752 |
ocolo = 10; |
ocolo = 10; |
2753 |
TPolyLine *ftof32ya[3]; |
TPolyLine *ftof32ya[3]; |
2754 |
|
rj=3; |
2755 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2756 |
|
rj--; |
2757 |
Float_t xc1[4]={ (s32p*j), (s32p*j), s32p*(j+1), (s32p*j)}; |
Float_t xc1[4]={ (s32p*j), (s32p*j), s32p*(j+1), (s32p*j)}; |
2758 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2759 |
Float_t xc[4]; |
Float_t xc[4]; |
2769 |
} else { |
} else { |
2770 |
colo = 1; |
colo = 1; |
2771 |
}; |
}; |
2772 |
ColorMIP(ms32a[j],colo); |
ColorMIP(ms32a[rj],colo); |
2773 |
// |
// |
2774 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2775 |
if ( mt32[0][j] == 4095. ) colo = noadc; |
if ( mt32[0][rj] == 4095. ) colo = noadc; |
2776 |
// |
// |
2777 |
ftof32ya[j]->SetFillColor(colo); |
ftof32ya[j]->SetFillColor(colo); |
2778 |
ftof32ya[j]->SetLineWidth(1); |
ftof32ya[j]->SetLineWidth(1); |
2781 |
}; |
}; |
2782 |
s32p = 0.050; |
s32p = 0.050; |
2783 |
TPolyLine *ftof32yb[3]; |
TPolyLine *ftof32yb[3]; |
2784 |
|
rj=3; |
2785 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2786 |
|
rj--; |
2787 |
Float_t xc1[4]={ (s32p*j), s32p*(j+1), s32p*(j+1), (s32p*j)}; |
Float_t xc1[4]={ (s32p*j), s32p*(j+1), s32p*(j+1), (s32p*j)}; |
2788 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2789 |
Float_t xc[4]; |
Float_t xc[4]; |
2799 |
} else { |
} else { |
2800 |
colo = 1; |
colo = 1; |
2801 |
}; |
}; |
2802 |
ColorMIP(ms32b[j],colo); |
ColorMIP(ms32b[rj],colo); |
2803 |
// |
// |
2804 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2805 |
if ( mt32[1][j] == 4095. ) colo = noadc; |
if ( mt32[1][rj] == 4095. ) colo = noadc; |
2806 |
// |
// |
2807 |
ftof32yb[j]->SetFillColor(colo); |
ftof32yb[j]->SetFillColor(colo); |
2808 |
ftof32yb[j]->SetLineWidth(1); |
ftof32yb[j]->SetLineWidth(1); |
3033 |
// |
// |
3034 |
// |
// |
3035 |
Bool_t repeat = true; |
Bool_t repeat = true; |
3036 |
Int_t numtr = 1; |
// Int_t numtr = 1; |
3037 |
// Int_t numtr = 0; |
Int_t numtr = 0; |
3038 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
3039 |
|
Int_t repuntiltr = 0; |
3040 |
// |
// |
3041 |
// |
// |
3042 |
var.tofraw = 0; |
var.tofraw = 0; |
3043 |
// |
// |
3044 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
3045 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
3046 |
//if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks(); |
if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks(); |
3047 |
//repuntil = L2->GetNTracks(); |
// repuntiltr = L2->GetNTracks(); |
3048 |
// |
// |
3049 |
while ( repeat ){ |
while ( repeat ){ |
3050 |
// printf("B repuntil = %i \n",repuntil); |
// printf("B repuntil = %i \n",repuntil); |
3053 |
// |
// |
3054 |
// |
// |
3055 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
3056 |
// PamTrack *ptrack = 0; |
PamTrack *ptrack = 0; |
3057 |
Float_t adc[4][12]; |
Float_t adc[4][12]; |
3058 |
Float_t tdc[4][12]; |
Float_t tdc[4][12]; |
3059 |
memset(adc,0,4*12*sizeof(Float_t)); |
memset(adc,0,4*12*sizeof(Float_t)); |
3060 |
memset(tdc,0,4*12*sizeof(Float_t)); |
memset(tdc,0,4*12*sizeof(Float_t)); |
3061 |
// |
// |
3062 |
// |
// |
3063 |
|
Int_t myseq = 0; |
3064 |
// if ( repuntil == 0 || var.tofraw ){ |
// if ( repuntil == 0 || var.tofraw ){ |
3065 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
3066 |
numtr = 0; |
numtr = 0; |
3068 |
repeat = false; |
repeat = false; |
3069 |
} else { |
} else { |
3070 |
// |
// |
3071 |
|
// printf(" deH_ \n"); |
3072 |
// |
// |
3073 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr == 0 ){ |
3074 |
// |
// printf(" ques \n"); |
3075 |
// printf(" numtr is %i \n",numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
3076 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
myseq = 0; |
3077 |
//ptrack = L2->GetTrack(numtr); |
// printf(" que \n"); |
3078 |
//ptt = ptrack->GetToFTrack(); |
|
3079 |
|
} else { |
3080 |
|
if ( numtr >= (repuntiltr-1) ) repeat = false; |
3081 |
|
// |
3082 |
|
printf(" numtr is %i \n",numtr); |
3083 |
|
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
3084 |
|
ptrack = L2->GetTrack(numtr-1); |
3085 |
|
ptt = ptrack->GetToFTrack(); |
3086 |
|
myseq = ptt->trkseqno + 1; |
3087 |
|
}; |
3088 |
}; |
}; |
3089 |
// |
// |
3090 |
xp11[0] = 0.; |
xp11[0] = 0.; |
3098 |
// |
// |
3099 |
ii = 2; |
ii = 2; |
3100 |
// |
// |
3101 |
Int_t myseq = ptt->trkseqno + 1; |
// Int_t myseq = ptt->trkseqno + 1; |
3102 |
|
// |
3103 |
|
// printf(" qui \n"); |
3104 |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
3105 |
// |
// |
3106 |
// printf(" qua \n"); |
// printf(" qua \n"); |
3107 |
// |
// |
3108 |
for ( Int_t i = 0; i<8; i++ ) { |
// for ( Int_t i = 0; i<8; i++ ) { |
3109 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
3110 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
3111 |
}; |
// }; |
3112 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
3113 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
3114 |
}; |
// }; |
3115 |
// xp11[i] = 0.; |
// xp11[i] = 0.; |
3116 |
}; |
// }; |
3117 |
|
|
3118 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
3119 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
3230 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3231 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
3232 |
} else { |
} else { |
3233 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
3234 |
}; |
}; |
3235 |
// |
// |
3236 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3260 |
ftof11y->Draw(); |
ftof11y->Draw(); |
3261 |
TPolyLine *sftof11[8]; |
TPolyLine *sftof11[8]; |
3262 |
tt = 1; |
tt = 1; |
3263 |
if ( level.file == -1 ) tt = 8; |
rj=1; |
3264 |
|
if ( level.file == -1 ){ |
3265 |
|
tt = 8; |
3266 |
|
rj = 8; |
3267 |
|
}; |
3268 |
for ( Int_t j=0; j<tt; j++){ |
for ( Int_t j=0; j<tt; j++){ |
3269 |
if ( (mt11[0][j]<4095. || mt11[1][j]<4095.)){ |
rj--; |
3270 |
|
if ( (mt11[0][rj]<4095. || mt11[1][rj]<4095.)){ |
3271 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3272 |
Float_t lowp = (xp11[j]-E11[j])/100.; |
Float_t lowp = -(xp11[rj]+E11[rj])/100.; |
3273 |
Float_t higp = (xp11[j]+E11[j])/100.; |
Float_t higp = -(xp11[rj]-E11[rj])/100.; |
3274 |
if ( lowp < -0.164 ) lowp = -0.164; |
if ( lowp < -0.164 ) lowp = -0.164; |
3275 |
if ( higp > 0.164 ) higp = 0.164; |
if ( higp > 0.164 ) higp = 0.164; |
3276 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
3277 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3278 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
3279 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3298 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
3299 |
ocolo = 10; |
ocolo = 10; |
3300 |
TPolyLine *ftof12y[6]; |
TPolyLine *ftof12y[6]; |
3301 |
|
rj = 6; |
3302 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
3303 |
|
rj--; |
3304 |
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
3305 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3306 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3317 |
colo = 1; |
colo = 1; |
3318 |
}; |
}; |
3319 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3320 |
ColorMIP(ms12a[j]+ms12b[j],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
3321 |
} else { |
} else { |
3322 |
ColorTOFMIP(ms12a[j]+ms12b[j],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
3323 |
}; |
}; |
3324 |
// |
// |
3325 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3386 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
3387 |
ocolo = 10; |
ocolo = 10; |
3388 |
TPolyLine *ftof21y[2]; |
TPolyLine *ftof21y[2]; |
3389 |
|
rj=2; |
3390 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
3391 |
|
rj--; |
3392 |
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
3393 |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
3394 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3396 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3397 |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
3398 |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
3399 |
|
// printf(" TOF i %i x %f y %f \n",i,nxc[i],nyc[i]); |
3400 |
}; |
}; |
3401 |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
3402 |
ftof21y[j]->SetLineColor(1); |
ftof21y[j]->SetLineColor(1); |
3406 |
colo = 1; |
colo = 1; |
3407 |
}; |
}; |
3408 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3409 |
ColorMIP(ms21a[j]+ms21b[j],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
3410 |
} else { |
} else { |
3411 |
ColorTOFMIP(ms21a[j]+ms21b[j],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
3412 |
}; |
}; |
3413 |
// |
// |
3414 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3494 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3495 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
3496 |
} else { |
} else { |
3497 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
3498 |
}; |
}; |
3499 |
// |
// |
3500 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3525 |
ftof22y->Draw(); |
ftof22y->Draw(); |
3526 |
TPolyLine *sftof22[2]; |
TPolyLine *sftof22[2]; |
3527 |
tt = 1; |
tt = 1; |
3528 |
if ( level.file == -1 ) tt = 2; |
rj = 1; |
3529 |
|
if ( level.file == -1 ){ |
3530 |
|
tt = 2; |
3531 |
|
rj = 2; |
3532 |
|
}; |
3533 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3534 |
|
rj--; |
3535 |
// for ( Int_t j=0; j<2; j++){ |
// for ( Int_t j=0; j<2; j++){ |
3536 |
if ( (mt22[0][j]<4095. || mt22[1][j]<4095.) ){ |
if ( (mt22[0][rj]<4095. || mt22[1][rj]<4095.) ){ |
3537 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3538 |
Float_t lowp = (xp22[j]-E22[j])/100.; |
Float_t lowp = -(xp22[rj]+E22[rj])/100.; |
3539 |
Float_t higp = (xp22[j]+E22[j])/100.; |
Float_t higp = -(xp22[rj]-E22[rj])/100.; |
3540 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3541 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3542 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
3543 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3544 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
3545 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3559 |
}; |
}; |
3560 |
}; |
}; |
3561 |
// |
// |
3562 |
|
//daquiinbasso |
3563 |
// |
// |
3564 |
// S31 X-view |
// S31 X-view |
3565 |
// |
// |
3585 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3586 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
3587 |
} else { |
} else { |
3588 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
3589 |
}; |
}; |
3590 |
// |
// |
3591 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3616 |
ftof31y->Draw(); |
ftof31y->Draw(); |
3617 |
TPolyLine *sftof31[3]; |
TPolyLine *sftof31[3]; |
3618 |
tt = 1; |
tt = 1; |
3619 |
if ( level.file == -1 ) tt = 3; |
rj = 1; |
3620 |
|
if ( level.file == -1 ){ |
3621 |
|
tt = 3; |
3622 |
|
rj = 3; |
3623 |
|
}; |
3624 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3625 |
|
rj--; |
3626 |
// for ( Int_t j=0; j<3; j++){ |
// for ( Int_t j=0; j<3; j++){ |
3627 |
if ( (mt31[0][j]<4095. || mt31[1][j]<4095.)){ |
if ( (mt31[0][rj]<4095. || mt31[1][rj]<4095.)){ |
3628 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3629 |
Float_t lowp = (xp31[j]-E31[j])/100.; |
Float_t lowp = -(xp31[rj]+E31[rj])/100.; |
3630 |
Float_t higp = (xp31[j]+E31[j])/100.; |
Float_t higp = -(xp31[rj]-E31[rj])/100.; |
3631 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3632 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3633 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
3634 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3635 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
3636 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3657 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
3658 |
ocolo = 10; |
ocolo = 10; |
3659 |
TPolyLine *ftof32y[3]; |
TPolyLine *ftof32y[3]; |
3660 |
|
rj = 3; |
3661 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
3662 |
|
rj--; |
3663 |
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
3664 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3665 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3676 |
colo = 1; |
colo = 1; |
3677 |
}; |
}; |
3678 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3679 |
ColorMIP(ms32a[j]+ms32b[j],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
3680 |
} else { |
} else { |
3681 |
ColorTOFMIP(ms32a[j]+ms32b[j],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
3682 |
}; |
}; |
3683 |
// |
// |
3684 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
5392 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5393 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5394 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5395 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5396 |
|
} else { |
5397 |
|
x = 1024 - trk->addrcluster[l][m]; |
5398 |
}; |
}; |
5399 |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
5400 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5464 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5465 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5466 |
for (Int_t img=0; img<2; img++){ |
for (Int_t img=0; img<2; img++){ |
5467 |
x = singlet->coord[img]; |
x = -singlet->coord[img]; |
5468 |
Float_t xsig = singlet->sgnl; |
Float_t xsig = singlet->sgnl; |
5469 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5470 |
// |
// |
5520 |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
5521 |
// |
// |
5522 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5523 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5524 |
if ( track->xgood[plane] ){ |
if ( track->XGood(plane) ){ |
5525 |
//if ( x > -100 ){ |
//if ( x > -100 ){ |
5526 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5527 |
if ( var.bw ){ |
if ( var.bw ){ |
5529 |
} else { |
} else { |
5530 |
sigcol2 = 1; |
sigcol2 = 1; |
5531 |
}; |
}; |
5532 |
ColorTRKMIP(track->dedx_x[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0); |
5533 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5534 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5535 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5549 |
planepad = plane * 2; |
planepad = plane * 2; |
5550 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5551 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5552 |
x = track->ym[plane]; |
x = -track->ym[plane]; |
5553 |
xsig = track->dedx_y[plane]; |
xsig = fabs(track->dedx_y[plane]); |
5554 |
if ( track->ygood[plane] ){ |
if ( track->YGood(plane) ){ |
5555 |
// if ( x > -100 ){ |
// if ( x > -100 ){ |
5556 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5557 |
if ( var.bw ){ |
if ( var.bw ){ |
5559 |
} else { |
} else { |
5560 |
sigcol2 = 1; |
sigcol2 = 1; |
5561 |
}; |
}; |
5562 |
ColorTRKMIP(track->dedx_y[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0); |
5563 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5564 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5565 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5611 |
for (Int_t plane = 0; plane<6; plane++){ |
for (Int_t plane = 0; plane<6; plane++){ |
5612 |
// |
// |
5613 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5614 |
Float_t y = track->ym[plane]; |
Float_t y = -track->ym[plane]; |
5615 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5616 |
Float_t ysig = track->dedx_y[plane]; |
Float_t ysig = fabs(track->dedx_y[plane]); |
5617 |
// if ( x > -100 && y > -100. ){ |
// if ( x > -100 && y > -100. ){ |
5618 |
if ( track->xgood[plane] && track->ygood[plane] ){ |
if ( track->XGood(plane) && track->YGood(plane) ){ |
5619 |
if ( var.bw ){ |
if ( var.bw ){ |
5620 |
sigcol1 = -1; |
sigcol1 = -1; |
5621 |
sigcol2 = -1; |
sigcol2 = -1; |
5733 |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
5734 |
// |
// |
5735 |
x = arrax->At(orderx->At(sing)); |
x = arrax->At(orderx->At(sing)); |
5736 |
Float_t y1 = array1->At(ordery->At(sing)); |
Float_t y1 = -array1->At(ordery->At(sing)); |
5737 |
Float_t y2 = array2->At(ordery->At(sing)); |
Float_t y2 = -array2->At(ordery->At(sing)); |
5738 |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
5739 |
Float_t ysig = sigarray->At(ordery->At(sing)); |
Float_t ysig = sigarray->At(ordery->At(sing)); |
5740 |
if ( x > -100 && y1 > -100. ){ |
if ( x > -100 && y1 > -100. ){ |
5827 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5828 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5829 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5830 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5831 |
|
} else { |
5832 |
|
x = 1024 - trk->addrcluster[l][m]; |
5833 |
}; |
}; |
5834 |
x += 1024.; |
x += 1024.; |
5835 |
if ( trk->signcluster[l][m]> ysig ){ |
if ( trk->signcluster[l][m]> ysig ){ |
5836 |
ysig = trk->signcluster[l][m]; |
ysig = trk->signcluster[l][m]; |
5837 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5838 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5839 |
}; |
}; |
5840 |
}; |
}; |
5862 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5863 |
if ( trk->signcluster[e][m] != 0. ){ |
if ( trk->signcluster[e][m] != 0. ){ |
5864 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[e][m]; |
|
|
} else { |
|
5865 |
x = trk->addrcluster[e][m]; |
x = trk->addrcluster[e][m]; |
5866 |
|
} else { |
5867 |
|
x = 1024 - trk->addrcluster[e][m]; |
5868 |
}; |
}; |
5869 |
x += 1024.; |
x += 1024.; |
5870 |
if ( trk->signcluster[e][m]> ysig ){ |
if ( trk->signcluster[e][m]> ysig ){ |
5871 |
ysig = trk->signcluster[e][m]; |
ysig = trk->signcluster[e][m]; |
5872 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5873 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5874 |
}; |
}; |
5875 |
}; |
}; |
5942 |
}; |
}; |
5943 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
5944 |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5945 |
caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
5946 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5947 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
5948 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
5991 |
// |
// |
5992 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
5993 |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5994 |
caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
5995 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5996 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
5997 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
6078 |
// |
// |
6079 |
Trajectory *tr = new Trajectory(npoint,zin); |
Trajectory *tr = new Trajectory(npoint,zin); |
6080 |
// |
// |
6081 |
ifail = track->DoTrack2(tr); |
// ifail = track->DoTrack2(tr); |
6082 |
|
ifail = track->DoTrack(tr); |
6083 |
// |
// |
6084 |
if ( !ifail ){ |
if ( !ifail ){ |
6085 |
for ( Int_t e = 0; e < npoint ; e++) { |
for ( Int_t e = 0; e < npoint ; e++) { |
6086 |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
6087 |
ty[e] = ((float)tr->y[e]/100.)*var.sfx + var.xyvc; |
ty[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xyvc; |
6088 |
if ( e < 50 ) { |
if ( e < 50 ) { |
6089 |
ptx1[e] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx1[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
6090 |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
6091 |
} else { |
} else { |
6092 |
ptx2[e-50] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx2[e-50] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
6093 |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
6094 |
}; |
}; |
6095 |
if ( e > 84 ) { |
if ( e > 84 ) { |
6096 |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
6097 |
ty1[e-85] = ((float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
ty1[e-85] = (-(float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
6098 |
tzx1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
tzx1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
6099 |
tzy1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
tzy1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
6100 |
}; |
}; |
6334 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6335 |
}; |
}; |
6336 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6337 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(95-n,21-m,1.); |
6338 |
pd2->cd(); |
pd2->cd(); |
6339 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6340 |
}; |
}; |
6563 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6564 |
}; |
}; |
6565 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6566 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(96-n,21-m,1.); |
6567 |
pd2->cd(); |
pd2->cd(); |
6568 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6569 |
}; |
}; |
6650 |
// |
// |
6651 |
stringstream xvev; |
stringstream xvev; |
6652 |
stringstream yvev; |
stringstream yvev; |
6653 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
6654 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
6655 |
Int_t colo; |
Int_t colo; |
6656 |
Int_t l; |
Int_t l; |
6657 |
Int_t m; |
Int_t m; |
6658 |
Int_t n; |
Int_t n; |
6659 |
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); |
Bool_t satura = false; |
6660 |
|
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura); |
6661 |
if ( var.bw ){ |
if ( var.bw ){ |
6662 |
colo = -1; |
colo = -1; |
6663 |
} else { |
} else { |
6664 |
colo = 1; |
colo = 1; |
6665 |
}; |
}; |
6666 |
ColorMIP(mip,colo); |
ColorMIP(mip,colo); |
6667 |
if ( l == 0 ) { |
if ( l == 0 ) { |
6668 |
xvev.str(""); |
xvev.str(""); |
6671 |
xvev << " " << l; |
xvev << " " << l; |
6672 |
gDirectory->Delete(xvev.str().c_str()); |
gDirectory->Delete(xvev.str().c_str()); |
6673 |
TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
6674 |
Xview->SetFillColor(colo); |
if ( satura ){ |
6675 |
|
Xview->SetFillColor(kBlack); |
6676 |
|
} else { |
6677 |
|
Xview->SetFillColor(colo); |
6678 |
|
}; |
6679 |
Xview->Fill(n,21-m,1.); |
Xview->Fill(n,21-m,1.); |
6680 |
pd1->cd(); |
pd1->cd(); |
6681 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6687 |
yvev << " " << l; |
yvev << " " << l; |
6688 |
gDirectory->Delete(yvev.str().c_str()); |
gDirectory->Delete(yvev.str().c_str()); |
6689 |
TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
6690 |
Yview->SetFillColor(colo); |
if ( satura ){ |
6691 |
Yview->Fill(n,21-m,1.); |
Yview->SetFillColor(kBlack); |
6692 |
|
} else { |
6693 |
|
Yview->SetFillColor(colo); |
6694 |
|
}; |
6695 |
|
Yview->Fill(96-n,21-m,1.); |
6696 |
pd2->cd(); |
pd2->cd(); |
6697 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6698 |
}; |
}; |