File indexing completed on 2023-03-17 11:20:10
0001 #ifndef _RECOMET_METPRODUCER_HCALNOISEINFOPRODUCER_H_
0002 #define _RECOMET_METPRODUCER_HCALNOISEINFOPRODUCER_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <memory>
0019
0020
0021 #include "FWCore/Utilities/interface/ESGetToken.h"
0022 #include "FWCore/Utilities/interface/EDGetToken.h"
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "FWCore/Framework/interface/stream/EDProducer.h"
0025 #include "FWCore/Framework/interface/Event.h"
0026 #include "FWCore/Framework/interface/MakerMacros.h"
0027 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0028
0029 #include "RecoMET/METAlgorithms/interface/HcalNoiseAlgo.h"
0030 #include "RecoMET/METAlgorithms/interface/HcalNoiseRBXArray.h"
0031 #include "DataFormats/METReco/interface/HcalNoiseSummary.h"
0032
0033 #include "RecoMET/METProducers/interface/HcalNoiseInfoProducer.h"
0034 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0035 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
0036 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputer.h"
0037 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputerRcd.h"
0038 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0039 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0040 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
0041 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0042 #include "DataFormats/TrackReco/interface/Track.h"
0043 #include "DataFormats/JetReco/interface/PFJetCollection.h"
0044
0045 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0046 #include "Geometry/Records/interface/HcalRecNumberingRecord.h"
0047 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0048 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0049
0050 namespace reco {
0051
0052
0053
0054
0055
0056 class HcalNoiseInfoProducer : public edm::stream::EDProducer<> {
0057 public:
0058 explicit HcalNoiseInfoProducer(const edm::ParameterSet&);
0059 ~HcalNoiseInfoProducer() override;
0060
0061 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0062
0063 private:
0064
0065
0066
0067
0068
0069
0070 void produce(edm::Event&, const edm::EventSetup&) override;
0071
0072
0073
0074
0075
0076
0077 void fillrechits(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
0078 void filldigis(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&);
0079 void fillcalotwrs(edm::Event&, const edm::EventSetup&, HcalNoiseRBXArray&, HcalNoiseSummary&) const;
0080 void filltracks(edm::Event&, const edm::EventSetup&, HcalNoiseSummary&) const;
0081 void filljetinfo(edm::Event&, const edm::EventSetup&, HcalNoiseSummary&) const;
0082
0083
0084 void fillOtherSummaryVariables(HcalNoiseSummary& summary, const CommonHcalNoiseRBXData& data) const;
0085
0086
0087
0088
0089
0090 bool fillDigis_;
0091 bool fillRecHits_;
0092 bool fillCaloTowers_;
0093 bool fillTracks_;
0094 bool fillLaserMonitor_;
0095
0096
0097 int maxProblemRBXs_;
0098
0099
0100 int maxCaloTowerIEta_;
0101 double maxTrackEta_;
0102 double minTrackPt_;
0103 double maxNHF_;
0104 int maxjetindex_;
0105
0106 const HcalTopology* theHcalTopology_;
0107
0108 std::string digiCollName_;
0109 std::string recHitCollName_;
0110 std::string caloTowerCollName_;
0111 std::string trackCollName_;
0112 std::string jetCollName_;
0113
0114 edm::EDGetTokenT<HBHEDigiCollection> hbhedigi_token_;
0115 edm::EDGetTokenT<HcalCalibDigiCollection> hcalcalibdigi_token_;
0116 edm::EDGetTokenT<QIE10DigiCollection> lasermondigi_token_;
0117 edm::EDGetTokenT<HBHERecHitCollection> hbherechit_token_;
0118 edm::EDGetTokenT<CaloTowerCollection> calotower_token_;
0119 edm::EDGetTokenT<reco::TrackCollection> track_token_;
0120 edm::EDGetTokenT<reco::PFJetCollection> jet_token_;
0121 edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> hcaltopo_token_;
0122 edm::ESGetToken<HcalDbService, HcalDbRecord> service_token_;
0123 edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> quality_token_;
0124 edm::ESGetToken<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd> severitycomputer_token_;
0125 edm::ESGetToken<CaloGeometry, CaloGeometryRecord> calogeometry_token_;
0126
0127 double totalCalibCharge;
0128 double totalLasmonCharge;
0129
0130 double minRecHitE_, minLowHitE_, minHighHitE_, minR45HitE_;
0131 HcalNoiseAlgo algo_;
0132
0133 bool useCalibDigi_;
0134
0135
0136 double calibdigiHBHEthreshold_;
0137 std::vector<int> calibdigiHBHEtimeslices_;
0138
0139 double calibdigiHFthreshold_;
0140 std::vector<int> calibdigiHFtimeslices_;
0141
0142 double TS4TS5EnergyThreshold_;
0143 std::vector<std::pair<double, double> > TS4TS5UpperCut_;
0144 std::vector<std::pair<double, double> > TS4TS5LowerCut_;
0145
0146 uint32_t HcalAcceptSeverityLevel_;
0147 std::vector<int> HcalRecHitFlagsToBeExcluded_;
0148
0149 std::vector<int> laserMonCBoxList_;
0150 std::vector<int> laserMonIPhiList_;
0151 std::vector<int> laserMonIEtaList_;
0152
0153 int laserMonitorTSStart_;
0154 int laserMonitorTSEnd_;
0155 unsigned laserMonitorSamples_;
0156
0157 std::vector<float> adc2fC;
0158 std::vector<float> adc2fCHF;
0159 };
0160
0161 }
0162
0163 #endif