Reweighting code of data/MC difference
root -l 'createDataset.cc(year,q2Bin,data,deno,num)'Then we can generate part of data/MC ntuple after all selections (due to limitations of ntuple size)
Then add sWeights to data ntuple, merge all files and divide into two parities
python AddSweight.pyFor MC we just need to merge all root files
python MCmerge.pyWe just use even parity Jpsi channel to generate reweighting model
python DoReweight_readindat_fulldatatraining.py q2Bin parity yearThen we can apply model to each q2Bin (here use odd parity events)
python Application_DoReweight_readindat_fulldatatraining.pyremember that we can only compare data and MC distributions in Jpsi channel and Psi(2S) channel