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

Comparing UserCode/MitHzz4l/Selection/src/SelectionZ4L.cc (file contents):
Revision 1.3 by anlevin, Fri Feb 17 15:19:16 2012 UTC vs.
Revision 1.4 by anlevin, Wed Feb 29 09:43:13 2012 UTC

# Line 37 | Line 37 | EventData apply_Z4L_selection(ControlFla
37    EventData ret;
38    unsigned evtfail = 0x0;
39    TRandom3 r;
40 <  
40 >        
41    if( ctrl.debug ) {
42      cout << "Run: " << info->runNum
43           << "\tEvt: " << info->evtNum
# Line 79 | Line 79 | EventData apply_Z4L_selection(ControlFla
79    // Lepton Selection
80    //********************************************************
81    vector<SimpleLepton> lepvec;
82 <  
82 >        
83    //    
84    if( ctrl.debug ) cout << "\tnMuons: " << muonArr->GetEntries() << endl;
85    //----------------------------------------------------
# Line 104 | Line 104 | EventData apply_Z4L_selection(ControlFla
104        }
105        
106        if ( musel.passID() ) {
107
107          SimpleLepton tmplep;
108          float pt = mu->pt;
109          tmplep.vecorig->SetPtEtaPhiM(pt,
# Line 135 | Line 134 | EventData apply_Z4L_selection(ControlFla
134          tmplep.ip3dSig = mu->ip3dSig;
135          tmplep.is4l    = false;
136          tmplep.isEB    = (fabs(mu->eta) < 1.479 ? 1 : 0 );
137 <        tmplep.isTight = musel.tight();
138 <        tmplep.isLoose = musel.loose();
137 >        tmplep.isTight = musel.tightID();
138 >        tmplep.isLoose = musel.looseID();
139          lepvec.push_back(tmplep);
140          if( ctrl.debug ) { cout << "muon passes ... " << endl;}
141        }
# Line 156 | Line 155 | EventData apply_Z4L_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 ( lepvec[k].isLoose && lepvec[k].type == 13 && lepvec[k].vec->Vect().DrEtaPhi(tmplep) < 0.05 ) {
159              if( ctrl.debug ) cout << "-----> isMuonOverlap! " << endl;
160              isMuonOverlap = kTRUE;
161              break;
# Line 179 | Line 178 | EventData apply_Z4L_selection(ControlFla
178                 << endl;
179          }
180  
181 <        if ( elesel.passID() && !isMuonOverlap )
181 >        if ( elesel.passIDAndPre() && !isMuonOverlap )
182            {
183              SimpleLepton tmplep;
184 <            
184 >          
185 >                        
186              float pt = ele->pt;
187 +                        
188              tmplep.vecorig->SetPtEtaPhiM( pt,
189                                            ele->eta,
190                                            ele->phi,
# Line 224 | Line 225 | EventData apply_Z4L_selection(ControlFla
225            }
226        }
227      
227    
228      //********************************************************
229      // Dump Stuff
230      //********************************************************
# Line 243 | Line 243 | EventData apply_Z4L_selection(ControlFla
243             << "\tnmuon: " << nmu
244             << "\tnelectron: " << nele
245             << endl;
246 <    }
247 <    
248 <    
246 >    }
247 >        
248      //******************************************************************************
249      // Z1 Selection
250      //******************************************************************************
# Line 309 | Line 308 | EventData apply_Z4L_selection(ControlFla
308      TLorentzVector Z1LeptonMinus = *(lepvec[Z1LeptonMinusIndex].vec);
309      TLorentzVector Z1Candidate   =  Z1LeptonPlus + Z1LeptonMinus;
310      
312    
311      //******************************************************************************
312      // Z1 + l
313      //******************************************************************************
# Line 368 | Line 366 | EventData apply_Z4L_selection(ControlFla
366            continue; //require same flavor
367          }
368          
371        
369          //Make Z2 hypothesis
370          TLorentzVector *leptonPlus, *leptonMinus;
371          
# Line 386 | Line 383 | EventData apply_Z4L_selection(ControlFla
383          if( ctrl.debug ) cout << "dilepton.M() : " << dilepton.M() << endl;
384          if( ctrl.debug ) cout << "fourLepton.M() : " << fourLepton.M() << endl;
385          
386 <        if (!(dilepton.M() > 12.0)) continue;
387 <        if (!(fourLepton.M() > 100.0)) continue;
386 >        if (!(dilepton.M() > 2.0)) continue;
387 >        if (!(fourLepton.M() > 60.0)) continue;
388          
389          //for 4e and 4mu, require at least 1 of the other opp sign lepton pairs have mass > 12
390          if (fabs(lepvec[i].type) == fabs(lepvec[Z1LeptonPlusIndex].type)) {
391            TLorentzVector pair1 = Z1LeptonPlus + *leptonMinus;
392            TLorentzVector pair2 = Z1LeptonMinus + *leptonPlus;
393            if( ctrl.debug ) cout << "pair1: " << pair1.M() << "\tpair2: "<< pair2.M() << endl;
394 <          if (!(pair1.M() > 12 || pair2.M() > 12)) continue;
394 >          if (!(pair1.M() > 2 && pair2.M() > 2)) continue;
395          }
396 <      
396 >  
397 >          
398        
399          //Disambiguiation is done by choosing the pair with the largest ptMax and largest ptMin
400          if (Z2LeptonPlusIndex < 0) {
# Line 464 | Line 462 | EventData apply_Z4L_selection(ControlFla
462      lepvec[Z2LeptonPlusIndex].is4l = true;
463      lepvec[Z2LeptonMinusIndex].is4l = true;
464  
465 +                
466    
467      //***************************************************************
468      // remaining cuts :  kinematic & iso
# Line 474 | Line 473 | EventData apply_Z4L_selection(ControlFla
473        return ret;
474      }
475  
476 <    double Z2massCut=0;
478 <    if      ( ctrl.kinematics == "loose" ) Z2massCut = 12;
479 <    else if ( ctrl.kinematics == "tight" ) Z2massCut = 20;
480 <    else { cout <<  "error! kinematic tightness not defined!" << endl; assert(0); }
476 >    double Z2massCut= 2;
477    
478 <    if ( Z1Candidate.M() > 120        ||
478 >   if ( Z1Candidate.M() > 120        ||
479           Z2Candidate.M() < Z2massCut  ||
480           Z2Candidate.M() > 120        ||
481           !(lepvec[Z1LeptonPlusIndex].vec->Pt() > 20.0 || lepvec[Z1LeptonMinusIndex].vec->Pt() > 20.0) ||
# Line 525 | Line 521 | EventData apply_Z4L_selection(ControlFla
521        ret.Z2leptons.push_back(lepvec[Z2LeptonMinusIndex]);
522        ret.Z2leptons.push_back(lepvec[Z2LeptonPlusIndex]);
523      }
524 +                
525 +                
526  
527      return ret;
528   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines