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

Comparing UserCode/MitHzz4l/Selection/src/ReferenceSelection.cc (file contents):
Revision 1.16 by anlevin, Wed Oct 3 17:11:31 2012 UTC vs.
Revision 1.17 by anlevin, Fri Oct 12 12:26:12 2012 UTC

# Line 25 | Line 25
25   #include "SelectionDefs.h"
26   #include "FSR.h"
27   #include "SelectionFuncs.h"
28 < #include "ElectronEnergyCorrection.h"
29 < #include "ElectronEnergyRegression.h"
28 > #include "ElectronMomentumCorrection.h"
29   #include "MuonMomentumCorrection.h"
30  
31  
# Line 115 | Line 114 | EventData apply_HZZ4L_reference_selectio
114      for(int i=0; i<muonArr->GetEntries(); i++) {
115        const mithep::Muon *const_mu = (mithep::Muon*)((*muonArr)[i]);
116        mithep::Muon *mu = const_cast<mithep::Muon*>(const_mu);
117 <      correct_muon_momentum(mu,info->EvtNum());
117 >      correct_muon_momentum(mu,info->RunNum());
118      }
119    }
120  
122
121    //********************************************************
122    // Skim 0 :
123    //********************************************************
# Line 258 | Line 256 | EventData apply_HZZ4L_reference_selectio
256        if(ctrl.debug) cout << "musel.status  after ID: " << musel.getStatus() << endl;
257        if( ctrl.debug ) cout << endl;
258  
261
259        if( !(ctrl.doFSR) ) {
260          musel |=  (*MuonIsoSelector)(ctrl,mu,vtx,pfCandidates,puEnergyDensity,eraMu,photonsToVeto);
261          if(ctrl.debug) cout << "musel.status  after iso: " << musel.getStatus() << endl;
# Line 312 | Line 309 | EventData apply_HZZ4L_reference_selectio
309      // --------------------------------------------------------------------------------
310      for(int i=0; i<electronArr->GetEntries(); i++)
311        {
312 <        const mithep::Electron *ele_uncorrected = (mithep::Electron*)((*electronArr)[i]);
313 <        mithep::Electron *ele = const_cast<mithep::Electron*>(ele_uncorrected);
314 <        if(ctrl.do_escale) correct_electron_energy(ele);
315 <        if(ctrl.do_eregression) apply_electron_energy_regression(ele,puEnergyDensity->At(0)->RhoKt6PFJets(),vtxArr->GetEntries());
312 > //      const mithep::Electron *ele = (mithep::Electron*)((*electronArr)[i]);
313 >        const mithep::Electron *const_ele = (mithep::Electron*)((*electronArr)[i]);
314 >        mithep::Electron *ele = const_cast<mithep::Electron*>(const_ele);
315 > //      if(ctrl.do_escale) correct_electron_energy(ele);
316 > //      if(ctrl.do_eregression) apply_electron_energy_regression(ele,puEnergyDensity->At(0)->RhoKt6PFJets(),vtxArr->GetEntries());
317  
318          SelectionStatus elesel;
319          if( ctrl.debug ) cout << endl;
320          if( ctrl.debug ) cout << "--> status before anything: " << hex << elesel.getStatus() << dec << endl;
321  
322 +        elesel |= (*ElectronIDSelector)(ctrl,ele,vtx);
323 +        if( ctrl.debug ) cout << "--> status after ID: " << hex << elesel.getStatus() << dec << endl;
324 +        if( ctrl.debug ) cout << endl;
325 +
326 +        ElectronMomentumCorrection electron_momentum_correction;
327 +        electron_momentum_correction.correct_electron_momentum(ctrl, ele,puEnergyDensity->At(0)->Rho(),vtxArr->GetEntries());
328 +
329          elesel |= (*ElectronPreSelector)(ctrl,ele,vtx);
330          if( ctrl.debug ) cout << "--> status after presel: " << hex << elesel.getStatus() << dec << endl;
331          if( !(elesel.getStatus() & SelectionStatus::PRESELECTION) ) continue;
332          if( ctrl.debug ) cout << endl;
333  
329        elesel |= (*ElectronIDSelector)(ctrl,ele,vtx);
330        if( ctrl.debug ) cout << "--> status after ID: " << hex << elesel.getStatus() << dec << endl;
331        if( ctrl.debug ) cout << endl;
334  
335        if( !(ctrl.doFSR) ) {
336          elesel |= (*ElectronIsoSelector)(ctrl,ele,vtx,pfCandidates,puEnergyDensity,eraEle,photonsToVeto);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines