Skip to content

CMSKStarMuMu/DataMCreweighting

Repository files navigation

DataMCreweighting

Reweighting code of data/MC difference

Create Dataset

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.py

For MC we just need to merge all root files

python MCmerge.py

Generate model

We just use even parity Jpsi channel to generate reweighting model

python DoReweight_readindat_fulldatatraining.py q2Bin parity year

Apply model

Then we can apply model to each q2Bin (here use odd parity events)

python Application_DoReweight_readindat_fulldatatraining.py

remember that we can only compare data and MC distributions in Jpsi channel and Psi(2S) channel

About

Reweighting code of data/MC difference

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published