File indexing completed on 2024-04-06 12:18:30
0001 #ifndef HLTHcalMETNoiseCleaner_h
0002 #define HLTHcalMETNoiseCleaner_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/global/EDFilter.h"
0011 #include "RecoMET/METAlgorithms/interface/HcalNoiseAlgo.h"
0012 #include "DataFormats/METReco/interface/HcalNoiseRBX.h"
0013 #include "DataFormats/METReco/interface/CaloMET.h"
0014 #include "DataFormats/METReco/interface/CaloMETCollection.h"
0015
0016 namespace edm {
0017 class ConfigurationDescriptions;
0018 }
0019
0020 class HLTHcalMETNoiseCleaner : public edm::global::EDFilter<> {
0021 public:
0022 explicit HLTHcalMETNoiseCleaner(const edm::ParameterSet&);
0023 ~HLTHcalMETNoiseCleaner() override;
0024 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0025 bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0026
0027 private:
0028 edm::EDGetTokenT<reco::CaloMETCollection> m_theCaloMetToken;
0029 edm::EDGetTokenT<reco::HcalNoiseRBXCollection> m_theHcalNoiseToken;
0030
0031 const edm::InputTag HcalNoiseRBXCollectionTag_;
0032 const edm::InputTag CaloMetCollectionTag_;
0033 const double CaloMetCut_;
0034 const int severity_;
0035 const int maxNumRBXs_;
0036 const int numRBXsToConsider_;
0037 const bool accept2NoiseRBXEvents_;
0038 const bool needEMFCoincidence_;
0039 const double minRBXEnergy_;
0040 const double minRatio_;
0041 const double maxRatio_;
0042 const int minHPDHits_;
0043 const int minRBXHits_;
0044 const int minHPDNoOtherHits_;
0045 const int minZeros_;
0046 const double minHighEHitTime_;
0047 const double maxHighEHitTime_;
0048 const double maxRBXEMF_;
0049
0050
0051 const double minRecHitE_;
0052 const double minLowHitE_;
0053 const double minHighHitE_;
0054 const double minR45HitE_;
0055
0056 const double TS4TS5EnergyThreshold_;
0057 std::vector<std::pair<double, double> > TS4TS5UpperCut_;
0058 std::vector<std::pair<double, double> > TS4TS5LowerCut_;
0059
0060 reco::CaloMET BuildCaloMet(float sumet, float pt, float phi) const;
0061
0062
0063 struct noisedatacomp {
0064 inline bool operator()(const CommonHcalNoiseRBXData& t1, const CommonHcalNoiseRBXData& t2) const {
0065 return t1.energy() > t2.energy();
0066 }
0067 };
0068 typedef std::set<CommonHcalNoiseRBXData, noisedatacomp> noisedataset_t;
0069 };
0070
0071 #endif