ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/ElectronIDMod.cc
Revision: 1.54
Committed: Fri Apr 9 22:51:57 2010 UTC (15 years, 1 month ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.53: +18 -20 lines
Log Message:
fixed 3 bugs

File Contents

# User Rev Content
1 ceballos 1.54 // $Id: ElectronIDMod.cc,v 1.53 2010/04/07 12:53:32 sixie Exp $
2 loizides 1.1
3     #include "MitPhysics/Mods/interface/ElectronIDMod.h"
4 loizides 1.26 #include "MitAna/DataTree/interface/StableData.h"
5     #include "MitAna/DataTree/interface/ElectronCol.h"
6     #include "MitAna/DataTree/interface/VertexCol.h"
7     #include "MitAna/DataTree/interface/DecayParticleCol.h"
8 loizides 1.5 #include "MitPhysics/Init/interface/ModNames.h"
9 loizides 1.1
10     using namespace mithep;
11    
12     ClassImp(mithep::ElectronIDMod)
13    
14     //--------------------------------------------------------------------------------------------------
15 loizides 1.5 ElectronIDMod::ElectronIDMod(const char *name, const char *title) :
16 loizides 1.1 BaseMod(name,title),
17 loizides 1.5 fElectronBranchName(Names::gkElectronBrn),
18 ceballos 1.12 fConversionBranchName(Names::gkMvfConversionBrn),
19 loizides 1.5 fGoodElectronsName(ModNames::gkGoodElectronsName),
20 ceballos 1.54 fVertexName(string("PrimaryVertexes").c_str()),
21 ceballos 1.31 fElectronIDType("CustomTight"),
22 ceballos 1.8 fElectronIsoType("TrackJuraSliding"),
23 loizides 1.1 fElectronPtMin(10),
24     fIDLikelihoodCut(0.9),
25     fTrackIsolationCut(5.0),
26     fCaloIsolationCut(5.0),
27 loizides 1.5 fEcalJuraIsoCut(5.0),
28     fHcalIsolationCut(5.0),
29 ceballos 1.49 fCombIsolationCut(5.0),
30 loizides 1.14 fApplyConvFilter(kTRUE),
31 bendavid 1.38 fWrongHitsRequirement(kTRUE),
32 ceballos 1.18 fApplyD0Cut(kTRUE),
33 ceballos 1.45 fChargeFilter(kTRUE),
34 ceballos 1.54 fD0Cut(0.25),
35 loizides 1.25 fReverseIsoCut(kFALSE),
36     fReverseD0Cut(kFALSE),
37 loizides 1.5 fElIdType(kIdUndef),
38 ceballos 1.12 fElIsoType(kIsoUndef),
39 loizides 1.14 fElectrons(0),
40     fConversions(0),
41 loizides 1.25 fVertices(0)
42 loizides 1.1 {
43     // Constructor.
44     }
45    
46     //--------------------------------------------------------------------------------------------------
47 loizides 1.30 Bool_t ElectronIDMod::PassCustomID(const Electron *ele) const
48     {
49 loizides 1.32 // Based on RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc.
50 loizides 1.30 Double_t eOverP = ele->ESuperClusterOverP();
51     Double_t fBrem = ele->FBrem();
52    
53     if ((eOverP < fCuts[5][0]) && (fBrem < fCuts[5][1]))
54     return kFALSE;
55    
56     if (eOverP < fCuts[5][2]*(1-fBrem))
57     return kFALSE;
58    
59     Int_t cat = 2;
60     if ((ele->IsEB() && fBrem<0.06) || (ele->IsEE() && fBrem<0.1))
61     cat=1;
62     else if (eOverP < 1.2 && eOverP > 0.8)
63     cat=0;
64    
65     Double_t eSeedOverPin = ele->ESeedClusterOverPIn();
66     Double_t hOverE = ele->HadronicOverEm();
67     Double_t sigmaee = ele->CoviEtaiEta();
68     Double_t deltaPhiIn = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx());
69     Double_t deltaEtaIn = TMath::Abs(ele->DeltaEtaSuperClusterTrackAtVtx());
70    
71     Int_t eb = 1;
72     if (ele->IsEB())
73     eb = 0;
74    
75     if (hOverE>fCuts[0][cat+4*eb])
76     return kFALSE;
77    
78     if (sigmaee>fCuts[1][cat+4*eb])
79     return kFALSE;
80    
81 ceballos 1.40 if (deltaPhiIn>fCuts[2][cat+4*eb])
82     return kFALSE;
83 loizides 1.30
84     if(deltaEtaIn>fCuts[3][cat+4*eb])
85     return kFALSE;
86    
87     if(eSeedOverPin<fCuts[4][cat+4*eb])
88     return kFALSE;
89    
90     return kTRUE;
91     }
92    
93     //--------------------------------------------------------------------------------------------------
94 sixie 1.51 Bool_t ElectronIDMod::PassCustomIso(const Electron *ele) const
95     {
96     Bool_t pass = kTRUE;
97    
98     Double_t trkIso = ele->TrackIsolationDr03();
99     Double_t ecalIso = ele->EcalRecHitIsoDr04();
100     Double_t hcalIso = ele->HcalIsolation();
101     Double_t combinedIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04() - 1.5;
102    
103     Int_t eb = 1;
104     if (ele->IsEB())
105     eb = 0;
106    
107 ceballos 1.54 if (trkIso>fIsoCuts[0][eb])
108 sixie 1.51 pass = kFALSE;
109 ceballos 1.54 if (ecalIso>fIsoCuts[1][eb])
110 sixie 1.51 pass = kFALSE;
111 ceballos 1.54 if (hcalIso>fIsoCuts[2][eb])
112 sixie 1.51 pass = kFALSE;
113 ceballos 1.54 if (combinedIso>fIsoCuts[3][eb])
114 sixie 1.51 pass = kFALSE;
115    
116    
117     return pass;
118     }
119    
120    
121     //--------------------------------------------------------------------------------------------------
122 sixie 1.42 Bool_t ElectronIDMod::PassIDCut(const Electron *ele, EElIdType idType) const
123     {
124    
125     Bool_t idcut = kFALSE;
126     switch (idType) {
127     case kTight:
128     idcut = ele->PassTightID();
129     break;
130     case kLoose:
131     idcut = ele->PassLooseID();
132     break;
133     case kLikelihood:
134     idcut = (ele->IDLikelihood() > fIDLikelihoodCut);
135     break;
136     case kNoId:
137     idcut = kTRUE;
138     break;
139     case kCustomIdLoose:
140     idcut = ElectronIDMod::PassCustomID(ele);
141     break;
142     case kCustomIdTight:
143     idcut = ElectronIDMod::PassCustomID(ele);
144     break;
145 ceballos 1.54 case kVBTFWorkingPoint90Id:
146     idcut = ElectronIDMod::PassCustomID(ele);
147     break;
148     case kVBTFWorkingPoint80Id:
149     idcut = ElectronIDMod::PassCustomID(ele);
150     break;
151     case kVBTFWorkingPoint70Id:
152     idcut = ElectronIDMod::PassCustomID(ele);
153     break;
154 sixie 1.42 default:
155     break;
156     }
157    
158     return idcut;
159     }
160    
161    
162     //--------------------------------------------------------------------------------------------------
163     Bool_t ElectronIDMod::PassIsolationCut(const Electron *ele, EElIsoType isoType) const
164     {
165    
166     Bool_t isocut = kFALSE;
167     switch (isoType) {
168     case kTrackCalo:
169     isocut = (ele->TrackIsolationDr03() < fTrackIsolationCut) &&
170     (ele->CaloIsolation() < fCaloIsolationCut);
171     break;
172     case kTrackJura:
173     isocut = (ele->TrackIsolationDr03() < fTrackIsolationCut) &&
174     (ele->EcalRecHitIsoDr04() < fEcalJuraIsoCut) &&
175     (ele->HcalIsolation() < fHcalIsolationCut);
176     break;
177 ceballos 1.49 case kTrackJuraCombined:
178     isocut = (ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04()
179     - 1.5 < fCombIsolationCut);
180     break;
181 sixie 1.42 case kTrackJuraSliding:
182     {
183     Double_t totalIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04() - 1.5;
184     if (totalIso < (ele->Pt()-10.0)*4.5/20.0 ||
185     totalIso <= 0)
186     isocut = kTRUE;
187    
188     if (fReverseIsoCut == kTRUE &&
189     isocut == kFALSE && totalIso < 10)
190     isocut = kTRUE;
191     else if(fReverseIsoCut == kTRUE)
192     isocut = kFALSE;
193     }
194     break;
195 sixie 1.51 case kVBTFWorkingPoint90Iso:
196     isocut = ElectronIDMod::PassCustomIso(ele);
197     break;
198     case kVBTFWorkingPoint80Iso:
199     isocut = ElectronIDMod::PassCustomIso(ele);
200     break;
201     case kVBTFWorkingPoint70Iso:
202     isocut = ElectronIDMod::PassCustomIso(ele);
203     break;
204 sixie 1.42 case kNoIso:
205     isocut = kTRUE;
206     break;
207     case kCustomIso:
208     default:
209     break;
210     }
211    
212     return isocut;
213     }
214    
215    
216     //--------------------------------------------------------------------------------------------------
217     Bool_t ElectronIDMod::PassConversionFilter(const Electron *ele, const DecayParticleCol *conversions) const
218     {
219     Bool_t isGoodConversion = kFALSE;
220    
221     for (UInt_t ifc=0; ifc<conversions->GetEntries(); ifc++) {
222     Bool_t ConversionMatchFound = kFALSE;
223     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
224     const Track *trk = dynamic_cast<const ChargedParticle*>
225     (conversions->At(ifc)->Daughter(d))->Trk();
226     if (ele->GsfTrk() == trk) {
227     ConversionMatchFound = kTRUE;
228     break;
229     }
230     }
231 sixie 1.52
232 sixie 1.42 // if match between the e-track and one of the conversion legs
233     if (ConversionMatchFound == kTRUE){
234     isGoodConversion = (conversions->At(ifc)->Prob() > 1e-6) &&
235     (conversions->At(ifc)->Lxy() > 0) &&
236     (conversions->At(ifc)->Position().Rho() > 2.0);
237 sixie 1.52
238 sixie 1.42 if (isGoodConversion == kTRUE) {
239     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
240     const Track *trk = dynamic_cast<const ChargedParticle*>
241     (conversions->At(ifc)->Daughter(d))->Trk();
242     if (trk) {
243     // These requirements are not used for the GSF track
244     if (!(trk->NHits() >= 3 && trk->Prob() > 1e-6) && trk!=ele->GsfTrk())
245     isGoodConversion = kFALSE;
246     const StableData *sd = dynamic_cast<const StableData*>
247     (conversions->At(ifc)->DaughterDat(d));
248     if (fWrongHitsRequirement && sd->NWrongHits() != 0)
249     isGoodConversion = kFALSE;
250     } else {
251     isGoodConversion = kFALSE;
252     }
253     }
254     }
255     }
256     if (isGoodConversion == kTRUE) break;
257    
258     } // loop over all conversions
259 sixie 1.52
260 ceballos 1.46 return !isGoodConversion;
261 sixie 1.42 }
262    
263     //--------------------------------------------------------------------------------------------------
264     Bool_t ElectronIDMod::PassD0Cut(const Electron *ele, const VertexCol *vertices) const
265     {
266     Bool_t d0cut = kFALSE;
267     // d0 cut
268     Double_t d0_real = 99999;
269     for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) {
270     Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0));
271     if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0);
272     }
273     if(d0_real < fD0Cut) d0cut = kTRUE;
274    
275     if (fReverseD0Cut == kTRUE &&
276     d0cut == kFALSE && d0_real < 0.05)
277     d0cut = kTRUE;
278     else if(fReverseD0Cut == kTRUE)
279     d0cut = kFALSE;
280    
281     return d0cut;
282     }
283    
284     //--------------------------------------------------------------------------------------------------
285     Bool_t ElectronIDMod::PassChargeFilter(const Electron *ele) const
286     {
287     Bool_t passChargeFilter = kTRUE;
288     if(ele->TrackerTrk() &&
289     ele->TrackerTrk()->Charge() != ele->Charge()) passChargeFilter = kFALSE;
290    
291     return passChargeFilter;
292     }
293    
294     //--------------------------------------------------------------------------------------------------
295 sixie 1.51 Bool_t ElectronIDMod::PassSpikeRemovalFilter(const Electron *ele) const
296     {
297     Bool_t passSpikeRemovalFilter = kTRUE;
298     if(ele->SCluster()->Seed()->Energy() > 5.0 &&
299     ele->SCluster()->Seed()->EMax() / ele->SCluster()->Seed()->E3x3() > 0.95
300     ) {
301     passSpikeRemovalFilter = kFALSE;
302     }
303    
304     // For Now Only use the EMax/E3x3 prescription.
305     // if(ele->SCluster()->Seed()->Energy() > 5.0 &&
306     // (1 - (ele->SCluster()->Seed()->E1x3() + ele->SCluster()->Seed()->E3x1() - 2*ele->SCluster()->Seed()->EMax())) > 0.95
307     // ) {
308     // passSpikeRemovalFilter = kFALSE;
309     // }
310    
311     return passSpikeRemovalFilter;
312     }
313    
314     //--------------------------------------------------------------------------------------------------
315 loizides 1.1 void ElectronIDMod::Process()
316     {
317     // Process entries of the tree.
318    
319 loizides 1.23 LoadEventObject(fElectronBranchName, fElectrons);
320 loizides 1.1
321 loizides 1.6 ElectronOArr *GoodElectrons = new ElectronOArr;
322     GoodElectrons->SetName(fGoodElectronsName);
323 loizides 1.1
324 ceballos 1.18 for (UInt_t i=0; i<fElectrons->GetEntries(); ++i) {
325 loizides 1.5 const Electron *e = fElectrons->At(i);
326 loizides 1.1
327 loizides 1.5 if (e->Pt() <= fElectronPtMin)
328     continue;
329 loizides 1.1
330 sixie 1.42 //apply id cut
331     Bool_t idcut = PassIDCut(e, fElIdType);
332 loizides 1.5 if (!idcut)
333     continue;
334    
335 sixie 1.42 //apply Isolation Cut
336     Bool_t isocut = PassIsolationCut(e, fElIsoType);
337     if (!isocut)
338 loizides 1.5 continue;
339    
340 loizides 1.14 // apply conversion filter
341 ceballos 1.47 Bool_t passConvVeto = kFALSE;
342 loizides 1.14 if (fApplyConvFilter) {
343 sixie 1.42 LoadEventObject(fConversionBranchName, fConversions);
344 ceballos 1.47 passConvVeto = PassConversionFilter(e, fConversions);
345 sixie 1.48 } else {
346     passConvVeto = kTRUE;
347 ceballos 1.12 }
348 ceballos 1.47 if (passConvVeto == kFALSE) continue;
349 sixie 1.42
350     // apply d0 cut
351 ceballos 1.15 if (fApplyD0Cut) {
352 sixie 1.42 LoadEventObject(fVertexName, fVertices);
353 ceballos 1.46 Bool_t passD0cut = PassD0Cut(e, fVertices);
354 sixie 1.42 if (!passD0cut)
355 ceballos 1.24 continue;
356 ceballos 1.12 }
357    
358 sixie 1.42 //apply charge filter
359     if(fChargeFilter == kTRUE) {
360     Bool_t passChargeFilter = PassChargeFilter(e);
361     if (!passChargeFilter) continue;
362 ceballos 1.45 }
363    
364 loizides 1.5 // add good electron
365 ceballos 1.12 GoodElectrons->Add(e);
366 loizides 1.5 }
367 loizides 1.1
368 loizides 1.9 // sort according to pt
369     GoodElectrons->Sort();
370    
371 loizides 1.5 // add to event for other modules to use
372 loizides 1.6 AddObjThisEvt(GoodElectrons);
373 loizides 1.1 }
374    
375     //--------------------------------------------------------------------------------------------------
376     void ElectronIDMod::SlaveBegin()
377     {
378     // Run startup code on the computer (slave) doing the actual analysis. Here,
379 loizides 1.5 // we just request the electron collection branch.
380 loizides 1.1
381 loizides 1.23 ReqEventObject(fElectronBranchName, fElectrons, kTRUE);
382 loizides 1.17
383 ceballos 1.16 if (fApplyConvFilter)
384 loizides 1.23 ReqEventObject(fConversionBranchName, fConversions, kTRUE);
385 loizides 1.17
386 ceballos 1.15 if (fApplyD0Cut)
387 loizides 1.23 ReqEventObject(fVertexName, fVertices, kTRUE);
388 loizides 1.1
389 sixie 1.42 Setup();
390     }
391    
392     //--------------------------------------------------------------------------------------------------
393     void ElectronIDMod::Setup()
394     {
395     // Set all options properly before execution.
396    
397 loizides 1.5 if (fElectronIDType.CompareTo("Tight") == 0)
398     fElIdType = kTight;
399     else if (fElectronIDType.CompareTo("Loose") == 0)
400     fElIdType = kLoose;
401     else if (fElectronIDType.CompareTo("Likelihood") == 0)
402     fElIdType = kLikelihood;
403 loizides 1.10 else if (fElectronIDType.CompareTo("NoId") == 0)
404     fElIdType = kNoId;
405 sixie 1.42 else if (fElectronIDType.CompareTo("ZeeId") == 0)
406     fElIdType = kZeeId;
407 sixie 1.51 else if (fElectronIDType.CompareTo("CustomLoose") == 0)
408 peveraer 1.29 fElIdType = kCustomIdLoose;
409 sixie 1.51 else if (fElectronIDType.CompareTo("CustomTight") == 0)
410 peveraer 1.29 fElIdType = kCustomIdTight;
411 sixie 1.51 else if (fElectronIDType.CompareTo("VBTFWorkingPoint90Id") == 0)
412     fElIdType = kVBTFWorkingPoint90Id;
413     else if (fElectronIDType.CompareTo("VBTFWorkingPoint80Id") == 0)
414     fElIdType = kVBTFWorkingPoint80Id;
415     else if (fElectronIDType.CompareTo("VBTFWorkingPoint70Id") == 0)
416     fElIdType = kVBTFWorkingPoint70Id;
417    
418 peveraer 1.29 else {
419 loizides 1.5 SendError(kAbortAnalysis, "SlaveBegin",
420     "The specified electron identification %s is not defined.",
421     fElectronIDType.Data());
422     return;
423     }
424 sixie 1.51 SetCustomIDCuts(fElIdType);
425    
426 loizides 1.5 if (fElectronIsoType.CompareTo("TrackCalo") == 0 )
427     fElIsoType = kTrackCalo;
428     else if (fElectronIsoType.CompareTo("TrackJura") == 0)
429     fElIsoType = kTrackJura;
430 ceballos 1.49 else if(fElectronIsoType.CompareTo("TrackJuraCombined") == 0)
431     fElIsoType = kTrackJuraCombined;
432 loizides 1.5 else if(fElectronIsoType.CompareTo("TrackJuraSliding") == 0)
433     fElIsoType = kTrackJuraSliding;
434     else if (fElectronIsoType.CompareTo("NoIso") == 0 )
435     fElIsoType = kNoIso;
436 sixie 1.42 else if (fElectronIsoType.CompareTo("ZeeIso") == 0 )
437     fElIsoType = kZeeIso;
438 sixie 1.51 else if (fElectronIsoType.CompareTo("VBTFWorkingPoint90Iso") == 0 )
439     fElIsoType = kVBTFWorkingPoint90Iso;
440     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint80Iso") == 0 )
441     fElIsoType = kVBTFWorkingPoint80Iso;
442     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint70Iso") == 0 )
443     fElIsoType = kVBTFWorkingPoint70Iso;
444 loizides 1.5 else if (fElectronIsoType.CompareTo("Custom") == 0 ) {
445     fElIsoType = kCustomIso;
446     SendError(kWarning, "SlaveBegin",
447     "Custom electron isolation is not yet implemented.");
448     } else {
449     SendError(kAbortAnalysis, "SlaveBegin",
450     "The specified electron isolation %s is not defined.",
451     fElectronIsoType.Data());
452     return;
453     }
454 sixie 1.51 SetCustomIsoCuts(fElIsoType);
455    
456 sixie 1.42
457 loizides 1.1 }
458 loizides 1.30
459     //--------------------------------------------------------------------------------------------------
460     void ElectronIDMod::SetCustomIDCuts(EElIdType idt)
461     {
462 loizides 1.32 // Set cut values based on RecoEgamma/ElectronIdentification/python/electronIdCutBasedExt_cfi.py.
463     // The following changes are in sigmaetaeta for endcups and deltaetain.
464 loizides 1.30
465     Double_t tightcuts[6][8]={
466 ceballos 1.40 {0.086, 0.1, 0.052, 0.0, 0.050, 0.059, 0.061, 0.0}, //hovere
467 sixie 1.44 {0.011, 0.011, 0.011, 0.0, 0.033, 0.029, 0.030, 0.0}, //sigmaetaeta
468     {0.038, 0.024, 0.045, 0.0, 0.034, 0.017, 0.026, 0.0}, //deltaphiin
469     {0.0081, 0.0029, 0.0051, 0.0, 0.0070, 0.0062, 0.0088, 0.0}, //deltaetain
470 sixie 1.51 {0.0, 0.9, 0.0, 0.0, 0.0, 0.78, 0.0, 0.0}, //eoverp
471 ceballos 1.40 {0.8,0.2,0.9,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
472 loizides 1.30
473     Double_t loosecuts[6][8]={
474 loizides 1.39 {0.076, 0.033, 0.07, 0.0, 0.083,0.148, 0.033, 0.0}, //hovere
475     {0.0101, 0.0095, 0.0097, 0.0, 0.03, 0.03, 0.03, 0.0}, //sigmaetaeta
476     {0.053, 0.0189, 0.059, 0.099, 0.0278,0.0157, 0.042, 0.080}, //deltaphiin
477     {0.0078, 0.00259, 0.0062, 0.0, 0.0078,0.0061, 0.0061, 0.0}, //deltaetain
478     {0.3, 0.92, 0.211, 0.0, 0.42, 0.88, 0.68, 0.0}, //eoverp
479     {0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
480 loizides 1.30
481 sixie 1.51 Double_t VBTFWorkingPoint90[6][8] = {
482 sixie 1.53 {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025 }, //hovere
483     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta
484     {0.04, 0.04, 0.04, 0.04, 0.025, 0.025, 0.025, 0.025 }, //deltaphiin
485     {0.006, 0.006, 0.006, 0.006, 0.008, 0.008, 0.008, 0.008 }, //deltaetain
486     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp
487     {0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P
488 sixie 1.51 };
489    
490     Double_t VBTFWorkingPoint80[6][8] = {
491 sixie 1.53 {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025}, //hovere
492     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta
493     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin
494     {0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006}, //deltaetain
495     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp
496     {0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P
497 sixie 1.51 };
498    
499     Double_t VBTFWorkingPoint70[6][8] = {
500 sixie 1.53 {0.02, 0.02, 0.02, 0.02, 0.025, 0.025, 0.025, 0.025}, //hovere
501     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta
502     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin
503     {0.006, 0.006, 0.006, 0.006, 0.003, 0.003, 0.003, 0.003}, //deltaetain
504     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp
505     {0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P
506 sixie 1.51 };
507 sixie 1.42
508 loizides 1.30 switch (idt) {
509     case kCustomIdTight:
510     memcpy(fCuts,tightcuts,sizeof(fCuts));
511     break;
512     case kCustomIdLoose:
513     memcpy(fCuts,loosecuts,sizeof(fCuts));
514     break;
515 sixie 1.51 case kVBTFWorkingPoint90Id:
516     memcpy(fCuts,VBTFWorkingPoint90,sizeof(fCuts));
517     break;
518     case kVBTFWorkingPoint80Id:
519     memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts));
520     break;
521     case kVBTFWorkingPoint70Id:
522     memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts));
523     break;
524 loizides 1.30 default:
525     memset(fCuts,0,sizeof(fCuts));
526     break;
527     }
528     }
529 sixie 1.51
530     //--------------------------------------------------------------------------------------------------
531     void ElectronIDMod::SetCustomIsoCuts(EElIsoType idt)
532     {
533    
534     //From Georgios Daskalakis email:
535     // WP90 (90%) ======= EB -- track_iso 5.0 GeV ecal_iso 5.0 GeV hcal_iso 5.0 GeV sihih 0.012 Dphi@vtx 0.04 Deta@vtx 0.007 H/E 0.05
536     // EE -- track_iso 5.0 GeV ecal_iso 5.0 GeV hcal_iso 5.0 GeV sihih 0.03 Dphi@vtx 0.04 Deta@vtx 0.007 H/E 0.05
537     // WP80 (80%) ======= EB -- track_iso 3.0 GeV ecal_iso 4.0 GeV hcal_iso 5.0 GeV sihih 0.01 Dphi@vtx 0.02 Deta@vtx 0.006 H/E 0.05
538     // EE -- track_iso 1.5 GeV ecal_iso 2.5 GeV hcal_iso 0.7 GeV sihih 0.03 Dphi@vtx 0.02 Deta@vtx 0.006 H/E 0.025
539     // WP70 (70%) ======= EB -- track_iso 2.5 GeV ecal_iso 3.0 GeV hcal_iso 5.0 GeV sihih 0.01 Dphi@vtx 0.02 Deta@vtx 0.006 H/E 0.02
540     // EE -- track_iso 0.8 GeV ecal_iso 2.5 GeV hcal_iso 0.25 GeV sihih 0.03 Dphi@vtx 0.02 Deta@vtx 0.003 H/E 0.0025
541    
542     Double_t VBTFWorkingPoint90[6][2] = {
543 sixie 1.53 {6.0 , 6.0 }, //TrkIso
544     {5.0 , 2.5 }, //ECALIso
545     {5.0 , 1.5 }, //HCALIso
546 sixie 1.51 {9999, 9999 } //Combined
547     };
548    
549 ceballos 1.54 Double_t VBTFWorkingPoint80[6][2] = {
550 sixie 1.51 {3.0 , 1.5 }, //TrkIso
551     {4.0 , 2.5 }, //ECALIso
552     {5.0 , 0.7 }, //HCALIso
553     {9999, 9999 } //Combined
554     };
555    
556 ceballos 1.54 Double_t VBTFWorkingPoint70[6][2] = {
557 sixie 1.51 {2.5 , 0.8 }, //TrkIso
558     {3.0 , 2.5 }, //ECALIso
559     {5.0 , 0.25 }, //HCALIso
560     {9999, 9999 } //Combined
561     };
562    
563     switch (idt) {
564     case kVBTFWorkingPoint90Iso:
565 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint90,sizeof(fIsoCuts));
566 sixie 1.51 break;
567     case kVBTFWorkingPoint80Iso:
568 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint80,sizeof(fIsoCuts));
569 sixie 1.51 break;
570     case kVBTFWorkingPoint70Iso:
571 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint70,sizeof(fIsoCuts));
572 sixie 1.51 break;
573     default:
574 sixie 1.52 memset(fIsoCuts,0,sizeof(fIsoCuts));
575 sixie 1.51 break;
576     }
577     }