Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HLTHcalMETNoiseCleaner_h
0002 #define HLTHcalMETNoiseCleaner_h
0003 
0004 /** \class HLTHcalNoiseCleaner
0005  *
0006  *  \author Alexander Mott (Caltech), Leonard Apanasevich (UIC), John Paul Chou (Brown)
0007  *
0008  */
0009 
0010 #include "FWCore/Framework/interface/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::EDFilter {
0021 public:
0022   explicit HLTHcalMETNoiseCleaner(const edm::ParameterSet&);
0023   ~HLTHcalMETNoiseCleaner() override;
0024   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0025   bool filter(edm::Event&, const edm::EventSetup&) override;
0026 
0027 private:
0028   edm::EDGetTokenT<reco::CaloMETCollection> m_theCaloMetToken;
0029   edm::EDGetTokenT<reco::HcalNoiseRBXCollection> m_theHcalNoiseToken;
0030   // parameters
0031   edm::InputTag HcalNoiseRBXCollectionTag_;
0032   edm::InputTag CaloMetCollectionTag_;
0033   double CaloMetCut_;
0034   int severity_;
0035   int maxNumRBXs_;
0036   int numRBXsToConsider_;
0037   bool accept2NoiseRBXEvents_;
0038   bool needEMFCoincidence_;
0039   double minRBXEnergy_;
0040   double minRatio_;
0041   double maxRatio_;
0042   int minHPDHits_;
0043   int minRBXHits_;
0044   int minHPDNoOtherHits_;
0045   int minZeros_;
0046   double minHighEHitTime_;
0047   double maxHighEHitTime_;
0048   double maxRBXEMF_;
0049 
0050   // imported from the RecoMET/METProducers/python/hcalnoiseinfoproducer_cfi
0051   double minRecHitE_, minLowHitE_, minHighHitE_, minR45HitE_;
0052 
0053   double TS4TS5EnergyThreshold_;
0054   std::vector<std::pair<double, double> > TS4TS5UpperCut_;
0055   std::vector<std::pair<double, double> > TS4TS5LowerCut_;
0056 
0057   reco::CaloMET BuildCaloMet(float sumet, float pt, float phi);
0058 
0059   // helper function to compare noise data energies
0060   struct noisedatacomp {
0061     inline bool operator()(const CommonHcalNoiseRBXData& t1, const CommonHcalNoiseRBXData& t2) const {
0062       return t1.energy() > t2.energy();
0063     }
0064   };
0065   typedef std::set<CommonHcalNoiseRBXData, noisedatacomp> noisedataset_t;
0066 };
0067 
0068 #endif  //HLTHcalMETNoiseCleaner_h