for (int loop=0;loop<N_FINESSE;loop++) { if (((* (int *) bufptr) & 0xffff0000) != fHDR) { m_status = ERROR_NOfHDR; return m_status; } bufptr++; bufptr++; // extra spacing btw fHDR and aHDR int bcount = (loop + 0xa) << 24; if ((( *(int *) bufptr)&0xff000000) == (aHDR|bcount)) // aHDR ? { bufptr++; } else { m_status = ERROR_NOaHDR; return m_status;; } // // loop over aSGL (the tdc edge data) // 5 = number of headers and trailers // int nlength = ndata[loop] - 5; printf("before loop %x (length = %x %d)\n",*(int *) bufptr,nlength,nlength); for (int nhits=0;nhits<nlength;nhits++) { bufptr++; } }Date: Sat, 12 Nov 2005 02:11:04 +0900From: Ryosuke Itoh To: eunil@hep.korea.ac.kr, daq-experts@bpost.kek.jpCc: itoh@balpha03.kek.jpSubject: Re: [daq-experts:2511] Re: amt3 finesse questions
Dear all,
Finally, I could make a comparison of TDC distributions for EFC COPPER obtained with Eunil's unpacker and for LeCroy.The same "dqm-efc" code was used except for the difference in TDCunpacking. You can find the plot in http://belle.kek.jp/~itoh/misc/amt3_vs_copper.ps.Solid line shows COPPER while dashed line is LeCroy. The plot was obtained for Run 69.As seen, two distributions are almost the same and it is confirmedthat COPPER TDCs are working fine. However, to make the plot forCOPPER, I need to use following conversion:
T_plot = 2 * ( T_max - T_amt * C )
T_plot is the converted TDC time while T_amt is the raw value ofAMT3 readout.T_max is set at 23772 and C=3000/4064. The value of T_max wasempirically obtained (scaled to adjust zero) and is different from that given by Higuchi-san (4500(EFC) or 18400(CDC)). Also, I don't know why factor 2 must be multiplied to have the same scale. Higuchi-san, could you explain the reason?
But anyway, the first goal, to have the TDC distributioncompatible with LeCroy's using Eunil's unpacker, is achieved. Congraturations, Eunil!
Next step is to make other histograms in dqm-efc compatible betweenCOPPER and LeCroy. But my understanding of EFC's DQM is limited and we should ask EFC people for further checks. After checking Eunil's unpacker and DQM code for EFC in CVS, I will talk to Chin-Chi.
- R.Itoh