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.1 by khahn, Tue Feb 14 01:30:21 2012 UTC vs.
Revision 1.2 by khahn, Tue Feb 14 21:29:18 2012 UTC

# Line 54 | Line 54 | EventData apply_EMU_selection(ControlFla
54    //********************************************************
55    // Trigger
56    //********************************************************
57 <  if( !ctrl.mc ) {
58 <    //if( !(passHLT(info->triggerBits, info->runNum, channel) )  ) {
59 < //     if( !(passHLT(info->triggerBits, info->runNum, 999) )  ) {
57 > //   if( !ctrl.mc ) {
58 > //     if( !(passHLTSingleMuon(info->triggerBits) )  ) {
59   //       if( ctrl.debug ) cout << "\tfails trigger" << endl;
60   //       evtfail |= (1<<EVTFAIL_TRIGGER);
61   //       ret.status.setStatus(0);
62   //       return ret;
63   //     }        
64 <  }
64 > //   }
65    if( ctrl.debug ) {
66      cout << "presel nlep: " << muonArr->GetEntries() + electronArr->GetEntries()
67           << "\tnmuon: "    << muonArr->GetEntries()
# Line 156 | Line 155 | EventData apply_EMU_selection(ControlFla
155          for (int k=0; k<lepvec.size(); ++k) {
156            TVector3 tmplep;
157            tmplep.SetPtEtaPhi(ele->pt, ele->eta, ele->phi);
158 <          if ( lepvec[k].isLoose && lepvec[k].type == 13 && lepvec[k].vec->Vect().DrEtaPhi(tmplep) < 0.1 ) {
158 >          if ( abs(lepvec[k].type == 13) && lepvec[k].vec->Vect().DrEtaPhi(tmplep) < 0.15 ) {
159              if( ctrl.debug ) cout << "-----> isMuonOverlap! " << endl;
160              isMuonOverlap = kTRUE;
161              break;
# Line 167 | Line 166 | EventData apply_EMU_selection(ControlFla
166          elesel |= (*ElectronPreSelector)(ctrl,ele);
167          elesel |= (*ElectronIDSelector)(ctrl,ele);
168          elesel |= (*ElectronIsoSelector)(ctrl,ele);
169 <        if( elesel.getStatus() == SelectionStatus::PRESELECTION )
169 >        if( elesel.getStatus() & SelectionStatus::PRESELECTION )
170            elesel.setStatus(SelectionStatus::LOOSESELECTION);
171  
172          if( ctrl.debug ){
# Line 250 | Line 249 | EventData apply_EMU_selection(ControlFla
249      // Selection
250      //******************************************************************************
251      float bestMass=-1; int best_mu_index=-1, best_ele_index=-1;
252 <    for(int i = 0; i < lepvec.size(); ++i) {      // get a tight muon
252 >    for(int i = 0; i<lepvec.size(); i++) {      // get a tight muon
253        if( abs(lepvec[i].type) != 13 ) continue;
254        if( !(lepvec[i].isTight) ) continue;
255 <      if( lepvec[i].vec->Pt() < 20 ) continue;
255 >      //      if( lepvec[i].vec->Pt() < 35 ) continue;
256        if( ctrl.debug ) cout << "got a muon, index: " << i << endl;
257  
258 <      for(int j = 0; j<lepvec.size(); ++j) {     // get a loose electron
258 >      for(int j = 0; j<lepvec.size(); j++) {     // get a loose electron
259          if( j == i ) continue;
260          if( abs(lepvec[j].type) != 11 ) continue;
261          if( !(lepvec[j].isLoose) ) continue;
262 <        //      if (lepvec[i].charge == lepvec[j].charge) continue;          
263 <        if (lepvec[i].charge != lepvec[j].charge) continue;          
262 >        if (lepvec[i].charge == lepvec[j].charge) continue;          
263 >        //      if (lepvec[i].charge != lepvec[j].charge) continue;          
264          if( ctrl.debug ) cout << "got a electron, index: " << j << endl;
265  
266          float tmpMass = ( *(lepvec[i].vec) + *(lepvec[j].vec) ).M();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines