ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/ElectronIDMod.h
Revision: 1.8
Committed: Wed Dec 10 17:28:22 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.7: +28 -14 lines
Log Message:
Added naming convention: SetInputName/SetOutputName etc.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.8 // $Id: ElectronIDMod.h,v 1.7 2008/12/10 11:44:32 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.4 // Authors: S.Xie, C.Loizides
10 loizides 1.1 //--------------------------------------------------------------------------------------------------
11    
12 loizides 1.4 #ifndef MITPHYSICS_MODS_ELECTRONIDMOD_H
13     #define MITPHYSICS_MODS_ELECTRONIDMOD_H
14 loizides 1.1
15     #include "MitAna/TreeMod/interface/BaseMod.h"
16     #include "MitAna/DataTree/interface/Collections.h"
17    
18     namespace mithep
19     {
20     class ElectronIDMod : public BaseMod
21     {
22     public:
23     ElectronIDMod(const char *name="ElectronIDMod",
24 loizides 1.4 const char *title="Electron identification module");
25 loizides 1.1 ~ElectronIDMod() {}
26 loizides 1.4
27 loizides 1.8 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
28     Double_t GetEcalJurIsoCut() const { return fEcalJuraIsoCut; }
29     const char *GetGoodName() const { return GetGoodElectronsName(); }
30     const char *GetGoodElectronsName() const { return fGoodElectronsName; }
31     Double_t GetHcalIsoCut() const { return fHcalIsolationCut; }
32     Double_t GetIDLikelihoodCut() const { return fIDLikelihoodCut; }
33     const char *GetIDType() const { return fElectronIDType; }
34     const char *GetInputName() const { return fElectronBranchName; }
35     const char *GetIsoType() const { return fElectronIsoType; }
36     const char *GetOutputName() const { return GetGoodElectronsName(); }
37     Double_t GetPtMin() const { return fElectronPtMin; }
38     Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
39     void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
40     void SetEcalJurIsoCut(Double_t cut) { fEcalJuraIsoCut = cut; }
41     void SetGoodName(const char *n) { SetGoodElectronsName(n); }
42     void SetGoodElectronsName(const char *n) { fGoodElectronsName = n; }
43     void SetHcalIsoCut(Double_t cut) { fHcalIsolationCut = cut; }
44     void SetIDLikelihoodCut(Double_t cut) { fIDLikelihoodCut = cut; }
45     void SetIDType(const char *type) { fElectronIDType = type; }
46     void SetInputName(const char *n) { fElectronBranchName = n; }
47     void SetIsoType(const char *type) { fElectronIsoType = type; }
48     void SetOutputName(const char *n) { SetGoodElectronsName(n); }
49     void SetPtMin(Double_t pt) { fElectronPtMin = pt; }
50     void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
51 loizides 1.4
52     enum EElIdType {
53     kIdUndef = 0, //not defined
54     kTight, //"Tight"
55     kLoose, //"Loose"
56     kLikelihood, //"Likelihood"
57     kCustomId //"Custom"
58     };
59     enum EElIsoType {
60     kIsoUndef = 0, //not defined
61     kTrackCalo, //"TrackCalo"
62     kTrackJura, //"TrackJura"
63     kTrackJuraSliding, //"TrackJuraSliding"
64     kNoIso, //"NoIso"
65     kCustomIso //"Custom"
66     };
67    
68 loizides 1.1 protected:
69 loizides 1.7 void Process();
70     void SlaveBegin();
71    
72 loizides 1.8 TString fElectronBranchName; //name of electron collection (input)
73 loizides 1.6 TString fGoodElectronsName; //name of exported "good electrons" collection
74     TString fElectronIDType; //type of electron ID we impose
75     TString fElectronIsoType; //type of electron Isolation we impose
76     Double_t fElectronPtMin; //min pt cut
77     Double_t fIDLikelihoodCut; //cut value for ID likelihood
78     Double_t fTrackIsolationCut; //cut value for track isolation
79     Double_t fCaloIsolationCut; //cut value for calo isolation
80     Double_t fEcalJuraIsoCut; //cut value for ecal jurassic isolation
81     Double_t fHcalIsolationCut; //cut value for hcal isolation
82 loizides 1.8 const ElectronCol *fElectrons; //!electron collection
83 loizides 1.6 EElIdType fElIdType; //!identification scheme
84     EElIsoType fElIsoType; //!isolation scheme
85 loizides 1.1
86 loizides 1.8 ClassDef(ElectronIDMod, 1) // Electron identification module
87 loizides 1.1 };
88     }
89     #endif