ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc (file contents):
Revision 1.29 by lantonel, Thu Mar 14 13:43:25 2013 UTC vs.
Revision 1.30 by lantonel, Fri Mar 15 13:08:45 2013 UTC

# Line 23 | Line 23 | OSUAnalysis::OSUAnalysis (const edm::Par
23    datasetType_ (cfg.getParameter<std::string> ("datasetType")),
24    channels_  (cfg.getParameter<vector<edm::ParameterSet> >("channels")),
25    histogramSets_ (cfg.getParameter<vector<edm::ParameterSet> >("histogramSets")),
26 <  plotAllObjectsInPassingEvents_ (cfg.getParameter<bool> ("plotAllObjectsInPassingEvents"))
26 >  plotAllObjectsInPassingEvents_ (cfg.getParameter<bool> ("plotAllObjectsInPassingEvents")),
27 >  doPileupReweighting_ (cfg.getParameter<bool> ("doPileupReweighting"))
28  
29   {
30  
31    TH1::SetDefaultSumw2 ();
32  
33    //create pile-up reweighting object, if necessary
34 <  if(datasetType_ != "data") puWeight_ = new PUWeight (puFile_, dataPU_, dataset_);
34 >  if(doPileupReweighting_ && datasetType_ != "data") puWeight_ = new PUWeight (puFile_, dataPU_, dataset_);
35  
36    // Construct Cutflow Objects. These store the results of cut decisions and
37    // handle filling cut flow histograms.
# Line 450 | Line 451 | OSUAnalysis::analyze (const edm::Event &
451  
452    //get pile-up event weight
453    double puScaleFactor = 1.00;
454 <  if(datasetType_ != "data"){
454 >  if(doPileupReweighting_ && datasetType_ != "data"){
455      puScaleFactor = puWeight_->at (events->at (0).numTruePV);
456      //cout << puScaleFactor << endl;
457    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines