File indexing completed on 2024-04-06 12:07:10
0001 #ifndef DTNoiseTask_H
0002 #define DTNoiseTask_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0011
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013
0014 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0015 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0016 #include "DataFormats/DTDigi/interface/DTDigi.h"
0017 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0018
0019 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0020 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0021
0022
0023 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0024
0025 #include "FWCore/Framework/interface/ESHandle.h"
0026 #include "FWCore/Utilities/interface/InputTag.h"
0027
0028 namespace edm {
0029 class ParameterSet;
0030 class EventSetup;
0031 class Event;
0032 }
0033
0034 class DTGeometry;
0035 class DTTtrig;
0036
0037
0038 class DTNoiseTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
0039 public:
0040
0041 DTNoiseTask(const edm::ParameterSet& ps);
0042
0043
0044 ~DTNoiseTask() override;
0045
0046
0047 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0048
0049 protected:
0050 void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0051
0052 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup) final {}
0053 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup) override;
0054
0055
0056 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0057
0058 private:
0059 void bookHistos(DQMStore::IBooker&, DTChamberId chId);
0060 void bookHistos(DQMStore::IBooker&, DTSuperLayerId slId);
0061
0062
0063 edm::EDGetTokenT<DTDigiCollection> dtDigiToken_;
0064
0065 int evtNumber;
0066
0067 bool doTimeBoxHistos;
0068
0069 edm::EDGetTokenT<DTRecSegment4DCollection> recHits4DToken_;
0070
0071 bool doSegmentVeto;
0072
0073 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0074 const DTGeometry* dtGeom;
0075 edm::ESGetToken<DTTtrig, DTTtrigRcd> tTrigMapToken_;
0076 const DTTtrig* tTrigMap;
0077
0078
0079 std::map<DTChamberId, double> tTrigStMap;
0080
0081
0082 std::map<DTChamberId, MonitorElement*> noiseHistos;
0083
0084
0085 std::map<DTChamberId, int> mapEvt;
0086
0087
0088 std::map<DTSuperLayerId, MonitorElement*> tbHistos;
0089
0090 MonitorElement* nEventMonitor;
0091
0092
0093 double safeMargin;
0094 };
0095 #endif
0096
0097
0098
0099
0100