ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
Revision: 1.28
Committed: Mon Feb 21 13:50:20 2011 UTC (14 years, 2 months ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.27: +17 -3 lines
Log Message:
new beta

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 ceballos 1.28 // $Id: MuonIDMod.h,v 1.27 2010/10/29 16:19:46 ceballos Exp $
3 loizides 1.1 //
4     // MuonIDMod
5     //
6 loizides 1.6 // This module applies muon identification criteria and exports a pointer to a collection
7 loizides 1.7 // of "good muons" according to the specified ID scheme.
8 loizides 1.1 //
9 loizides 1.16 // See http://indico.cern.ch/contributionDisplay.py?contribId=1&confId=45945
10     // See http://indico.cern.ch/getFile.py/access?contribId=1&resId=0&materialId=slides&confId=42229
11     //
12 ceballos 1.15 // Authors: S.Xie
13 loizides 1.1 //--------------------------------------------------------------------------------------------------
14    
15 loizides 1.6 #ifndef MITPHYSICS_MODS_MUONIDMOD_H
16     #define MITPHYSICS_MODS_MUONIDMOD_H
17 loizides 1.1
18     #include "MitAna/TreeMod/interface/BaseMod.h"
19 loizides 1.22 #include "MitAna/DataTree/interface/MuonFwd.h"
20     #include "MitAna/DataTree/interface/VertexFwd.h"
21 ceballos 1.28 #include "MitAna/DataTree/interface/TrackFwd.h"
22     #include "MitAna/DataTree/interface/PFCandidateFwd.h"
23 ceballos 1.5 #include "MitPhysics/Utils/interface/MuonTools.h"
24 ceballos 1.28 #include "MitPhysics/Utils/interface/IsolationTools.h"
25 loizides 1.1
26     namespace mithep
27     {
28     class MuonIDMod : public BaseMod
29     {
30     public:
31     MuonIDMod(const char *name="MuonIDMod",
32 loizides 1.6 const char *title="Muon identification module");
33    
34 loizides 1.11 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
35     const char *GetClassType() const { return fMuonClassType; }
36     const char *GetCleanName() const { return GetCleanMuonsName(); }
37     const char *GetCleanMuonsName() const { return fCleanMuonsName; }
38     Double_t GetCombIsoCut() const { return fCombIsolationCut; }
39     const char *GetIDType() const { return fMuonIDType; }
40     const char *GetInputName() const { return fMuonBranchName; }
41     const char *GetIsoType() const { return fMuonIsoType; }
42     const char *GetOutputName() const { return GetCleanMuonsName(); }
43 ceballos 1.24 Double_t GetPtMin() const { return fMuonPtMin; }
44 loizides 1.20 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
45 ceballos 1.21 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
46 loizides 1.11 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
47 loizides 1.20 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
48 loizides 1.11 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
49     void SetClassType(const char *type) { fMuonClassType = type; }
50 loizides 1.18 void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; }
51 ceballos 1.28 void SetOldMuonsName(const char *n) { fOldMuonsName = n; }
52     void SetOldElectronsName(const char *n) { fOldElectronsName = n; }
53 loizides 1.11 void SetCleanName(const char *name) { SetCleanMuonsName(name); }
54 loizides 1.18 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
55 loizides 1.20 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
56 ceballos 1.25 void SetEtaCut(Double_t cut) { fEtaCut = cut; }
57 loizides 1.11 void SetIDType(const char *type) { fMuonIDType = type; }
58     void SetInputName(const char *name) { fMuonBranchName = name; }
59     void SetIsoType(const char *type) { fMuonIsoType = type; }
60     void SetOutputName(const char *name) { SetCleanMuonsName(name); }
61     void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
62 loizides 1.20 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
63 ceballos 1.21 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
64 loizides 1.11 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
65 loizides 1.6
66     enum EMuIdType {
67     kIdUndef = 0, //not defined
68 ceballos 1.26 kWMuId, //"WMuId"
69     kZMuId, //"ZMuId"
70 loizides 1.6 kTight, //"Tight"
71     kLoose, //"Loose"
72 ceballos 1.27 kWWMuId, //"WWMuId"
73 loizides 1.12 kNoId, //"NoId"
74 loizides 1.6 kCustomId //"Custom"
75     };
76     enum EMuIsoType {
77     kIsoUndef = 0, //not defined
78     kTrackCalo, //"TrackCalo"
79     kTrackCaloCombined, //"TrackCaloCombined"
80     kTrackCaloSliding, //"TrackCaloSliding"
81     kCustomIso, //"Custom"
82 ceballos 1.28 kPFIso, //"PFIso"
83     kPFIsoNoL, //"PFIsoNoL"
84 loizides 1.6 kNoIso //"NoIso"
85     };
86     enum EMuClassType {
87     kClassUndef = 0, //not defined
88     kAll, //"All"
89     kGlobal, //"Global"
90     kSta, //"Standalone"
91 loizides 1.23 kTrackerMuon, //"TrackerMuon"
92     kCaloMuon, //"CaloMuon"
93     kTrackerBased //"TrackerMuon or CaloMuon"
94 loizides 1.6 };
95    
96 loizides 1.1 protected:
97 loizides 1.11 void Process();
98     void SlaveBegin();
99 loizides 1.10
100 loizides 1.11 TString fMuonBranchName; //name of muon collection (input)
101     TString fCleanMuonsName; //name of exported "good muon" collection
102 ceballos 1.28 TString fOldMuonsName; //name of imported "old muon" collection
103     TString fOldElectronsName; //name of imported "old electron" collection
104 ceballos 1.15 TString fVertexName; //name of vertex collection
105 ceballos 1.28 TString fTrackName; //name of track collection
106     TString fPFCandidatesName; //name of pfcandidates collection
107 loizides 1.11 TString fMuonIDType; //type of muon id scheme we impose
108     TString fMuonIsoType; //type of muon isolations scheme we impose
109     TString fMuonClassType; //type of muon class we impose
110     Double_t fTrackIsolationCut; //cut value for track isolation
111     Double_t fCaloIsolationCut; //cut value for calo isolation
112     Double_t fCombIsolationCut; //cut value for combined isolation
113     Double_t fMuonPtMin; //min muon pt
114 loizides 1.20 Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
115 loizides 1.16 Double_t fD0Cut; //max d0
116 ceballos 1.25 Double_t fEtaCut; //max eta, absolute value
117 loizides 1.19 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
118 ceballos 1.21 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
119 loizides 1.11 EMuIdType fMuIDType; //!muon id type (imposed)
120     EMuIsoType fMuIsoType; //!muon iso type (imposed)
121     EMuClassType fMuClassType; //!muon class type (imposed)
122 loizides 1.16 const MuonCol *fMuons; //!muon collection
123     const VertexCol *fVertices; //!vertices branch
124 ceballos 1.28 const TrackCol *fTracks; //!track branch
125     const PFCandidateCol *fPFCandidates; //!pfcandidate branch
126     MuonCol *fOldMuons; //!pointer to old muon collection
127     ElectronCol *fOldElectrons; //!pointer to old electron collection
128    
129 loizides 1.11 ClassDef(MuonIDMod, 1) // Muon identification module
130 loizides 1.1 };
131     }
132     #endif