16 |
|
#include "MitAna/DataTree/interface/ElectronCol.h" |
17 |
|
#include "MitAna/DataTree/interface/PFCandidateCol.h" |
18 |
|
#include "MitAna/DataTree/interface/PFJetCol.h" |
19 |
+ |
#include "MitAna/DataTree/interface/GenericParticleCol.h" |
20 |
|
#include "MitCommon/MathTools/interface/MathUtils.h" |
21 |
|
|
22 |
|
namespace mithep { |
36 |
|
const Vertex *fVertex, float deltaZCut = 0.1, float ptCut = 8.0, float etaCut = 5.0); |
37 |
|
|
38 |
|
MetTools(const MuonCol *fMuons, const ElectronCol *fElectrons, const PFCandidateCol *fPFCandidates, |
39 |
< |
const Vertex *fVertex, float deltaZCut = 0.1, float ptCut = 8.0, float etaCut = 5.0, float intRadius = 0.0); |
39 |
> |
const Vertex *fVertex, float deltaZCut = 0.1, float ptCut = 8.0, float etaCut = 5.0, float intRadius = 0.0, |
40 |
> |
const GenericParticle *genP = NULL); |
41 |
|
|
42 |
|
MetTools(const MuonCol *fMuons, const ElectronCol *fElectrons, const PFCandidateCol *fPFCandidates, const PFJetCol *fPFJets, |
43 |
< |
const Vertex *fVertex, float deltaZCut = 0.1, float ptCut = 8.0, float etaCut = 5.0, float intRadius = 0.0); |
43 |
> |
const Vertex *fVertex, float deltaZCut = 0.1, float ptCut = 8.0, float etaCut = 5.0, float intRadius = 0.0, |
44 |
> |
const GenericParticle *genP = NULL); |
45 |
|
|
46 |
|
|
47 |
|
~MetTools() {} |
67 |
|
Met GetMinimumTrackMet (const Met *UncorrectedMet); |
68 |
|
Met GetCorrectedMet() { return fCorrectedMet; } |
69 |
|
Met GetCorrectedTrackMet() { return fCorrectedTrackMet; } |
70 |
+ |
Met GetCHSMet() { return fCHSMet; } |
71 |
+ |
Met GetNHSMet() { return fNHSMet; } |
72 |
|
FourVectorM Recoil() { return fRecoil; } |
73 |
|
FourVectorM ChargedRecoil() { return fChargedRecoil; } |
74 |
|
|
82 |
|
private: |
83 |
|
Met fCorrectedMet; |
84 |
|
Met fCorrectedTrackMet; |
85 |
+ |
Met fCHSMet; |
86 |
+ |
Met fNHSMet; |
87 |
|
FourVectorM fRecoil; |
88 |
|
FourVectorM fChargedRecoil; |
89 |
|
|
94 |
|
double MetTools::GetProjectedMet(const V *fV, const Met *UncorrectedMet) { |
95 |
|
double projectedMet = UncorrectedMet->Pt(); |
96 |
|
double minDPhi = 999; |
90 |
– |
int index = -1; |
97 |
|
for (UInt_t m = 0; m < fV->GetEntries(); ++m) { |
98 |
< |
if (MathUtils::DeltaPhi(UncorrectedMet->Phi(), fV->At(m)->Phi()) < minDPhi) { |
99 |
< |
minDPhi = MathUtils::DeltaPhi(UncorrectedMet->Phi(), fV->At(m)->Phi()); |
94 |
< |
index = m; |
98 |
> |
if (fabs(MathUtils::DeltaPhi(UncorrectedMet->Phi(), fV->At(m)->Phi())) < minDPhi) { |
99 |
> |
minDPhi = fabs(MathUtils::DeltaPhi(UncorrectedMet->Phi(), fV->At(m)->Phi())); |
100 |
|
} |
101 |
|
} |
102 |
|
if (minDPhi < TMath::Pi()/2.) return projectedMet = projectedMet * sin(minDPhi); |
107 |
|
double MetTools::GetProjectedMet(const V *fV) { |
108 |
|
double projectedMet = fCorrectedMet.Pt(); |
109 |
|
double minDPhi = 999; |
105 |
– |
int index = -1; |
110 |
|
for (UInt_t m = 0; m < fV->GetEntries(); ++m) { |
111 |
< |
if (MathUtils::DeltaPhi(fCorrectedMet.Phi(), fV->At(m)->Phi()) < minDPhi) { |
112 |
< |
minDPhi = MathUtils::DeltaPhi(fCorrectedMet.Phi(), fV->At(m)->Phi()); |
109 |
< |
index = m; |
111 |
> |
if (fabs(MathUtils::DeltaPhi(fCorrectedMet.Phi(), fV->At(m)->Phi())) < minDPhi) { |
112 |
> |
minDPhi = fabs(MathUtils::DeltaPhi(fCorrectedMet.Phi(), fV->At(m)->Phi())); |
113 |
|
} |
114 |
|
} |
115 |
|
if (minDPhi < TMath::Pi()/2.) return projectedMet = projectedMet * sin(minDPhi); |
120 |
|
double MetTools::GetProjectedTrackMet(const V *fV) { |
121 |
|
double projectedMet = fCorrectedTrackMet.Pt(); |
122 |
|
double minDPhi = 999; |
120 |
– |
int index = -1; |
123 |
|
for (UInt_t m = 0; m < fV->GetEntries(); ++m) { |
124 |
< |
if (MathUtils::DeltaPhi(fCorrectedTrackMet.Phi(), fV->At(m)->Phi()) < minDPhi) { |
125 |
< |
minDPhi = MathUtils::DeltaPhi(fCorrectedTrackMet.Phi(), fV->At(m)->Phi()); |
124 |
< |
index = m; |
124 |
> |
if (fabs(MathUtils::DeltaPhi(fCorrectedTrackMet.Phi(), fV->At(m)->Phi())) < minDPhi) { |
125 |
> |
minDPhi = fabs(MathUtils::DeltaPhi(fCorrectedTrackMet.Phi(), fV->At(m)->Phi())); |
126 |
|
} |
127 |
|
} |
128 |
|
if (minDPhi < TMath::Pi()/2.) return projectedMet = projectedMet * sin(minDPhi); |