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/MuonIDMVA.h" |
25 |
|
#include "MitPhysics/Utils/interface/IsolationTools.h" |
26 |
|
#include "MitAna/DataTree/interface/PileupEnergyDensityCol.h" |
27 |
|
|
44 |
|
const char *GetOutputName() const { return GetCleanMuonsName(); } |
45 |
|
Double_t GetPtMin() const { return fMuonPtMin; } |
46 |
|
Double_t GetTrackIsoCut() const { return fTrackIsolationCut; } |
47 |
+ |
Bool_t PassMuonMVA_BDTG_IdIso(const Muon *mu, const Vertex *vertex, |
48 |
+ |
const PileupEnergyDensityCol *PileupEnergyDensity) const; |
49 |
+ |
void SetPrintMVADebugInfo(Bool_t b) { fPrintMVADebugInfo = b; } |
50 |
|
void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; } |
51 |
|
void SetApplyDZCut(Bool_t b) { fApplyDZCut = b; } |
52 |
|
void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; } |
68 |
|
void SetOutputName(const char *name) { SetCleanMuonsName(name); } |
69 |
|
void SetPtMin(Double_t pt) { fMuonPtMin = pt; } |
70 |
|
void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; } |
71 |
+ |
void SetIntRadius(Double_t dr) { fIntRadius = dr; } |
72 |
+ |
void SetMuonMVAWeightsSubdet0Pt10To14p5(TString s) |
73 |
+ |
{ fMuonMVAWeights_Subdet0Pt10To14p5 = s; } |
74 |
+ |
void SetMuonMVAWeightsSubdet1Pt10To14p5(TString s) |
75 |
+ |
{ fMuonMVAWeights_Subdet1Pt10To14p5 = s; } |
76 |
+ |
void SetMuonMVAWeightsSubdet0Pt14p5To20(TString s) |
77 |
+ |
{ fMuonMVAWeights_Subdet0Pt14p5To20 = s; } |
78 |
+ |
void SetMuonMVAWeightsSubdet1Pt14p5To20(TString s) |
79 |
+ |
{ fMuonMVAWeights_Subdet1Pt14p5To20 = s; } |
80 |
+ |
void SetMuonMVAWeightsSubdet0Pt20ToInf(TString s) |
81 |
+ |
{ fMuonMVAWeights_Subdet0Pt20ToInf = s; } |
82 |
+ |
void SetMuonMVAWeightsSubdet1Pt20ToInf(TString s) |
83 |
+ |
{ fMuonMVAWeights_Subdet1Pt20ToInf = s; } |
84 |
|
|
85 |
|
enum EMuIdType { |
86 |
|
kIdUndef = 0, //not defined |
90 |
|
kLoose, //"Loose" |
91 |
|
kWWMuIdV1, //"WWMuIdV1" |
92 |
|
kWWMuIdV2, //"WWMuIdV2" |
93 |
< |
kNoId, //"NoId" |
94 |
< |
kCustomId //"Custom" |
93 |
> |
kWWMuIdV3, //"WWMuIdV3" |
94 |
> |
kNoId, //"NoId" |
95 |
> |
kCustomId, //"Custom" |
96 |
> |
kMVAID_BDTG_IDIso //"BDTG ID + Iso03, Iso04 Combined" |
97 |
|
}; |
98 |
|
enum EMuIsoType { |
99 |
|
kIsoUndef = 0, //"not defined" |
102 |
|
kTrackCaloSliding, //"TrackCaloSliding" |
103 |
|
kTrackCaloSlidingNoCorrection, //"TrackCaloSlidingNoCorrection" |
104 |
|
kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected" |
105 |
+ |
kCombinedRelativeEffectiveAreaCorrected, |
106 |
|
kCustomIso, //"Custom" |
107 |
|
kPFIso, //"PFIso" |
108 |
+ |
kPFIsoEffectiveAreaCorrected, //"PFIso with EffectiveArea Pileup Correction" |
109 |
|
kPFIsoNoL, //"PFIsoNoL" |
110 |
< |
kNoIso //"NoIso" |
110 |
> |
kNoIso, //"NoIso" |
111 |
> |
kMVAIso_BDTG_IDIso //"BDTG ID + Iso03, Iso04 Combined" |
112 |
|
}; |
113 |
|
enum EMuClassType { |
114 |
|
kClassUndef = 0, //not defined |
119 |
|
kTrackerMuon, //"TrackerMuon" |
120 |
|
kCaloMuon, //"CaloMuon" |
121 |
|
kTrackerBased //"TrackerMuon or CaloMuon" |
122 |
+ |
|
123 |
|
}; |
124 |
|
|
125 |
|
protected: |
126 |
|
void Process(); |
127 |
|
void SlaveBegin(); |
128 |
|
|
129 |
+ |
Bool_t fPrintMVADebugInfo; //print MVA debug information |
130 |
|
TString fMuonBranchName; //name of muon collection (input) |
131 |
|
TString fCleanMuonsName; //name of exported "good muon" collection |
132 |
|
TString fNonIsolatedMuonsName; //name of imported "old muon" collection |
158 |
|
const BeamSpotCol *fBeamSpot; //!beamspot branch |
159 |
|
const TrackCol *fTracks; //!track branch |
160 |
|
const PFCandidateCol *fPFCandidates; //!pfcandidate branch |
161 |
+ |
Double_t fIntRadius; //!min IntRadius cut in pf isolation |
162 |
|
MuonCol *fNonIsolatedMuons; //!pointer to old muon collection |
163 |
|
ElectronCol *fNonIsolatedElectrons;//!pointer to old electron collection |
164 |
|
TString fPileupEnergyDensityName; |
165 |
|
const PileupEnergyDensityCol *fPileupEnergyDensity; |
166 |
+ |
MuonTools *fMuonTools; // interface to tools for muon ID |
167 |
+ |
MuonIDMVA *fMuonIDMVA; // helper class for MuonMVA |
168 |
+ |
TString fMuonMVAWeights_Subdet0Pt10To14p5; |
169 |
+ |
TString fMuonMVAWeights_Subdet1Pt10To14p5; |
170 |
+ |
TString fMuonMVAWeights_Subdet0Pt14p5To20; |
171 |
+ |
TString fMuonMVAWeights_Subdet1Pt14p5To20; |
172 |
+ |
TString fMuonMVAWeights_Subdet0Pt20ToInf; |
173 |
+ |
TString fMuonMVAWeights_Subdet1Pt20ToInf; |
174 |
|
|
175 |
|
ClassDef(MuonIDMod, 1) // Muon identification module |
176 |
|
}; |