PID efficiency

For the particle identification efficiency study, we tried two methods to select the "pure" sample.
First method is using the decayed daughters, such as pion from Ks0 decay, kaon from phi decay, and proton from lambda decay. 
/global/homes/x/xgn1992/rnc_Global/SL16dRun14/myAnalysis_QM17_Jan17/PID/20170813
(update directory since pdsf is retired: /star/data01/pwg/xgn1992/pdsf/rnc/work/SL16dRun14/myAnalysis_QM17_Jan17/PID/20170813)
The second method is directly using the Tpc and Tof for particle sample selections.
/global/homes/x/xgn1992/rnc_Global/SL16dRun14/myAnalysis_QM17_Jan17/PID/20170823/pion
(update directory: /star/data01/pwg/xgn1992/pdsf/rnc/work/SL16dRun14/myAnalysis_QM17_Jan17/PID/20170823/pion)

For nSigmaTpc, we use gaus func fit the mean and sigma, then calculate the cut eff.
For 1/beta, we use binning counting method to calculate the eff. Note Here, 1/beta is not pure "gaus" distribution.

- For the First method, the mother particles InvMass distribution can be found from next pdfs with name "*_Mass.pdf". We use wrong sign method here to statistically subtract the background.
as can see, the Ks peak is very prompting. The Lambda peak is also good. But not the Phi meson.
The results can be found in the pdfs with name "*PidHFT_SB*.pdf". The last page is the pid efficiency for TPC and Tof 1/beta. We fit it with some specific function.

Results:
For pion, the distribution looks reasonable, and the result is trustable.
For kaon, the distribution at some pt range have weird structure. such as nSigmaTpc at pt ~ 0.5-0.7 GeV, there is a secondary peak, which is contamination due to the wrong-sign subtraction method can't describe the non-liner bkg.  For the 1/beta distribution, also at some pt range, they do have some secondary peak. We also tried to use like-sign to extract the kaon sample, but still the same problem. But, As we know how the "true" efficiency looks like for kaon, we just use line function to fit our current nSigmaTpc eff, and line func to fit 1/beta at high pt and some specific "polN" func fit the low pt for 1/beta cut. We will double check this "assumption" later on with some clean PID selections.
For proton, the same procedure as pion and kaon, the result is also trustable.

Double check.
The low pt range 1/beta eff for Kaon and Proton. as we saw, they have pt dependence, not a line fit as pion.
So here, we directly use tpc and tof to identify the particles and do this eff calcu.
I have two PID cases here for this check, One is strict cut, with name "**PidHFT_v2.pdf", another one is kind of loose cut with name "**PidHFT_v3.pdf"

strict pid: 
pion  // if (fabs(nSigmaPion)<0.05 && fabs(nSigmaKaon) > 4 && fabs(nSigmaProton) > 4 && pTofAvailable && fabs(deltaB_tofKaon)>0.04 && fabs(deltaB_tofProton)>0.04)
kaon //if (fabs(nSigmaKaon)<0.05  && fabs(nSigmaPion) > 4 && fabs(nSigmaProton) > 4 && kTofAvailable && fabs(deltaB_tofPion)>0.04 && fabs(deltaB_tofProton)>0.04)
proton //if (fabs(nSigmaProton)<0.05  && fabs(nSigmaPion) > 4 && fabs(nSigmaKaon) > 4 && prTofAvailable && fabs(deltaB_tofPion)>0.04 && fabs(deltaB_tofKaon)>0.04)
With this kind "strict" PID from both tpc and tof, the kaon sample can be only extend to ~0.7GeV with is the limit of TPC identification ability. and proton to ~1.2GeV. The low pt 1/beta cut eff ,matches out previous results well.

loose pid:
pion //if (fabs(nSigmaPion)<0.05 && pTofAvailable && fabs(deltaB_tofKaon)>0.04 && fabs(deltaB_tofProton)>0.04)
kaon //if (fabs(nSigmaKaon)<0.05 && kTofAvailable && fabs(deltaB_tofPion)>0.04 && fabs(deltaB_tofProton)>0.04)
proton //if (fabs(nSigmaProton)<0.05  && prTofAvailable && fabs(deltaB_tofPion)>0.04 && fabs(deltaB_tofKaon)>0.04)
after Remove the tpc cut, the pt can be extend higher range, and the result is consistent with previous results.

 I have some even looser cut, but the results was not understand, the contamination is beyond my suspectation. The result can be found with names "**Pid_looose.pdf". The contamination is too large, so this result is use able for check.
/global/homes/x/xgn1992/rnc_Global/SL16dRun14/myAnalysis_QM17_Jan17/PID/20170823/pion_2
pion //  (fabs(nSigmaPion)<1.0 && pTofAvailable && fabs(deltaB_tofPion)<0.05 )
kaon //  (fabs(nSigmaKaon)<1.0 && kTofAvailable && fabs(deltaB_tofKaon)<0.05 )
proton //  (fabs(nSigmaProton)<1.0 && prTofAvailable && fabs(deltaB_tofProton)<0.05 )