ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/NonMCBackground/src/applyEMU.cc
(Generate patch)

Comparing UserCode/MitHzz4l/NonMCBackground/src/applyEMU.cc (file contents):
Revision 1.2 by dkralph, Mon Jun 18 06:56:17 2012 UTC vs.
Revision 1.3 by khahn, Wed Jun 20 19:17:19 2012 UTC

# Line 80 | Line 80 | using namespace mithep;
80   //
81   // globals
82   //----------------------------------------------------------------------------
83 < TH1D * hpu;
83 > TH1D *hpu_2011, *hpu_2012;
84   mithep::RunLumiRangeMap rlrm;
85   vector<SimpleLepton> failingLeptons ; // for fake estimation
86   vector<SimpleLepton> passingLeptons;      // for fake estimation
# Line 96 | Line 96 | vector<bool>   PFnoPUflag;;
96   // prototypes
97   //----------------------------------------------------------------------------
98   void initRunLumiRangeMap();
99 < void initPUWeights();
100 < double getPUWeight(unsigned npu);
99 >
100  
101   //
102   // MAIN
# Line 357 | Line 356 | int main(int argc, char** argv)
356        foTree.Fill();
357          
358        if( ctrl.mc)
359 <        setEffiencyWeights(ret4l, weights);
359 >        setEffiencyWeights(ctrl.era, ret4l, weights);
360          
361        nt.Fill();
362      }
# Line 385 | Line 384 | void initRunLumiRangeMap()
384    rlrm.AddJSONFile(std::string("./data/Cert_190456-194479_8TeV_PromptReco_Collisions12_JSON.txt"));  
385  
386   };
388
389
390 //----------------------------------------------------------------------------
391 void initPUWeights()
392 //----------------------------------------------------------------------------
393 {
394  TFile * puf = new TFile("data/PileupReweighting.Summer11DYmm_To_Full2011.root");
395  hpu = (TH1D*)(puf->Get("puWeights"));
396 }
397
398 //----------------------------------------------------------------------------
399 double getPUWeight(unsigned npu)
400 //----------------------------------------------------------------------------
401 {
402  return hpu->GetBinContent(hpu->FindBin(npu));
403 }
404

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines