15 EEfeeTP::EEfeeTP(
int xcrate,
const char *TPname,
int lenX,
int xcha0L,
int xcha0H) {
22 strncpy(name,TPname,mxTxt);
31 memset(adc12,0,
sizeof(adc12));
32 memset(ped4,0,
sizeof(ped4));
33 memset(chanID,0,
sizeof(chanID));
34 memset(adc10p,0,
sizeof(adc10p));
35 memset(adc6,0,
sizeof(adc6));
46 EEfeeTP::compute(
int *adcA,
int *ped4A,
int *maskA,
int highTowerMask,
int patchSumMask){
51 if(cha0H>0) len=len/2;
53 for (i=0; i<len; i++){
54 if( maskA[cha0L+i])
continue;
55 adc12[nT]= adcA[cha0L+i] & 0xfff;
56 ped4 [nT]=ped4A[cha0L+i];
62 for (i=0; i<len; i++){
63 if( maskA[cha0H+i])
continue;
64 adc12[nT]= adcA[cha0H+i] & 0xfff;
65 ped4 [nT]=ped4A[cha0H+i];
77 int adc10=adc12[i]>>2;
78 int x10=adc10+ped4[i];
86 if(( y>>7) & 0x7 ) y |=(1<<7);
97 TPsum6b =TPsum8b - nT + 1;
99 if (TPsum6b <0 ) TPsum6b=0;
100 if (TPsum6b > 62) TPsum6b=62;
102 if (!highTowerMask) HT6b = 0;
103 if (!patchSumMask) TPsum6b = 0;
110 EEfeeTP::print(
int k)
const {
111 printf(
"EEfeeTP: name=%s nT=%d\n",name,nT);
113 printf(
" channel: ");
for(i=0;i<nT;i++) printf(
" %4d",chanID[i]); printf(
"\n");
114 printf(
" rawADC : ");
for(i=0;i<nT;i++) printf(
" %4d",adc12[i]);printf(
"\n");
115 printf(
" ped4: ");
for(i=0;i<nT;i++) printf(
" %4d",ped4[i]);printf(
"\n");
116 printf(
" adc10+p: ");
for(i=0;i<nT;i++) printf(
" %4d",adc10p[i]);printf(
"\n");
119 printf(
"%4d",adc6[i]);
120 if(HTchId==chanID[i]) printf(
"*");
else printf(
" ");
122 printf(
"\nOUTPUT: HT6b=%d TPsum6b=%d \n",getOutHT(),getOutTPsum());