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

Both sides previous revisionPrevious revision
Next revision
Previous revision
users:ngadiuba:tools:puweightrecipe [2014/04/15 14:10] ngadiubausers:ngadiuba:tools:puweightrecipe [2014/04/15 14:34] (current) ngadiuba
Line 18: Line 18:
  
 ===== How to calculate weights ===== ===== How to calculate weights =====
-  * Get the MC PU distribution from here+ 
 +  * 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.1397563843.txt.gz · Last modified: by ngadiuba