ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.36
Committed: Sat May 29 18:08:34 2010 UTC (14 years, 11 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_014a, Mit_014
Changes since 1.35: +2 -1 lines
Log Message:
Add missing function for ElectronID trigger matching

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: ElectronIDMod.h,v 1.35 2010/05/29 11:56:17 bendavid 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 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
48 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
49 Bool_t GetApplyTriggerMatching() const { return fApplyTriggerMatching; }
50 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
51 Bool_t GetChargeFilter() const { return fChargeFilter; }
52 Bool_t PassIDCut(const Electron *el, ElectronTools::EElIdType idType) const;
53 Bool_t PassIsolationCut(const Electron *el,
54 ElectronTools::EElIsoType isoType) const;
55 Bool_t GetCombinedIdCut() const { return fCombinedIdCut; }
56 void SetApplyConversionFilterType1(Bool_t b){ fApplyConvFilterType1 = b; }
57 void SetApplyConversionFilterType2(Bool_t b){ fApplyConvFilterType2 = b; }
58 void SetNExpectedHitsInnerCut(Double_t cut) {fNExpectedHitsInnerCut = cut;}
59 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
60 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
61 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
62 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
63 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
64 void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
65 void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
66 void SetGoodName(const char *n) { SetGoodElectronsName(n); }
67 void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
68 void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
69 void SetIDType(const char *type) { fElectronIDType = type; }
70 void SetInputName(const char *n) { fElectronBranchName = n; }
71 void SetIsoType(const char *type) { fElectronIsoType = type; }
72 void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; }
73 void SetOutputName(const char *n) { SetGoodElectronsName(n); }
74 void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
75 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
76 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
77 void SetApplyTriggerMatching(Bool_t b) { fApplyTriggerMatching = b; }
78 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
79 void SetChargeFilter(Bool_t b) { fChargeFilter = b; }
80 void SetWrongHitsRequirement(Bool_t b) { fWrongHitsRequirement = b; }
81 void SetCombinedIdCut(Bool_t b) { fCombinedIdCut = b; }
82 void Setup();
83
84 protected:
85 void Process();
86 void SlaveBegin();
87
88
89 TString fElectronBranchName; //name of electron collection (input)
90 TString fConversionBranchName; //name of electron collection (input)
91 TString fGoodElectronsName; //name of exported "good electrons" col
92 TString fVertexName; //name of vertex collection
93 TString fElectronIDType; //type of electron ID we impose
94 TString fElectronIsoType; //type of electron Isolation we impose
95 TString fTrigObjectsName; //name of trigger object collection
96 Double_t fElectronPtMin; //min pt cut
97 Double_t fIDLikelihoodCut; //cut value for ID likelihood
98 Double_t fTrackIsolationCut; //cut value for track isolation
99 Double_t fCaloIsolationCut; //cut value for calo isolation
100 Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
101 Double_t fHcalIsolationCut; //cut value for hcal isolation
102 Double_t fCombIsolationCut; //cut value for combined isolation
103 Bool_t fApplyConvFilterType1; //whether remove conversions using fit method
104 Bool_t fApplyConvFilterType2; //whether remove conversions using DCotTheta method
105 Bool_t fWrongHitsRequirement; //whether to use wrong hits req
106 //for conversion removal
107 Double_t fNExpectedHitsInnerCut; //cut value for NExpectedHitsInner maximum
108 Bool_t fCombinedIdCut; //whether to use full combined id
109 Bool_t fApplySpikeRemoval; //whether apply d0 cut
110 Bool_t fApplyD0Cut; //whether apply d0 cut
111 Bool_t fChargeFilter; //whether apply GSF and CFT equal requirement
112 Double_t fD0Cut; //max d0
113 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
114 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
115 Bool_t fApplyTriggerMatching; //match to hlt electron (default=0)
116 ElectronTools::EElIdType fElIdType; //!identification scheme
117 ElectronTools::EElIsoType fElIsoType; //!isolation scheme
118 const ElectronCol *fElectrons; //!electron collection
119 const DecayParticleCol *fConversions; //!conversion collection
120 const VertexCol *fVertices; //!vertices branches
121
122 ClassDef(ElectronIDMod, 1) // Electron identification module
123 };
124 }
125 #endif