File indexing completed on 2024-04-06 12:25:45
0001 #ifndef RecoLocalCalo_EcalRecProducers_EcalLocalRecoTask_h
0002 #define RecoLocalCalo_EcalRecProducers_EcalLocalRecoTask_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012
0013 #include "FWCore/Framework/interface/Event.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "FWCore/Framework/interface/MakerMacros.h"
0016
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0019
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 #include "FWCore/ServiceRegistry/interface/Service.h"
0022
0023 #include "CondFormats/EcalObjects/interface/EcalPedestals.h"
0024 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h"
0025
0026 #include "DataFormats/EcalDigi/interface/EBDataFrame.h"
0027 #include "DataFormats/EcalDigi/interface/EEDataFrame.h"
0028 #include "DataFormats/EcalDigi/interface/ESDataFrame.h"
0029 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0030
0031 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0032 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
0033
0034 #include <fstream>
0035 #include <vector>
0036 #include <map>
0037 #include <string>
0038
0039 class EcalLocalRecoTask : public edm::one::EDAnalyzer<> {
0040 public:
0041 typedef dqm::legacy::DQMStore DQMStore;
0042 typedef dqm::legacy::MonitorElement MonitorElement;
0043
0044
0045 explicit EcalLocalRecoTask(const edm::ParameterSet& ps);
0046
0047
0048 ~EcalLocalRecoTask() override;
0049
0050
0051 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0052
0053 private:
0054 typedef std::map<uint32_t, float, std::less<uint32_t>> MapType;
0055
0056 bool verbose_;
0057
0058 DQMStore* dbe_;
0059
0060 std::string outputFile_;
0061
0062 edm::EDGetTokenT<EBRecHitCollection> EBrecHitToken_;
0063 edm::EDGetTokenT<EERecHitCollection> EErecHitToken_;
0064 edm::EDGetTokenT<ESRecHitCollection> ESrecHitToken_;
0065
0066 edm::EDGetTokenT<EBUncalibratedRecHitCollection> EBurecHitToken_;
0067 edm::EDGetTokenT<EBUncalibratedRecHitCollection> EEurecHitToken_;
0068
0069 edm::EDGetTokenT<EBDigiCollection> EBdigiToken_;
0070 edm::EDGetTokenT<EEDigiCollection> EEdigiToken_;
0071 edm::EDGetTokenT<ESDigiCollection> ESdigiToken_;
0072
0073 edm::EDGetTokenT<CrossingFrame<PCaloHit>> cfToken_;
0074
0075 const edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> pedestalToken_;
0076
0077 MonitorElement* meEBUncalibRecHitMaxSampleRatio_;
0078 MonitorElement* meEBUncalibRecHitPedestal_;
0079 MonitorElement* meEBUncalibRecHitOccupancy_;
0080 MonitorElement* meEBRecHitSimHitRatio_;
0081 };
0082
0083 #endif