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

Comparing UserCode/MitHzz4l/NonMCBackground/src/SelectionEMU.cc (file contents):
Revision 1.9 by dkralph, Mon Jun 25 18:08:04 2012 UTC vs.
Revision 1.10 by dkralph, Fri Jul 6 15:01:28 2012 UTC

# Line 42 | Line 42 | EventData apply_HZZ4L_EMU_selection(Cont
42                                      const mithep::Array<mithep::Vertex>       * vtxArr ,
43                                      const mithep::Array<mithep::PFCandidate>  *pfCandidates,
44                                      const mithep::Array<mithep::PileupEnergyDensity>  *puEnergyDensity,
45 +                                    const mithep::DecayParticleCol *fConversions,
46                                      const mithep::Array<mithep::Electron> *electronArr,    // input electrons
47                                      SelectionStatus (*ElectronPreSelector)( ControlFlags &,
48                                                                              const mithep::Electron*,
# Line 157 | Line 158 | EventData apply_HZZ4L_EMU_selection(Cont
158  
159        tmplep.status  = musel;    
160        tmplep.fsrRecoveryAttempted = false;
161 <      SelectionStatus tmpstat = PassWwMuonSel(mu,vtx,pfCandidates);
161 <      tmplep.tightCutsApplied = tmpstat.tight();
161 >      tmplep.tightCutsApplied = muon2012CutBasedIDTight(ctrl,mu,vtx,pfCandidates,puEnergyDensity,eraMu);
162        lepvec.push_back(tmplep);
163        if( ctrl.debug ) cout << endl;
164      }
# Line 171 | Line 171 | EventData apply_HZZ4L_EMU_selection(Cont
171  
172          SelectionStatus denomSel;
173          denomSel |= electronPreSelectionNoD0DzIP(ctrl,ele,vtx);
174 <        if( !(denomSel.getStatus() & SelectionStatus::PRESELECTION) ) continue;
174 >        if( !denomSel.passPre() ) continue;
175          
176          SelectionStatus elesel;
177          elesel |= (*ElectronPreSelector)(ctrl,ele,vtx);
# Line 211 | Line 211 | EventData apply_HZZ4L_EMU_selection(Cont
211          tmplep.idMVA   = elesel.idMVA;
212          tmplep.isoMVA  = elesel.isoMVA;
213          tmplep.fsrRecoveryAttempted = false;
214 <        SelectionStatus tmpstat = electronTagSelection(ele,vtx,pfCandidates);
215 <        tmplep.tightCutsApplied   = tmpstat.tight();
214 >        tmplep.tightCutsApplied = electron2012CutBasedIDMedium(ctrl,ele,vtx,pfCandidates,fConversions,puEnergyDensity,eraEle);
215          lepvec.push_back(tmplep);
216          if( ctrl.debug ) cout << endl;
217        }
# Line 249 | Line 248 | EventData apply_HZZ4L_EMU_selection(Cont
248      //********************************************************
249      // Step 3: Good Leptons
250      //********************************************************
252    vector<double> pt_of_leptons_to_erase;
251      for (int i=0; i<lepvec.size(); i++ ) {
254      bool already_pushed=false;
252        if( !(lepvec[i].status.loose()) ) {
253 <        pt_of_leptons_to_erase.push_back(lepvec[i].vec.Pt());
257 <        already_pushed = true;
258 <        failingLeptons.push_back(lepvec[i]); // these should pass preselection
253 >        failingLeptons.push_back(lepvec[i]);
254        } else {
255          passingLeptons.push_back(lepvec[i]);
256        }
262 #ifndef SYNC
263      if( !already_pushed && fabs(lepvec[i].ip3dSig)>4 )  
264        pt_of_leptons_to_erase.push_back(lepvec[i].vec.Pt());
265 #endif      
266    }
267    for( int i=0; i<pt_of_leptons_to_erase.size(); i++ ) {
268      for( vector<SimpleLepton>::iterator it=lepvec.begin(); it != lepvec.end(); it++ ) {
269        SimpleLepton flep = *it;
270        if( flep.vec.Pt() != pt_of_leptons_to_erase[i] ) continue;
271        lepvec.erase(it);
272        break;
273      }
257      }
258  
259      //******************************************************************************

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines