ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/ElectronIDMod.cc
Revision: 1.51
Committed: Wed Apr 7 06:57:10 2010 UTC (15 years, 1 month ago) by sixie
Content type: text/plain
Branch: MAIN
Changes since 1.50: +171 -21 lines
Log Message:
recommended electron cuts from VBTF

File Contents

# User Rev Content
1 sixie 1.51 // $Id: ElectronIDMod.cc,v 1.50 2010/03/28 15:58:53 bendavid 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.12 fVertexName(string("PrimaryVertexesBeamSpot").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 loizides 1.14 fD0Cut(0.025),
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 sixie 1.51
91 loizides 1.30 return kTRUE;
92     }
93    
94     //--------------------------------------------------------------------------------------------------
95 sixie 1.51 Bool_t ElectronIDMod::PassCustomIso(const Electron *ele) const
96     {
97     Bool_t pass = kTRUE;
98    
99     Double_t trkIso = ele->TrackIsolationDr03();
100     Double_t ecalIso = ele->EcalRecHitIsoDr04();
101     Double_t hcalIso = ele->HcalIsolation();
102     Double_t combinedIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04() - 1.5;
103    
104     Int_t eb = 1;
105     if (ele->IsEB())
106     eb = 0;
107    
108     if (trkIso>fCuts[0][eb])
109     pass = kFALSE;
110     if (ecalIso>fCuts[1][eb])
111     pass = kFALSE;
112     if (hcalIso>fCuts[2][eb])
113     pass = kFALSE;
114     if (combinedIso>fCuts[3][eb])
115     pass = kFALSE;
116    
117    
118     return pass;
119     }
120    
121    
122     //--------------------------------------------------------------------------------------------------
123 sixie 1.42 Bool_t ElectronIDMod::PassIDCut(const Electron *ele, EElIdType idType) const
124     {
125    
126     Bool_t idcut = kFALSE;
127     switch (idType) {
128     case kTight:
129     idcut = ele->PassTightID();
130     break;
131     case kLoose:
132     idcut = ele->PassLooseID();
133     break;
134     case kLikelihood:
135     idcut = (ele->IDLikelihood() > fIDLikelihoodCut);
136     break;
137     case kNoId:
138     idcut = kTRUE;
139     break;
140     case kCustomIdLoose:
141     idcut = ElectronIDMod::PassCustomID(ele);
142     break;
143     case kCustomIdTight:
144     idcut = ElectronIDMod::PassCustomID(ele);
145     break;
146     default:
147     break;
148     }
149    
150     return idcut;
151     }
152    
153    
154     //--------------------------------------------------------------------------------------------------
155     Bool_t ElectronIDMod::PassIsolationCut(const Electron *ele, EElIsoType isoType) const
156     {
157    
158     Bool_t isocut = kFALSE;
159     switch (isoType) {
160     case kTrackCalo:
161     isocut = (ele->TrackIsolationDr03() < fTrackIsolationCut) &&
162     (ele->CaloIsolation() < fCaloIsolationCut);
163     break;
164     case kTrackJura:
165     isocut = (ele->TrackIsolationDr03() < fTrackIsolationCut) &&
166     (ele->EcalRecHitIsoDr04() < fEcalJuraIsoCut) &&
167     (ele->HcalIsolation() < fHcalIsolationCut);
168     break;
169 ceballos 1.49 case kTrackJuraCombined:
170     isocut = (ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04()
171     - 1.5 < fCombIsolationCut);
172     break;
173 sixie 1.42 case kTrackJuraSliding:
174     {
175     Double_t totalIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr04() - 1.5;
176     if (totalIso < (ele->Pt()-10.0)*4.5/20.0 ||
177     totalIso <= 0)
178     isocut = kTRUE;
179    
180     if (fReverseIsoCut == kTRUE &&
181     isocut == kFALSE && totalIso < 10)
182     isocut = kTRUE;
183     else if(fReverseIsoCut == kTRUE)
184     isocut = kFALSE;
185     }
186     break;
187 sixie 1.51 case kVBTFWorkingPoint90Iso:
188     isocut = ElectronIDMod::PassCustomIso(ele);
189     break;
190     case kVBTFWorkingPoint80Iso:
191     isocut = ElectronIDMod::PassCustomIso(ele);
192     break;
193     case kVBTFWorkingPoint70Iso:
194     isocut = ElectronIDMod::PassCustomIso(ele);
195     break;
196 sixie 1.42 case kNoIso:
197     isocut = kTRUE;
198     break;
199     case kCustomIso:
200     default:
201     break;
202     }
203    
204     return isocut;
205     }
206    
207    
208     //--------------------------------------------------------------------------------------------------
209     Bool_t ElectronIDMod::PassConversionFilter(const Electron *ele, const DecayParticleCol *conversions) const
210     {
211     Bool_t isGoodConversion = kFALSE;
212    
213     for (UInt_t ifc=0; ifc<conversions->GetEntries(); ifc++) {
214    
215     Bool_t ConversionMatchFound = kFALSE;
216     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
217     const Track *trk = dynamic_cast<const ChargedParticle*>
218     (conversions->At(ifc)->Daughter(d))->Trk();
219     if (ele->GsfTrk() == trk) {
220     ConversionMatchFound = kTRUE;
221     break;
222     }
223     }
224    
225     // if match between the e-track and one of the conversion legs
226     if (ConversionMatchFound == kTRUE){
227     isGoodConversion = (conversions->At(ifc)->Prob() > 1e-6) &&
228     (conversions->At(ifc)->Lxy() > 0) &&
229     (conversions->At(ifc)->Position().Rho() > 2.0);
230    
231     if (isGoodConversion == kTRUE) {
232     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
233     const Track *trk = dynamic_cast<const ChargedParticle*>
234     (conversions->At(ifc)->Daughter(d))->Trk();
235    
236     if (trk) {
237     // These requirements are not used for the GSF track
238     if (!(trk->NHits() >= 3 && trk->Prob() > 1e-6) && trk!=ele->GsfTrk())
239     isGoodConversion = kFALSE;
240    
241     const StableData *sd = dynamic_cast<const StableData*>
242     (conversions->At(ifc)->DaughterDat(d));
243     if (fWrongHitsRequirement && sd->NWrongHits() != 0)
244     isGoodConversion = kFALSE;
245    
246     } else {
247     isGoodConversion = kFALSE;
248     }
249     }
250     }
251     }
252    
253     if (isGoodConversion == kTRUE) break;
254    
255     } // loop over all conversions
256    
257 ceballos 1.46 return !isGoodConversion;
258 sixie 1.42 }
259    
260     //--------------------------------------------------------------------------------------------------
261     Bool_t ElectronIDMod::PassD0Cut(const Electron *ele, const VertexCol *vertices) const
262     {
263     Bool_t d0cut = kFALSE;
264     // d0 cut
265     Double_t d0_real = 99999;
266     for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) {
267     Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0));
268     if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0);
269     }
270     if(d0_real < fD0Cut) d0cut = kTRUE;
271    
272     if (fReverseD0Cut == kTRUE &&
273     d0cut == kFALSE && d0_real < 0.05)
274     d0cut = kTRUE;
275     else if(fReverseD0Cut == kTRUE)
276     d0cut = kFALSE;
277    
278     return d0cut;
279     }
280    
281     //--------------------------------------------------------------------------------------------------
282     Bool_t ElectronIDMod::PassChargeFilter(const Electron *ele) const
283     {
284     Bool_t passChargeFilter = kTRUE;
285     if(ele->TrackerTrk() &&
286     ele->TrackerTrk()->Charge() != ele->Charge()) passChargeFilter = kFALSE;
287    
288     return passChargeFilter;
289     }
290    
291     //--------------------------------------------------------------------------------------------------
292 sixie 1.51 Bool_t ElectronIDMod::PassSpikeRemovalFilter(const Electron *ele) const
293     {
294     Bool_t passSpikeRemovalFilter = kTRUE;
295     if(ele->SCluster()->Seed()->Energy() > 5.0 &&
296     ele->SCluster()->Seed()->EMax() / ele->SCluster()->Seed()->E3x3() > 0.95
297     ) {
298     passSpikeRemovalFilter = kFALSE;
299     }
300    
301     // For Now Only use the EMax/E3x3 prescription.
302     // if(ele->SCluster()->Seed()->Energy() > 5.0 &&
303     // (1 - (ele->SCluster()->Seed()->E1x3() + ele->SCluster()->Seed()->E3x1() - 2*ele->SCluster()->Seed()->EMax())) > 0.95
304     // ) {
305     // passSpikeRemovalFilter = kFALSE;
306     // }
307    
308     return passSpikeRemovalFilter;
309     }
310    
311    
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
427 loizides 1.30
428 loizides 1.5 if (fElectronIsoType.CompareTo("TrackCalo") == 0 )
429     fElIsoType = kTrackCalo;
430     else if (fElectronIsoType.CompareTo("TrackJura") == 0)
431     fElIsoType = kTrackJura;
432 ceballos 1.49 else if(fElectronIsoType.CompareTo("TrackJuraCombined") == 0)
433     fElIsoType = kTrackJuraCombined;
434 loizides 1.5 else if(fElectronIsoType.CompareTo("TrackJuraSliding") == 0)
435     fElIsoType = kTrackJuraSliding;
436     else if (fElectronIsoType.CompareTo("NoIso") == 0 )
437     fElIsoType = kNoIso;
438 sixie 1.42 else if (fElectronIsoType.CompareTo("ZeeIso") == 0 )
439     fElIsoType = kZeeIso;
440 sixie 1.51 else if (fElectronIsoType.CompareTo("VBTFWorkingPoint90Iso") == 0 )
441     fElIsoType = kVBTFWorkingPoint90Iso;
442     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint80Iso") == 0 )
443     fElIsoType = kVBTFWorkingPoint80Iso;
444     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint70Iso") == 0 )
445     fElIsoType = kVBTFWorkingPoint70Iso;
446 loizides 1.5 else if (fElectronIsoType.CompareTo("Custom") == 0 ) {
447     fElIsoType = kCustomIso;
448     SendError(kWarning, "SlaveBegin",
449     "Custom electron isolation is not yet implemented.");
450     } else {
451     SendError(kAbortAnalysis, "SlaveBegin",
452     "The specified electron isolation %s is not defined.",
453     fElectronIsoType.Data());
454     return;
455     }
456 sixie 1.51 SetCustomIsoCuts(fElIsoType);
457    
458 sixie 1.42
459 loizides 1.1 }
460 loizides 1.30
461     //--------------------------------------------------------------------------------------------------
462     void ElectronIDMod::SetCustomIDCuts(EElIdType idt)
463     {
464 loizides 1.32 // Set cut values based on RecoEgamma/ElectronIdentification/python/electronIdCutBasedExt_cfi.py.
465     // The following changes are in sigmaetaeta for endcups and deltaetain.
466 loizides 1.30
467     Double_t tightcuts[6][8]={
468 ceballos 1.40 {0.086, 0.1, 0.052, 0.0, 0.050, 0.059, 0.061, 0.0}, //hovere
469 sixie 1.44 {0.011, 0.011, 0.011, 0.0, 0.033, 0.029, 0.030, 0.0}, //sigmaetaeta
470     {0.038, 0.024, 0.045, 0.0, 0.034, 0.017, 0.026, 0.0}, //deltaphiin
471     {0.0081, 0.0029, 0.0051, 0.0, 0.0070, 0.0062, 0.0088, 0.0}, //deltaetain
472 sixie 1.51 {0.0, 0.9, 0.0, 0.0, 0.0, 0.78, 0.0, 0.0}, //eoverp
473 ceballos 1.40 {0.8,0.2,0.9,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
474 loizides 1.30
475     Double_t loosecuts[6][8]={
476 loizides 1.39 {0.076, 0.033, 0.07, 0.0, 0.083,0.148, 0.033, 0.0}, //hovere
477     {0.0101, 0.0095, 0.0097, 0.0, 0.03, 0.03, 0.03, 0.0}, //sigmaetaeta
478     {0.053, 0.0189, 0.059, 0.099, 0.0278,0.0157, 0.042, 0.080}, //deltaphiin
479     {0.0078, 0.00259, 0.0062, 0.0, 0.0078,0.0061, 0.0061, 0.0}, //deltaetain
480     {0.3, 0.92, 0.211, 0.0, 0.42, 0.88, 0.68, 0.0}, //eoverp
481     {0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
482 loizides 1.30
483 sixie 1.51 Double_t VBTFWorkingPoint90[6][8] = {
484     {0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05}, //hovere
485     {0.012, 0.012, 0.012, 0.012, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
486     {0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04}, //deltaphiin
487     {0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.007}, //deltaetain
488     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
489     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
490     };
491    
492     Double_t VBTFWorkingPoint80[6][8] = {
493     {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025}, //hovere
494     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
495     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02}, //deltaphiin
496     {0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006}, //deltaetain
497     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
498     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
499     };
500    
501     Double_t VBTFWorkingPoint70[6][8] = {
502     {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025}, //hovere
503     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
504     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02}, //deltaphiin
505     {0.006, 0.006, 0.006, 0.006, 0.003, 0.003, 0.003, 0.003}, //deltaetain
506     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
507     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
508     };
509    
510 sixie 1.42
511 loizides 1.30 switch (idt) {
512     case kCustomIdTight:
513     memcpy(fCuts,tightcuts,sizeof(fCuts));
514     break;
515     case kCustomIdLoose:
516     memcpy(fCuts,loosecuts,sizeof(fCuts));
517     break;
518 sixie 1.51 case kVBTFWorkingPoint90Id:
519     memcpy(fCuts,VBTFWorkingPoint90,sizeof(fCuts));
520     break;
521     case kVBTFWorkingPoint80Id:
522     memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts));
523     break;
524     case kVBTFWorkingPoint70Id:
525     memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts));
526     break;
527 loizides 1.30 default:
528     memset(fCuts,0,sizeof(fCuts));
529     break;
530     }
531     }
532 sixie 1.51
533     //--------------------------------------------------------------------------------------------------
534     void ElectronIDMod::SetCustomIsoCuts(EElIsoType idt)
535     {
536    
537     //From Georgios Daskalakis email:
538     // 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
539     // 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
540     // 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
541     // 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
542     // 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
543     // 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
544    
545     Double_t VBTFWorkingPoint90[6][2] = {
546     {5.0 , 5.0 }, //TrkIso
547     {5.0 , 5.0 }, //ECALIso
548     {5.0 , 5.0 }, //HCALIso
549     {9999, 9999 } //Combined
550     };
551    
552     Double_t VBTFWorkingPoint80[6][8] = {
553     {3.0 , 1.5 }, //TrkIso
554     {4.0 , 2.5 }, //ECALIso
555     {5.0 , 0.7 }, //HCALIso
556     {9999, 9999 } //Combined
557     };
558    
559     Double_t VBTFWorkingPoint70[6][8] = {
560     {2.5 , 0.8 }, //TrkIso
561     {3.0 , 2.5 }, //ECALIso
562     {5.0 , 0.25 }, //HCALIso
563     {9999, 9999 } //Combined
564     };
565    
566    
567     switch (idt) {
568     case kVBTFWorkingPoint90Iso:
569     memcpy(fIsoCuts,VBTFWorkingPoint90,sizeof(fCuts));
570     break;
571     case kVBTFWorkingPoint80Iso:
572     memcpy(fIsoCuts,VBTFWorkingPoint80,sizeof(fCuts));
573     break;
574     case kVBTFWorkingPoint70Iso:
575     memcpy(fIsoCuts,VBTFWorkingPoint70,sizeof(fCuts));
576     break;
577     default:
578     memset(fIsoCuts,0,sizeof(fCuts));
579     break;
580     }
581     }
582    
583    
584