File indexing completed on 2024-04-06 12:26:47
0001 #ifndef RecoMET_METPUSubtraction_noPileUpMEtUtilities_h
0002 #define RecoMET_METPUSubtraction_noPileUpMEtUtilities_h
0003
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005
0006 #include "DataFormats/Candidate/interface/Candidate.h"
0007 #include "DataFormats/METReco/interface/CommonMETData.h"
0008 #include "DataFormats/METReco/interface/PUSubMETData.h"
0009 #include "DataFormats/METReco/interface/PUSubMETDataFwd.h"
0010
0011 #include <vector>
0012
0013 class NoPileUpMEtUtilities {
0014 public:
0015 enum { kOutsideJet = 0, kWithin, kAll };
0016 enum { kChHSMET = 0, kChPUMET, kNeutralUncMET, kHadronicHSMET, kHadronicPUMET };
0017
0018 NoPileUpMEtUtilities();
0019 ~NoPileUpMEtUtilities();
0020
0021
0022 void finalizeMEtData(CommonMETData&);
0023
0024
0025
0026 reco::PUSubMETCandInfoCollection cleanJets(const reco::PUSubMETCandInfoCollection&,
0027 const std::vector<reco::Candidate::LorentzVector>&,
0028 double,
0029 bool);
0030
0031
0032 reco::PUSubMETCandInfoCollection cleanPFCandidates(const reco::PUSubMETCandInfoCollection&,
0033 const std::vector<reco::Candidate::LorentzVector>&,
0034 double,
0035 bool);
0036
0037
0038 void computeAllSums(const reco::PUSubMETCandInfoCollection& jets,
0039 const reco::PUSubMETCandInfoCollection& pfCandidates);
0040
0041 CommonMETData computeRecoil(int metType, double& sumAbsPx, double& sumAbsPy);
0042
0043
0044 private:
0045
0046 CommonMETData computeCandidateSum(const reco::PUSubMETCandInfoCollection& cands,
0047 bool neutralFracOnly,
0048 double& sumAbsPx,
0049 double& sumAbsPy);
0050
0051 reco::PUSubMETCandInfoCollection selectCandidates(const reco::PUSubMETCandInfoCollection& cands,
0052 double minPt,
0053 double maxPt,
0054 int type,
0055 bool isCharged,
0056 int isWithinJet);
0057
0058 private:
0059 double minPtDef_;
0060 double maxPtDef_;
0061
0062 CommonMETData chHSPfcSum_;
0063 CommonMETData chPUPfcSum_;
0064 CommonMETData nUncPfcSum_;
0065 CommonMETData nHSJetSum_;
0066 CommonMETData nPUJetSum_;
0067
0068 double chHSPfcSumAbsPx_;
0069 double chPUPfcSumAbsPx_;
0070 double nUncPfcSumAbsPx_;
0071 double nHSJetSumAbsPx_;
0072 double nPUJetSumAbsPx_;
0073
0074 double chHSPfcSumAbsPy_;
0075 double chPUPfcSumAbsPy_;
0076 double nUncPfcSumAbsPy_;
0077 double nHSJetSumAbsPy_;
0078 double nPUJetSumAbsPy_;
0079 };
0080
0081 #endif