BTOF comparison between BFC production vs. BFC+Afterburner (MuDst->picoDst) production

 Currently in STAR, there are two ways of producing picoDst data used for physics analysis. (A) full BFC chain including daq->StEvent->MuDst->picoDst flow; (B) BFC chain to produce daq->StEvent->MuDst, then use genDst.C to (re-)produce picoDst data. 

In Option (A), BTOF Match and Calib makers are loaded to handle StEvent objects directly in ::processStEvent() functions. In Option (B), BTOF Match and Calib makers are loaded if needed to re-perform the matching and calibration calculations for BTOF related variables. They take MuDst object as inputs and these tasks are handled in ::processMuDst() functions. This blog is intended to do an apple-to-apple comparisons on the final BTOF related variables in the picoDst data.

The test is based on the following samples and so far 1000 events were used for comparisons.

================================
For the P24iy production of 2019 fixed target data:

bfc.C chain for BFC production:
P2019b StiCA FXT EbyET0 CorrZ -mtd picoVtxFXT PicoCovMtxWrite BEmcChkStat

genDst.C chain for conversion production:
y2019b FXT picoDst PicoVtxMode:PicoVtxFXT PicoCovMtxMode:PicoCovMtxWrite btofMatch btofStartless

A sample DAQ file (production_4p59GeV_fixedTarget_2019) is here:
/star/rcf/test/daq/2019/181/st_physics_20181004_raw_2000007.daq
================================

1) First, it seems the genDst.C macro in SL24y lib doesn't handle the FXT production well. But this has been updated in a later commit (PR 730), now included in SL25a.

2) After 1) was fixed, I did the two productions (A) and (B) as described above and the comparisons are shown below:

Fig. 1:  Comparison between different TOF variables:  (A: BFC) - black;  (B: Afterburner) - red
Fig. 2: Ratio between A/B

Findings are:

1) For BTof hit level only variables (total counts, IDs), all distributions are identical. This is expected as all the hits pushed into MuDst are direct copy from StEvent.

2) For matching variables (matchFlag, btofYLocal, btofZLocal, tofHitPosX,Y,Z) etc, distributions are nearly identical except for a very tiny different in YLocal/ZLocal. Originally, I was a bit uncertain on the MuDst track pool vs. StEvent track pool. This seems to be a very small issue. I didn't dig in very detail to find out this tiny difference, could be the residual track pool difference.

3) For tof calibration variables (tof, beta, NTofT0 etc.), there seems to be some small differences. The most significant differences in TOF nSigmaXs. So I did a line-by-line printout comparison between the two production. Here are the comparisons:

A: BFC Production B:  BFC + Afterburner production

It appears that the major difference is in the momentum used in the two methods. Here are the codes used:

A:

B:

while in MuDst, MuTrack momentum is constructed as:


and then:

In the BTofCalibMaker, in the startless or FXTmode, TPC dEdx combined with total momentum are used to select candidates used for T0 calculation. This can introduce some difference in the number of T0 particles used for Tstart calculation. And then also the following tof and beta calculation (T_stop - T_start). For nSigmaX, it can be more drastics, as it depends on the expected tof which is calculated using the ptot. The difference is in the 4th digit (<0.1%), much smaller than our momentum resolution. However, there are some numerical differences here.