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; |
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++){ |
415 |
|
} |
416 |
|
} |
417 |
|
} |
418 |
< |
|
418 |
> |
|
419 |
|
if(distVtx < fDZCut) dzcut = kTRUE; |
420 |
|
|
421 |
|
return dzcut; |
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 |
+ |
} |