Eunil Won's Home Page
|
Powered by
|
|
What's New : Nov-14-2005
Finally, I finished writing the unpacker for the new copperII EFC data.
It has been delayed due to my slow response but is now done and the
result looks just beautiful. Below has a snippet of the core codes:
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 +0900
From: Ryosuke Itoh
To: eunil@hep.korea.ac.kr, daq-experts@bpost.kek.jp
Cc: itoh@balpha03.kek.jp
Subject: 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 TDC
unpacking.
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 confirmed
that COPPER TDCs are working fine. However, to make the plot for
COPPER, 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 of
AMT3 readout.
T_max is set at 23772 and C=3000/4064. The value of T_max was
empirically 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 distribution
compatible with LeCroy's using Eunil's unpacker, is achieved.
Congraturations, Eunil!
Next step is to make other histograms in dqm-efc compatible between
COPPER 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