35 |
|
{0.3, 0.92, 0.211, 0.0, 0.42, 0.88, 0.68, 0.0}, //eoverp |
36 |
|
{0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P |
37 |
|
|
38 |
+ |
Double_t VBTFWorkingPointFakeable[6][8] = { |
39 |
+ |
{0.12, 0.12, 0.12, 0.12, 0.10, 0.10, 0.10, 0.10 }, //hovere |
40 |
+ |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
41 |
+ |
{0.15, 0.15, 0.15, 0.15, 0.10, 0.10, 0.10, 0.10 }, //deltaphiin |
42 |
+ |
{0.007, 0.007, 0.007, 0.007, 0.009, 0.009, 0.009, 0.009 }, //deltaetain |
43 |
+ |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
44 |
+ |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
45 |
+ |
}; |
46 |
+ |
|
47 |
|
Double_t VBTFWorkingPoint95[6][8] = { |
48 |
|
{0.15, 0.15, 0.15, 0.15, 0.07, 0.07, 0.07, 0.07 }, //hovere |
49 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
89 |
|
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
90 |
|
}; |
91 |
|
|
92 |
+ |
Double_t VBTFWorkingPoint80NoHOverEE[6][8] = { |
93 |
+ |
{0.04, 0.04, 0.04, 0.04, 0.10, 0.10, 0.10, 0.10 }, //hovere |
94 |
+ |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
95 |
+ |
{0.06, 0.06, 0.06, 0.06, 0.03, 0.03, 0.03, 0.03 }, //deltaphiin |
96 |
+ |
{0.004, 0.004, 0.004, 0.004, 0.007, 0.007, 0.007, 0.007}, //deltaetain |
97 |
+ |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
98 |
+ |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
99 |
+ |
}; |
100 |
+ |
|
101 |
+ |
Double_t VBTFWorkingPoint70NoHOverEE[6][8] = { |
102 |
+ |
{0.025, 0.025, 0.025, 0.025, 0.10, 0.10, 0.10, 0.10 }, //hovere |
103 |
+ |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
104 |
+ |
{0.03, 0.03, 0.03, 0.03, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin |
105 |
+ |
{0.004, 0.004, 0.004, 0.004, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
106 |
+ |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
107 |
+ |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
108 |
+ |
}; |
109 |
+ |
|
110 |
|
switch (idType) { |
111 |
|
case kCustomIdTight: |
112 |
|
memcpy(fCuts,tightcuts,sizeof(fCuts)); |
114 |
|
case kCustomIdLoose: |
115 |
|
memcpy(fCuts,loosecuts,sizeof(fCuts)); |
116 |
|
break; |
117 |
+ |
case kVBTFWorkingPointFakeableId: |
118 |
+ |
memcpy(fCuts,VBTFWorkingPointFakeable,sizeof(fCuts)); |
119 |
+ |
break; |
120 |
|
case kVBTFWorkingPoint95Id: |
121 |
|
memcpy(fCuts,VBTFWorkingPoint95,sizeof(fCuts)); |
122 |
|
break; |
129 |
|
case kVBTFWorkingPoint80Id: |
130 |
|
memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts)); |
131 |
|
break; |
132 |
< |
case kVBTFWorkingPoint80LowPtId: |
133 |
< |
memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts)); |
132 |
> |
case kVBTFWorkingPointLowPtId: |
133 |
> |
if(ele->Pt() < 20) |
134 |
> |
memcpy(fCuts,VBTFWorkingPoint70NoHOverEE,sizeof(fCuts)); |
135 |
> |
else |
136 |
> |
memcpy(fCuts,VBTFWorkingPoint80NoHOverEE,sizeof(fCuts)); |
137 |
|
break; |
138 |
|
case kVBTFWorkingPoint70Id: |
139 |
|
memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts)); |
143 |
|
break; |
144 |
|
} |
145 |
|
|
113 |
– |
|
146 |
|
// Based on RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc. |
147 |
|
Double_t eOverP = ele->ESuperClusterOverP(); |
148 |
|
Double_t fBrem = ele->FBrem(); |
170 |
|
Int_t eb = 1; |
171 |
|
if (ele->IsEB()) |
172 |
|
eb = 0; |
173 |
< |
|
173 |
> |
|
174 |
|
if (hOverE>fCuts[0][cat+4*eb]) |
175 |
|
return kFALSE; |
176 |
|
|
186 |
|
if(eSeedOverPin<fCuts[4][cat+4*eb]) |
187 |
|
return kFALSE; |
188 |
|
|
189 |
< |
// Cuts only for pt<20 region and kVBTFWorkingPoint80LowPtId |
190 |
< |
if(ele->Pt() < 20 && idType == kVBTFWorkingPoint80LowPtId) { |
189 |
> |
// Cuts only for pt<20 region and kVBTFWorkingPointLowPtId |
190 |
> |
if(ele->Pt() < 20 && idType == kVBTFWorkingPointLowPtId) { |
191 |
|
Bool_t isGoodLowPtEl = fBrem > 0.15 || |
192 |
< |
(ele->AbsEta() < 1.0 && eOverP > 0.95); |
192 |
> |
(ele->SCluster()->AbsEta() < 1.0 && eOverP > 0.95); |
193 |
|
if(!isGoodLowPtEl) return kFALSE; |
194 |
|
} |
195 |
|
|
294 |
|
Double_t probMin, |
295 |
|
Double_t lxyMin, |
296 |
|
Bool_t matchCkf, |
297 |
< |
Bool_t requireArbitratedMerged) |
297 |
> |
Bool_t requireArbitratedMerged, |
298 |
> |
Double_t trkptMin) |
299 |
|
{ |
300 |
|
Bool_t isGoodConversion = kFALSE; |
301 |
|
|
321 |
|
const Track *trk = dynamic_cast<const ChargedParticle*> |
322 |
|
(conversions->At(ifc)->Daughter(d))->Trk(); |
323 |
|
if (trk) { |
324 |
+ |
if (trk->Pt()<trkptMin) isGoodConversion = kFALSE; |
325 |
|
const StableData *sd = dynamic_cast<const StableData*> |
326 |
|
(conversions->At(ifc)->DaughterDat(d)); |
327 |
|
if (sd->NWrongHits() > nWrongHitsMax) |
380 |
|
} |
381 |
|
|
382 |
|
//-------------------------------------------------------------------------------------------------- |
383 |
< |
Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut) |
383 |
> |
Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut, Int_t nVertex) |
384 |
|
{ |
385 |
|
Bool_t dzcut = kFALSE; |
386 |
|
|
387 |
|
Double_t distVtx = 999.0; |
388 |
< |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
389 |
< |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
390 |
< |
if(dz < distVtx) { |
391 |
< |
distVtx = dz; |
388 |
> |
if(nVertex >= 0) distVtx = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nVertex))); |
389 |
> |
else { |
390 |
> |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
391 |
> |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
392 |
> |
if(dz < distVtx) { |
393 |
> |
distVtx = dz; |
394 |
> |
} |
395 |
|
} |
396 |
|
} |
397 |
+ |
|
398 |
|
if(distVtx < fDZCut) dzcut = kTRUE; |
399 |
|
|
400 |
|
return dzcut; |