ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.31
Committed: Sat Apr 10 18:07:53 2010 UTC (15 years ago) by sixie
Content type: text/plain
Branch: MAIN
Changes since 1.30: +32 -69 lines
Log Message:
Move Custom ID and Iso Functions to a helper class.

File Contents

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