Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-15 22:20:52

0001 #ifndef PFProducer_PFEGammaFilters_H
0002 #define PFProducer_PFEGammaFilters_H
0003 
0004 #include "TMath.h"
0005 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
0006 #include "DataFormats/EgammaCandidates/interface/Photon.h"
0007 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0008 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0009 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0010 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateEGammaExtra.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0013 
0014 #include <iostream>
0015 
0016 class PFEGammaFilters {
0017 public:
0018   PFEGammaFilters(const edm::ParameterSet &iConfig);
0019 
0020   bool passPhotonSelection(const reco::Photon &) const;
0021   bool passElectronSelection(const reco::GsfElectron &, const reco::PFCandidate &, const int &) const;
0022   bool isElectron(const reco::GsfElectron &) const;
0023 
0024   bool isElectronSafeForJetMET(const reco::GsfElectron &,
0025                                const reco::PFCandidate &,
0026                                const reco::Vertex &,
0027                                bool &lockTracks) const;
0028 
0029   bool isPhotonSafeForJetMET(const reco::Photon &, const reco::PFCandidate &) const;
0030 
0031   static void fillPSetDescription(edm::ParameterSetDescription &iDesc);
0032 
0033 private:
0034   bool passGsfElePreSelWithOnlyConeHadem(const reco::GsfElectron &) const;
0035 
0036   // Photon selections
0037   const float ph_Et_;
0038   const float ph_combIso_;
0039   const float ph_loose_hoe_;
0040   const float ph_sietaieta_eb_;
0041   const float ph_sietaieta_ee_;
0042   float pho_sumPtTrackIso_;
0043   float pho_sumPtTrackIsoSlope_;
0044 
0045   // Electron selections
0046   const bool useElePFidDNN_;
0047   const bool usePhotonPFidDNN_;
0048   const bool useEBModelInGap_;
0049   const float endcapBoundary_;
0050   const float extEtaBoundary_;
0051   const float ele_iso_pt_;
0052   const float ele_iso_mva_eb_;
0053   const float ele_iso_mva_ee_;
0054   const float ele_iso_combIso_eb_;
0055   const float ele_iso_combIso_ee_;
0056   const float ele_noniso_mva_;
0057   // Threshold for DNN ele pfid
0058   float ele_dnnLowPtThr_;
0059   float ele_dnnHighPtBarrelThr_;
0060   float ele_dnnHighPtEndcapThr_;
0061   float ele_dnnExtEta1Thr_;
0062   float ele_dnnExtEta2Thr_;
0063   // Thresholds for DNN Bkg ele pfid
0064   float ele_dnnBkgLowPtThr_;
0065   float ele_dnnBkgHighPtBarrelThr_;
0066   float ele_dnnBkgHighPtEndcapThr_;
0067   float ele_dnnBkgExtEta1Thr_;
0068   float ele_dnnBkgExtEta2Thr_;
0069   // Threshold for DNN photon pfid
0070   float photon_dnnBarrelThr_;
0071   float photon_dnnEndcapThr_;
0072 
0073   const int ele_missinghits_;
0074   const float ele_ecalDrivenHademPreselCut_;
0075   const float ele_maxElePtForOnlyMVAPresel_;
0076   float ele_maxNtracks_;
0077   float ele_maxHcalE_;
0078   float ele_maxTrackPOverEele_;
0079   float ele_maxE_;
0080   float ele_maxEleHcalEOverEcalE_;
0081   float ele_maxEcalEOverPRes_;
0082   float ele_maxEeleOverPoutRes_;
0083   float ele_maxHcalEOverP_;
0084   float ele_maxHcalEOverEcalE_;
0085   float ele_maxEcalEOverP_1_;
0086   float ele_maxEcalEOverP_2_;
0087   float ele_maxEeleOverPout_;
0088   float ele_maxDPhiIN_;
0089 
0090   // dead hcal selections (electrons)
0091   std::array<float, 2> badHcal_full5x5_sigmaIetaIeta_;
0092   std::array<float, 2> badHcal_eInvPInv_;
0093   std::array<float, 2> badHcal_dEta_;
0094   std::array<float, 2> badHcal_dPhi_;
0095   bool badHcal_eleEnable_;
0096 
0097   // dead hcal selections (photons)
0098   float badHcal_phoTrkSolidConeIso_offs_;
0099   float badHcal_phoTrkSolidConeIso_slope_;
0100   bool badHcal_phoEnable_;
0101 
0102   const bool debug_ = false;
0103 };
0104 #endif