Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-25 23:59:52

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