157 |
|
// Cuts only for pt<20 region and kVBTFWorkingPoint80LowPtId |
158 |
|
if(ele->Pt() < 20 && idType == kVBTFWorkingPoint80LowPtId) { |
159 |
|
Bool_t isGoodLowPtEl = fBrem > 0.15 || |
160 |
< |
(ele->AbsEta() < 1.0 && eOverP > 0.95 && |
161 |
< |
TMath::Abs(ele->Charge()*ele->DeltaPhiSuperClusterTrackAtVtx()) < 0.006); |
160 |
> |
(ele->AbsEta() < 1.0 && eOverP > 0.95); |
161 |
|
if(!isGoodLowPtEl) return kFALSE; |
162 |
|
} |
163 |
|
|
307 |
|
} |
308 |
|
|
309 |
|
//-------------------------------------------------------------------------------------------------- |
310 |
< |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut) |
310 |
> |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut, Int_t nVertex) |
311 |
|
{ |
312 |
|
Bool_t d0cut = kFALSE; |
313 |
< |
// d0 cut |
314 |
< |
Double_t d0_real = 99999; |
315 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
316 |
< |
if(vertices->At(i0)->NTracks() > 0){ |
317 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
318 |
< |
d0_real = TMath::Abs(pD0); |
319 |
< |
break; |
313 |
> |
|
314 |
> |
Double_t d0_real = 1e30; |
315 |
> |
if(nVertex >= 0) d0_real = TMath::Abs(ele->GsfTrk()->D0Corrected(*vertices->At(nVertex))); |
316 |
> |
else { |
317 |
> |
Double_t distVtx = 999.0; |
318 |
> |
Int_t closestVtx = 0; |
319 |
> |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
320 |
> |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
321 |
> |
if(dz < distVtx) { |
322 |
> |
distVtx = dz; |
323 |
> |
closestVtx = nv; |
324 |
> |
} |
325 |
|
} |
326 |
+ |
d0_real = TMath::Abs(ele->GsfTrk()->D0Corrected(*vertices->At(closestVtx))); |
327 |
|
} |
328 |
|
if(d0_real < fD0Cut) d0cut = kTRUE; |
329 |
|
|
346 |
|
} |
347 |
|
|
348 |
|
//-------------------------------------------------------------------------------------------------- |
349 |
+ |
Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut) |
350 |
+ |
{ |
351 |
+ |
Bool_t dzcut = kFALSE; |
352 |
+ |
|
353 |
+ |
Double_t distVtx = 999.0; |
354 |
+ |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
355 |
+ |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
356 |
+ |
if(dz < distVtx) { |
357 |
+ |
distVtx = dz; |
358 |
+ |
} |
359 |
+ |
} |
360 |
+ |
if(distVtx < fDZCut) dzcut = kTRUE; |
361 |
+ |
|
362 |
+ |
return dzcut; |
363 |
+ |
} |
364 |
+ |
|
365 |
+ |
//-------------------------------------------------------------------------------------------------- |
366 |
|
Bool_t ElectronTools::PassChargeFilter(const Electron *ele) |
367 |
|
{ |
368 |
|
Bool_t passChargeFilter = kTRUE; |