ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.27
Committed: Tue Nov 3 08:38:37 2009 UTC (15 years, 6 months ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012
Changes since 1.26: +1 -1 lines
Log Message:
new Eem cut

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 sixie 1.26 // $Id: ElectronIDMod.h,v 1.25 2009/09/29 19:41:13 loizides 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     kCustomIdTight //"CustomTight"
39     };
40    
41     enum EElIsoType {
42     kIsoUndef = 0, //not defined
43     kTrackCalo, //"TrackCalo"
44     kTrackJura, //"TrackJura"
45     kTrackJuraSliding, //"TrackJuraSliding"
46     kNoIso, //"NoIso"
47     kZeeIso, //"ZeeIso"
48     kCustomIso //"Custom"
49     };
50    
51 loizides 1.13 Bool_t GetApplyConversionFilter() const { return fApplyConvFilter; }
52 ceballos 1.14 Bool_t GetApplyD0Cut() const { return fApplyD0Cut; }
53 loizides 1.8 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
54     Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
55     const char *GetGoodName() const { return GetGoodElectronsName(); }
56     const char *GetGoodElectronsName() const { return fGoodElectronsName; }
57     Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
58     Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
59     const char *GetIDType() const { return fElectronIDType; }
60     const char *GetInputName() const { return fElectronBranchName; }
61     const char *GetIsoType() const { return fElectronIsoType; }
62     const char *GetOutputName() const { return GetGoodElectronsName(); }
63     Double_t GetPtMin() const { return fElectronPtMin; }
64 loizides 1.22 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
65     Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
66 loizides 1.8 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
67 ceballos 1.23 Bool_t GetChargeFilter() const { return fChargeFilter; }
68 sixie 1.26 Bool_t PassChargeFilter(const Electron *el) const;
69     Bool_t PassConversionFilter(const Electron *el, const DecayParticleCol *conversions) const;
70     Bool_t PassD0Cut(const Electron *el, const VertexCol *vertices) const;
71     Bool_t PassIDCut(const Electron *el, EElIdType idType) const;
72     Bool_t PassIsolationCut(const Electron *el, EElIsoType isoType) const;
73 loizides 1.13 void SetApplyConversionFilter(Bool_t b) { fApplyConvFilter = b; }
74 ceballos 1.14 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
75 loizides 1.8 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
76 loizides 1.22 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
77 loizides 1.8 void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
78 loizides 1.22 void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
79 loizides 1.8 void SetGoodName(const char *n) { SetGoodElectronsName(n); }
80     void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
81     void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
82     void SetIDType(const char *type) { fElectronIDType = type; }
83     void SetInputName(const char *n) { fElectronBranchName = n; }
84     void SetIsoType(const char *type) { fElectronIsoType = type; }
85     void SetOutputName(const char *n) { SetGoodElectronsName(n); }
86     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
87 loizides 1.22 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
88     void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
89 loizides 1.8 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
90 ceballos 1.23 void SetChargeFilter(Bool_t b) { fChargeFilter = b; }
91 bendavid 1.24 void SetWrongHitsRequirement(Bool_t b) { fWrongHitsRequirement = b; }
92 ceballos 1.27 void Setup();
93 loizides 1.4
94 loizides 1.22
95 loizides 1.4
96 loizides 1.1 protected:
97 sixie 1.26 Bool_t PassCustomID(const Electron *el) const;
98     void Process();
99     void SetCustomIDCuts(EElIdType idt);
100     void SlaveBegin();
101 loizides 1.22
102 loizides 1.7
103 ceballos 1.12 TString fElectronBranchName; //name of electron collection (input)
104     TString fConversionBranchName; //name of electron collection (input)
105 loizides 1.16 TString fGoodElectronsName; //name of exported "good electrons" col
106 ceballos 1.12 TString fVertexName; //name of vertex collection
107     TString fElectronIDType; //type of electron ID we impose
108     TString fElectronIsoType; //type of electron Isolation we impose
109     Double_t fElectronPtMin; //min pt cut
110     Double_t fIDLikelihoodCut; //cut value for ID likelihood
111     Double_t fTrackIsolationCut; //cut value for track isolation
112     Double_t fCaloIsolationCut; //cut value for calo isolation
113     Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
114     Double_t fHcalIsolationCut; //cut value for hcal isolation
115 loizides 1.13 Bool_t fApplyConvFilter; //whether remove conversions
116 bendavid 1.24 Bool_t fWrongHitsRequirement; //whether to use wrong hits req for conversion removal
117 loizides 1.16 Bool_t fApplyD0Cut; //whether apply d0 cut
118 loizides 1.25 Bool_t fChargeFilter; //whether apply GSF and CFT equal requirement
119 loizides 1.13 Double_t fD0Cut; //max d0
120 loizides 1.19 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
121     Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
122 loizides 1.13 EElIdType fElIdType; //!identification scheme
123     EElIsoType fElIsoType; //!isolation scheme
124 ceballos 1.12 const ElectronCol *fElectrons; //!electron collection
125     const DecayParticleCol *fConversions; //!conversion collection
126 loizides 1.16 const VertexCol *fVertices; //!vertices branches
127 loizides 1.22 Double_t fCuts[6][8]; //!custom id cuts
128 ceballos 1.17
129 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
130 loizides 1.1 };
131     }
132     #endif