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
virtual ~MvaMEtUtilities()
CommonMETData leptonsChSum_
void finalize(CommonMETData &metData)
unsigned numJetsAboveThreshold(const std::vector< reco::PUSubMETCandInfo > &, double)
std::vector< reco::PUSubMETCandInfo > cleanedJets_
CommonMETData neutralJetHSSum_
bool passesMVA(const reco::Candidate::LorentzVector &, double)
CommonMETData leptonsSum_
double getLeptonsChSumMEX() const
CommonMETData neutralJetPUSum_
CommonMETData pfCandChPUSum_
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double mvaCut_[3][4][4]
double getLeptonsSumMEY() const
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
MvaMEtUtilities(const edm::ParameterSet &cfg)
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
std::vector< reco::PUSubMETCandInfo > cleanPFCands(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, double, bool)
double getLeptonsSumMEX() const
CommonMETData computeRecoil(int metType)
CommonMETData computeCandSum(int compKey, double dZmax, int dZflag, bool iCharged, bool mvaPassFlag, const std::vector< reco::PUSubMETCandInfo > &objects)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
double getLeptonsChSumMEY() const
std::vector< reco::PUSubMETCandInfo > cleanJets(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, double, double)
reco::Candidate::LorentzVector jetP4(const std::vector< reco::PUSubMETCandInfo > &, unsigned)
CommonMETData pfCandSum_
CommonMETData pfCandChHSSum_