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; |
96 |
var.showcal = false; |
var.showcal = false; |
97 |
var.showrun = false; |
var.showrun = false; |
98 |
var.showac = false; |
var.showac = false; |
99 |
|
L2 = 0; |
100 |
|
} |
101 |
|
|
102 |
|
void FEVdetector::Reset(){ |
103 |
|
L2 = NULL; |
104 |
} |
} |
105 |
|
|
106 |
void FEVdetector::checkctrlword(){ |
void FEVdetector::checkctrlword(){ |
118 |
var.INFOS = 0; |
var.INFOS = 0; |
119 |
var.VINFOS = 0; |
var.VINFOS = 0; |
120 |
var.PALETTE = 0; |
var.PALETTE = 0; |
121 |
|
var.PATTRIG = 1; |
122 |
if ( *ctrlword & (1<<0) ) { |
if ( *ctrlword & (1<<0) ) { |
123 |
var.PALETTE = 1; |
var.PALETTE = 1; |
124 |
}; |
}; |
146 |
if ( *ctrlword & (1<<8) ) { |
if ( *ctrlword & (1<<8) ) { |
147 |
var.TOF = 1; |
var.TOF = 1; |
148 |
}; |
}; |
149 |
|
if ( *ctrlword & (1<<9) ) { |
150 |
|
var.PATTRIG = 1; |
151 |
|
}; |
152 |
} |
} |
153 |
|
|
154 |
void FEVdetector::SetDDEC(TString de){ |
void FEVdetector::SetDDEC(TString de){ |
216 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
217 |
thisentry = i; |
thisentry = i; |
218 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
219 |
L2->Clear(); |
// L2->Clear(); |
220 |
// printf("qui\n"); |
// printf("qui\n"); |
221 |
L2->GetEntry(i); |
L2->GetEntry(i); |
222 |
if ( var.showall ){ |
if ( var.showall ){ |
404 |
Int_t dlen = 10; |
Int_t dlen = 10; |
405 |
// |
// |
406 |
char o[200000]; |
char o[200000]; |
407 |
|
char zz[200000]; |
408 |
char col[13]; |
char col[13]; |
409 |
char col2[13]; |
char col2[13]; |
410 |
// |
// |
411 |
setcolor(col,RESET, GREEN, WHITE); |
setcolor(col,RESET, GREEN, WHITE); |
412 |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
413 |
|
sprintf(zz,"======> EVENT:%i\n", thisentry); |
414 |
// |
// |
415 |
setcolor(col,RESET, RED, WHITE); |
setcolor(col,RESET, RED, WHITE); |
416 |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
417 |
|
sprintf(zz,"%sBranch %s\n",zz,b1->GetName()); |
418 |
setcolor(col,RESET, BLACK, WHITE); |
setcolor(col,RESET, BLACK, WHITE); |
419 |
sprintf(o,"%s%s",o,col); |
sprintf(o,"%s%s",o,col); |
420 |
// |
// |
427 |
TBranchElement *tb = (TBranchElement*)branch_array->At(l); |
TBranchElement *tb = (TBranchElement*)branch_array->At(l); |
428 |
Int_t type = tb->GetType(); |
Int_t type = tb->GetType(); |
429 |
Int_t atype = tb->GetStreamerType() - 20; |
Int_t atype = tb->GetStreamerType() - 20; |
430 |
Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
// Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
431 |
|
Int_t len = tb->GetInfo()->GetLength(tb->GetID()); |
432 |
Int_t length = min(len,dlen); |
Int_t length = min(len,dlen); |
433 |
// |
// |
434 |
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
443 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
444 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
445 |
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); |
446 |
|
sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName()); |
447 |
// |
// |
448 |
j = 0; |
j = 0; |
449 |
// |
// |
456 |
while ( j < length ){ |
while ( j < length ){ |
457 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
458 |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
459 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0)); |
460 |
} else { |
} else { |
461 |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
462 |
|
sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0)); |
463 |
}; |
}; |
464 |
j++; |
j++; |
465 |
}; |
}; |
471 |
while ( j < length ){ |
while ( j < length ){ |
472 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
473 |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
474 |
|
sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0)); |
475 |
} else { |
} else { |
476 |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
477 |
|
sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0)); |
478 |
}; |
}; |
479 |
j++; |
j++; |
480 |
}; |
}; |
486 |
while ( j < length ){ |
while ( j < length ){ |
487 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
488 |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
489 |
|
sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0)); |
490 |
} else { |
} else { |
491 |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
492 |
|
sprintf(zz,"%s %f",zz,tb->GetValue(j,0)); |
493 |
}; |
}; |
494 |
j++; |
j++; |
495 |
}; |
}; |
524 |
// printf("ciao %s \n",pr->Data()); |
// printf("ciao %s \n",pr->Data()); |
525 |
// }; |
// }; |
526 |
sprintf(o,"%s TString - not implemented yet -",o); |
sprintf(o,"%s TString - not implemented yet -",o); |
527 |
|
sprintf(zz,"%s TString - not implemented yet -",zz); |
528 |
}; |
}; |
529 |
// |
// |
530 |
// TArray |
// TArray |
625 |
// sprintf(o,"%s\n",o); |
// sprintf(o,"%s\n",o); |
626 |
// |
// |
627 |
sprintf(o,"%s TArray - not implemented yet -",o); |
sprintf(o,"%s TArray - not implemented yet -",o); |
628 |
|
sprintf(zz,"%s TArray - not implemented yet -",zz); |
629 |
// |
// |
630 |
}; |
}; |
631 |
// |
// |
632 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
633 |
|
sprintf(zz,"%s\n",zz); |
634 |
break; |
break; |
635 |
case 3: |
case 3: |
636 |
// |
// |
639 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
640 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
641 |
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()); |
642 |
|
sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata()); |
643 |
|
|
644 |
// |
// |
645 |
if ( tb->GetNdata() ){ |
if ( tb->GetNdata() ){ |
661 |
TBranchElement *stb = (TBranchElement*)tb->FindBranch(name); |
TBranchElement *stb = (TBranchElement*)tb->FindBranch(name); |
662 |
Int_t stype = stb->GetType(); |
Int_t stype = stb->GetType(); |
663 |
Int_t satype = stb->GetStreamerType() - 20; |
Int_t satype = stb->GetStreamerType() - 20; |
664 |
Int_t slen = (stb->GetInfo()->GetLengths())[stb->GetID()]; |
// Int_t slen = (stb->GetInfo()->GetLengths())[stb->GetID()]; |
665 |
|
Int_t slen = stb->GetInfo()->GetLength(stb->GetID()); |
666 |
Int_t slength = min(slen,dlen); |
Int_t slength = min(slen,dlen); |
667 |
// printf("SubBranches : atype is %i type is %i tb getname %s slen %i slength %i\n",satype,stype,stb->GetName(),slen,slength); |
// printf("SubBranches : atype is %i type is %i tb getname %s slen %i slength %i\n",satype,stype,stb->GetName(),slen,slength); |
668 |
switch (stype){ |
switch (stype){ |
691 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
692 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
693 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
694 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
695 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
696 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
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 |
} else { |
} else { |
700 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
701 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength)); |
702 |
}; |
}; |
703 |
j++; |
j++; |
704 |
}; |
}; |
711 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
712 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
713 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
714 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
715 |
while ( j < cl->GetEntriesFast() ){ |
while ( j < cl->GetEntriesFast() ){ |
716 |
if ( j < cl->GetEntriesFast() -1 ){ |
if ( j < cl->GetEntriesFast() -1 ){ |
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 |
} else { |
} else { |
720 |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
721 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,slength)); |
722 |
}; |
}; |
723 |
j++; |
j++; |
724 |
}; |
}; |
731 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
732 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
733 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
734 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
735 |
Bool_t bold = true; |
Bool_t bold = true; |
736 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
737 |
if ( bold ){ |
if ( bold ){ |
745 |
while ( jj < slength ){ |
while ( jj < slength ){ |
746 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
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 |
} else { |
} else { |
750 |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
751 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true)); |
752 |
}; |
}; |
753 |
jj++; |
jj++; |
754 |
}; |
}; |
755 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
756 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
757 |
if ( !bold ){ |
if ( !bold ){ |
758 |
bold = true; |
bold = true; |
759 |
} else { |
} else { |
774 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
775 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
776 |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
777 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
778 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
779 |
Int_t jj = 0; |
Int_t jj = 0; |
780 |
while ( jj < slength ){ |
while ( jj < slength ){ |
781 |
if ( jj < slength-1 ){ |
if ( jj < slength-1 ){ |
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 |
} else { |
} else { |
785 |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
786 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true)); |
787 |
}; |
}; |
788 |
jj++; |
jj++; |
789 |
}; |
}; |
790 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
791 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
792 |
j++; |
j++; |
793 |
}; |
}; |
794 |
}; |
}; |
821 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
822 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
823 |
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); |
824 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
825 |
// |
// |
826 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
827 |
// |
// |
832 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
833 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
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 |
} else { |
} else { |
837 |
sprintf(o,"%s %i",o,arr->At(jj)); |
sprintf(o,"%s %i",o,arr->At(jj)); |
838 |
|
sprintf(zz,"%s %i",zz,arr->At(jj)); |
839 |
}; |
}; |
840 |
jj++; |
jj++; |
841 |
}; |
}; |
842 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
843 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
844 |
j++; |
j++; |
845 |
}; |
}; |
846 |
}; |
}; |
858 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
859 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
860 |
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); |
861 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
862 |
// |
// |
863 |
while ( j < tb->GetNdata() ){ |
while ( j < tb->GetNdata() ){ |
864 |
// |
// |
869 |
while ( jj < arlen ){ |
while ( jj < arlen ){ |
870 |
if ( jj < arlen-1 ){ |
if ( jj < arlen-1 ){ |
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 |
} else { |
} else { |
874 |
sprintf(o,"%s %f",o,arr->At(jj)); |
sprintf(o,"%s %f",o,arr->At(jj)); |
875 |
|
sprintf(zz,"%s %f",zz,arr->At(jj)); |
876 |
}; |
}; |
877 |
jj++; |
jj++; |
878 |
}; |
}; |
879 |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
880 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
881 |
j++; |
j++; |
882 |
}; |
}; |
883 |
}; |
}; |
884 |
}; |
}; |
885 |
sprintf(o,"%s\n",o); |
sprintf(o,"%s\n",o); |
886 |
|
sprintf(zz,"%s\n",zz); |
887 |
break; |
break; |
888 |
}; |
}; |
889 |
}; |
}; |
892 |
break; |
break; |
893 |
}; |
}; |
894 |
}; |
}; |
|
// pamgui->DIALOG(0,o); |
|
895 |
printf("%s\n",o); |
printf("%s\n",o); |
896 |
|
pamgui->DIALOG(4,zz); |
897 |
}; |
}; |
898 |
|
|
899 |
|
|
1065 |
// |
// |
1066 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1067 |
cintcom.str(""); |
cintcom.str(""); |
1068 |
cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex; |
cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona |
1069 |
cintcom << L2; |
cintcom << L2; |
1070 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1071 |
|
// printf(" comando: %s \n",cintcom.str().c_str()); |
1072 |
} else { |
} else { |
1073 |
cintcom.str(""); |
cintcom.str(""); |
1074 |
cintcom << "TTree *otr = (TTree*)0x" << hex; |
cintcom << "TTree *otr = (TTree*)" << hex; |
1075 |
cintcom << otr; |
cintcom << otr; |
1076 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1077 |
// |
// |
1078 |
cintcom.str(""); |
cintcom.str(""); |
1079 |
cintcom << "struct Variables &var = (struct Variables &)0x" << hex; |
cintcom << "struct Variables &var = (struct Variables &)" << hex; |
1080 |
cintcom << &var; |
cintcom << &var; |
1081 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1082 |
}; |
}; |
1107 |
// |
// |
1108 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1109 |
// |
// |
1110 |
printf(" %s \n",ddec.Data()); |
// printf(" %s \n",ddec.Data()); |
1111 |
if ( !L2 ){ |
if ( !L2 ){ |
1112 |
|
// printf(" l2 constructor\n"); |
1113 |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
1114 |
|
if ( NODB ) L2->NoDBconnections(); |
1115 |
otr = L2->GetPamTree(); |
otr = L2->GetPamTree(); |
|
printf(" l2 constructor\n"); |
|
1116 |
// 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); |
1117 |
} else { |
} else { |
1118 |
// |
// |
1119 |
printf(" l2 already exist \n"); |
// printf(" l2 already exist \n"); |
1120 |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
1121 |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
1122 |
// |
// |
1267 |
// |
// |
1268 |
} |
} |
1269 |
|
|
1270 |
|
bool bit(int decimal, char pos) |
1271 |
|
{ |
1272 |
|
return( (decimal>>pos)%2 ); |
1273 |
|
} |
1274 |
|
// |
1275 |
|
// THE PATTERN TRIGGER |
1276 |
|
// |
1277 |
|
void FEVdetector::ShowTRG(){ |
1278 |
|
// |
1279 |
|
if ( level.file != 2 ) return; |
1280 |
|
// |
1281 |
|
if ( !var.TRG ) return; |
1282 |
|
// |
1283 |
|
int S11[8]; |
1284 |
|
S11[0] = 0; |
1285 |
|
S11[1] = 0; |
1286 |
|
S11[2] = 0; |
1287 |
|
S11[3] = 0; |
1288 |
|
S11[4] = 0; |
1289 |
|
S11[5] = 0; |
1290 |
|
S11[6] = 0; |
1291 |
|
S11[7] = 0; |
1292 |
|
|
1293 |
|
int S12[6]; |
1294 |
|
S12[0] = 0; |
1295 |
|
S12[1] = 0; |
1296 |
|
S12[2] = 0; |
1297 |
|
S12[3] = 0; |
1298 |
|
S12[4] = 0; |
1299 |
|
S12[5] = 0; |
1300 |
|
|
1301 |
|
int S21[2]; |
1302 |
|
S21[0] = 0; |
1303 |
|
S21[1] = 0; |
1304 |
|
|
1305 |
|
int S22[2]; |
1306 |
|
S22[0] = 0; |
1307 |
|
S22[1] = 0; |
1308 |
|
|
1309 |
|
int S31[3]; |
1310 |
|
S31[0] = 0; |
1311 |
|
S31[1] = 0; |
1312 |
|
S31[2] = 0; |
1313 |
|
|
1314 |
|
int S32[3]; |
1315 |
|
S32[0] = 0; |
1316 |
|
S32[1] = 0; |
1317 |
|
S32[2] = 0; |
1318 |
|
|
1319 |
|
//S3 |
1320 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],0) ) S31[0]++; |
1321 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],1) ) S31[1]++; |
1322 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],2) ) S31[2]++; |
1323 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],3) ) S31[0]++; |
1324 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],4) ) S31[1]++; |
1325 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],5) ) S31[2]++; |
1326 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],6) ) S32[0]++; |
1327 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],7) ) S32[1]++; |
1328 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],8) ) S32[2]++; |
1329 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],9) ) S32[0]++; |
1330 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],10) ) S32[1]++; |
1331 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],11) ) S32[2]++; |
1332 |
|
//S2 |
1333 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],0) ) S21[0]++; |
1334 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],1) ) S21[1]++; |
1335 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],2) ) S21[0]++; |
1336 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],3) ) S21[1]++; |
1337 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],4) ) S22[0]++; |
1338 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],5) ) S22[1]++; |
1339 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],6) ) S22[0]++; |
1340 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],7) ) S22[1]++; |
1341 |
|
//S12 |
1342 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],0) ) S12[0]++; |
1343 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],1) ) S12[1]++; |
1344 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],2) ) S12[2]++; |
1345 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],3) ) S12[3]++; |
1346 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],4) ) S12[4]++; |
1347 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],5) ) S12[5]++; |
1348 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],6) ) S12[0]++; |
1349 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],7) ) S12[1]++; |
1350 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],8) ) S12[2]++; |
1351 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],9) ) S12[3]++; |
1352 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],10) ) S12[4]++; |
1353 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],11) ) S12[5]++; |
1354 |
|
//S11 |
1355 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],0) ) S11[0]++; |
1356 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],1) ) S11[1]++; |
1357 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],2) ) S11[2]++; |
1358 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],3) ) S11[3]++; |
1359 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],4) ) S11[4]++; |
1360 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],5) ) S11[5]++; |
1361 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],6) ) S11[6]++; |
1362 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],7) ) S11[7]++; |
1363 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],8) ) S11[0]++; |
1364 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],9) ) S11[1]++; |
1365 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],10) ) S11[2]++; |
1366 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],11) ) S11[3]++; |
1367 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],12) ) S11[4]++; |
1368 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],13) ) S11[5]++; |
1369 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],14) ) S11[6]++; |
1370 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],15) ) S11[7]++; |
1371 |
|
|
1372 |
|
|
1373 |
|
// |
1374 |
|
Int_t rj = 0; |
1375 |
|
Float_t xs2x = var.xxvc; |
1376 |
|
Float_t ys2x = var.yxvc + 0.36*var.sfy; |
1377 |
|
Float_t xs2y = var.xyvc; |
1378 |
|
Float_t ys2y = var.yyvc + 0.36*var.sfy; |
1379 |
|
Float_t ws2 = 0.005; |
1380 |
|
Float_t ws13 = 0.007; |
1381 |
|
Int_t noadc; |
1382 |
|
if ( var.bw ){ |
1383 |
|
noadc=12; |
1384 |
|
} else { |
1385 |
|
noadc=kRed; |
1386 |
|
}; |
1387 |
|
// |
1388 |
|
// S11 X-view |
1389 |
|
// |
1390 |
|
Float_t s11p = 0.051; |
1391 |
|
TPolyLine *ftrg11x[8]; |
1392 |
|
for ( Int_t j=0; j<8; j++){ |
1393 |
|
Float_t nxc1[5]={ (s11p*j), (s11p*j), s11p*(j+1), s11p*(j+1), (s11p*j)}; |
1394 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
1395 |
|
Float_t nxc[5]; |
1396 |
|
Float_t nyc[5]; |
1397 |
|
for (Int_t i = 0; i<5 ; i++) { |
1398 |
|
nxc[i]= xs2x + (-0.204+nxc1[i])*var.sfx; |
1399 |
|
nyc[i] = ys2x + (0.295+nyc1[i])*var.sfy; |
1400 |
|
}; |
1401 |
|
ftrg11x[j] = new TPolyLine(5,nxc,nyc); |
1402 |
|
ftrg11x[j]->SetLineColor(noadc); |
1403 |
|
ftrg11x[j]->SetLineWidth(S11[j]); |
1404 |
|
if ( S11[j] ) ftrg11x[j]->Draw(); |
1405 |
|
}; |
1406 |
|
// |
1407 |
|
// S12 Y-view |
1408 |
|
// |
1409 |
|
Float_t s12p = 0.055; |
1410 |
|
TPolyLine *ftrg12y[6]; |
1411 |
|
rj = 6; |
1412 |
|
for ( Int_t j=0; j<6; j++){ |
1413 |
|
rj--; |
1414 |
|
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
1415 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
1416 |
|
Float_t nxc[5]; |
1417 |
|
Float_t nyc[5]; |
1418 |
|
for (Int_t i = 0; i<5 ; i++) { |
1419 |
|
nxc[i]= xs2y + (-0.165+nxc1[i])*var.sfx; |
1420 |
|
nyc[i] = ys2y + (0.295+nyc1[i])*var.sfy; |
1421 |
|
}; |
1422 |
|
ftrg12y[j] = new TPolyLine(5,nxc,nyc); |
1423 |
|
ftrg12y[j]->SetLineColor(noadc); |
1424 |
|
ftrg12y[j]->SetLineWidth(S12[rj]); |
1425 |
|
if ( S12[rj] ) ftrg12y[j]->Draw(); |
1426 |
|
}; |
1427 |
|
|
1428 |
|
|
1429 |
|
// |
1430 |
|
// S21 Y-view |
1431 |
|
// |
1432 |
|
Float_t s21p = 0.075; |
1433 |
|
TPolyLine *ftrg21y[2]; |
1434 |
|
rj=2; |
1435 |
|
for ( Int_t j=0; j<2; j++){ |
1436 |
|
rj--; |
1437 |
|
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
1438 |
|
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
1439 |
|
Float_t nxc[5]; |
1440 |
|
Float_t nyc[5]; |
1441 |
|
for (Int_t i = 0; i<5 ; i++) { |
1442 |
|
nxc[i]= xs2y + nxc1[i]*var.sfx; |
1443 |
|
nyc[i] = ys2y + nyc1[i]*var.sfy; |
1444 |
|
// printf(" TRG i %i x %f y %f \n",i,nxc[i],nyc[i]); |
1445 |
|
}; |
1446 |
|
ftrg21y[j] = new TPolyLine(5,nxc,nyc); |
1447 |
|
ftrg21y[j]->SetLineColor(noadc); |
1448 |
|
ftrg21y[j]->SetLineWidth(S21[j]); |
1449 |
|
if ( S21[j]) ftrg21y[j]->Draw(); |
1450 |
|
}; |
1451 |
|
|
1452 |
|
// |
1453 |
|
// S22 X-view |
1454 |
|
// |
1455 |
|
Float_t s22p = 0.090; |
1456 |
|
TPolyLine *ftrg22x[2]; |
1457 |
|
for ( Int_t j=0; j<2; j++){ |
1458 |
|
Float_t nxc1[5]={ s22p*(j-1), s22p*(j-1), s22p*j, s22p*j, s22p*(j-1)}; |
1459 |
|
Float_t nyc1[5]={ -ws2, 0., 0., -ws2, -ws2}; |
1460 |
|
Float_t nxc[5]; |
1461 |
|
Float_t nyc[5]; |
1462 |
|
for (Int_t i = 0; i<5 ; i++) { |
1463 |
|
nxc[i]= xs2x + nxc1[i]*var.sfx; |
1464 |
|
nyc[i] = ys2x + nyc1[i]*var.sfy; |
1465 |
|
}; |
1466 |
|
ftrg22x[j] = new TPolyLine(5,nxc,nyc); |
1467 |
|
ftrg22x[j]->SetLineColor(noadc); |
1468 |
|
ftrg22x[j]->SetLineWidth(S22[j]); |
1469 |
|
if ( S22[j] ) ftrg22x[j]->Draw(); |
1470 |
|
}; |
1471 |
|
// |
1472 |
|
// S31 X-view |
1473 |
|
// |
1474 |
|
Float_t s31p = 0.060; |
1475 |
|
TPolyLine *ftrg31x[3]; |
1476 |
|
for ( Int_t j=0; j<3; j++){ |
1477 |
|
Float_t nxc1[5]={ (s31p*j), (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
1478 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
1479 |
|
Float_t nxc[5]; |
1480 |
|
Float_t nyc[5]; |
1481 |
|
for (Int_t i = 0; i<5 ; i++) { |
1482 |
|
nxc[i]= xs2x + (-0.090+nxc1[i])*var.sfx; |
1483 |
|
nyc[i] = ys2x + (-0.488+nyc1[i])*var.sfy; |
1484 |
|
}; |
1485 |
|
ftrg31x[j] = new TPolyLine(5,nxc,nyc); |
1486 |
|
ftrg31x[j]->SetLineColor(noadc); |
1487 |
|
ftrg31x[j]->SetLineWidth(S31[j]); |
1488 |
|
if ( S31[j] ) ftrg31x[j]->Draw(); |
1489 |
|
}; |
1490 |
|
|
1491 |
|
// |
1492 |
|
// S32 Y-view |
1493 |
|
// |
1494 |
|
Float_t s32p = 0.050; |
1495 |
|
TPolyLine *ftrg32y[3]; |
1496 |
|
rj = 3; |
1497 |
|
for ( Int_t j=0; j<3; j++){ |
1498 |
|
rj--; |
1499 |
|
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
1500 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
1501 |
|
Float_t nxc[5]; |
1502 |
|
Float_t nyc[5]; |
1503 |
|
for (Int_t i = 0; i<5 ; i++) { |
1504 |
|
nxc[i]= xs2y + (-0.075+nxc1[i])*var.sfx; |
1505 |
|
nyc[i] = ys2y + (-0.488+nyc1[i])*var.sfy; |
1506 |
|
}; |
1507 |
|
ftrg32y[j] = new TPolyLine(5,nxc,nyc); |
1508 |
|
ftrg32y[j]->SetLineColor(noadc); |
1509 |
|
ftrg32y[j]->SetLineWidth(S32[rj]); |
1510 |
|
if ( S32[rj] ) ftrg32y[j]->Draw(); |
1511 |
|
} |
1512 |
|
} |
1513 |
|
|
1514 |
void FEVdetector::DisplayEvent(){ |
void FEVdetector::DisplayEvent(){ |
1515 |
TLatex *text=new TLatex(); |
TLatex *text=new TLatex(); |
1516 |
stringstream testo; |
stringstream testo; |
1526 |
thefigure->cd(); |
thefigure->cd(); |
1527 |
ShowTOF(); |
ShowTOF(); |
1528 |
// |
// |
1529 |
|
// show pattern trigger if the case |
1530 |
|
// |
1531 |
|
thefigure->cd(); |
1532 |
|
if ( var.PATTRIG ){ |
1533 |
|
ShowTRG(); |
1534 |
|
thefigure->Modified(); |
1535 |
|
thefigure->Update(); |
1536 |
|
} |
1537 |
|
// |
1538 |
// show anticounters |
// show anticounters |
1539 |
// |
// |
1540 |
thefigure->cd(); |
thefigure->cd(); |
1631 |
testo3 << "S4: ";// << setprecision(2); |
testo3 << "S4: ";// << setprecision(2); |
1632 |
testo3 << var.s4sig << " [MIP] TOF: #beta = "; |
testo3 << var.s4sig << " [MIP] TOF: #beta = "; |
1633 |
testo3 << setprecision(3) << var.beta[4]; |
testo3 << setprecision(3) << var.beta[4]; |
1634 |
|
if ( level.file == 2 ){ |
1635 |
|
testo3 << " SVL cutoff: "; |
1636 |
|
testo3 << setprecision(3) << L2->GetOrbitalInfo()->GetCutoffSVL();//quiquiqui |
1637 |
|
} |
1638 |
text->DrawLatex(0.33,txthi,testo3.str().c_str()); |
text->DrawLatex(0.33,txthi,testo3.str().c_str()); |
1639 |
txthi -= 0.03; |
txthi -= 0.03; |
1640 |
testo3.str(""); |
testo3.str(""); |
1756 |
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"); |
1757 |
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"); |
1758 |
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"); |
1759 |
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"); |
1760 |
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"); |
1761 |
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"); |
1762 |
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"); |
1763 |
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"); |
1764 |
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"); |
1765 |
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"); |
1887 |
// |
// |
1888 |
// print infos on terminal |
// print infos on terminal |
1889 |
// |
// |
1890 |
|
// if ( !var.selex ){ |
1891 |
printf(" File: %s \n",var.thefilename.Data()); |
printf(" File: %s \n",var.thefilename.Data()); |
1892 |
if ( !s4pulser && !calotrig ){ |
if ( !s4pulser && !calotrig ){ |
1893 |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
1910 |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
1911 |
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]); |
1912 |
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); |
1913 |
|
// }; |
1914 |
// |
// |
1915 |
} |
} |
1916 |
|
|
2221 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
2222 |
// |
// |
2223 |
Int_t tt = 0; |
Int_t tt = 0; |
2224 |
|
Int_t rj = 0; |
2225 |
// |
// |
2226 |
// force level0, i.e. show patterntrig variable! |
// force level0, i.e. show patterntrig variable! |
2227 |
// |
// |
2251 |
Float_t mt31[2][3]; |
Float_t mt31[2][3]; |
2252 |
Float_t mt32[2][3]; |
Float_t mt32[2][3]; |
2253 |
// |
// |
2254 |
|
memset(mt11,0,2*8*sizeof(Float_t)); |
2255 |
|
memset(mt12,0,2*6*sizeof(Float_t)); |
2256 |
|
memset(mt21,0,2*2*sizeof(Float_t)); |
2257 |
|
memset(mt22,0,2*2*sizeof(Float_t)); |
2258 |
|
memset(mt31,0,2*3*sizeof(Float_t)); |
2259 |
|
memset(mt32,0,2*3*sizeof(Float_t)); |
2260 |
|
// |
2261 |
Int_t S3 = 0; |
Int_t S3 = 0; |
2262 |
Int_t S2 = 0; |
Int_t S2 = 0; |
2263 |
Int_t S12 = 0; |
Int_t S12 = 0; |
2422 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
2423 |
ocolo = 10; |
ocolo = 10; |
2424 |
TPolyLine *ftof12ya[6]; |
TPolyLine *ftof12ya[6]; |
2425 |
|
rj=6; |
2426 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2427 |
|
rj--; |
2428 |
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)}; |
2429 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2430 |
Float_t xc[4]; |
Float_t xc[4]; |
2440 |
} else { |
} else { |
2441 |
colo = 1; |
colo = 1; |
2442 |
}; |
}; |
2443 |
ColorMIP(ms12a[j],colo); |
ColorMIP(ms12a[rj],colo); |
2444 |
// |
// |
2445 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2446 |
if ( mt12[0][j] == 4095. ) colo = noadc; |
if ( mt12[0][rj] == 4095. ) colo = noadc; |
2447 |
// |
// |
2448 |
ftof12ya[j]->SetFillColor(colo); |
ftof12ya[j]->SetFillColor(colo); |
2449 |
ftof12ya[j]->SetLineWidth(1); |
ftof12ya[j]->SetLineWidth(1); |
2453 |
// B |
// B |
2454 |
s12p = 0.055; |
s12p = 0.055; |
2455 |
TPolyLine *ftof12yb[6]; |
TPolyLine *ftof12yb[6]; |
2456 |
|
rj=6; |
2457 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2458 |
|
rj--; |
2459 |
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)}; |
2460 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2461 |
Float_t xc[4]; |
Float_t xc[4]; |
2471 |
} else { |
} else { |
2472 |
colo = 1; |
colo = 1; |
2473 |
}; |
}; |
2474 |
ColorMIP(ms12b[j],colo); |
ColorMIP(ms12b[rj],colo); |
2475 |
// |
// |
2476 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2477 |
if ( mt12[1][j] == 4095. ) colo = noadc; |
if ( mt12[1][rj] == 4095. ) colo = noadc; |
2478 |
// |
// |
2479 |
ftof12yb[j]->SetFillColor(colo); |
ftof12yb[j]->SetFillColor(colo); |
2480 |
ftof12yb[j]->SetLineWidth(1); |
ftof12yb[j]->SetLineWidth(1); |
2508 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
2509 |
ocolo = 10; |
ocolo = 10; |
2510 |
TPolyLine *ftof21ya[2]; |
TPolyLine *ftof21ya[2]; |
2511 |
|
rj=2; |
2512 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2513 |
|
rj--; |
2514 |
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)}; |
2515 |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
2516 |
Float_t xc[4]; |
Float_t xc[4]; |
2526 |
} else { |
} else { |
2527 |
colo = 1; |
colo = 1; |
2528 |
}; |
}; |
2529 |
ColorMIP(ms21a[j],colo); |
ColorMIP(ms21a[rj],colo); |
2530 |
// |
// |
2531 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2532 |
if ( mt21[0][j] == 4095. ) colo = noadc; |
if ( mt21[0][rj] == 4095. ) colo = noadc; |
2533 |
// |
// |
2534 |
ftof21ya[j]->SetFillColor(colo); |
ftof21ya[j]->SetFillColor(colo); |
2535 |
ftof21ya[j]->SetLineWidth(1); |
ftof21ya[j]->SetLineWidth(1); |
2539 |
// B |
// B |
2540 |
s21p = 0.075; |
s21p = 0.075; |
2541 |
TPolyLine *ftof21yb[2]; |
TPolyLine *ftof21yb[2]; |
2542 |
|
rj=2; |
2543 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2544 |
|
rj--; |
2545 |
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)}; |
2546 |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
2547 |
Float_t xc[4]; |
Float_t xc[4]; |
2557 |
} else { |
} else { |
2558 |
colo = 1; |
colo = 1; |
2559 |
}; |
}; |
2560 |
ColorMIP(ms21b[j],colo); |
ColorMIP(ms21b[rj],colo); |
2561 |
// |
// |
2562 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2563 |
if ( mt21[1][j] == 4095. ) colo = noadc; |
if ( mt21[1][rj] == 4095. ) colo = noadc; |
2564 |
// |
// |
2565 |
ftof21yb[j]->SetFillColor(colo); |
ftof21yb[j]->SetFillColor(colo); |
2566 |
ftof21yb[j]->SetLineWidth(1); |
ftof21yb[j]->SetLineWidth(1); |
2675 |
Float_t s31p = 0.060; |
Float_t s31p = 0.060; |
2676 |
ocolo = 10; |
ocolo = 10; |
2677 |
TPolyLine *ftof31xa[3]; |
TPolyLine *ftof31xa[3]; |
2678 |
|
rj=3; |
2679 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2680 |
|
rj--; |
2681 |
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)}; |
2682 |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
2683 |
Float_t xc[4]; |
Float_t xc[4]; |
2693 |
} else { |
} else { |
2694 |
colo = 1; |
colo = 1; |
2695 |
}; |
}; |
2696 |
ColorMIP(ms31a[j],colo); |
ColorMIP(ms31a[rj],colo); |
2697 |
// |
// |
2698 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2699 |
if ( mt31[0][j] == 4095. ) colo = noadc; |
if ( mt31[0][rj] == 4095. ) colo = noadc; |
2700 |
// |
// |
2701 |
ftof31xa[j]->SetFillColor(colo); |
ftof31xa[j]->SetFillColor(colo); |
2702 |
ftof31xa[j]->SetLineWidth(1); |
ftof31xa[j]->SetLineWidth(1); |
2706 |
// B |
// B |
2707 |
s31p = 0.060; |
s31p = 0.060; |
2708 |
TPolyLine *ftof31xb[3]; |
TPolyLine *ftof31xb[3]; |
2709 |
|
rj=3; |
2710 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2711 |
|
rj--; |
2712 |
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)}; |
2713 |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
2714 |
Float_t xc[4]; |
Float_t xc[4]; |
2724 |
} else { |
} else { |
2725 |
colo = 1; |
colo = 1; |
2726 |
}; |
}; |
2727 |
ColorMIP(ms31b[j],colo); |
ColorMIP(ms31b[rj],colo); |
2728 |
// |
// |
2729 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2730 |
if ( mt31[1][j] == 4095. ) colo = noadc; |
if ( mt31[1][rj] == 4095. ) colo = noadc; |
2731 |
// |
// |
2732 |
ftof31xb[j]->SetFillColor(colo); |
ftof31xb[j]->SetFillColor(colo); |
2733 |
ftof31xb[j]->SetLineWidth(1); |
ftof31xb[j]->SetLineWidth(1); |
2759 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
2760 |
ocolo = 10; |
ocolo = 10; |
2761 |
TPolyLine *ftof32ya[3]; |
TPolyLine *ftof32ya[3]; |
2762 |
|
rj=3; |
2763 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2764 |
|
rj--; |
2765 |
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)}; |
2766 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2767 |
Float_t xc[4]; |
Float_t xc[4]; |
2777 |
} else { |
} else { |
2778 |
colo = 1; |
colo = 1; |
2779 |
}; |
}; |
2780 |
ColorMIP(ms32a[j],colo); |
ColorMIP(ms32a[rj],colo); |
2781 |
// |
// |
2782 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2783 |
if ( mt32[0][j] == 4095. ) colo = noadc; |
if ( mt32[0][rj] == 4095. ) colo = noadc; |
2784 |
// |
// |
2785 |
ftof32ya[j]->SetFillColor(colo); |
ftof32ya[j]->SetFillColor(colo); |
2786 |
ftof32ya[j]->SetLineWidth(1); |
ftof32ya[j]->SetLineWidth(1); |
2789 |
}; |
}; |
2790 |
s32p = 0.050; |
s32p = 0.050; |
2791 |
TPolyLine *ftof32yb[3]; |
TPolyLine *ftof32yb[3]; |
2792 |
|
rj=3; |
2793 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2794 |
|
rj--; |
2795 |
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)}; |
2796 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2797 |
Float_t xc[4]; |
Float_t xc[4]; |
2807 |
} else { |
} else { |
2808 |
colo = 1; |
colo = 1; |
2809 |
}; |
}; |
2810 |
ColorMIP(ms32b[j],colo); |
ColorMIP(ms32b[rj],colo); |
2811 |
// |
// |
2812 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2813 |
if ( mt32[1][j] == 4095. ) colo = noadc; |
if ( mt32[1][rj] == 4095. ) colo = noadc; |
2814 |
// |
// |
2815 |
ftof32yb[j]->SetFillColor(colo); |
ftof32yb[j]->SetFillColor(colo); |
2816 |
ftof32yb[j]->SetLineWidth(1); |
ftof32yb[j]->SetLineWidth(1); |
3041 |
// |
// |
3042 |
// |
// |
3043 |
Bool_t repeat = true; |
Bool_t repeat = true; |
3044 |
Int_t numtr = 1; |
// Int_t numtr = 1; |
3045 |
// Int_t numtr = 0; |
Int_t numtr = 0; |
3046 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
3047 |
|
Int_t repuntiltr = 0; |
3048 |
// |
// |
3049 |
// |
// |
3050 |
var.tofraw = 0; |
var.tofraw = 0; |
3051 |
// |
// |
3052 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
3053 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
3054 |
//if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks(); |
if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks(); |
3055 |
//repuntil = L2->GetNTracks(); |
// repuntiltr = L2->GetNTracks(); |
3056 |
// |
// |
3057 |
while ( repeat ){ |
while ( repeat ){ |
3058 |
// printf("B repuntil = %i \n",repuntil); |
// printf("B repuntil = %i \n",repuntil); |
3061 |
// |
// |
3062 |
// |
// |
3063 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
3064 |
// PamTrack *ptrack = 0; |
PamTrack *ptrack = 0; |
3065 |
Float_t adc[4][12]; |
Float_t adc[4][12]; |
3066 |
Float_t tdc[4][12]; |
Float_t tdc[4][12]; |
3067 |
memset(adc,0,4*12*sizeof(Float_t)); |
memset(adc,0,4*12*sizeof(Float_t)); |
3068 |
memset(tdc,0,4*12*sizeof(Float_t)); |
memset(tdc,0,4*12*sizeof(Float_t)); |
3069 |
// |
// |
3070 |
// |
// |
3071 |
|
Int_t myseq = 0; |
3072 |
// if ( repuntil == 0 || var.tofraw ){ |
// if ( repuntil == 0 || var.tofraw ){ |
3073 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
3074 |
numtr = 0; |
numtr = 0; |
3076 |
repeat = false; |
repeat = false; |
3077 |
} else { |
} else { |
3078 |
// |
// |
3079 |
|
// printf(" deH_ \n"); |
3080 |
// |
// |
3081 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr == 0 ){ |
3082 |
// |
// printf(" ques \n"); |
3083 |
// printf(" numtr is %i \n",numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
3084 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
myseq = 0; |
3085 |
//ptrack = L2->GetTrack(numtr); |
// printf(" que \n"); |
3086 |
//ptt = ptrack->GetToFTrack(); |
|
3087 |
|
} else { |
3088 |
|
if ( numtr >= (repuntiltr-1) ) repeat = false; |
3089 |
|
// |
3090 |
|
printf(" numtr is %i \n",numtr); |
3091 |
|
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
3092 |
|
ptrack = L2->GetTrack(numtr-1); |
3093 |
|
ptt = ptrack->GetToFTrack(); |
3094 |
|
myseq = ptt->trkseqno + 1; |
3095 |
|
}; |
3096 |
}; |
}; |
3097 |
// |
// |
3098 |
xp11[0] = 0.; |
xp11[0] = 0.; |
3106 |
// |
// |
3107 |
ii = 2; |
ii = 2; |
3108 |
// |
// |
3109 |
Int_t myseq = ptt->trkseqno + 1; |
// Int_t myseq = ptt->trkseqno + 1; |
3110 |
|
// |
3111 |
|
// printf(" qui \n"); |
3112 |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
3113 |
// |
// |
3114 |
// printf(" qua \n"); |
// printf(" qua \n"); |
3115 |
// |
// |
3116 |
for ( Int_t i = 0; i<8; i++ ) { |
// for ( Int_t i = 0; i<8; i++ ) { |
3117 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
3118 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
3119 |
}; |
// }; |
3120 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
3121 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
3122 |
}; |
// }; |
3123 |
// xp11[i] = 0.; |
// xp11[i] = 0.; |
3124 |
}; |
// }; |
3125 |
|
|
3126 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
3127 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
3238 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3239 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
3240 |
} else { |
} else { |
3241 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
3242 |
}; |
}; |
3243 |
// |
// |
3244 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3268 |
ftof11y->Draw(); |
ftof11y->Draw(); |
3269 |
TPolyLine *sftof11[8]; |
TPolyLine *sftof11[8]; |
3270 |
tt = 1; |
tt = 1; |
3271 |
if ( level.file == -1 ) tt = 8; |
rj=1; |
3272 |
|
if ( level.file == -1 ){ |
3273 |
|
tt = 8; |
3274 |
|
rj = 8; |
3275 |
|
}; |
3276 |
for ( Int_t j=0; j<tt; j++){ |
for ( Int_t j=0; j<tt; j++){ |
3277 |
if ( (mt11[0][j]<4095. || mt11[1][j]<4095.)){ |
rj--; |
3278 |
|
if ( (mt11[0][rj]<4095. || mt11[1][rj]<4095.)){ |
3279 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3280 |
Float_t lowp = (xp11[j]-E11[j])/100.; |
Float_t lowp = -(xp11[rj]+E11[rj])/100.; |
3281 |
Float_t higp = (xp11[j]+E11[j])/100.; |
Float_t higp = -(xp11[rj]-E11[rj])/100.; |
3282 |
if ( lowp < -0.164 ) lowp = -0.164; |
if ( lowp < -0.164 ) lowp = -0.164; |
3283 |
if ( higp > 0.164 ) higp = 0.164; |
if ( higp > 0.164 ) higp = 0.164; |
3284 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
3285 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3286 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
3287 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3288 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3289 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3306 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
3307 |
ocolo = 10; |
ocolo = 10; |
3308 |
TPolyLine *ftof12y[6]; |
TPolyLine *ftof12y[6]; |
3309 |
|
rj = 6; |
3310 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
3311 |
|
rj--; |
3312 |
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)}; |
3313 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3314 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3325 |
colo = 1; |
colo = 1; |
3326 |
}; |
}; |
3327 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3328 |
ColorMIP(ms12a[j]+ms12b[j],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
3329 |
} else { |
} else { |
3330 |
ColorTOFMIP(ms12a[j]+ms12b[j],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
3331 |
}; |
}; |
3332 |
// |
// |
3333 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3369 |
if ( higp > 0.203 ) higp = 0.203; |
if ( higp > 0.203 ) higp = 0.203; |
3370 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
3371 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3372 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
3373 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3374 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3375 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3394 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
3395 |
ocolo = 10; |
ocolo = 10; |
3396 |
TPolyLine *ftof21y[2]; |
TPolyLine *ftof21y[2]; |
3397 |
|
rj=2; |
3398 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
3399 |
|
rj--; |
3400 |
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)}; |
3401 |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
3402 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3404 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3405 |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
3406 |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
3407 |
|
// printf(" TOF i %i x %f y %f \n",i,nxc[i],nyc[i]); |
3408 |
}; |
}; |
3409 |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
3410 |
ftof21y[j]->SetLineColor(1); |
ftof21y[j]->SetLineColor(1); |
3414 |
colo = 1; |
colo = 1; |
3415 |
}; |
}; |
3416 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3417 |
ColorMIP(ms21a[j]+ms21b[j],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
3418 |
} else { |
} else { |
3419 |
ColorTOFMIP(ms21a[j]+ms21b[j],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
3420 |
}; |
}; |
3421 |
// |
// |
3422 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3458 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
3459 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
3460 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3461 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws2-0.0015, ws2-0.0015, 0.}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws2-0.0015), (float)(ws2-0.0015), 0.}; |
3462 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3463 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3464 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3502 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3503 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
3504 |
} else { |
} else { |
3505 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
3506 |
}; |
}; |
3507 |
// |
// |
3508 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3533 |
ftof22y->Draw(); |
ftof22y->Draw(); |
3534 |
TPolyLine *sftof22[2]; |
TPolyLine *sftof22[2]; |
3535 |
tt = 1; |
tt = 1; |
3536 |
if ( level.file == -1 ) tt = 2; |
rj = 1; |
3537 |
|
if ( level.file == -1 ){ |
3538 |
|
tt = 2; |
3539 |
|
rj = 2; |
3540 |
|
}; |
3541 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3542 |
|
rj--; |
3543 |
// for ( Int_t j=0; j<2; j++){ |
// for ( Int_t j=0; j<2; j++){ |
3544 |
if ( (mt22[0][j]<4095. || mt22[1][j]<4095.) ){ |
if ( (mt22[0][rj]<4095. || mt22[1][rj]<4095.) ){ |
3545 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3546 |
Float_t lowp = (xp22[j]-E22[j])/100.; |
Float_t lowp = -(xp22[rj]+E22[rj])/100.; |
3547 |
Float_t higp = (xp22[j]+E22[j])/100.; |
Float_t higp = -(xp22[rj]-E22[rj])/100.; |
3548 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3549 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3550 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
3551 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3552 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws2+0.0015), (float)(-ws2+0.0015), -0.0015}; |
3553 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3554 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3555 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3567 |
}; |
}; |
3568 |
}; |
}; |
3569 |
// |
// |
3570 |
|
//daquiinbasso |
3571 |
// |
// |
3572 |
// S31 X-view |
// S31 X-view |
3573 |
// |
// |
3593 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3594 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
3595 |
} else { |
} else { |
3596 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
3597 |
}; |
}; |
3598 |
// |
// |
3599 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3624 |
ftof31y->Draw(); |
ftof31y->Draw(); |
3625 |
TPolyLine *sftof31[3]; |
TPolyLine *sftof31[3]; |
3626 |
tt = 1; |
tt = 1; |
3627 |
if ( level.file == -1 ) tt = 3; |
rj = 1; |
3628 |
|
if ( level.file == -1 ){ |
3629 |
|
tt = 3; |
3630 |
|
rj = 3; |
3631 |
|
}; |
3632 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3633 |
|
rj--; |
3634 |
// for ( Int_t j=0; j<3; j++){ |
// for ( Int_t j=0; j<3; j++){ |
3635 |
if ( (mt31[0][j]<4095. || mt31[1][j]<4095.)){ |
if ( (mt31[0][rj]<4095. || mt31[1][rj]<4095.)){ |
3636 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3637 |
Float_t lowp = (xp31[j]-E31[j])/100.; |
Float_t lowp = -(xp31[rj]+E31[rj])/100.; |
3638 |
Float_t higp = (xp31[j]+E31[j])/100.; |
Float_t higp = -(xp31[rj]-E31[rj])/100.; |
3639 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3640 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3641 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
3642 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3643 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
3644 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3645 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3646 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
3665 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
3666 |
ocolo = 10; |
ocolo = 10; |
3667 |
TPolyLine *ftof32y[3]; |
TPolyLine *ftof32y[3]; |
3668 |
|
rj = 3; |
3669 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
3670 |
|
rj--; |
3671 |
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)}; |
3672 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3673 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3684 |
colo = 1; |
colo = 1; |
3685 |
}; |
}; |
3686 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3687 |
ColorMIP(ms32a[j]+ms32b[j],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
3688 |
} else { |
} else { |
3689 |
ColorTOFMIP(ms32a[j]+ms32b[j],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
3690 |
}; |
}; |
3691 |
// |
// |
3692 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3728 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
3729 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
3730 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3731 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
3732 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3733 |
Float_t nyc[5]; |
Float_t nyc[5]; |
3734 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
4104 |
// |
// |
4105 |
if ( true ){ |
if ( true ){ |
4106 |
// PMTs |
// PMTs |
4107 |
Float_t xc1[5]={ 0., 0.014*var.sfx, 0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1), -var.sfx*var.sfx*pmt1*cos(apmt1), 0.}; |
Float_t xc1[5]={ 0., (float)(0.014*var.sfx), (float)(0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1)), (float)(-var.sfx*var.sfx*pmt1*cos(apmt1)), 0.}; |
4108 |
Float_t yc1[5]={ 0., 0.011*var.sfy, 0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1), var.sfy*var.sfy*pmt1*sin(apmt1), 0.}; |
Float_t yc1[5]={ 0., (float)(0.011*var.sfy), (float)(0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1)), (float)(var.sfy*var.sfy*pmt1*sin(apmt1)), 0.}; |
4109 |
Float_t xc2[5]={ 0., 0.011*var.sfx, 0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2), -pmt2*var.sfx*var.sfx*cos(apmt2), 0.}; |
Float_t xc2[5]={ 0., (float)(0.011*var.sfx), (float)(0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2)), (float)(-pmt2*var.sfx*var.sfx*cos(apmt2)), 0.}; |
4110 |
Float_t yc2[5]={ 0., 0.015*var.sfy, 0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2), var.sfy*pmt2*var.sfy*sin(apmt2), 0.}; |
Float_t yc2[5]={ 0., (float)(0.015*var.sfy), (float)(0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2)), (float)(var.sfy*pmt2*var.sfy*sin(apmt2)), 0.}; |
4111 |
// SCINTs |
// SCINTs |
4112 |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
4113 |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
5400 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5401 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5402 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5403 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5404 |
|
} else { |
5405 |
|
x = 1024 - trk->addrcluster[l][m]; |
5406 |
}; |
}; |
5407 |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
5408 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5472 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5473 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5474 |
for (Int_t img=0; img<2; img++){ |
for (Int_t img=0; img<2; img++){ |
5475 |
x = singlet->coord[img]; |
x = -singlet->coord[img]; |
5476 |
Float_t xsig = singlet->sgnl; |
Float_t xsig = singlet->sgnl; |
5477 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5478 |
// |
// |
5528 |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
5529 |
// |
// |
5530 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5531 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5532 |
if ( track->xgood[plane] ){ |
if ( track->XGood(plane) ){ |
5533 |
//if ( x > -100 ){ |
//if ( x > -100 ){ |
5534 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5535 |
if ( var.bw ){ |
if ( var.bw ){ |
5537 |
} else { |
} else { |
5538 |
sigcol2 = 1; |
sigcol2 = 1; |
5539 |
}; |
}; |
5540 |
ColorTRKMIP(track->dedx_x[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0); |
5541 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5542 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5543 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5544 |
linea->Draw(); |
linea->Draw(); |
5545 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
5546 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
5547 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
5548 |
tlinea->SetLineWidth(1); |
tlinea->SetLineWidth(1); |
5557 |
planepad = plane * 2; |
planepad = plane * 2; |
5558 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5559 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5560 |
x = track->ym[plane]; |
x = -track->ym[plane]; |
5561 |
xsig = track->dedx_y[plane]; |
xsig = fabs(track->dedx_y[plane]); |
5562 |
if ( track->ygood[plane] ){ |
if ( track->YGood(plane) ){ |
5563 |
// if ( x > -100 ){ |
// if ( x > -100 ){ |
5564 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5565 |
if ( var.bw ){ |
if ( var.bw ){ |
5567 |
} else { |
} else { |
5568 |
sigcol2 = 1; |
sigcol2 = 1; |
5569 |
}; |
}; |
5570 |
ColorTRKMIP(track->dedx_y[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0); |
5571 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5572 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5573 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5574 |
linea->Draw(); |
linea->Draw(); |
5575 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
5576 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
5577 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
5578 |
tlinea->SetLineColor(dcol); |
tlinea->SetLineColor(dcol); |
5619 |
for (Int_t plane = 0; plane<6; plane++){ |
for (Int_t plane = 0; plane<6; plane++){ |
5620 |
// |
// |
5621 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5622 |
Float_t y = track->ym[plane]; |
Float_t y = -track->ym[plane]; |
5623 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5624 |
Float_t ysig = track->dedx_y[plane]; |
Float_t ysig = fabs(track->dedx_y[plane]); |
5625 |
// if ( x > -100 && y > -100. ){ |
// if ( x > -100 && y > -100. ){ |
5626 |
if ( track->xgood[plane] && track->ygood[plane] ){ |
if ( track->XGood(plane) && track->YGood(plane) ){ |
5627 |
if ( var.bw ){ |
if ( var.bw ){ |
5628 |
sigcol1 = -1; |
sigcol1 = -1; |
5629 |
sigcol2 = -1; |
sigcol2 = -1; |
5741 |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
5742 |
// |
// |
5743 |
x = arrax->At(orderx->At(sing)); |
x = arrax->At(orderx->At(sing)); |
5744 |
Float_t y1 = array1->At(ordery->At(sing)); |
Float_t y1 = -array1->At(ordery->At(sing)); |
5745 |
Float_t y2 = array2->At(ordery->At(sing)); |
Float_t y2 = -array2->At(ordery->At(sing)); |
5746 |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
5747 |
Float_t ysig = sigarray->At(ordery->At(sing)); |
Float_t ysig = sigarray->At(ordery->At(sing)); |
5748 |
if ( x > -100 && y1 > -100. ){ |
if ( x > -100 && y1 > -100. ){ |
5835 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5836 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5837 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5838 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5839 |
|
} else { |
5840 |
|
x = 1024 - trk->addrcluster[l][m]; |
5841 |
}; |
}; |
5842 |
x += 1024.; |
x += 1024.; |
5843 |
if ( trk->signcluster[l][m]> ysig ){ |
if ( trk->signcluster[l][m]> ysig ){ |
5844 |
ysig = trk->signcluster[l][m]; |
ysig = trk->signcluster[l][m]; |
5845 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5846 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5847 |
}; |
}; |
5848 |
}; |
}; |
5870 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5871 |
if ( trk->signcluster[e][m] != 0. ){ |
if ( trk->signcluster[e][m] != 0. ){ |
5872 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[e][m]; |
|
|
} else { |
|
5873 |
x = trk->addrcluster[e][m]; |
x = trk->addrcluster[e][m]; |
5874 |
|
} else { |
5875 |
|
x = 1024 - trk->addrcluster[e][m]; |
5876 |
}; |
}; |
5877 |
x += 1024.; |
x += 1024.; |
5878 |
if ( trk->signcluster[e][m]> ysig ){ |
if ( trk->signcluster[e][m]> ysig ){ |
5879 |
ysig = trk->signcluster[e][m]; |
ysig = trk->signcluster[e][m]; |
5880 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5881 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5882 |
}; |
}; |
5883 |
}; |
}; |
5950 |
}; |
}; |
5951 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
5952 |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5953 |
caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
5954 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5955 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
5956 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
5999 |
// |
// |
6000 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
6001 |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
6002 |
caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
6003 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
6004 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
6005 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
6040 |
// printf("qua \n"); |
// printf("qua \n"); |
6041 |
Int_t npoint = 100; |
Int_t npoint = 100; |
6042 |
Float_t zin[100]; |
Float_t zin[100]; |
6043 |
Double_t xout[100]; |
// Double_t xout[100]; |
6044 |
Double_t yout[100]; |
// Double_t yout[100]; |
6045 |
Int_t ifail = 0; |
Int_t ifail = 0; |
6046 |
Int_t trcol = 10; |
Int_t trcol = 10; |
6047 |
// |
// |
6059 |
Float_t tzy1[15]; |
Float_t tzy1[15]; |
6060 |
// |
// |
6061 |
for ( Int_t e = 0; e < 100 ; e++) { |
for ( Int_t e = 0; e < 100 ; e++) { |
6062 |
xout[e] = 0.; |
// xout[e] = 0.; |
6063 |
yout[e] = 0.; |
// yout[e] = 0.; |
6064 |
// |
// |
6065 |
tx[e] = 0.; |
tx[e] = 0.; |
6066 |
ty[e] = 0.; |
ty[e] = 0.; |
6086 |
// |
// |
6087 |
Trajectory *tr = new Trajectory(npoint,zin); |
Trajectory *tr = new Trajectory(npoint,zin); |
6088 |
// |
// |
6089 |
ifail = track->DoTrack2(tr); |
// ifail = track->DoTrack2(tr); |
6090 |
|
ifail = track->DoTrack(tr); |
6091 |
// |
// |
6092 |
if ( !ifail ){ |
if ( !ifail ){ |
6093 |
for ( Int_t e = 0; e < npoint ; e++) { |
for ( Int_t e = 0; e < npoint ; e++) { |
6094 |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
6095 |
ty[e] = ((float)tr->y[e]/100.)*var.sfx + var.xyvc; |
ty[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xyvc; |
6096 |
if ( e < 50 ) { |
if ( e < 50 ) { |
6097 |
ptx1[e] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx1[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
6098 |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
6099 |
} else { |
} else { |
6100 |
ptx2[e-50] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx2[e-50] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
6101 |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
6102 |
}; |
}; |
6103 |
if ( e > 84 ) { |
if ( e > 84 ) { |
6104 |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
6105 |
ty1[e-85] = ((float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
ty1[e-85] = (-(float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
6106 |
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; |
6107 |
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; |
6108 |
}; |
}; |
6235 |
// |
// |
6236 |
stringstream xevent; |
stringstream xevent; |
6237 |
stringstream yevent; |
stringstream yevent; |
6238 |
Float_t sdexy[2][22][96]; |
// Float_t sdexy[2][22][96]; |
6239 |
Float_t sdexyc[2][22][96]; |
// Float_t sdexyc[2][22][96]; |
6240 |
// |
// |
6241 |
for (Int_t m = 0; m < 22; m++){ |
for (Int_t m = 0; m < 22; m++){ |
6242 |
for (Int_t l = 0; l < 2; l++){ |
for (Int_t l = 0; l < 2; l++){ |
6251 |
// |
// |
6252 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
6253 |
// |
// |
6254 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
6255 |
bool isFULL = 0; |
// bool isFULL = 0; |
6256 |
bool isRAW = 0; |
bool isRAW = 0; |
6257 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
6258 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
6259 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
6260 |
// |
// |
6261 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
6265 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
6266 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
6267 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
6268 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
6269 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
6270 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
6271 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
6272 |
}; |
}; |
6273 |
}; |
}; |
6342 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6343 |
}; |
}; |
6344 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6345 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(95-n,21-m,1.); |
6346 |
pd2->cd(); |
pd2->cd(); |
6347 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6348 |
}; |
}; |
6363 |
// Define variables |
// Define variables |
6364 |
// |
// |
6365 |
UInt_t etime = var.etime; |
UInt_t etime = var.etime; |
6366 |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
Float_t estrip[2][22][96], ener, basel;//,sdexy[2][22][96],sdexyc[2][22][96]; |
6367 |
Int_t badstrip = 0; |
Int_t badstrip = 0; |
6368 |
qtot = 0.; |
qtot = 0.; |
6369 |
nstrip = 0; |
nstrip = 0; |
6459 |
// |
// |
6460 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
6461 |
// |
// |
6462 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
6463 |
bool isFULL = 0; |
// bool isFULL = 0; |
6464 |
bool isRAW = 0; |
bool isRAW = 0; |
6465 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
6466 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
6467 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
6468 |
// |
// |
6469 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
6473 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
6474 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
6475 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
6476 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
6477 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
6478 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
6479 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
6480 |
}; |
}; |
6481 |
}; |
}; |
6484 |
// |
// |
6485 |
Int_t done = 0; |
Int_t done = 0; |
6486 |
Int_t rdone = 0; |
Int_t rdone = 0; |
6487 |
Int_t fdone = 0; |
// Int_t fdone = 0; |
6488 |
pre = -1; |
pre = -1; |
6489 |
for (Int_t n =0 ; n < 96; n++){ |
for (Int_t n =0 ; n < 96; n++){ |
6490 |
if ( n%16 == 0 ) { |
if ( n%16 == 0 ) { |
6491 |
pre++; |
pre++; |
6492 |
done = 0; |
done = 0; |
6493 |
rdone = 0; |
rdone = 0; |
6494 |
fdone = 0; |
// fdone = 0; |
6495 |
}; |
}; |
6496 |
// |
// |
6497 |
// baseline check and calculation |
// baseline check and calculation |
6571 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6572 |
}; |
}; |
6573 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6574 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(96-n,21-m,1.); |
6575 |
pd2->cd(); |
pd2->cd(); |
6576 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6577 |
}; |
}; |
6658 |
// |
// |
6659 |
stringstream xvev; |
stringstream xvev; |
6660 |
stringstream yvev; |
stringstream yvev; |
6661 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
6662 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
6663 |
Int_t colo; |
Int_t colo; |
6664 |
Int_t l; |
Int_t l; |
6665 |
Int_t m; |
Int_t m; |
6666 |
Int_t n; |
Int_t n; |
6667 |
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); |
Bool_t satura = false; |
6668 |
|
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura); |
6669 |
if ( var.bw ){ |
if ( var.bw ){ |
6670 |
colo = -1; |
colo = -1; |
6671 |
} else { |
} else { |
6672 |
colo = 1; |
colo = 1; |
6673 |
}; |
}; |
6674 |
ColorMIP(mip,colo); |
ColorMIP(mip,colo); |
6675 |
if ( l == 0 ) { |
if ( l == 0 ) { |
6676 |
xvev.str(""); |
xvev.str(""); |
6679 |
xvev << " " << l; |
xvev << " " << l; |
6680 |
gDirectory->Delete(xvev.str().c_str()); |
gDirectory->Delete(xvev.str().c_str()); |
6681 |
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); |
6682 |
Xview->SetFillColor(colo); |
if ( satura ){ |
6683 |
|
Xview->SetFillColor(kBlack); |
6684 |
|
} else { |
6685 |
|
Xview->SetFillColor(colo); |
6686 |
|
}; |
6687 |
Xview->Fill(n,21-m,1.); |
Xview->Fill(n,21-m,1.); |
6688 |
pd1->cd(); |
pd1->cd(); |
6689 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6695 |
yvev << " " << l; |
yvev << " " << l; |
6696 |
gDirectory->Delete(yvev.str().c_str()); |
gDirectory->Delete(yvev.str().c_str()); |
6697 |
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); |
6698 |
Yview->SetFillColor(colo); |
if ( satura ){ |
6699 |
Yview->Fill(n,21-m,1.); |
Yview->SetFillColor(kBlack); |
6700 |
|
} else { |
6701 |
|
Yview->SetFillColor(colo); |
6702 |
|
}; |
6703 |
|
Yview->Fill(96-n,21-m,1.); |
6704 |
pd2->cd(); |
pd2->cd(); |
6705 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6706 |
}; |
}; |
6713 |
} |
} |
6714 |
|
|
6715 |
void FEVdetector::Calo1stcalib(){ |
void FEVdetector::Calo1stcalib(){ |
6716 |
Float_t estrip[2][22][96]; |
// Float_t estrip[2][22][96]; |
6717 |
// |
// |
6718 |
// this is the value of the mip for each strip. To be changed when we will have the real values |
// this is the value of the mip for each strip. To be changed when we will have the real values |
6719 |
// |
// |
6731 |
for (Int_t k = 0; k < 22; k++ ){ |
for (Int_t k = 0; k < 22; k++ ){ |
6732 |
for (Int_t l = 0; l < 96; l++ ){ |
for (Int_t l = 0; l < 96; l++ ){ |
6733 |
calib.calped[m][k][l] = 0. ; |
calib.calped[m][k][l] = 0. ; |
6734 |
estrip[m][k][l] = 0.; |
// estrip[m][k][l] = 0.; |
6735 |
}; |
}; |
6736 |
}; |
}; |
6737 |
} |
} |