00001 #ifndef HCALDIGITESTER_H 00002 #define HCALDIGITESTER_H 00003 00004 // user include files 00005 00006 #include "FWCore/Framework/interface/Event.h" 00007 #include "FWCore/Framework/interface/ESHandle.h" 00008 #include "FWCore/Framework/interface/EDAnalyzer.h" 00009 00010 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00011 #include "CalibFormats/HcalObjects/interface/HcalDbService.h" 00012 #include "DQMServices/Core/interface/DQMStore.h" 00013 #include <map> 00014 #include "Validation/HcalDigis/src/HcalSubdetDigiMonitor.h" 00015 00016 class HcalDigiTester : public edm::EDAnalyzer { 00017 public: 00018 00019 explicit HcalDigiTester(const edm::ParameterSet&); 00020 ~HcalDigiTester(); 00021 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00022 virtual void beginJob() ; 00023 template<class Digi> void reco(const edm::Event&, const edm::EventSetup&); 00024 virtual void endRun() ; 00025 virtual void endJob() ; 00026 00027 private: 00028 00029 double dR(double eta1, double phi1, double eta2, double phi2); 00030 void eval_occupancy(); 00031 00032 // choose the correct subdet 00033 HcalSubdetDigiMonitor * monitor(); 00034 00035 DQMStore* dbe_; 00036 00037 edm::InputTag inputTag_; 00038 std::string outputFile_; 00039 std::string hcalselector_; 00040 std::string zside_; 00041 std::string mode_; 00042 std::string mc_; 00043 int noise_; 00044 // flag to distinguish between 00045 // particular subdet only case and "global" noise one 00046 00047 edm::ESHandle<CaloGeometry> geometry ; 00048 edm::ESHandle<HcalDbService> conditions; 00049 float pedvalue; 00050 int nevent1; 00051 int nevent2; 00052 int nevent3; 00053 int nevent4; 00054 int nevtot; 00055 std::map<std::string, HcalSubdetDigiMonitor*> monitors_; 00056 00057 }; 00058 00059 #endif 00060