[Clas_offline] Is this a bug in cc code?
Jixie Zhang
jixie at jlab.org
Wed Aug 12 19:44:53 EDT 2009
Hi,
Sorry to bother those who is not interested.
I found something strange when I tried to calibrate the CC TDC.
I am not sure if this is a bug. I have even set the calibration database
constants CC_CALIB->TDC->T1=0.01 and CC_CALIB->TDC->T0=0,
I found in the cooking result that 'cc_t' in h10 ntuple is very closed to
0.05*TDC,
not 0.01*TDC.
------------------------------------------------------------------------------------
Here is the original code in the latest cc and seb from cvs.
("cvs co cc" and "cvs co seb" :)
jixie at ifarml5> grep -i ch2nsec *
cc_evnt.F: real thet_cc(18), ch2nsec, ch_time
cc_evnt.F: data NWRITE,NWARN /0,0/, ch2nsec /0.05/ * !this line set
ch2nsec to 0.05*
cc_evnt.F: ch2nsec = abs(xcct2ch(n_SECT_CC(i),n_CC_hit(i))) * !
xcct2ch is T1 in calibration database
! ch2nsec is updated to T1*
cc_evnt.F: tdc(nhits) = ch2nsec*I_TDC_CC(i) + ch_time *! I_TDC_CC is
TDC in raw bos file*
cc_evnt.F: tclust(nrclust) = tdc(nhits) ! cluster time
(nsec)
cc_evnt.F: * nrtime(nrclust) = tclust(nrclust) / ch2nsec + 0.5* *!
this line could be wrong *
jixie at ifarml5> grep nrtime seb/*
seb/trk_2_cc.F: cctime(npart_cc) = nrtime(cchit)*0.05
------------------------------------------------------------------------------------
cc/cc_evnt.F is trying to fill ccrc bank. nrtime, one variable of this
bank,
is calculated as
"nrtime(nrclust) = tclust(nrclust) / ch2nsec + 0.5 ", where
1) ch2nsec is the calbration constant CC_CALIB->TDC->T1,
2) tclust(nrclust) = tdc(nhits) = ch2nsec*I_TDC_CC(i) + ch_time ,
3)ch_time here is the calbration constant CC_CALIB->TDC->T0,
4)I_TDC_CC is the RAW CC TDC in bos file
in seb/trk_2_cc.F, I found this line
" cctime(npart_cc) = nrtime(cchit)*0.05".
From the above we can see that
* --> nrtime = TDC+ T0/T1 +0.5
--> cctime = 0.05 *TDC + 0.05* T0/T1 + 0.025
*
I think this should not be the correct way for calibration. It made no sence
to provide both T1 and T0
to calibrate the CC time. I think the correct way should be
"cc_evnt.F: nrtime(nrclust) = tclust(nrclust)/*0.05* + 0.5"
If we change this line like the following, we can see that
*--> nrtime = T1/0.05 *TDC + T0/0.05 + 0.5
--> cctime = T1 *TDC + T0 + 0.025*
Am I right?
Thank you for your time.
--
Best Regards,
Jixie Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/clas_offline/attachments/20090812/fdb94e04/attachment.html
More information about the Clas_offline
mailing list