CMS 3D CMS Logo

MvaMEtUtilities.h
Go to the documentation of this file.
1 #ifndef RecoMET_METPUSubtraction_mvaMEtUtilities_h
2 #define RecoMET_METPUSubtraction_mvaMEtUtilities_h
3 
5 
9 
10 #include <vector>
11 #include <utility>
12 
14 public:
15  enum { kPFCands = 0, kLeptons, kJets };
16  enum { kPF = 0, kChHS, kHS, kPU, kHSMinusNeutralPU };
17 
18 private:
26 
27  std::vector<reco::PUSubMETCandInfo> cleanedJets_;
28 
29  double dzCut_;
30  double ptThreshold_;
31 
32 public:
34  virtual ~MvaMEtUtilities();
35 
36  reco::Candidate::LorentzVector leadJetP4(const std::vector<reco::PUSubMETCandInfo>&);
37  reco::Candidate::LorentzVector subleadJetP4(const std::vector<reco::PUSubMETCandInfo>&);
38  unsigned numJetsAboveThreshold(const std::vector<reco::PUSubMETCandInfo>&, double);
39 
40  const std::vector<reco::PUSubMETCandInfo>& getCleanedJets() const;
41 
42  //access functions for lepton suns ============
43  double getLeptonsSumMEX() const;
44  double getLeptonsSumMEY() const;
45 
46  double getLeptonsChSumMEX() const;
47  double getLeptonsChSumMEY() const;
48 
49  //recoil and sum computing functions ========
50  void computeAllSums(const std::vector<reco::PUSubMETCandInfo>& jets,
51  const std::vector<reco::PUSubMETCandInfo>& leptons,
52  const std::vector<reco::PUSubMETCandInfo>& pfCandidates);
53 
55 
56 protected:
57  reco::Candidate::LorentzVector jetP4(const std::vector<reco::PUSubMETCandInfo>&, unsigned);
58 
59  // cuts on jet Id. MVA output in bins of jet Pt and eta
60  double mvaCut_[3][4][4];
61 
62 private:
63  //utilities functions for jets ===============
64  bool passesMVA(const reco::Candidate::LorentzVector&, double);
65 
66  std::vector<reco::PUSubMETCandInfo> cleanJets(const std::vector<reco::PUSubMETCandInfo>&,
67  const std::vector<reco::PUSubMETCandInfo>&,
68  double,
69  double);
70 
71  //utilities functions for pf candidate ======
72  std::vector<reco::PUSubMETCandInfo> cleanPFCands(const std::vector<reco::PUSubMETCandInfo>&,
73  const std::vector<reco::PUSubMETCandInfo>&,
74  double,
75  bool);
76 
77  CommonMETData computeCandSum(int compKey,
78  double dZmax,
79  int dZflag,
80  bool iCharged,
81  bool mvaPassFlag,
82  const std::vector<reco::PUSubMETCandInfo>& objects);
83 
84  void finalize(CommonMETData& metData);
85 };
86 
87 #endif
zmumugammaAnalyzer_cfi.pfCandidates
pfCandidates
Definition: zmumugammaAnalyzer_cfi.py:11
MvaMEtUtilities::leadJetP4
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
Definition: MvaMEtUtilities.cc:106
HLT_FULL_cff.leptons
leptons
Definition: HLT_FULL_cff.py:26283
MvaMEtUtilities::leptonsSum_
CommonMETData leptonsSum_
Definition: MvaMEtUtilities.h:19
MvaMEtUtilities::cleanedJets_
std::vector< reco::PUSubMETCandInfo > cleanedJets_
Definition: MvaMEtUtilities.h:27
objects
Definition: __init__.py:1
MvaMEtUtilities::ptThreshold_
double ptThreshold_
Definition: MvaMEtUtilities.h:30
MvaMEtUtilities::pfCandSum_
CommonMETData pfCandSum_
Definition: MvaMEtUtilities.h:21
MvaMEtUtilities::subleadJetP4
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
Definition: MvaMEtUtilities.cc:110
MvaMEtUtilities::getLeptonsSumMEX
double getLeptonsSumMEX() const
Definition: MvaMEtUtilities.cc:296
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
MvaMEtUtilities::pfCandChHSSum_
CommonMETData pfCandChHSSum_
Definition: MvaMEtUtilities.h:22
CommonMETData
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
objects.autophobj.metType
metType
Definition: autophobj.py:214
MvaMEtUtilities::passesMVA
bool passesMVA(const reco::Candidate::LorentzVector &, double)
Definition: MvaMEtUtilities.cc:86
MvaMEtUtilities::jetP4
reco::Candidate::LorentzVector jetP4(const std::vector< reco::PUSubMETCandInfo > &, unsigned)
Definition: MvaMEtUtilities.cc:114
MvaMEtUtilities::getCleanedJets
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
Definition: MvaMEtUtilities.cc:304
MvaMEtUtilities::pfCandChPUSum_
CommonMETData pfCandChPUSum_
Definition: MvaMEtUtilities.h:23
MvaMEtUtilities::numJetsAboveThreshold
unsigned numJetsAboveThreshold(const std::vector< reco::PUSubMETCandInfo > &, double)
Definition: MvaMEtUtilities.cc:123
MvaMEtUtilities::computeRecoil
CommonMETData computeRecoil(int metType)
Definition: MvaMEtUtilities.cc:236
edm::ParameterSet
Definition: ParameterSet.h:47
MvaMEtUtilities::kPU
Definition: MvaMEtUtilities.h:16
MvaMEtUtilities::kJets
Definition: MvaMEtUtilities.h:15
MvaMEtUtilities::kPF
Definition: MvaMEtUtilities.h:16
MvaMEtUtilities::mvaCut_
double mvaCut_[3][4][4]
Definition: MvaMEtUtilities.h:60
MvaMEtUtilities::kLeptons
Definition: MvaMEtUtilities.h:15
MvaMEtUtilities::kHS
Definition: MvaMEtUtilities.h:16
CommonMETData.h
MvaMEtUtilities::MvaMEtUtilities
MvaMEtUtilities(const edm::ParameterSet &cfg)
Definition: MvaMEtUtilities.cc:8
looper.cfg
cfg
Definition: looper.py:297
MvaMEtUtilities::computeCandSum
CommonMETData computeCandSum(int compKey, double dZmax, int dZflag, bool iCharged, bool mvaPassFlag, const std::vector< reco::PUSubMETCandInfo > &objects)
Definition: MvaMEtUtilities.cc:177
MvaMEtUtilities::getLeptonsChSumMEX
double getLeptonsChSumMEX() const
Definition: MvaMEtUtilities.cc:300
MvaMEtUtilities
Definition: MvaMEtUtilities.h:13
MvaMEtUtilities::kHSMinusNeutralPU
Definition: MvaMEtUtilities.h:16
MvaMEtUtilities::computeAllSums
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
Definition: MvaMEtUtilities.cc:282
MvaMEtUtilities::neutralJetHSSum_
CommonMETData neutralJetHSSum_
Definition: MvaMEtUtilities.h:24
PUSubMETData.h
MvaMEtUtilities::finalize
void finalize(CommonMETData &metData)
Definition: MvaMEtUtilities.cc:171
MvaMEtUtilities::~MvaMEtUtilities
virtual ~MvaMEtUtilities()
Definition: MvaMEtUtilities.cc:82
MvaMEtUtilities::cleanPFCands
std::vector< reco::PUSubMETCandInfo > cleanPFCands(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, double, bool)
Definition: MvaMEtUtilities.cc:150
MvaMEtUtilities::neutralJetPUSum_
CommonMETData neutralJetPUSum_
Definition: MvaMEtUtilities.h:25
MvaMEtUtilities::kChHS
Definition: MvaMEtUtilities.h:16
MvaMEtUtilities::dzCut_
double dzCut_
Definition: MvaMEtUtilities.h:29
MvaMEtUtilities::kPFCands
Definition: MvaMEtUtilities.h:15
Candidate.h
ParameterSet.h
MvaMEtUtilities::getLeptonsChSumMEY
double getLeptonsChSumMEY() const
Definition: MvaMEtUtilities.cc:302
MvaMEtUtilities::leptonsChSum_
CommonMETData leptonsChSum_
Definition: MvaMEtUtilities.h:20
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
MvaMEtUtilities::getLeptonsSumMEY
double getLeptonsSumMEY() const
Definition: MvaMEtUtilities.cc:298
MvaMEtUtilities::cleanJets
std::vector< reco::PUSubMETCandInfo > cleanJets(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, double, double)
Definition: MvaMEtUtilities.cc:131