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

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.38 // $Id: ElectronIDMod.h,v 1.37 2010/06/17 13:26:26 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 sixie 1.31 #include "MitPhysics/Utils/interface/ElectronTools.h"
22 loizides 1.1
23     namespace mithep
24     {
25     class ElectronIDMod : public BaseMod
26     {
27     public:
28     ElectronIDMod(const char *name="ElectronIDMod",
29 loizides 1.4 const char *title="Electron identification module");
30    
31 ceballos 1.34 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 ceballos 1.37 Double_t GetEtaMax() const { return fElectronEtaMax; }
48 ceballos 1.34 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
49     Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
50 bendavid 1.35 Bool_t GetApplyTriggerMatching() const { return fApplyTriggerMatching; }
51 ceballos 1.34 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
52     Bool_t GetChargeFilter() const { return fChargeFilter; }
53 sixie 1.31 Bool_t PassIDCut(const Electron *el, ElectronTools::EElIdType idType) const;
54     Bool_t PassIsolationCut(const Electron *el,
55     ElectronTools::EElIsoType isoType) const;
56 ceballos 1.34 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 bendavid 1.36 void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; }
74 ceballos 1.34 void SetOutputName(const char *n) { SetGoodElectronsName(n); }
75     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
76 bendavid 1.38 void SetEtMin(Double_t et) { fElectronEtMin = et; }
77     void SetEtaMax(Double_t eta) { fElectronEtaMax = eta; }
78 ceballos 1.34 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
79     void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
80 ceballos 1.37 void SetApplyTriggerMatching(Bool_t b) { fApplyTriggerMatching = b; }
81 ceballos 1.34 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 bendavid 1.38 void SetApplyEcalFiducial(Bool_t b) { fApplyEcalFiducial = b; }
86     void SetApplyEcalSeeded(Bool_t b) { fApplyEcalSeeded = b; }
87     void SetApplyCombinedIso(Bool_t b) { fApplyCombinedIso = b; }
88 ceballos 1.27 void Setup();
89 loizides 1.4
90 loizides 1.1 protected:
91 sixie 1.26 void Process();
92     void SlaveBegin();
93 loizides 1.22
94 loizides 1.7
95 sixie 1.31 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 bendavid 1.35 TString fTrigObjectsName; //name of trigger object collection
102 sixie 1.31 Double_t fElectronPtMin; //min pt cut
103 bendavid 1.38 Double_t fElectronEtMin; //min pt cut
104 ceballos 1.37 Double_t fElectronEtaMax; //max eta cut
105 sixie 1.31 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 ceballos 1.34 Bool_t fApplyConvFilterType1; //whether remove conversions using fit method
112     Bool_t fApplyConvFilterType2; //whether remove conversions using DCotTheta method
113 sixie 1.31 Bool_t fWrongHitsRequirement; //whether to use wrong hits req
114     //for conversion removal
115 ceballos 1.34 Double_t fNExpectedHitsInnerCut; //cut value for NExpectedHitsInner maximum
116 ceballos 1.33 Bool_t fCombinedIdCut; //whether to use full combined id
117 sixie 1.32 Bool_t fApplySpikeRemoval; //whether apply d0 cut
118 sixie 1.31 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 bendavid 1.35 Bool_t fApplyTriggerMatching; //match to hlt electron (default=0)
124 bendavid 1.38 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 sixie 1.31 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 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
134 loizides 1.1 };
135     }
136     #endif