| 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)); |
| 2812 |
} else { |
} else { |
| 2813 |
// |
// |
| 2814 |
// |
// |
| 2815 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr >= (repuntiltr-1) ) repeat = false; |
| 2816 |
// |
// |
| 2817 |
// printf(" numtr is %i \n",numtr); |
//printf(" numtr is %i \n",numtr); |
| 2818 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
| 2819 |
//ptrack = L2->GetTrack(numtr); |
ptrack = L2->GetTrack(numtr); |
| 2820 |
//ptt = ptrack->GetToFTrack(); |
ptt = ptrack->GetToFTrack(); |
| 2821 |
}; |
}; |
| 2822 |
// |
// |
| 2823 |
xp11[0] = 0.; |
xp11[0] = 0.; |
| 2832 |
ii = 2; |
ii = 2; |
| 2833 |
// |
// |
| 2834 |
Int_t myseq = ptt->trkseqno + 1; |
Int_t myseq = ptt->trkseqno + 1; |
| 2835 |
|
// |
| 2836 |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
| 2837 |
// |
// |
| 2838 |
// printf(" qua \n"); |
// printf(" qua \n"); |
| 2839 |
// |
// |
| 2840 |
for ( Int_t i = 0; i<8; i++ ) { |
// for ( Int_t i = 0; i<8; i++ ) { |
| 2841 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
| 2842 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
| 2843 |
}; |
// }; |
| 2844 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
| 2845 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
| 2846 |
}; |
// }; |
| 2847 |
// xp11[i] = 0.; |
// xp11[i] = 0.; |
| 2848 |
}; |
// }; |
| 2849 |
|
|
| 2850 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
| 2851 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
| 2962 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 2963 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
| 2964 |
} else { |
} else { |
| 2965 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
| 2966 |
}; |
}; |
| 2967 |
// |
// |
| 2968 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3051 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3052 |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
| 3053 |
} else { |
} else { |
| 3054 |
ColorTOFMIP(ms12a[rj]+ms12b[rj],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
| 3055 |
}; |
}; |
| 3056 |
// |
// |
| 3057 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3139 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3140 |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
| 3141 |
} else { |
} else { |
| 3142 |
ColorTOFMIP(ms21a[rj]+ms21b[rj],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
| 3143 |
}; |
}; |
| 3144 |
// |
// |
| 3145 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3225 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3226 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
| 3227 |
} else { |
} else { |
| 3228 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
| 3229 |
}; |
}; |
| 3230 |
// |
// |
| 3231 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3316 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3317 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
| 3318 |
} else { |
} else { |
| 3319 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
| 3320 |
}; |
}; |
| 3321 |
// |
// |
| 3322 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3409 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3410 |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
| 3411 |
} else { |
} else { |
| 3412 |
ColorTOFMIP(ms32a[rj]+ms32b[rj],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
| 3413 |
}; |
}; |
| 3414 |
// |
// |
| 3415 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 6381 |
// |
// |
| 6382 |
stringstream xvev; |
stringstream xvev; |
| 6383 |
stringstream yvev; |
stringstream yvev; |
| 6384 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
| 6385 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
| 6386 |
Int_t colo; |
Int_t colo; |
| 6387 |
Int_t l; |
Int_t l; |
| 6388 |
Int_t m; |
Int_t m; |