ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.28
Committed: Sun Dec 6 14:59:43 2009 UTC (15 years, 5 months ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e
Changes since 1.27: +5 -1 lines
Log Message:
small updates

File Contents

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