1 Data pileup is calculated by using the corresponding pileup JSON file by masking lumi sections out of the certain datasets. An important parameter is the minibias cross section. Now recommend is 69000+-5%, I used 69400, and 80000 was said being under review for run2. (The current results show the larger one in better, say 71000 is much better than 69000)
2 MC pileup is simulated based on the expected data pileup, but not accurate sometime(like the runII_spring _74x_mc, produced before the runII data taking, much like guess, pretty off). The same MC campaign (the same cmssw version), should has the same pileup input, which can be found in the cmssw pdf directly.
3 Get the pileup weight factor depends on the
TrueNumInteractions(puTrue in ggNtuples) by data_pu/mc_pu
4 Apply the pu weight factor to the mc samples, using the nVtx to test to see how the data the mc agree.
The follows plots use data JSON: Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_Silver_v2.txt
MC pdf: mix__2015__25ns__Startup__PoissonOOTPU__cfi_8py_source.html from CMSSW_7_4_15_patch1
True PU distributions:
Before PU, the nVtx probability distributions
After PU, the nVtx probability distribution