Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:44

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/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::EDFilter {
0024 public:
0025   explicit HLTHcalMETNoiseFilter(const edm::ParameterSet&);
0026   ~HLTHcalMETNoiseFilter() override;
0027   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0028   bool filter(edm::Event&, const edm::EventSetup&) override;
0029 
0030 private:
0031   edm::EDGetTokenT<reco::HcalNoiseRBXCollection> m_theHcalNoiseToken;
0032   // parameters
0033   edm::InputTag HcalNoiseRBXCollectionTag_;
0034   int severity_;
0035   int maxNumRBXs_;
0036   int numRBXsToConsider_;
0037   bool needEMFCoincidence_;
0038   double minRBXEnergy_;
0039   double minRatio_;
0040   double maxRatio_;
0041   int minHPDHits_;
0042   int minRBXHits_;
0043   int minHPDNoOtherHits_;
0044   int minZeros_;
0045   double minHighEHitTime_;
0046   double maxHighEHitTime_;
0047   double maxRBXEMF_;
0048 
0049   // imported from the RecoMET/METProducers/python/hcalnoiseinfoproducer_cfi
0050   double minRecHitE_, minLowHitE_, minHighHitE_, minR45HitE_;
0051 
0052   double TS4TS5EnergyThreshold_;
0053   std::vector<std::pair<double, double> > TS4TS5UpperCut_;
0054   std::vector<std::pair<double, double> > TS4TS5LowerCut_;
0055 
0056   // helper function to compare noise data energies
0057   struct noisedatacomp {
0058     inline bool operator()(const CommonHcalNoiseRBXData& t1, const CommonHcalNoiseRBXData& t2) const {
0059       return t1.energy() > t2.energy();
0060     }
0061   };
0062   typedef std::set<CommonHcalNoiseRBXData, noisedatacomp> noisedataset_t;
0063 };
0064 
0065 #endif  //HLTHcalMETNoiseFilter_h