User Tools

Site Tools


users:ngadiuba:tools:puweightrecipe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
users:ngadiuba:tools:puweightrecipe [2014/04/15 10:45] – created ngadiubausers:ngadiuba:tools:puweightrecipe [2014/04/15 14:34] (current) ngadiuba
Line 1: Line 1:
-fsghfsajkf+===== Recipe to Derive the Data Pile-Up Profiles  ===== 
 + 
 +   * The following two centrally produced files should be used: 
 +            * the pile-up JSON file [[https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/Collisions12/8TeV/PileUp/pileup_JSON_DCSONLY_190389-208686_All_2012_pixelcorr.txt|pileup_JSON_DCSONLY_190389-208686_All_2012_pixelcorr.txt]] 
 +            * the list of good lumi sections [[https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt|Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt]] 
 + 
 +   * The actual pile-up profile is easily generated with the command 
 + 
 +   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 
 + 
 +=== PU-Related Links and info === 
 + 
 +  * [[https://twiki.cern.ch/twiki/bin/viewauth/CMS/PileupJSONFileforData#2012_Pileup_JSON_Files|Here]] you can find info about PU JSON file for data 
 +  * If you are interested in a specific run range then you have to filter the two JSON files above as described [[users:ngadiuba:tools:lumicalc|here]] 
 +  * You can download directly the JSON files with the command 
 + 
 +    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 ===== 
 + 
 +  * Get the MC PU distribution for the scenario of interest from [[https://twiki.cern.ch/twiki/bin/viewauth/CMS/Pileup_MC_Gen_Scenarios|here]] 
 +  * Then calculate the weights using the true number of PU interactions for the in-time bunch crossing. This information is extracted in CMSSW as follows 
 + 
 +   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 ===== 
 +  * [[users:ngadiuba:tools:puweightrecipe:puweighth|PUWeight.h]] 
 +  * [[users:ngadiuba:tools:puweightrecipe:puweightcxx|PUWeight.cxx]] 
 +   
 +  
users/ngadiuba/tools/puweightrecipe.1397551551.txt.gz · Last modified: by ngadiuba