| 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; |
| 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); |
| 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; |
| 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; |