File indexing completed on 2024-04-06 12:07:06
0001 #ifndef DTResolutionTest_H
0002 #define DTResolutionTest_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/LuminosityBlock.h"
0022 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0023
0024 #include "DQMServices/Core/interface/DQMStore.h"
0025 #include "FWCore/ServiceRegistry/interface/Service.h"
0026
0027 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0028
0029 #include <memory>
0030 #include <iostream>
0031 #include <fstream>
0032 #include <string>
0033 #include <vector>
0034 #include <map>
0035
0036 class DTGeometry;
0037 class DTChamberId;
0038 class DTSuperLayerId;
0039
0040 class DTResolutionTest : public DQMEDHarvester {
0041 public:
0042
0043 DTResolutionTest(const edm::ParameterSet& ps);
0044
0045
0046 ~DTResolutionTest() override;
0047
0048 protected:
0049
0050 void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
0051
0052
0053 void bookHistos(DQMStore::IBooker&, const DTChamberId& ch);
0054
0055
0056 void bookHistos(DQMStore::IBooker&, int wh);
0057
0058
0059 std::string getMEName(const DTSuperLayerId& slID);
0060 std::string getMEName2D(const DTSuperLayerId& slID);
0061
0062
0063 void dqmEndLuminosityBlock(DQMStore::IBooker&,
0064 DQMStore::IGetter&,
0065 edm::LuminosityBlock const&,
0066 edm::EventSetup const&) override;
0067
0068 private:
0069 int nevents;
0070 unsigned int nLumiSegs;
0071 int prescaleFactor;
0072 int run;
0073 int percentual;
0074
0075 bool bookingdone;
0076
0077 edm::ParameterSet parameters;
0078 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0079 const DTGeometry* muonGeom;
0080
0081
0082 std::map<std::pair<int, int>, MonitorElement*> MeanHistos;
0083 std::map<std::pair<int, int>, MonitorElement*> SigmaHistos;
0084 std::map<std::pair<int, int>, MonitorElement*> SlopeHistos;
0085 std::map<std::string, MonitorElement*> MeanHistosSetRange;
0086 std::map<std::string, MonitorElement*> SigmaHistosSetRange;
0087 std::map<std::string, MonitorElement*> SlopeHistosSetRange;
0088 std::map<std::string, MonitorElement*> MeanHistosSetRange2D;
0089 std::map<std::string, MonitorElement*> SigmaHistosSetRange2D;
0090 std::map<std::string, MonitorElement*> SlopeHistosSetRange2D;
0091
0092
0093 std::map<int, MonitorElement*> wheelMeanHistos;
0094 std::map<int, MonitorElement*> wheelSigmaHistos;
0095 std::map<int, MonitorElement*> wheelSlopeHistos;
0096
0097
0098 std::map<std::pair<int, int>, int> cmsMeanHistos;
0099 std::map<std::pair<int, int>, bool> MeanFilled;
0100 std::map<std::pair<int, int>, int> cmsSigmaHistos;
0101 std::map<std::pair<int, int>, bool> SigmaFilled;
0102 std::map<std::pair<int, int>, int> cmsSlopeHistos;
0103 std::map<std::pair<int, int>, bool> SlopeFilled;
0104
0105
0106 int stationFromBin(int bin) const;
0107
0108 int slFromBin(int bin) const;
0109 };
0110
0111 #endif