CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/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 beginJob() ;
00052     virtual void endJob() ;
00053     virtual void produce(edm::Event&, const edm::EventSetup&);
00054     virtual void beginRun(edm::Run&, const edm::EventSetup&);
00055     virtual void endRun(edm::Run&, const edm::EventSetup&);
00056     
00057     //
00058     // more internal methods
00059     // fills an HcalNoiseRBXArray with various data
00060     // filldigis() depends on fillrechits() being called first
00061     //
00062     void fillrechits(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
00063     void filldigis(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&);
00064     void fillcalotwrs(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
00065     void filltracks(edm::Event&, const edm::EventSetup&, HcalNoiseSummary&) const;
00066 
00067     // other helper functions
00068     void fillOtherSummaryVariables(HcalNoiseSummary& summary, const CommonHcalNoiseRBXData& data) const;
00069 
00070     
00071     //
00072     // parameters
00073     //
00074     
00075     bool fillDigis_;        // fill digi information into HcalNoiseRBXs
00076     bool fillRecHits_;      // fill rechit information into HcalNoiseRBXs and HcalNoiseSummary
00077     bool fillCaloTowers_;   // fill calotower information into HcalNoiseRBXs and HcalNoiseSummary
00078     bool fillTracks_;       // fill track information into HcalNoiseSummary
00079 
00080     // These provide the requirements for writing an RBX to the event
00081     int maxProblemRBXs_;   // maximum number of problematic RBXs to be written to the event record
00082 
00083     // parameters for calculating summary variables
00084     int maxCaloTowerIEta_;      // maximum caloTower ieta
00085     double maxTrackEta_;        // maximum eta of the track
00086     double minTrackPt_;         // minimum track Pt
00087     
00088     std::string digiCollName_;         // name of the digi collection
00089     std::string recHitCollName_;       // name of the rechit collection
00090     std::string caloTowerCollName_;    // name of the caloTower collection
00091     std::string trackCollName_;        // name of the track collection
00092 
00093     double TotalCalibCharge;    // placeholder to calculate total charge in calibration channels
00094 
00095     double minRecHitE_, minLowHitE_, minHighHitE_; // parameters used to determine noise status
00096     HcalNoiseAlgo algo_; // algorithms to determine if an RBX is noisy
00097 
00098     double TS4TS5EnergyThreshold_;
00099     std::vector<std::pair<double, double> > TS4TS5UpperCut_;
00100     std::vector<std::pair<double, double> > TS4TS5LowerCut_;
00101 
00102     uint32_t HcalAcceptSeverityLevel_;
00103     std::vector<int> HcalRecHitFlagsToBeExcluded_;
00104     
00105     float adc2fC[128];
00106   };
00107   
00108 } // end of namespace
00109 
00110 #endif