Wrong pileup profiles in 2017
Some datasets with 2017 conditions have been produced with wrong pileup profiles (see here). Some of them have been redone, but it's not clear if all the samples are now with the correct profile. To work around this, we should obtain the actual pileup profile for each sample before any event selection. It should be stored in the header, around here. Here is an example of filling the profile in a different framework (search for ‘pileupProfile’).
In the analysis we'll need to use these profiles in the denominator for the reweighting.