Code QA for D0 v1 paper

 
Code QA for psn0715

support documents : https://www.star.bnl.gov/protected/bulkcorr/subhash/heavy/D0v1_docu/webpage/
original code CVS location : $CVSROOT/offline/paper/psn0715
my working directory: rcf  /star/u/xgn1992/work/CodeQA/d0v1

=============

update on 03/24.

The previous issues (on 03/19) are fixed by the PAs, the relevent input files are added in a tempory directory, will upload to cvs shortly. The change of the v1 sign is due to the eventplane definition in the reconstruction are different between different analysiers. The final v1 results are consistent. and combined code are provided.
After the code checks to cvs. the codeQA part be should fine.

=============

Next show some progress status and some issued need to fix first before i can moving forward.  - 03/19

======================================================================================
reproduce paper figures.

Figure1. pls update the latest macro to cvs. There are several comments particular on this plots. (fixed)
such as panel (a) the legend of red line. I think the "Gauss+ background" is more proper than "Gauss + res bkg". since you are fitting the foreground of unlike-sign, but not the combinational background subtracted one. 
panel (a) & (b), the a-axis titles are too close to the axis label.
panel (c), i think the fitting function should be p0[1+2*v1*cos(phi-Psi)]. Did you misses a factor of 2 here??? (fixed)
panel (b) and (d) - minor comments, pls change the order of the legend. there are different with the one from paper.

Figure2, pls update the latest macro to the cvs. also including "STAR". there are also some small issues need to pay attention on fig2.
such as the Error: "Non-static-const variable in array dimension Fig2.C: line165 :" and "line 247". those const variables need to set in some other proper way.
also the root file for kaon "TFile *fkaons = new TFile("Kaons/output_phiv1_200GeV_allsyst.root");" is not the final one you used.  can't find the root files. even though you did not use at all for figure2. but pls comment it out.

Figure3. pls also upload the latest macro to the cvs.  such as include Apmt date was missed in the current cvs. 

======================================================================================

Analysis part. (three analysis)

==============
Sooraj :  

Next for <run16>  (fixed)

- reconstruction,
   -- run smoothly with stphys and stsst data-stream for TEST filelist.
   -- but the stnosst stream have some problem with the local test input filelist. pleae update it accordingly though it's a minor issue.

- production,
   -- the production test sample can't be run through. the error log can be found accordingly in my test directory with the file name log. what i did is next command.
   sh anarun.sh d0TreeList_run_stphys.test.list  > log
   --For me, looks like you missed the main maker in cvs.
   --i am not going to run through all the data set, but at least you need to provide the final combined output root fire for the next step test.

- analysis
  -- not be able to run through the code. also missing files.

Next for <run14>

the data reconstruction/production and analysis are carry out on pdsf. so i am not be able to do this QA check for run14 now.

==============
Subhash 

next for <run16> (fixed)

- MakeTree
  -- cannot run through the code sicne the input test filelist is empty, even thoug i can find some other files instead to test the macro. but pls provide a good test filelist.
 
- ReadTree
  -- missing Makefile/.cxx and nothing to complie, can not test the sample.
  --i am not going to run through all the data set to loop all the tree, but at least you need to provide the final combined output root fire for the next step test.

- macro with Run.C
  -- missing input files. can't test.
       
next for <run14>

- makeTree
   -- the analysis was done in pdsf,  but one test sample provide on rcf. But again, the sample was not accessable to the group user. permission denied for me. so the test can't be done.

- readTree
   -- same problem as run16, can't test the file. need to provide the final rootfile for next test.

- macro with Run.C
  -- missing input files.

==============
Liang

next for <run16> (fixed)

- readPicoDst.C run test sample well to produce the analyis tree.
- no submission script provided for the full data sample. it would be better to include it in cvs for backup.
  the final full sample output file with name "result_fulldata.root" was provided for run16.

- cal.C can run through fine to extract the v1^obs, but apperantly there is the only one i can test now for the v1 calculation. so i pay a little more attention.
   -- run the cal.C with the input file "result_fulldata.root ".
   --next plots, first row is the d0bar (even thoug it say d0, but it is d0bar) raw yield vs phi-Psi from 4 different rapidity range. fitted with p0(1+2*v1*cosx) function. the extraced v1^obs was list on each panel. 
 

   --after divide the resolution, (res ~0.377322 according to the macro and files). the d0bar v1 was ploted below.  There is a big problem for me here, why the sign was totally changed !! ??  (fixed)
    according to the links for the presentation below, 
https://www.star.bnl.gov/protected/bulkcorr/subhash/heavy/D0v1_docu/preqm/Update_D0v1_HFG_PWG_review_Oct18.pdf page 19 right hand plot, we can make sure, this is indeed d0bar. and the central value is the same from next two plots.
   - So i am curious about what happened here ??

   next is from the cvs result.

next is from the pwg presentatio metioned above.

next for <ru14>

- the test sample are not for rcf. can not test it.

 ==============

OverAll concern.

1, run14 can't be tested !

2, The analysis are done with three different person. (fixed)
But so far, i didn't see the consistence between the resutls due to either lack of final files (from sooraj & subhash) or the clarify of the results from Liang on the sign of v1. 

3, Also i am not sure how to final results for the paper are presented from these three different results accroding to the macro in current cvs so far. no macro on how to combine the results or i didn't find it yet.  (fixed)

--2019/03/19

==============