4 |
|
// MuonIDMod |
5 |
|
// |
6 |
|
// This module applies muon identification criteria and exports a pointer to a collection |
7 |
< |
// of "good muons" according to the specified ID scheme. TODO: Pointer to a presentation. |
7 |
> |
// of "good muons" according to the specified ID scheme. |
8 |
> |
// |
9 |
> |
// 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 |
|
// Authors: S.Xie |
13 |
|
//-------------------------------------------------------------------------------------------------- |
16 |
|
#define MITPHYSICS_MODS_MUONIDMOD_H |
17 |
|
|
18 |
|
#include "MitAna/TreeMod/interface/BaseMod.h" |
19 |
< |
#include "MitAna/DataTree/interface/Collections.h" |
19 |
> |
#include "MitAna/DataTree/interface/MuonFwd.h" |
20 |
> |
#include "MitAna/DataTree/interface/VertexFwd.h" |
21 |
> |
#include "MitAna/DataTree/interface/TrackFwd.h" |
22 |
> |
#include "MitAna/DataTree/interface/PFCandidateFwd.h" |
23 |
|
#include "MitPhysics/Utils/interface/MuonTools.h" |
24 |
+ |
#include "MitPhysics/Utils/interface/IsolationTools.h" |
25 |
|
|
26 |
|
namespace mithep |
27 |
|
{ |
30 |
|
public: |
31 |
|
MuonIDMod(const char *name="MuonIDMod", |
32 |
|
const char *title="Muon identification module"); |
26 |
– |
~MuonIDMod() {} |
33 |
|
|
34 |
< |
void SetMuonBranchName(const char *name) { fMuonBranchName = name; } |
35 |
< |
void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; } |
36 |
< |
void SetMuonIDType(const char *type) { fMuonIDType = type; } |
37 |
< |
void SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut = cut; } |
38 |
< |
void SetCaloIsolationCut(Double_t cut) { fCaloIsolationCut = cut; } |
39 |
< |
void SetCombIsolationCut(Double_t cut) { fCombIsolationCut = cut; } |
40 |
< |
void SetMuonPtMin(Double_t pt) { fMuonPtMin = pt; } |
34 |
> |
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 |
> |
Double_t GetPtMin() const { return fMuonPtMin; } |
44 |
> |
Bool_t GetReverseIsoCut() const { return fReverseIsoCut; } |
45 |
> |
Bool_t GetReverseD0Cut() const { return fReverseD0Cut; } |
46 |
> |
Double_t GetTrackIsoCut() const { return fTrackIsolationCut; } |
47 |
> |
void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; } |
48 |
> |
void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; } |
49 |
> |
void SetClassType(const char *type) { fMuonClassType = type; } |
50 |
> |
void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; } |
51 |
> |
void SetOldMuonsName(const char *n) { fOldMuonsName = n; } |
52 |
> |
void SetOldElectronsName(const char *n) { fOldElectronsName = n; } |
53 |
> |
void SetCleanName(const char *name) { SetCleanMuonsName(name); } |
54 |
> |
void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; } |
55 |
> |
void SetD0Cut(Double_t cut) { fD0Cut = cut; } |
56 |
> |
void SetEtaCut(Double_t cut) { fEtaCut = cut; } |
57 |
> |
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 |
> |
void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; } |
63 |
> |
void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; } |
64 |
> |
void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; } |
65 |
|
|
66 |
|
enum EMuIdType { |
67 |
|
kIdUndef = 0, //not defined |
68 |
+ |
kWMuId, //"WMuId" |
69 |
+ |
kZMuId, //"ZMuId" |
70 |
|
kTight, //"Tight" |
71 |
|
kLoose, //"Loose" |
72 |
+ |
kWWMuId, //"WWMuId" |
73 |
+ |
kNoId, //"NoId" |
74 |
|
kCustomId //"Custom" |
75 |
|
}; |
76 |
|
enum EMuIsoType { |
79 |
|
kTrackCaloCombined, //"TrackCaloCombined" |
80 |
|
kTrackCaloSliding, //"TrackCaloSliding" |
81 |
|
kCustomIso, //"Custom" |
82 |
+ |
kPFIso, //"PFIso" |
83 |
+ |
kPFIsoNoL, //"PFIsoNoL" |
84 |
|
kNoIso //"NoIso" |
85 |
|
}; |
86 |
|
enum EMuClassType { |
88 |
|
kAll, //"All" |
89 |
|
kGlobal, //"Global" |
90 |
|
kSta, //"Standalone" |
91 |
< |
kTrackerOnly //"TrackerOnly" |
91 |
> |
kTrackerMuon, //"TrackerMuon" |
92 |
> |
kCaloMuon, //"CaloMuon" |
93 |
> |
kTrackerBased //"TrackerMuon or CaloMuon" |
94 |
|
}; |
95 |
|
|
96 |
|
protected: |
97 |
< |
TString fMuonBranchName; //name of muon collection (in branch) |
98 |
< |
TString fCleanMuonsName; //name of exported "good muon" collection |
99 |
< |
TString fMuonIDType; //type of muon id scheme we impose |
100 |
< |
TString fMuonIsoType; //type of muon isolations scheme we impose |
101 |
< |
TString fMuonClassType; //type of muon class we impose |
102 |
< |
Double_t fTrackIsolationCut; //cut value for track isolation |
103 |
< |
Double_t fCaloIsolationCut; //cut value for calo isolation |
104 |
< |
Double_t fCombIsolationCut; //cut value for combined isolation |
105 |
< |
Double_t fMuonPtMin; //min muon pt |
106 |
< |
MuonCol *fMuons; //!muon branch |
107 |
< |
MuonTools *fMuonTools; //!muon tool |
108 |
< |
EMuIdType fMuIDType; //! |
109 |
< |
EMuIsoType fMuIsoType; //! |
110 |
< |
EMuClassType fMuClassType; //! |
111 |
< |
|
112 |
< |
void Process(); |
113 |
< |
void SlaveBegin(); |
114 |
< |
|
115 |
< |
ClassDef(MuonIDMod,1) // TAM module for muon id |
97 |
> |
void Process(); |
98 |
> |
void SlaveBegin(); |
99 |
> |
|
100 |
> |
TString fMuonBranchName; //name of muon collection (input) |
101 |
> |
TString fCleanMuonsName; //name of exported "good muon" collection |
102 |
> |
TString fOldMuonsName; //name of imported "old muon" collection |
103 |
> |
TString fOldElectronsName; //name of imported "old electron" collection |
104 |
> |
TString fVertexName; //name of vertex collection |
105 |
> |
TString fTrackName; //name of track collection |
106 |
> |
TString fPFCandidatesName; //name of pfcandidates collection |
107 |
> |
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 |
> |
Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1) |
115 |
> |
Double_t fD0Cut; //max d0 |
116 |
> |
Double_t fEtaCut; //max eta, absolute value |
117 |
> |
Bool_t fReverseIsoCut; //apply reversion iso cut (default=0) |
118 |
> |
Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0) |
119 |
> |
EMuIdType fMuIDType; //!muon id type (imposed) |
120 |
> |
EMuIsoType fMuIsoType; //!muon iso type (imposed) |
121 |
> |
EMuClassType fMuClassType; //!muon class type (imposed) |
122 |
> |
const MuonCol *fMuons; //!muon collection |
123 |
> |
const VertexCol *fVertices; //!vertices branch |
124 |
> |
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 |
> |
ClassDef(MuonIDMod, 1) // Muon identification module |
130 |
|
}; |
131 |
|
} |
132 |
|
#endif |