CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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_
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
double getLeptonsChSumMEX() const
tuple cfg
Definition: looper.py:296
double getLeptonsChSumMEY() const
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_
CommonMETData neutralJetPUSum_
CommonMETData pfCandChPUSum_
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double mvaCut_[3][4][4]
double getLeptonsSumMEX() const
vector< PseudoJet > jets
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)
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 getLeptonsSumMEY() const
tuple metType
MET
Definition: autophobj.py:214
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
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_