File indexing completed on 2024-04-06 11:58:30
0001 #ifndef DTTTrigAnalyzer_H
0002 #define DTTTrigAnalyzer_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0014 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0015
0016 #include <string>
0017 #include <fstream>
0018 #include <map>
0019 #include <vector>
0020
0021 class DTTtrig;
0022 class TFile;
0023 class TH1D;
0024
0025 class DTTTrigAnalyzer : public edm::one::EDAnalyzer<> {
0026 public:
0027
0028 DTTTrigAnalyzer(const edm::ParameterSet& pset);
0029
0030
0031 virtual ~DTTTrigAnalyzer();
0032
0033
0034
0035 virtual void beginRun(const edm::Run&, const edm::EventSetup& setup);
0036 void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
0037
0038 void endJob();
0039
0040 protected:
0041 private:
0042 std::string getHistoName(const DTWireId& lId) const;
0043 std::string getDistribName(const DTWireId& wId) const;
0044
0045
0046 TFile* theFile;
0047
0048
0049 const DTTtrig* tTrigMap;
0050
0051
0052
0053
0054
0055 std::map<std::pair<int, int>, TH1D*> theTTrigHistoMap;
0056 std::map<std::pair<int, int>, TH1D*> theTMeanHistoMap;
0057 std::map<std::pair<int, int>, TH1D*> theSigmaHistoMap;
0058 std::map<std::pair<int, int>, TH1D*> theKFactorHistoMap;
0059
0060 std::map<std::vector<int>, TH1D*> theTTrigDistribMap;
0061 std::map<std::vector<int>, TH1D*> theTMeanDistribMap;
0062 std::map<std::vector<int>, TH1D*> theSigmaDistribMap;
0063 std::map<std::vector<int>, TH1D*> theKFactorDistribMap;
0064
0065 edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0066 };
0067 #endif