test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
15  public:
16 
19 
20  private:
21 
29 
30  std::vector<reco::PUSubMETCandInfo> cleanedJets_;
31 
32  double dzCut_;
33  double ptThreshold_;
34 
35  public:
36 
38  virtual ~MvaMEtUtilities();
39 
40  reco::Candidate::LorentzVector leadJetP4(const std::vector<reco::PUSubMETCandInfo>&);
41  reco::Candidate::LorentzVector subleadJetP4(const std::vector<reco::PUSubMETCandInfo>&);
42  unsigned numJetsAboveThreshold(const std::vector<reco::PUSubMETCandInfo>&, double);
43 
44  const std::vector<reco::PUSubMETCandInfo>& getCleanedJets() const;
45 
46  //access functions for lepton suns ============
47  double getLeptonsSumMEX() const;
48  double getLeptonsSumMEY() const;
49 
50  double getLeptonsChSumMEX() const;
51  double getLeptonsChSumMEY() const;
52 
53  //recoil and sum computing functions ========
54  void computeAllSums(const std::vector<reco::PUSubMETCandInfo>& jets,
55  const std::vector<reco::PUSubMETCandInfo>& leptons,
56  const std::vector<reco::PUSubMETCandInfo>& pfCandidates);
57 
59 
60 
61  protected:
62 
63  reco::Candidate::LorentzVector jetP4(const std::vector<reco::PUSubMETCandInfo>&, unsigned);
64 
65  // cuts on jet Id. MVA output in bins of jet Pt and eta
66  double mvaCut_[3][4][4];
67 
68  private:
69 
70  //utilities functions for jets ===============
71  bool passesMVA(const reco::Candidate::LorentzVector&, double);
72 
73  std::vector<reco::PUSubMETCandInfo> cleanJets(const std::vector<reco::PUSubMETCandInfo>&,
74  const std::vector<reco::PUSubMETCandInfo>&, double, double);
75 
76  //utilities functions for pf candidate ======
77  std::vector<reco::PUSubMETCandInfo> cleanPFCands(const std::vector<reco::PUSubMETCandInfo>&,
78  const std::vector<reco::PUSubMETCandInfo>&, double, bool);
79 
80  CommonMETData computeCandSum( int compKey, double dZmax, int dZflag,
81  bool iCharged, bool mvaPassFlag,
82  const std::vector<reco::PUSubMETCandInfo>& objects );
83 
84 
85  void finalize(CommonMETData& metData);
86 
87 };
88 
89 #endif
virtual ~MvaMEtUtilities()
CommonMETData leptonsChSum_
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
double getLeptonsChSumMEX() const
tuple cfg
Definition: looper.py:293
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 > &)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
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:37
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_