ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/ElectronIDMod.cc
Revision: 1.52
Committed: Wed Apr 7 12:24:58 2010 UTC (15 years, 1 month ago) by sixie
Content type: text/plain
Branch: MAIN
Changes since 1.51: +8 -13 lines
Log Message:
fix small bug with the size of cut arrays

File Contents

# User Rev Content
1 sixie 1.52 // $Id: ElectronIDMod.cc,v 1.51 2010/04/07 06:57:10 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.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     Bool_t ConversionMatchFound = kFALSE;
215     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
216     const Track *trk = dynamic_cast<const ChargedParticle*>
217     (conversions->At(ifc)->Daughter(d))->Trk();
218     if (ele->GsfTrk() == trk) {
219     ConversionMatchFound = kTRUE;
220     break;
221     }
222     }
223 sixie 1.52
224 sixie 1.42 // if match between the e-track and one of the conversion legs
225     if (ConversionMatchFound == kTRUE){
226     isGoodConversion = (conversions->At(ifc)->Prob() > 1e-6) &&
227     (conversions->At(ifc)->Lxy() > 0) &&
228     (conversions->At(ifc)->Position().Rho() > 2.0);
229 sixie 1.52
230 sixie 1.42 if (isGoodConversion == kTRUE) {
231     for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) {
232     const Track *trk = dynamic_cast<const ChargedParticle*>
233     (conversions->At(ifc)->Daughter(d))->Trk();
234     if (trk) {
235     // These requirements are not used for the GSF track
236     if (!(trk->NHits() >= 3 && trk->Prob() > 1e-6) && trk!=ele->GsfTrk())
237     isGoodConversion = kFALSE;
238     const StableData *sd = dynamic_cast<const StableData*>
239     (conversions->At(ifc)->DaughterDat(d));
240     if (fWrongHitsRequirement && sd->NWrongHits() != 0)
241     isGoodConversion = kFALSE;
242     } else {
243     isGoodConversion = kFALSE;
244     }
245     }
246     }
247     }
248     if (isGoodConversion == kTRUE) break;
249    
250     } // loop over all conversions
251 sixie 1.52
252 ceballos 1.46 return !isGoodConversion;
253 sixie 1.42 }
254    
255     //--------------------------------------------------------------------------------------------------
256     Bool_t ElectronIDMod::PassD0Cut(const Electron *ele, const VertexCol *vertices) const
257     {
258     Bool_t d0cut = kFALSE;
259     // d0 cut
260     Double_t d0_real = 99999;
261     for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) {
262     Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0));
263     if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0);
264     }
265     if(d0_real < fD0Cut) d0cut = kTRUE;
266    
267     if (fReverseD0Cut == kTRUE &&
268     d0cut == kFALSE && d0_real < 0.05)
269     d0cut = kTRUE;
270     else if(fReverseD0Cut == kTRUE)
271     d0cut = kFALSE;
272    
273     return d0cut;
274     }
275    
276     //--------------------------------------------------------------------------------------------------
277     Bool_t ElectronIDMod::PassChargeFilter(const Electron *ele) const
278     {
279     Bool_t passChargeFilter = kTRUE;
280     if(ele->TrackerTrk() &&
281     ele->TrackerTrk()->Charge() != ele->Charge()) passChargeFilter = kFALSE;
282    
283     return passChargeFilter;
284     }
285    
286     //--------------------------------------------------------------------------------------------------
287 sixie 1.51 Bool_t ElectronIDMod::PassSpikeRemovalFilter(const Electron *ele) const
288     {
289     Bool_t passSpikeRemovalFilter = kTRUE;
290     if(ele->SCluster()->Seed()->Energy() > 5.0 &&
291     ele->SCluster()->Seed()->EMax() / ele->SCluster()->Seed()->E3x3() > 0.95
292     ) {
293     passSpikeRemovalFilter = kFALSE;
294     }
295    
296     // For Now Only use the EMax/E3x3 prescription.
297     // if(ele->SCluster()->Seed()->Energy() > 5.0 &&
298     // (1 - (ele->SCluster()->Seed()->E1x3() + ele->SCluster()->Seed()->E3x1() - 2*ele->SCluster()->Seed()->EMax())) > 0.95
299     // ) {
300     // passSpikeRemovalFilter = kFALSE;
301     // }
302    
303     return passSpikeRemovalFilter;
304     }
305    
306    
307    
308    
309     //--------------------------------------------------------------------------------------------------
310 loizides 1.1 void ElectronIDMod::Process()
311     {
312     // Process entries of the tree.
313    
314 loizides 1.23 LoadEventObject(fElectronBranchName, fElectrons);
315 loizides 1.1
316 loizides 1.6 ElectronOArr *GoodElectrons = new ElectronOArr;
317     GoodElectrons->SetName(fGoodElectronsName);
318 loizides 1.1
319 ceballos 1.18 for (UInt_t i=0; i<fElectrons->GetEntries(); ++i) {
320 loizides 1.5 const Electron *e = fElectrons->At(i);
321 loizides 1.1
322 loizides 1.5 if (e->Pt() <= fElectronPtMin)
323     continue;
324 loizides 1.1
325 sixie 1.42 //apply id cut
326     Bool_t idcut = PassIDCut(e, fElIdType);
327 loizides 1.5 if (!idcut)
328     continue;
329    
330 sixie 1.42 //apply Isolation Cut
331     Bool_t isocut = PassIsolationCut(e, fElIsoType);
332     if (!isocut)
333 loizides 1.5 continue;
334    
335 loizides 1.14 // apply conversion filter
336 ceballos 1.47 Bool_t passConvVeto = kFALSE;
337 loizides 1.14 if (fApplyConvFilter) {
338 sixie 1.42 LoadEventObject(fConversionBranchName, fConversions);
339 ceballos 1.47 passConvVeto = PassConversionFilter(e, fConversions);
340 sixie 1.48 } else {
341     passConvVeto = kTRUE;
342 ceballos 1.12 }
343 ceballos 1.47 if (passConvVeto == kFALSE) continue;
344 sixie 1.42
345     // apply d0 cut
346 ceballos 1.15 if (fApplyD0Cut) {
347 sixie 1.42 LoadEventObject(fVertexName, fVertices);
348 ceballos 1.46 Bool_t passD0cut = PassD0Cut(e, fVertices);
349 sixie 1.42 if (!passD0cut)
350 ceballos 1.24 continue;
351 ceballos 1.12 }
352    
353 sixie 1.42 //apply charge filter
354     if(fChargeFilter == kTRUE) {
355     Bool_t passChargeFilter = PassChargeFilter(e);
356     if (!passChargeFilter) continue;
357 ceballos 1.45 }
358    
359 loizides 1.5 // add good electron
360 ceballos 1.12 GoodElectrons->Add(e);
361 loizides 1.5 }
362 loizides 1.1
363 loizides 1.9 // sort according to pt
364     GoodElectrons->Sort();
365    
366 loizides 1.5 // add to event for other modules to use
367 loizides 1.6 AddObjThisEvt(GoodElectrons);
368 loizides 1.1 }
369    
370     //--------------------------------------------------------------------------------------------------
371     void ElectronIDMod::SlaveBegin()
372     {
373     // Run startup code on the computer (slave) doing the actual analysis. Here,
374 loizides 1.5 // we just request the electron collection branch.
375 loizides 1.1
376 loizides 1.23 ReqEventObject(fElectronBranchName, fElectrons, kTRUE);
377 loizides 1.17
378 ceballos 1.16 if (fApplyConvFilter)
379 loizides 1.23 ReqEventObject(fConversionBranchName, fConversions, kTRUE);
380 loizides 1.17
381 ceballos 1.15 if (fApplyD0Cut)
382 loizides 1.23 ReqEventObject(fVertexName, fVertices, kTRUE);
383 loizides 1.1
384 sixie 1.42 Setup();
385     }
386    
387     //--------------------------------------------------------------------------------------------------
388     void ElectronIDMod::Setup()
389     {
390     // Set all options properly before execution.
391    
392 loizides 1.5 if (fElectronIDType.CompareTo("Tight") == 0)
393     fElIdType = kTight;
394     else if (fElectronIDType.CompareTo("Loose") == 0)
395     fElIdType = kLoose;
396     else if (fElectronIDType.CompareTo("Likelihood") == 0)
397     fElIdType = kLikelihood;
398 loizides 1.10 else if (fElectronIDType.CompareTo("NoId") == 0)
399     fElIdType = kNoId;
400 sixie 1.42 else if (fElectronIDType.CompareTo("ZeeId") == 0)
401     fElIdType = kZeeId;
402 sixie 1.51 else if (fElectronIDType.CompareTo("CustomLoose") == 0)
403 peveraer 1.29 fElIdType = kCustomIdLoose;
404 sixie 1.51 else if (fElectronIDType.CompareTo("CustomTight") == 0)
405 peveraer 1.29 fElIdType = kCustomIdTight;
406 sixie 1.51 else if (fElectronIDType.CompareTo("VBTFWorkingPoint90Id") == 0)
407     fElIdType = kVBTFWorkingPoint90Id;
408     else if (fElectronIDType.CompareTo("VBTFWorkingPoint80Id") == 0)
409     fElIdType = kVBTFWorkingPoint80Id;
410     else if (fElectronIDType.CompareTo("VBTFWorkingPoint70Id") == 0)
411     fElIdType = kVBTFWorkingPoint70Id;
412    
413 peveraer 1.29 else {
414 loizides 1.5 SendError(kAbortAnalysis, "SlaveBegin",
415     "The specified electron identification %s is not defined.",
416     fElectronIDType.Data());
417     return;
418     }
419 sixie 1.51 SetCustomIDCuts(fElIdType);
420    
421 loizides 1.5
422 loizides 1.30
423 loizides 1.5 if (fElectronIsoType.CompareTo("TrackCalo") == 0 )
424     fElIsoType = kTrackCalo;
425     else if (fElectronIsoType.CompareTo("TrackJura") == 0)
426     fElIsoType = kTrackJura;
427 ceballos 1.49 else if(fElectronIsoType.CompareTo("TrackJuraCombined") == 0)
428     fElIsoType = kTrackJuraCombined;
429 loizides 1.5 else if(fElectronIsoType.CompareTo("TrackJuraSliding") == 0)
430     fElIsoType = kTrackJuraSliding;
431     else if (fElectronIsoType.CompareTo("NoIso") == 0 )
432     fElIsoType = kNoIso;
433 sixie 1.42 else if (fElectronIsoType.CompareTo("ZeeIso") == 0 )
434     fElIsoType = kZeeIso;
435 sixie 1.51 else if (fElectronIsoType.CompareTo("VBTFWorkingPoint90Iso") == 0 )
436     fElIsoType = kVBTFWorkingPoint90Iso;
437     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint80Iso") == 0 )
438     fElIsoType = kVBTFWorkingPoint80Iso;
439     else if (fElectronIsoType.CompareTo("VBTFWorkingPoint70Iso") == 0 )
440     fElIsoType = kVBTFWorkingPoint70Iso;
441 loizides 1.5 else if (fElectronIsoType.CompareTo("Custom") == 0 ) {
442     fElIsoType = kCustomIso;
443     SendError(kWarning, "SlaveBegin",
444     "Custom electron isolation is not yet implemented.");
445     } else {
446     SendError(kAbortAnalysis, "SlaveBegin",
447     "The specified electron isolation %s is not defined.",
448     fElectronIsoType.Data());
449     return;
450     }
451 sixie 1.51 SetCustomIsoCuts(fElIsoType);
452    
453 sixie 1.42
454 loizides 1.1 }
455 loizides 1.30
456     //--------------------------------------------------------------------------------------------------
457     void ElectronIDMod::SetCustomIDCuts(EElIdType idt)
458     {
459 loizides 1.32 // Set cut values based on RecoEgamma/ElectronIdentification/python/electronIdCutBasedExt_cfi.py.
460     // The following changes are in sigmaetaeta for endcups and deltaetain.
461 loizides 1.30
462     Double_t tightcuts[6][8]={
463 ceballos 1.40 {0.086, 0.1, 0.052, 0.0, 0.050, 0.059, 0.061, 0.0}, //hovere
464 sixie 1.44 {0.011, 0.011, 0.011, 0.0, 0.033, 0.029, 0.030, 0.0}, //sigmaetaeta
465     {0.038, 0.024, 0.045, 0.0, 0.034, 0.017, 0.026, 0.0}, //deltaphiin
466     {0.0081, 0.0029, 0.0051, 0.0, 0.0070, 0.0062, 0.0088, 0.0}, //deltaetain
467 sixie 1.51 {0.0, 0.9, 0.0, 0.0, 0.0, 0.78, 0.0, 0.0}, //eoverp
468 ceballos 1.40 {0.8,0.2,0.9,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
469 loizides 1.30
470     Double_t loosecuts[6][8]={
471 loizides 1.39 {0.076, 0.033, 0.07, 0.0, 0.083,0.148, 0.033, 0.0}, //hovere
472     {0.0101, 0.0095, 0.0097, 0.0, 0.03, 0.03, 0.03, 0.0}, //sigmaetaeta
473     {0.053, 0.0189, 0.059, 0.099, 0.0278,0.0157, 0.042, 0.080}, //deltaphiin
474     {0.0078, 0.00259, 0.0062, 0.0, 0.0078,0.0061, 0.0061, 0.0}, //deltaetain
475     {0.3, 0.92, 0.211, 0.0, 0.42, 0.88, 0.68, 0.0}, //eoverp
476     {0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P
477 loizides 1.30
478 sixie 1.51 Double_t VBTFWorkingPoint90[6][8] = {
479     {0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05}, //hovere
480     {0.012, 0.012, 0.012, 0.012, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
481     {0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04}, //deltaphiin
482     {0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.007}, //deltaetain
483     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
484     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
485     };
486    
487     Double_t VBTFWorkingPoint80[6][8] = {
488     {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025}, //hovere
489     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
490     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02}, //deltaphiin
491     {0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006}, //deltaetain
492     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
493     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
494     };
495    
496     Double_t VBTFWorkingPoint70[6][8] = {
497     {0.05, 0.05, 0.05, 0.05, 0.025, 0.025, 0.025, 0.025}, //hovere
498     {0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.0 }, //sigmaetaeta
499     {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02}, //deltaphiin
500     {0.006, 0.006, 0.006, 0.006, 0.003, 0.003, 0.003, 0.003}, //deltaetain
501     {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, //eoverp
502     {0.0, 0.0, 0, 0, 0, 0, 0, 0} //extra cuts fbrem and E_Over_P
503     };
504    
505 sixie 1.42
506 loizides 1.30 switch (idt) {
507     case kCustomIdTight:
508     memcpy(fCuts,tightcuts,sizeof(fCuts));
509     break;
510     case kCustomIdLoose:
511     memcpy(fCuts,loosecuts,sizeof(fCuts));
512     break;
513 sixie 1.51 case kVBTFWorkingPoint90Id:
514     memcpy(fCuts,VBTFWorkingPoint90,sizeof(fCuts));
515     break;
516     case kVBTFWorkingPoint80Id:
517     memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts));
518     break;
519     case kVBTFWorkingPoint70Id:
520     memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts));
521     break;
522 loizides 1.30 default:
523     memset(fCuts,0,sizeof(fCuts));
524     break;
525     }
526     }
527 sixie 1.51
528     //--------------------------------------------------------------------------------------------------
529     void ElectronIDMod::SetCustomIsoCuts(EElIsoType idt)
530     {
531    
532     //From Georgios Daskalakis email:
533     // 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
534     // 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
535     // 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
536     // 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
537     // 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
538     // 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
539    
540     Double_t VBTFWorkingPoint90[6][2] = {
541     {5.0 , 5.0 }, //TrkIso
542     {5.0 , 5.0 }, //ECALIso
543     {5.0 , 5.0 }, //HCALIso
544     {9999, 9999 } //Combined
545     };
546    
547     Double_t VBTFWorkingPoint80[6][8] = {
548     {3.0 , 1.5 }, //TrkIso
549     {4.0 , 2.5 }, //ECALIso
550     {5.0 , 0.7 }, //HCALIso
551     {9999, 9999 } //Combined
552     };
553    
554     Double_t VBTFWorkingPoint70[6][8] = {
555     {2.5 , 0.8 }, //TrkIso
556     {3.0 , 2.5 }, //ECALIso
557     {5.0 , 0.25 }, //HCALIso
558     {9999, 9999 } //Combined
559     };
560    
561    
562     switch (idt) {
563     case kVBTFWorkingPoint90Iso:
564 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint90,sizeof(fIsoCuts));
565 sixie 1.51 break;
566     case kVBTFWorkingPoint80Iso:
567 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint80,sizeof(fIsoCuts));
568 sixie 1.51 break;
569     case kVBTFWorkingPoint70Iso:
570 sixie 1.52 memcpy(fIsoCuts,VBTFWorkingPoint70,sizeof(fIsoCuts));
571 sixie 1.51 break;
572     default:
573 sixie 1.52 memset(fIsoCuts,0,sizeof(fIsoCuts));
574 sixie 1.51 break;
575     }
576     }
577    
578    
579