ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.17
Committed: Thu Apr 30 06:34:02 2009 UTC (16 years ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.16: +5 -2 lines
Log Message:
allow reversing isolation cut

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 ceballos 1.17 // $Id: ElectronIDMod.h,v 1.16 2009/04/07 15:37:09 loizides 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     #include "MitAna/DataTree/interface/Collections.h"
19    
20     namespace mithep
21     {
22     class ElectronIDMod : public BaseMod
23     {
24     public:
25     ElectronIDMod(const char *name="ElectronIDMod",
26 loizides 1.4 const char *title="Electron identification module");
27    
28 loizides 1.13 Bool_t GetApplyConversionFilter() const { return fApplyConvFilter; }
29 ceballos 1.14 Bool_t GetApplyD0Cut() const { return fApplyD0Cut; }
30 loizides 1.8 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
31     Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
32     const char *GetGoodName() const { return GetGoodElectronsName(); }
33     const char *GetGoodElectronsName() const { return fGoodElectronsName; }
34     Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
35     Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
36     const char *GetIDType() const { return fElectronIDType; }
37     const char *GetInputName() const { return fElectronBranchName; }
38     const char *GetIsoType() const { return fElectronIsoType; }
39     const char *GetOutputName() const { return GetGoodElectronsName(); }
40     Double_t GetPtMin() const { return fElectronPtMin; }
41     Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
42 ceballos 1.17 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
43 loizides 1.13 void SetApplyConversionFilter(Bool_t b) { fApplyConvFilter = b; }
44 ceballos 1.14 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
45 loizides 1.8 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
46     void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
47     void SetGoodName(const char *n) { SetGoodElectronsName(n); }
48     void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
49     void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
50     void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
51     void SetIDType(const char *type) { fElectronIDType = type; }
52     void SetInputName(const char *n) { fElectronBranchName = n; }
53     void SetIsoType(const char *type) { fElectronIsoType = type; }
54     void SetOutputName(const char *n) { SetGoodElectronsName(n); }
55     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
56     void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
57 ceballos 1.12 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
58 ceballos 1.17 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
59 loizides 1.4
60     enum EElIdType {
61     kIdUndef = 0, //not defined
62     kTight, //"Tight"
63     kLoose, //"Loose"
64     kLikelihood, //"Likelihood"
65 loizides 1.9 kNoId, //"NoId"
66 loizides 1.4 kCustomId //"Custom"
67     };
68     enum EElIsoType {
69     kIsoUndef = 0, //not defined
70     kTrackCalo, //"TrackCalo"
71     kTrackJura, //"TrackJura"
72     kTrackJuraSliding, //"TrackJuraSliding"
73     kNoIso, //"NoIso"
74     kCustomIso //"Custom"
75     };
76    
77 loizides 1.1 protected:
78 ceballos 1.12 void Process();
79     void SlaveBegin();
80 loizides 1.7
81 ceballos 1.12 TString fElectronBranchName; //name of electron collection (input)
82     TString fConversionBranchName; //name of electron collection (input)
83 loizides 1.16 TString fGoodElectronsName; //name of exported "good electrons" col
84 ceballos 1.12 TString fVertexName; //name of vertex collection
85     TString fElectronIDType; //type of electron ID we impose
86     TString fElectronIsoType; //type of electron Isolation we impose
87     Double_t fElectronPtMin; //min pt cut
88     Double_t fIDLikelihoodCut; //cut value for ID likelihood
89     Double_t fTrackIsolationCut; //cut value for track isolation
90     Double_t fCaloIsolationCut; //cut value for calo isolation
91     Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
92     Double_t fHcalIsolationCut; //cut value for hcal isolation
93 loizides 1.13 Bool_t fApplyConvFilter; //whether remove conversions
94 loizides 1.16 Bool_t fApplyD0Cut; //whether apply d0 cut
95 loizides 1.13 Double_t fD0Cut; //max d0
96     EElIdType fElIdType; //!identification scheme
97     EElIsoType fElIsoType; //!isolation scheme
98 ceballos 1.12 const ElectronCol *fElectrons; //!electron collection
99     const DecayParticleCol *fConversions; //!conversion collection
100 loizides 1.16 const VertexCol *fVertices; //!vertices branches
101 ceballos 1.17 Bool_t fReverseIsoCut; //!apply reversion iso cut
102    
103 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
104 loizides 1.1 };
105     }
106     #endif