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

Comparing UserCode/MitPhysics/Utils/src/ElectronTools.cc (file contents):
Revision 1.37 by ceballos, Fri Apr 20 20:25:58 2012 UTC vs.
Revision 1.38 by fabstoec, Tue Apr 24 11:45:53 2012 UTC

# Line 359 | Line 359 | Bool_t ElectronTools::PassD0Cut(const El
359    Bool_t d0cut = kFALSE;
360  
361    Double_t d0_real = 1e30;
362 +
363 +  if( nVertex >= (int) vertices->GetEntries() )
364 +    nVertex = vertices->GetEntries() - 1;
365 +  
366    if(nVertex >= 0) d0_real = TMath::Abs(ele->GsfTrk()->D0Corrected(*vertices->At(nVertex)));
367    else            {
368      Double_t distVtx = 999.0;
# Line 398 | Line 402 | Bool_t ElectronTools::PassDZCut(const El
402    Bool_t dzcut = kFALSE;
403  
404    Double_t distVtx = 999.0;
405 +
406 +  if( nVertex >= (int) vertices->GetEntries() )
407 +    nVertex = vertices->GetEntries()-1;
408 +  
409    if(nVertex >= 0) distVtx = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nVertex)));
410    else {
411      for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){
# Line 407 | Line 415 | Bool_t ElectronTools::PassDZCut(const El
415        }
416      }
417    }
418 <
418 >  
419    if(distVtx < fDZCut) dzcut = kTRUE;
420    
421    return dzcut;
# Line 1432 | Line 1440 | Double_t ElectronTools::ElectronEffectiv
1440   }
1441  
1442  
1443 + Bool_t ElectronTools::PassHggLeptonTagID(const Electron* ele) {
1444 +  
1445 +  float dist = ( ele->ConvPartnerDist()      == -9999.? 9999:TMath::Abs(ele->ConvPartnerDist()));
1446 +  float dcot = ( ele->ConvPartnerDCotTheta() == -9999.? 9999:TMath::Abs(ele->ConvPartnerDCotTheta()));  
1447 +  
1448 +  if (dist < 0.02) return false;
1449 +  if (dcot < 0.02) return false;
1450 +
1451 +  int numInnerHits = ele->Trk()->NExpectedHitsInner();
1452 +  if( numInnerHits > 0 ) return false;
1453 +
1454 +  float coviEtaiEta = ele->CoviEtaiEta();
1455 +  if( ele->SCluster()->AbsEta() < 1.5 && coviEtaiEta > 0.01 ) return false;
1456 +  else if( ele->SCluster()->AbsEta() > 1.5 && coviEtaiEta > 0.031 ) return false;
1457 +
1458 +  Double_t deltaPhiIn   = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx());
1459 +  Double_t deltaEtaIn   = TMath::Abs(ele->DeltaEtaSuperClusterTrackAtVtx());
1460 +
1461 +  if( ele->SCluster()->AbsEta() < 1.5 && ( deltaPhiIn > 0.039 || deltaEtaIn > 0.005 ) ) return false;
1462 +  else if ( ele->SCluster()->AbsEta() > 1.5 && ( deltaPhiIn > 0.028 || deltaEtaIn > 0.007 ) ) return false;
1463 +
1464 +  return true;
1465 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines