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

Comparing UserCode/MitHzz4l/Selection/src/Selection.cc (file contents):
Revision 1.16 by khahn, Mon Nov 7 05:28:06 2011 UTC vs.
Revision 1.17 by khahn, Mon Nov 7 06:53:01 2011 UTC

# Line 184 | Line 184 | unsigned fails_HZZ4L_selection(ControlFl
184             << "\tmask: 0x" << hex << muonfail << dec
185             << endl;
186      }
187 +
188 + #ifdef Z2FO
189 +    if ( isMuFO(mu) ) {
190 + #else
191      if ( !muonfail ) {
192 + #endif
193        SimpleLepton tmplep;
194  
195        float pt = mu->pt;
# Line 207 | Line 212 | unsigned fails_HZZ4L_selection(ControlFl
212        tmplep.ip3dSig = mu->ip3dSig;
213        tmplep.is4l    = false;
214        tmplep.isEB    = (fabs(mu->eta) < 1.479 ? 1 : 0 );
215 +      tmplep.isTight = (muonfail > 0 ? 0 : 1 );
216 +      tmplep.isLoose = (muonfail > 0 ? 0 : 1 );
217        lepvec.push_back(tmplep);
218        if( ctrl.debug ) { cout << "muon passes ... " << endl;}
219      }
# Line 225 | Line 232 | unsigned fails_HZZ4L_selection(ControlFl
232      for (int k=0; k<lepvec.size(); ++k) {
233        TVector3 tmplep;
234        tmplep.SetPtEtaPhi(ele->pt, ele->eta, ele->phi);
235 <      if ( lepvec[k].type == 13 && lepvec[k].vec.Vect().DrEtaPhi(tmplep) < 0.1 ) {
235 >      if ( lepvec[k].isLoose && lepvec[k].type == 13 && lepvec[k].vec.Vect().DrEtaPhi(tmplep) < 0.1 ) {
236          if( ctrl.debug ) cout << "-----> isMuonOverlap! " << endl;
237          isMuonOverlap = kTRUE;
238          break;
239        }
240      }
241  
242 <    unsigned FAIL=0, isEleTight=0;
242 >    unsigned FAIL=0, isEleTight=0, isEleLoose=0;
243  
244      unsigned  failsCIC=0;
245      CICStruct ciccuts_tight, ciccuts_medium, ciccuts_loose;
# Line 267 | Line 274 | unsigned fails_HZZ4L_selection(ControlFl
274          unsigned failsBDTLoose  = failsBDTSelection(ctrl,"loose",ele);
275          failsBDT = ( failsBDTLoose > 0 && failsBDTMedium > 0 );
276          if( !failsBDTMedium ) isEleTight=1;
277 +        if( !failsBDTLoose ) isEleLoose=1;
278        } else {
279          failsBDT = failsBDTSelection(ctrl,"tight",ele);
280          if( !failsBDT ) isEleTight=1;
# Line 361 | Line 369 | unsigned fails_HZZ4L_selection(ControlFl
369    double BestZ1Mass = -999;
370    if( ctrl.debug ) { cout << "looking for a Z1 ..." << endl; }
371    for(int i = 0; i < lepvec.size(); ++i) {
372 +    if( !(lepvec[i].isLoose ) ) continue;
373      for(int j = i+1; j < lepvec.size(); ++j) {
374 +      if( !(lepvec[j].isLoose ) ) continue;
375        if( ctrl.debug ) { cout << "\tconsidering leptons " << i << " & " << j << endl; }
376        if (!(lepvec[i].vec.Pt() > 20.0 || lepvec[j].vec.Pt() > 20.0)) continue;
377        if( ctrl.debug ) { cout << "\tat least one is > 20 GeV" << endl; }
# Line 433 | Line 443 | unsigned fails_HZZ4L_selection(ControlFl
443    Double_t BestZ2Mass = -1;
444    if( ctrl.debug ) cout << "looking for a Z2 ... out of " << lepvec.size() << " leptons" <<endl;
445    for(int i = 0; i < lepvec.size(); ++i) {
446 <    if( abs(lepvec[i].type) == 11 &&
447 <        ctrl.eleSeleScheme == "mediumloose" &&
446 >
447 > #ifndef Z2FO
448 >    if( ctrl.eleSeleScheme == "mediumloose" &&
449          !(lepvec[i].isTight) ) continue;
450 + #endif
451  
452      for(int j = i+1; j < lepvec.size(); ++j) {
453 <      if( abs(lepvec[j].type) == 11 &&
454 <          ctrl.eleSeleScheme == "mediumloose" &&
453 >
454 > #ifndef Z2FO
455 >      if( ctrl.eleSeleScheme == "mediumloose" &&
456            !(lepvec[j].isTight) ) continue;
457 + #endif
458  
459        //            cout << "i: " << i << "\tj: " << j << endl;
460        if (i == Z1LeptonPlusIndex || i == Z1LeptonMinusIndex) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines