Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:30

0001 #ifndef HLTHcalMETNoiseFilter_h
0002 #define HLTHcalMETNoiseFilter_h
0003 
0004 /** \class HLTHcalNoiseFilter
0005  *
0006  *  \author Leonard Apanasevich (UIC), John Paul Chou (Brown)
0007  *
0008  */
0009 
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/global/EDFilter.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/Utilities/interface/InputTag.h"
0015 #include "RecoMET/METAlgorithms/interface/HcalNoiseAlgo.h"
0016 
0017 #include "DataFormats/METReco/interface/HcalNoiseRBX.h"
0018 
0019 namespace edm {
0020   class ConfigurationDescriptions;
0021 }
0022 
0023 class HLTHcalMETNoiseFilter : public edm::global::EDFilter<> {
0024 public:
0025   explicit HLTHcalMETNoiseFilter(const edm::ParameterSet&);
0026   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0027   bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0028 
0029 private:
0030   // parameters
0031   const edm::InputTag HcalNoiseRBXCollectionTag_;
0032   edm::EDGetTokenT<reco::HcalNoiseRBXCollection> m_theHcalNoiseToken;
0033   const int severity_;
0034   const int maxNumRBXs_;
0035   const int numRBXsToConsider_;
0036   const bool needEMFCoincidence_;
0037   const double minRBXEnergy_;
0038   const double minRatio_;
0039   const double maxRatio_;
0040   const int minHPDHits_;
0041   const int minRBXHits_;
0042   const int minHPDNoOtherHits_;
0043   const int minZeros_;
0044   const double minHighEHitTime_;
0045   const double maxHighEHitTime_;
0046   const double maxRBXEMF_;
0047 
0048   // imported from the RecoMET/METProducers/python/hcalnoiseinfoproducer_cfi
0049   const double minRecHitE_;
0050   const double minLowHitE_;
0051   const double minHighHitE_;
0052   const double minR45HitE_;
0053 
0054   const double TS4TS5EnergyThreshold_;
0055   std::vector<std::pair<double, double> > TS4TS5UpperCut_;
0056   std::vector<std::pair<double, double> > TS4TS5LowerCut_;
0057 
0058   // helper function to compare noise data energies
0059   struct noisedatacomp {
0060     inline bool operator()(const CommonHcalNoiseRBXData& t1, const CommonHcalNoiseRBXData& t2) const {
0061       return t1.energy() > t2.energy();
0062     }
0063   };
0064   typedef std::set<CommonHcalNoiseRBXData, noisedatacomp> noisedataset_t;
0065 };
0066 
0067 #endif  //HLTHcalMETNoiseFilter_h