File indexing completed on 2024-04-06 12:07:05
0001 #ifndef DTNoiseAnalysisTest_H
0002 #define DTNoiseAnalysisTest_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "DQMServices/Core/interface/DQMStore.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0019 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0020
0021 #include <iostream>
0022 #include <string>
0023 #include <map>
0024
0025 class DTGeometry;
0026 class DTChamberId;
0027 class DTSuperLayerId;
0028
0029 class DTNoiseAnalysisTest : public DQMEDHarvester {
0030 public:
0031
0032 DTNoiseAnalysisTest(const edm::ParameterSet& ps);
0033
0034
0035 ~DTNoiseAnalysisTest() override;
0036
0037 protected:
0038
0039 void beginRun(edm::Run const& run, edm::EventSetup const& context) override;
0040
0041
0042
0043 void bookHistos(DQMStore::IBooker&);
0044
0045
0046 void dqmEndLuminosityBlock(DQMStore::IBooker&,
0047 DQMStore::IGetter&,
0048 edm::LuminosityBlock const&,
0049 edm::EventSetup const&) override;
0050
0051 void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
0052
0053 private:
0054
0055 std::string getMEName(const DTChamberId& chID);
0056 std::string getSynchNoiseMEName(int wheelId) const;
0057
0058 int nevents;
0059 int nMinEvts;
0060
0061 bool bookingdone;
0062
0063
0064 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0065 const DTGeometry* muonGeom;
0066
0067
0068 int noisyCellDef;
0069 bool isCosmics;
0070 bool doSynchNoise;
0071 bool detailedAnalysis;
0072 double maxSynchNoiseRate;
0073 double noiseSafetyFactor;
0074
0075
0076 std::map<int, MonitorElement*> noiseHistos;
0077 std::map<int, MonitorElement*> noisyCellHistos;
0078 MonitorElement* summaryNoiseHisto;
0079 MonitorElement* threshChannelsHisto;
0080 MonitorElement* summarySynchNoiseHisto;
0081 MonitorElement* glbSummarySynchNoiseHisto;
0082
0083
0084 static constexpr float cellW = 4.2;
0085 static constexpr float instLumi = 20;
0086 static constexpr std::array<std::array<float, 4>, 3> kW_MB = {
0087 {{{0.41, 0.08, 0.01, 0.15}},
0088 {{0.17, 0.04, 0.01, 0.15}},
0089 {{0.06, 0.02, 0.01, 0.15}}}};
0090 static constexpr std::array<std::array<float, 4>, 2> lenghtSL_MB = {
0091 {{{206, 252, 302, 0}}, {{240, 240, 240, 240}}}};
0092 };
0093
0094 #endif