ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.38
Committed: Sat Oct 9 20:15:30 2010 UTC (14 years, 6 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015
Changes since 1.37: +10 -2 lines
Log Message:
Extra electron id options to synchronize with vbtf selection

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: ElectronIDMod.h,v 1.37 2010/06/17 13:26:26 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 #include "MitPhysics/Utils/interface/ElectronTools.h"
22
23 namespace mithep
24 {
25 class ElectronIDMod : public BaseMod
26 {
27 public:
28 ElectronIDMod(const char *name="ElectronIDMod",
29 const char *title="Electron identification module");
30
31 Bool_t GetApplyConversionFilterType1() const { return fApplyConvFilterType1; }
32 Bool_t GetApplyConversionFilterType2() const { return fApplyConvFilterType2; }
33 Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
34 Bool_t GetApplyD0Cut() const { return fApplyD0Cut; }
35 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
36 Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
37 Double_t GetCombIsoCut() const { return fCombIsolationCut; }
38 const char *GetGoodName() const { return GetGoodElectronsName(); }
39 const char *GetGoodElectronsName() const { return fGoodElectronsName; }
40 Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
41 Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
42 const char *GetIDType() const { return fElectronIDType; }
43 const char *GetInputName() const { return fElectronBranchName; }
44 const char *GetIsoType() const { return fElectronIsoType; }
45 const char *GetOutputName() const { return GetGoodElectronsName(); }
46 Double_t GetPtMin() const { return fElectronPtMin; }
47 Double_t GetEtaMax() const { return fElectronEtaMax; }
48 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
49 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
50 Bool_t GetApplyTriggerMatching() const { return fApplyTriggerMatching; }
51 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
52 Bool_t GetChargeFilter() const { return fChargeFilter; }
53 Bool_t PassIDCut(const Electron *el, ElectronTools::EElIdType idType) const;
54 Bool_t PassIsolationCut(const Electron *el,
55 ElectronTools::EElIsoType isoType) const;
56 Bool_t GetCombinedIdCut() const { return fCombinedIdCut; }
57 void SetApplyConversionFilterType1(Bool_t b){ fApplyConvFilterType1 = b; }
58 void SetApplyConversionFilterType2(Bool_t b){ fApplyConvFilterType2 = b; }
59 void SetNExpectedHitsInnerCut(Double_t cut) {fNExpectedHitsInnerCut = cut;}
60 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
61 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
62 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
63 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
64 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
65 void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
66 void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
67 void SetGoodName(const char *n) { SetGoodElectronsName(n); }
68 void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
69 void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
70 void SetIDType(const char *type) { fElectronIDType = type; }
71 void SetInputName(const char *n) { fElectronBranchName = n; }
72 void SetIsoType(const char *type) { fElectronIsoType = type; }
73 void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; }
74 void SetOutputName(const char *n) { SetGoodElectronsName(n); }
75 void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
76 void SetEtMin(Double_t et) { fElectronEtMin = et; }
77 void SetEtaMax(Double_t eta) { fElectronEtaMax = eta; }
78 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
79 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
80 void SetApplyTriggerMatching(Bool_t b) { fApplyTriggerMatching = b; }
81 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
82 void SetChargeFilter(Bool_t b) { fChargeFilter = b; }
83 void SetWrongHitsRequirement(Bool_t b) { fWrongHitsRequirement = b; }
84 void SetCombinedIdCut(Bool_t b) { fCombinedIdCut = b; }
85 void SetApplyEcalFiducial(Bool_t b) { fApplyEcalFiducial = b; }
86 void SetApplyEcalSeeded(Bool_t b) { fApplyEcalSeeded = b; }
87 void SetApplyCombinedIso(Bool_t b) { fApplyCombinedIso = b; }
88 void Setup();
89
90 protected:
91 void Process();
92 void SlaveBegin();
93
94
95 TString fElectronBranchName; //name of electron collection (input)
96 TString fConversionBranchName; //name of electron collection (input)
97 TString fGoodElectronsName; //name of exported "good electrons" col
98 TString fVertexName; //name of vertex collection
99 TString fElectronIDType; //type of electron ID we impose
100 TString fElectronIsoType; //type of electron Isolation we impose
101 TString fTrigObjectsName; //name of trigger object collection
102 Double_t fElectronPtMin; //min pt cut
103 Double_t fElectronEtMin; //min pt cut
104 Double_t fElectronEtaMax; //max eta cut
105 Double_t fIDLikelihoodCut; //cut value for ID likelihood
106 Double_t fTrackIsolationCut; //cut value for track isolation
107 Double_t fCaloIsolationCut; //cut value for calo isolation
108 Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
109 Double_t fHcalIsolationCut; //cut value for hcal isolation
110 Double_t fCombIsolationCut; //cut value for combined isolation
111 Bool_t fApplyConvFilterType1; //whether remove conversions using fit method
112 Bool_t fApplyConvFilterType2; //whether remove conversions using DCotTheta method
113 Bool_t fWrongHitsRequirement; //whether to use wrong hits req
114 //for conversion removal
115 Double_t fNExpectedHitsInnerCut; //cut value for NExpectedHitsInner maximum
116 Bool_t fCombinedIdCut; //whether to use full combined id
117 Bool_t fApplySpikeRemoval; //whether apply d0 cut
118 Bool_t fApplyD0Cut; //whether apply d0 cut
119 Bool_t fChargeFilter; //whether apply GSF and CFT equal requirement
120 Double_t fD0Cut; //max d0
121 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
122 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
123 Bool_t fApplyTriggerMatching; //match to hlt electron (default=0)
124 Bool_t fApplyEcalSeeded; //require ecal seeded flag
125 Bool_t fApplyCombinedIso; //apply combined isolation
126 Bool_t fApplyEcalFiducial; //apply ecal fiducial cuts on supercluster eta
127 ElectronTools::EElIdType fElIdType; //!identification scheme
128 ElectronTools::EElIsoType fElIsoType; //!isolation scheme
129 const ElectronCol *fElectrons; //!electron collection
130 const DecayParticleCol *fConversions; //!conversion collection
131 const VertexCol *fVertices; //!vertices branches
132
133 ClassDef(ElectronIDMod, 1) // Electron identification module
134 };
135 }
136 #endif