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; |
211 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
212 |
thisentry = i; |
thisentry = i; |
213 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
214 |
L2->Clear(); |
// L2->Clear(); |
215 |
// printf("qui\n"); |
// printf("qui\n"); |
216 |
L2->GetEntry(i); |
L2->GetEntry(i); |
217 |
if ( var.showall ){ |
if ( var.showall ){ |
399 |
Int_t dlen = 10; |
Int_t dlen = 10; |
400 |
// |
// |
401 |
char o[200000]; |
char o[200000]; |
402 |
|
char zz[200000]; |
403 |
char col[13]; |
char col[13]; |
404 |
char col2[13]; |
char col2[13]; |
405 |
// |
// |
406 |
setcolor(col,RESET, GREEN, WHITE); |
setcolor(col,RESET, GREEN, WHITE); |
407 |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
408 |
|
sprintf(zz,"======> EVENT:%i\n", thisentry); |
409 |
// |
// |
410 |
setcolor(col,RESET, RED, WHITE); |
setcolor(col,RESET, RED, WHITE); |
411 |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
412 |
|
sprintf(zz,"%sBranch %s\n",zz,b1->GetName()); |
413 |
setcolor(col,RESET, BLACK, WHITE); |
setcolor(col,RESET, BLACK, WHITE); |
414 |
sprintf(o,"%s%s",o,col); |
sprintf(o,"%s%s",o,col); |
415 |
// |
// |
437 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
438 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
439 |
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); |
440 |
|
sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName()); |
441 |
// |
// |
442 |
j = 0; |
j = 0; |
443 |
// |
// |
450 |
while ( j < length ){ |
while ( j < length ){ |
451 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
452 |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
453 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0)); |
454 |
} else { |
} else { |
455 |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
456 |
|
sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0)); |
457 |
}; |
}; |
458 |
j++; |
j++; |
459 |
}; |
}; |
465 |
while ( j < length ){ |
while ( j < length ){ |
466 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
467 |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
468 |
|
sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0)); |
469 |
} else { |
} else { |
470 |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
471 |
|
sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0)); |
472 |
}; |
}; |
473 |
j++; |
j++; |
474 |
}; |
}; |
480 |
while ( j < length ){ |
while ( j < length ){ |
481 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
482 |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
483 |
|
sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0)); |
484 |
} else { |
} else { |
485 |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
486 |
|
sprintf(zz,"%s %f",zz,tb->GetValue(j,0)); |
487 |
}; |
}; |
488 |
j++; |
j++; |
489 |
}; |
}; |
518 |
// printf("ciao %s \n",pr->Data()); |
// printf("ciao %s \n",pr->Data()); |
519 |
// }; |
// }; |
520 |
sprintf(o,"%s TString - not implemented yet -",o); |
sprintf(o,"%s TString - not implemented yet -",o); |
521 |
|
sprintf(zz,"%s TString - not implemented yet -",zz); |
522 |
}; |
}; |
523 |
// |
// |
524 |
// TArray |
// TArray |
619 |
// sprintf(o,"%s\n",o); |
// sprintf(o,"%s\n",o); |
620 |
// |
// |
621 |
sprintf(o,"%s TArray - not implemented yet -",o); |
sprintf(o,"%s TArray - not implemented yet -",o); |
622 |
|
sprintf(zz,"%s TArray - not implemented yet -",zz); |
623 |
// |
// |
624 |
}; |
}; |
625 |
// |
// |
626 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
627 |
|
sprintf(zz,"%s\n",zz); |
628 |
break; |
break; |
629 |
case 3: |
case 3: |
630 |
// |
// |
633 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
634 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
635 |
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()); |
636 |
|
sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata()); |
637 |
|
|
638 |
// |
// |
639 |
if ( tb->GetNdata() ){ |
if ( tb->GetNdata() ){ |
684 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
685 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
686 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
687 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
688 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
689 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
690 |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
691 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength)); |
692 |
} else { |
} else { |
693 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
694 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength)); |
695 |
}; |
}; |
696 |
j++; |
j++; |
697 |
}; |
}; |
704 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
705 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
706 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
707 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
708 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
709 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
710 |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
711 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength)); |
712 |
} else { |
} else { |
713 |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
714 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,slength)); |
715 |
}; |
}; |
716 |
j++; |
j++; |
717 |
}; |
}; |
724 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
725 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
726 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
727 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
728 |
Bool_t bold = true; |
Bool_t bold = true; |
729 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
730 |
if ( bold ){ |
if ( bold ){ |
738 |
while ( jj < slength ){ |
while ( jj < slength ){ |
739 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
740 |
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
741 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true)); |
742 |
} else { |
} else { |
743 |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
744 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true)); |
745 |
}; |
}; |
746 |
jj++; |
jj++; |
747 |
}; |
}; |
748 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
749 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
750 |
if ( !bold ){ |
if ( !bold ){ |
751 |
bold = true; |
bold = true; |
752 |
} else { |
} else { |
767 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
768 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
769 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
770 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
771 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
772 |
Int_t jj = 0; |
Int_t jj = 0; |
773 |
while ( jj < slength ){ |
while ( jj < slength ){ |
774 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
775 |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
776 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true)); |
777 |
} else { |
} else { |
778 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
779 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true)); |
780 |
}; |
}; |
781 |
jj++; |
jj++; |
782 |
}; |
}; |
783 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
784 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
785 |
j++; |
j++; |
786 |
}; |
}; |
787 |
}; |
}; |
814 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
815 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
816 |
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); |
817 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
818 |
// |
// |
819 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
820 |
// |
// |
825 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
826 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
827 |
sprintf(o,"%s %i ,",o,arr->At(jj)); |
sprintf(o,"%s %i ,",o,arr->At(jj)); |
828 |
|
sprintf(zz,"%s %i ,",zz,arr->At(jj)); |
829 |
} else { |
} else { |
830 |
sprintf(o,"%s %i",o,arr->At(jj)); |
sprintf(o,"%s %i",o,arr->At(jj)); |
831 |
|
sprintf(zz,"%s %i",zz,arr->At(jj)); |
832 |
}; |
}; |
833 |
jj++; |
jj++; |
834 |
}; |
}; |
835 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
836 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
837 |
j++; |
j++; |
838 |
}; |
}; |
839 |
}; |
}; |
851 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
852 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
853 |
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); |
854 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
855 |
// |
// |
856 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
857 |
// |
// |
862 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
863 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
864 |
sprintf(o,"%s %f ,",o,arr->At(jj)); |
sprintf(o,"%s %f ,",o,arr->At(jj)); |
865 |
|
sprintf(zz,"%s %f ,",zz,arr->At(jj)); |
866 |
} else { |
} else { |
867 |
sprintf(o,"%s %f",o,arr->At(jj)); |
sprintf(o,"%s %f",o,arr->At(jj)); |
868 |
|
sprintf(zz,"%s %f",zz,arr->At(jj)); |
869 |
}; |
}; |
870 |
jj++; |
jj++; |
871 |
}; |
}; |
872 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
873 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
874 |
j++; |
j++; |
875 |
}; |
}; |
876 |
}; |
}; |
877 |
}; |
}; |
878 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
879 |
|
sprintf(zz,"%s\n",zz); |
880 |
break; |
break; |
881 |
}; |
}; |
882 |
}; |
}; |
885 |
break; |
break; |
886 |
}; |
}; |
887 |
}; |
}; |
|
// pamgui->DIALOG(0,o); |
|
888 |
printf("%s\n",o); |
printf("%s\n",o); |
889 |
|
pamgui->DIALOG(4,zz); |
890 |
}; |
}; |
891 |
|
|
892 |
|
|
1058 |
// |
// |
1059 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1060 |
cintcom.str(""); |
cintcom.str(""); |
1061 |
cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex; |
cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona |
1062 |
cintcom << L2; |
cintcom << L2; |
1063 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1064 |
|
// printf(" comando: %s \n",cintcom.str().c_str()); |
1065 |
} else { |
} else { |
1066 |
cintcom.str(""); |
cintcom.str(""); |
1067 |
cintcom << "TTree *otr = (TTree*)0x" << hex; |
cintcom << "TTree *otr = (TTree*)" << hex; |
1068 |
cintcom << otr; |
cintcom << otr; |
1069 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1070 |
// |
// |
1071 |
cintcom.str(""); |
cintcom.str(""); |
1072 |
cintcom << "struct Variables &var = (struct Variables &)0x" << hex; |
cintcom << "struct Variables &var = (struct Variables &)" << hex; |
1073 |
cintcom << &var; |
cintcom << &var; |
1074 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1075 |
}; |
}; |
1100 |
// |
// |
1101 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1102 |
// |
// |
1103 |
printf(" %s \n",ddec.Data()); |
// printf(" %s \n",ddec.Data()); |
1104 |
if ( !L2 ){ |
if ( !L2 ){ |
1105 |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
1106 |
|
if ( NODB ) L2->NoDBconnections(); |
1107 |
otr = L2->GetPamTree(); |
otr = L2->GetPamTree(); |
1108 |
printf(" l2 constructor\n"); |
// printf(" l2 constructor\n"); |
1109 |
// 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); |
1110 |
} else { |
} else { |
1111 |
// |
// |
1112 |
printf(" l2 already exist \n"); |
// printf(" l2 already exist \n"); |
1113 |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
1114 |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
1115 |
// |
// |
1987 |
Float_t mt31[2][3]; |
Float_t mt31[2][3]; |
1988 |
Float_t mt32[2][3]; |
Float_t mt32[2][3]; |
1989 |
// |
// |
1990 |
|
memset(mt11,0,2*8*sizeof(Float_t)); |
1991 |
|
memset(mt12,0,2*6*sizeof(Float_t)); |
1992 |
|
memset(mt21,0,2*2*sizeof(Float_t)); |
1993 |
|
memset(mt22,0,2*2*sizeof(Float_t)); |
1994 |
|
memset(mt31,0,2*3*sizeof(Float_t)); |
1995 |
|
memset(mt32,0,2*3*sizeof(Float_t)); |
1996 |
|
// |
1997 |
Int_t S3 = 0; |
Int_t S3 = 0; |
1998 |
Int_t S2 = 0; |
Int_t S2 = 0; |
1999 |
Int_t S12 = 0; |
Int_t S12 = 0; |
2777 |
// |
// |
2778 |
// |
// |
2779 |
Bool_t repeat = true; |
Bool_t repeat = true; |
2780 |
Int_t numtr = 1; |
// Int_t numtr = 1; |
2781 |
// Int_t numtr = 0; |
Int_t numtr = 0; |
2782 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
2783 |
|
Int_t repuntiltr = 0; |
2784 |
// |
// |
2785 |
// |
// |
2786 |
var.tofraw = 0; |
var.tofraw = 0; |
2787 |
// |
// |
2788 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
2789 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
2790 |
//if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks(); |
if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks(); |
2791 |
//repuntil = L2->GetNTracks(); |
// repuntiltr = L2->GetNTracks(); |
2792 |
// |
// |
2793 |
while ( repeat ){ |
while ( repeat ){ |
2794 |
// printf("B repuntil = %i \n",repuntil); |
// printf("B repuntil = %i \n",repuntil); |
2797 |
// |
// |
2798 |
// |
// |
2799 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
2800 |
// PamTrack *ptrack = 0; |
PamTrack *ptrack = 0; |
2801 |
Float_t adc[4][12]; |
Float_t adc[4][12]; |
2802 |
Float_t tdc[4][12]; |
Float_t tdc[4][12]; |
2803 |
memset(adc,0,4*12*sizeof(Float_t)); |
memset(adc,0,4*12*sizeof(Float_t)); |
2804 |
memset(tdc,0,4*12*sizeof(Float_t)); |
memset(tdc,0,4*12*sizeof(Float_t)); |
2805 |
// |
// |
2806 |
// |
// |
2807 |
|
Int_t myseq = 0; |
2808 |
// if ( repuntil == 0 || var.tofraw ){ |
// if ( repuntil == 0 || var.tofraw ){ |
2809 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
2810 |
numtr = 0; |
numtr = 0; |
2812 |
repeat = false; |
repeat = false; |
2813 |
} else { |
} else { |
2814 |
// |
// |
2815 |
|
// printf(" deH_ \n"); |
2816 |
// |
// |
2817 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr == 0 ){ |
2818 |
// |
// printf(" ques \n"); |
2819 |
// printf(" numtr is %i \n",numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
2820 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
myseq = 0; |
2821 |
//ptrack = L2->GetTrack(numtr); |
// printf(" que \n"); |
2822 |
//ptt = ptrack->GetToFTrack(); |
|
2823 |
|
} else { |
2824 |
|
if ( numtr >= (repuntiltr-1) ) repeat = false; |
2825 |
|
// |
2826 |
|
printf(" numtr is %i \n",numtr); |
2827 |
|
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
2828 |
|
ptrack = L2->GetTrack(numtr-1); |
2829 |
|
ptt = ptrack->GetToFTrack(); |
2830 |
|
myseq = ptt->trkseqno + 1; |
2831 |
|
}; |
2832 |
}; |
}; |
2833 |
// |
// |
2834 |
xp11[0] = 0.; |
xp11[0] = 0.; |
2842 |
// |
// |
2843 |
ii = 2; |
ii = 2; |
2844 |
// |
// |
2845 |
Int_t myseq = ptt->trkseqno + 1; |
// Int_t myseq = ptt->trkseqno + 1; |
2846 |
|
// |
2847 |
|
// printf(" qui \n"); |
2848 |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
2849 |
// |
// |
2850 |
// printf(" qua \n"); |
// printf(" qua \n"); |
2851 |
// |
// |
2852 |
for ( Int_t i = 0; i<8; i++ ) { |
// for ( Int_t i = 0; i<8; i++ ) { |
2853 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
2854 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
2855 |
}; |
// }; |
2856 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
2857 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
2858 |
}; |
// }; |
2859 |
// xp11[i] = 0.; |
// xp11[i] = 0.; |
2860 |
}; |
// }; |
2861 |
|
|
2862 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
2863 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
2974 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
2975 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
2976 |
} else { |
} else { |
2977 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
2978 |
}; |
}; |
2979 |
// |
// |
2980 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3063 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3064 |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
3065 |
} else { |
} else { |
3066 |
ColorTOFMIP(ms12a[rj]+ms12b[rj],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
3067 |
}; |
}; |
3068 |
// |
// |
3069 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3151 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3152 |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
3153 |
} else { |
} else { |
3154 |
ColorTOFMIP(ms21a[rj]+ms21b[rj],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
3155 |
}; |
}; |
3156 |
// |
// |
3157 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3237 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3238 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
3239 |
} else { |
} else { |
3240 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
3241 |
}; |
}; |
3242 |
// |
// |
3243 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3328 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3329 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
3330 |
} else { |
} else { |
3331 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
3332 |
}; |
}; |
3333 |
// |
// |
3334 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3421 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3422 |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
3423 |
} else { |
} else { |
3424 |
ColorTOFMIP(ms32a[rj]+ms32b[rj],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
3425 |
}; |
}; |
3426 |
// |
// |
3427 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
5263 |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
5264 |
// |
// |
5265 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5266 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5267 |
if ( track->XGood(plane) ){ |
if ( track->XGood(plane) ){ |
5268 |
//if ( x > -100 ){ |
//if ( x > -100 ){ |
5269 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5272 |
} else { |
} else { |
5273 |
sigcol2 = 1; |
sigcol2 = 1; |
5274 |
}; |
}; |
5275 |
ColorTRKMIP(track->dedx_x[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0); |
5276 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5277 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5278 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5293 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5294 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5295 |
x = -track->ym[plane]; |
x = -track->ym[plane]; |
5296 |
xsig = track->dedx_y[plane]; |
xsig = fabs(track->dedx_y[plane]); |
5297 |
if ( track->YGood(plane) ){ |
if ( track->YGood(plane) ){ |
5298 |
// if ( x > -100 ){ |
// if ( x > -100 ){ |
5299 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5302 |
} else { |
} else { |
5303 |
sigcol2 = 1; |
sigcol2 = 1; |
5304 |
}; |
}; |
5305 |
ColorTRKMIP(track->dedx_y[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0); |
5306 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5307 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5308 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5355 |
// |
// |
5356 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5357 |
Float_t y = -track->ym[plane]; |
Float_t y = -track->ym[plane]; |
5358 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5359 |
Float_t ysig = track->dedx_y[plane]; |
Float_t ysig = fabs(track->dedx_y[plane]); |
5360 |
// if ( x > -100 && y > -100. ){ |
// if ( x > -100 && y > -100. ){ |
5361 |
if ( track->XGood(plane) && track->YGood(plane) ){ |
if ( track->XGood(plane) && track->YGood(plane) ){ |
5362 |
if ( var.bw ){ |
if ( var.bw ){ |
5821 |
// |
// |
5822 |
Trajectory *tr = new Trajectory(npoint,zin); |
Trajectory *tr = new Trajectory(npoint,zin); |
5823 |
// |
// |
5824 |
ifail = track->DoTrack2(tr); |
// ifail = track->DoTrack2(tr); |
5825 |
|
ifail = track->DoTrack(tr); |
5826 |
// |
// |
5827 |
if ( !ifail ){ |
if ( !ifail ){ |
5828 |
for ( Int_t e = 0; e < npoint ; e++) { |
for ( Int_t e = 0; e < npoint ; e++) { |
6393 |
// |
// |
6394 |
stringstream xvev; |
stringstream xvev; |
6395 |
stringstream yvev; |
stringstream yvev; |
6396 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
6397 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
6398 |
Int_t colo; |
Int_t colo; |
6399 |
Int_t l; |
Int_t l; |
6400 |
Int_t m; |
Int_t m; |
6401 |
Int_t n; |
Int_t n; |
6402 |
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); |
Bool_t satura = false; |
6403 |
|
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura); |
6404 |
if ( var.bw ){ |
if ( var.bw ){ |
6405 |
colo = -1; |
colo = -1; |
6406 |
} else { |
} else { |
6407 |
colo = 1; |
colo = 1; |
6408 |
}; |
}; |
6409 |
ColorMIP(mip,colo); |
ColorMIP(mip,colo); |
6410 |
if ( l == 0 ) { |
if ( l == 0 ) { |
6411 |
xvev.str(""); |
xvev.str(""); |
6414 |
xvev << " " << l; |
xvev << " " << l; |
6415 |
gDirectory->Delete(xvev.str().c_str()); |
gDirectory->Delete(xvev.str().c_str()); |
6416 |
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); |
6417 |
Xview->SetFillColor(colo); |
if ( satura ){ |
6418 |
|
Xview->SetFillColor(kBlack); |
6419 |
|
} else { |
6420 |
|
Xview->SetFillColor(colo); |
6421 |
|
}; |
6422 |
Xview->Fill(n,21-m,1.); |
Xview->Fill(n,21-m,1.); |
6423 |
pd1->cd(); |
pd1->cd(); |
6424 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6430 |
yvev << " " << l; |
yvev << " " << l; |
6431 |
gDirectory->Delete(yvev.str().c_str()); |
gDirectory->Delete(yvev.str().c_str()); |
6432 |
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); |
6433 |
Yview->SetFillColor(colo); |
if ( satura ){ |
6434 |
|
Yview->SetFillColor(kBlack); |
6435 |
|
} else { |
6436 |
|
Yview->SetFillColor(colo); |
6437 |
|
}; |
6438 |
Yview->Fill(96-n,21-m,1.); |
Yview->Fill(96-n,21-m,1.); |
6439 |
pd2->cd(); |
pd2->cd(); |
6440 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |