ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.29
Committed: Wed Apr 7 06:57:47 2010 UTC (15 years, 1 month ago) by sixie
Content type: text/plain
Branch: MAIN
Changes since 1.28: +13 -5 lines
Log Message:
recommended electron cuts from VBTF

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 sixie 1.29 // $Id: ElectronIDMod.h,v 1.28 2009/12/06 14:59:43 ceballos Exp $
3 loizides 1.1 //
4     // ElectronIDMod
5     //
6 loizides 1.4 // This module applies electron identification criteria and exports a pointer to a collection
7 loizides 1.5 // of "good electrons" according to the specified identification scheme.
8 loizides 1.1 //
9 loizides 1.13 // See http://indico.cern.ch/contributionDisplay.py?contribId=1&confId=42251
10     //
11 loizides 1.4 // Authors: S.Xie, C.Loizides
12 loizides 1.1 //--------------------------------------------------------------------------------------------------
13    
14 loizides 1.4 #ifndef MITPHYSICS_MODS_ELECTRONIDMOD_H
15     #define MITPHYSICS_MODS_ELECTRONIDMOD_H
16 loizides 1.1
17     #include "MitAna/TreeMod/interface/BaseMod.h"
18 loizides 1.20 #include "MitAna/DataTree/interface/ElectronFwd.h"
19     #include "MitAna/DataTree/interface/VertexFwd.h"
20     #include "MitAna/DataTree/interface/DecayParticleFwd.h"
21 loizides 1.1
22     namespace mithep
23     {
24     class ElectronIDMod : public BaseMod
25     {
26     public:
27     ElectronIDMod(const char *name="ElectronIDMod",
28 loizides 1.4 const char *title="Electron identification module");
29    
30 sixie 1.26 enum EElIdType {
31     kIdUndef = 0, //not defined
32     kTight, //"Tight"
33     kLoose, //"Loose"
34     kLikelihood, //"Likelihood"
35     kNoId, //"NoId"
36     kZeeId, //"ZeeId"
37     kCustomIdLoose, //"CustomLoose"
38 sixie 1.29 kCustomIdTight, //"CustomTight"
39     kVBTFWorkingPoint90Id,
40     kVBTFWorkingPoint80Id,
41     kVBTFWorkingPoint70Id
42 sixie 1.26 };
43    
44     enum EElIsoType {
45     kIsoUndef = 0, //not defined
46     kTrackCalo, //"TrackCalo"
47     kTrackJura, //"TrackJura"
48 ceballos 1.28 kTrackJuraCombined, //"TrackJuraCombined"
49 sixie 1.26 kTrackJuraSliding, //"TrackJuraSliding"
50     kNoIso, //"NoIso"
51     kZeeIso, //"ZeeIso"
52 sixie 1.29 kCustomIso, //"Custom"
53     kVBTFWorkingPoint90Iso,
54     kVBTFWorkingPoint80Iso,
55     kVBTFWorkingPoint70Iso
56 sixie 1.26 };
57    
58 loizides 1.13 Bool_t GetApplyConversionFilter() const { return fApplyConvFilter; }
59 ceballos 1.14 Bool_t GetApplyD0Cut() const { return fApplyD0Cut; }
60 loizides 1.8 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
61     Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
62 ceballos 1.28 Double_t GetCombIsoCut() const { return fCombIsolationCut; }
63 loizides 1.8 const char *GetGoodName() const { return GetGoodElectronsName(); }
64     const char *GetGoodElectronsName() const { return fGoodElectronsName; }
65     Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
66     Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
67     const char *GetIDType() const { return fElectronIDType; }
68     const char *GetInputName() const { return fElectronBranchName; }
69     const char *GetIsoType() const { return fElectronIsoType; }
70     const char *GetOutputName() const { return GetGoodElectronsName(); }
71     Double_t GetPtMin() const { return fElectronPtMin; }
72 loizides 1.22 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
73     Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
74 loizides 1.8 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
75 ceballos 1.23 Bool_t GetChargeFilter() const { return fChargeFilter; }
76 sixie 1.26 Bool_t PassChargeFilter(const Electron *el) const;
77     Bool_t PassConversionFilter(const Electron *el, const DecayParticleCol *conversions) const;
78     Bool_t PassD0Cut(const Electron *el, const VertexCol *vertices) const;
79     Bool_t PassIDCut(const Electron *el, EElIdType idType) const;
80     Bool_t PassIsolationCut(const Electron *el, EElIsoType isoType) const;
81 sixie 1.29 Bool_t PassSpikeRemovalFilter(const Electron *ele) const;
82 loizides 1.13 void SetApplyConversionFilter(Bool_t b) { fApplyConvFilter = b; }
83 ceballos 1.14 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
84 loizides 1.8 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
85 ceballos 1.28 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
86 loizides 1.22 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
87 loizides 1.8 void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
88 loizides 1.22 void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
89 loizides 1.8 void SetGoodName(const char *n) { SetGoodElectronsName(n); }
90     void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
91     void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
92     void SetIDType(const char *type) { fElectronIDType = type; }
93     void SetInputName(const char *n) { fElectronBranchName = n; }
94     void SetIsoType(const char *type) { fElectronIsoType = type; }
95     void SetOutputName(const char *n) { SetGoodElectronsName(n); }
96     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
97 loizides 1.22 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
98     void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
99 loizides 1.8 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
100 ceballos 1.23 void SetChargeFilter(Bool_t b) { fChargeFilter = b; }
101 bendavid 1.24 void SetWrongHitsRequirement(Bool_t b) { fWrongHitsRequirement = b; }
102 ceballos 1.27 void Setup();
103 loizides 1.4
104 loizides 1.1 protected:
105 sixie 1.26 Bool_t PassCustomID(const Electron *el) const;
106 sixie 1.29 Bool_t PassCustomIso(const Electron *el) const;
107 sixie 1.26 void Process();
108     void SetCustomIDCuts(EElIdType idt);
109 sixie 1.29 void SetCustomIsoCuts(EElIsoType idt);
110 sixie 1.26 void SlaveBegin();
111 loizides 1.22
112 loizides 1.7
113 ceballos 1.12 TString fElectronBranchName; //name of electron collection (input)
114     TString fConversionBranchName; //name of electron collection (input)
115 loizides 1.16 TString fGoodElectronsName; //name of exported "good electrons" col
116 ceballos 1.12 TString fVertexName; //name of vertex collection
117     TString fElectronIDType; //type of electron ID we impose
118     TString fElectronIsoType; //type of electron Isolation we impose
119     Double_t fElectronPtMin; //min pt cut
120     Double_t fIDLikelihoodCut; //cut value for ID likelihood
121     Double_t fTrackIsolationCut; //cut value for track isolation
122     Double_t fCaloIsolationCut; //cut value for calo isolation
123     Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
124     Double_t fHcalIsolationCut; //cut value for hcal isolation
125 ceballos 1.28 Double_t fCombIsolationCut; //cut value for combined isolation
126 loizides 1.13 Bool_t fApplyConvFilter; //whether remove conversions
127 bendavid 1.24 Bool_t fWrongHitsRequirement; //whether to use wrong hits req for conversion removal
128 loizides 1.16 Bool_t fApplyD0Cut; //whether apply d0 cut
129 loizides 1.25 Bool_t fChargeFilter; //whether apply GSF and CFT equal requirement
130 loizides 1.13 Double_t fD0Cut; //max d0
131 loizides 1.19 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
132     Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
133 loizides 1.13 EElIdType fElIdType; //!identification scheme
134     EElIsoType fElIsoType; //!isolation scheme
135 ceballos 1.12 const ElectronCol *fElectrons; //!electron collection
136     const DecayParticleCol *fConversions; //!conversion collection
137 loizides 1.16 const VertexCol *fVertices; //!vertices branches
138 loizides 1.22 Double_t fCuts[6][8]; //!custom id cuts
139 sixie 1.29 Double_t fIsoCuts[4][2]; //!custom isolation cuts
140 ceballos 1.17
141 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
142 loizides 1.1 };
143     }
144     #endif