Table of Contents

Recipe to Derive the Data Pile-Up Profiles

 pileupCalc.py -i Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --inputLumiJSON pileup_JSON_DCSONLY_190389-208686_All_2012_pixelcorr.txt --calcMode true --minBiasXsec 69400 --maxPileupBin 60 --numPileupBins 60  DataPUProfile_2013Jan22.root
  wget --no-check-certificate https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt

How to calculate weights

 Handle<std::vector< PileupSummaryInfo > >  PupInfo;
 event.getByLabel(edm::InputTag("addPileupInfo"), PupInfo);
 
 std::vector<PileupSummaryInfo>::const_iterator PVI;
 
 float Tnpv = -1;
 for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI) {
 
    int BX = PVI->getBunchCrossing();
 
    if(BX == 0) { 
      Tnpv = PVI->getTrueNumInteractions();
      continue;
    }
 
 }

PUweight class for SFrame