CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoMET/METProducers/interface/HcalNoiseInfoProducer.h

Go to the documentation of this file.
00001 #ifndef _RECOMET_METPRODUCER_HCALNOISEINFOPRODUCER_H_
00002 #define _RECOMET_METPRODUCER_HCALNOISEINFOPRODUCER_H_
00003 
00004 //
00005 // HcalNoiseInfoProducer.h
00006 //
00007 //   description: Definition of the producer for the HCAL noise information.
00008 //                Uses various algorithms to process digis, rechits, and calotowers
00009 //                and produce a vector of HcalNoiseRBXs.
00010 //                To minimize the time used to sort the data into HPD/RBX space, we fill
00011 //                an rbxarray of size 72, and then pick which rbxs are interesting at
00012 //                the end.
00013 //
00014 //   author: J.P. Chou, Brown
00015 //
00016 
00017 // system include files
00018 #include <memory>
00019 
00020 // user include files
00021 #include "FWCore/Framework/interface/Frameworkfwd.h"
00022 #include "FWCore/Framework/interface/EDProducer.h"
00023 #include "FWCore/Framework/interface/Event.h"
00024 #include "FWCore/Framework/interface/MakerMacros.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 
00027 #include "RecoMET/METAlgorithms/interface/HcalNoiseAlgo.h"
00028 #include "RecoMET/METAlgorithms/interface/HcalNoiseRBXArray.h"
00029 #include "DataFormats/METReco/interface/HcalNoiseSummary.h"
00030 
00031 
00032 namespace reco {
00033 
00034   //
00035   // class declaration
00036   //
00037   
00038   class HcalNoiseInfoProducer : public edm::EDProducer {
00039   public:
00040     explicit HcalNoiseInfoProducer(const edm::ParameterSet&);
00041     ~HcalNoiseInfoProducer();
00042     
00043   private:
00044     
00045     //
00046     // methods inherited from EDProducer
00047     // produce(...) fills an HcalNoiseRBXArray with information from various places, and then
00048     // picks which rbxs are interesting, storing them to the EDM.
00049     //
00050     
00051     virtual void produce(edm::Event&, const edm::EventSetup&) override;
00052     
00053     //
00054     // more internal methods
00055     // fills an HcalNoiseRBXArray with various data
00056     // filldigis() depends on fillrechits() being called first
00057     //
00058     void fillrechits(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
00059     void filldigis(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&);
00060     void fillcalotwrs(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
00061     void filltracks(edm::Event&, const edm::EventSetup&, HcalNoiseSummary&) const;
00062 
00063     // other helper functions
00064     void fillOtherSummaryVariables(HcalNoiseSummary& summary, const CommonHcalNoiseRBXData& data) const;
00065 
00066     
00067     //
00068     // parameters
00069     //
00070     
00071     bool fillDigis_;        // fill digi information into HcalNoiseRBXs
00072     bool fillRecHits_;      // fill rechit information into HcalNoiseRBXs and HcalNoiseSummary
00073     bool fillCaloTowers_;   // fill calotower information into HcalNoiseRBXs and HcalNoiseSummary
00074     bool fillTracks_;       // fill track information into HcalNoiseSummary
00075 
00076     // These provide the requirements for writing an RBX to the event
00077     int maxProblemRBXs_;   // maximum number of problematic RBXs to be written to the event record
00078 
00079     // parameters for calculating summary variables
00080     int maxCaloTowerIEta_;      // maximum caloTower ieta
00081     double maxTrackEta_;        // maximum eta of the track
00082     double minTrackPt_;         // minimum track Pt
00083     
00084     std::string digiCollName_;         // name of the digi collection
00085     std::string recHitCollName_;       // name of the rechit collection
00086     std::string caloTowerCollName_;    // name of the caloTower collection
00087     std::string trackCollName_;        // name of the track collection
00088 
00089     double TotalCalibCharge;    // placeholder to calculate total charge in calibration channels
00090 
00091     double minRecHitE_, minLowHitE_, minHighHitE_; // parameters used to determine noise status
00092     HcalNoiseAlgo algo_; // algorithms to determine if an RBX is noisy
00093 
00094     bool useCalibDigi_;
00095 
00096     // Variables to store info regarding HBHE calibration digis
00097     double calibdigiHBHEthreshold_;  // minimum charge calib digi in order to be counted by noise algorithm
00098     std::vector<int> calibdigiHBHEtimeslices_; // time slices to use when computing calibration charge
00099     // Variables to store info regarding HF calibration digis
00100     double calibdigiHFthreshold_;
00101     std::vector<int> calibdigiHFtimeslices_;
00102 
00103 
00104     double TS4TS5EnergyThreshold_;
00105     std::vector<std::pair<double, double> > TS4TS5UpperCut_;
00106     std::vector<std::pair<double, double> > TS4TS5LowerCut_;
00107 
00108     uint32_t HcalAcceptSeverityLevel_;
00109     std::vector<int> HcalRecHitFlagsToBeExcluded_;
00110     
00111     float adc2fC[128];
00112   };
00113   
00114 } // end of namespace
00115 
00116 #endif