ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.33
Committed: Wed May 12 19:06:52 2010 UTC (14 years, 11 months ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.32: +4 -1 lines
Log Message:
small additions

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 ceballos 1.33 // $Id: ElectronIDMod.h,v 1.32 2010/04/10 19:38:46 sixie 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 loizides 1.13 Bool_t GetApplyConversionFilter() const { return fApplyConvFilter; }
32 sixie 1.32 Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
33 ceballos 1.14 Bool_t GetApplyD0Cut() const { return fApplyD0Cut; }
34 loizides 1.8 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
35     Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
36 ceballos 1.28 Double_t GetCombIsoCut() const { return fCombIsolationCut; }
37 loizides 1.8 const char *GetGoodName() const { return GetGoodElectronsName(); }
38     const char *GetGoodElectronsName() const { return fGoodElectronsName; }
39     Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
40     Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
41     const char *GetIDType() const { return fElectronIDType; }
42     const char *GetInputName() const { return fElectronBranchName; }
43     const char *GetIsoType() const { return fElectronIsoType; }
44     const char *GetOutputName() const { return GetGoodElectronsName(); }
45     Double_t GetPtMin() const { return fElectronPtMin; }
46 loizides 1.22 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
47     Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
48 loizides 1.8 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
49 ceballos 1.23 Bool_t GetChargeFilter() const { return fChargeFilter; }
50 sixie 1.31 Bool_t PassIDCut(const Electron *el, ElectronTools::EElIdType idType) const;
51     Bool_t PassIsolationCut(const Electron *el,
52     ElectronTools::EElIsoType isoType) const;
53 ceballos 1.33 Bool_t GetCombinedIdCut() const { return fCombinedIdCut; }
54 loizides 1.13 void SetApplyConversionFilter(Bool_t b) { fApplyConvFilter = b; }
55 sixie 1.32 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
56 ceballos 1.14 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
57 loizides 1.8 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
58 ceballos 1.28 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
59 loizides 1.22 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
60 loizides 1.8 void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
61 loizides 1.22 void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
62 loizides 1.8 void SetGoodName(const char *n) { SetGoodElectronsName(n); }
63     void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
64     void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
65     void SetIDType(const char *type) { fElectronIDType = type; }
66     void SetInputName(const char *n) { fElectronBranchName = n; }
67     void SetIsoType(const char *type) { fElectronIsoType = type; }
68     void SetOutputName(const char *n) { SetGoodElectronsName(n); }
69     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
70 loizides 1.22 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
71     void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
72 loizides 1.8 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
73 ceballos 1.23 void SetChargeFilter(Bool_t b) { fChargeFilter = b; }
74 bendavid 1.24 void SetWrongHitsRequirement(Bool_t b) { fWrongHitsRequirement = b; }
75 ceballos 1.33 void SetCombinedIdCut(Bool_t b) { fCombinedIdCut = b; }
76 ceballos 1.27 void Setup();
77 loizides 1.4
78 loizides 1.1 protected:
79 sixie 1.26 void Process();
80     void SlaveBegin();
81 loizides 1.22
82 loizides 1.7
83 sixie 1.31 TString fElectronBranchName; //name of electron collection (input)
84     TString fConversionBranchName; //name of electron collection (input)
85     TString fGoodElectronsName; //name of exported "good electrons" col
86     TString fVertexName; //name of vertex collection
87     TString fElectronIDType; //type of electron ID we impose
88     TString fElectronIsoType; //type of electron Isolation we impose
89     Double_t fElectronPtMin; //min pt cut
90     Double_t fIDLikelihoodCut; //cut value for ID likelihood
91     Double_t fTrackIsolationCut; //cut value for track isolation
92     Double_t fCaloIsolationCut; //cut value for calo isolation
93     Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
94     Double_t fHcalIsolationCut; //cut value for hcal isolation
95     Double_t fCombIsolationCut; //cut value for combined isolation
96     Bool_t fApplyConvFilter; //whether remove conversions
97     Bool_t fWrongHitsRequirement; //whether to use wrong hits req
98     //for conversion removal
99 ceballos 1.33 Bool_t fCombinedIdCut; //whether to use full combined id
100 sixie 1.32 Bool_t fApplySpikeRemoval; //whether apply d0 cut
101 sixie 1.31 Bool_t fApplyD0Cut; //whether apply d0 cut
102     Bool_t fChargeFilter; //whether apply GSF and CFT equal requirement
103     Double_t fD0Cut; //max d0
104     Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
105     Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
106     ElectronTools::EElIdType fElIdType; //!identification scheme
107     ElectronTools::EElIsoType fElIsoType; //!isolation scheme
108     const ElectronCol *fElectrons; //!electron collection
109     const DecayParticleCol *fConversions; //!conversion collection
110     const VertexCol *fVertices; //!vertices branches
111    
112 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
113 loizides 1.1 };
114     }
115     #endif