File indexing completed on 2024-04-06 12:07:10
0001
0002 #ifndef DTSegmentAnalysisTask_H
0003 #define DTSegmentAnalysisTask_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "FWCore/ServiceRegistry/interface/Service.h"
0025
0026 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0027
0028
0029 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0030
0031 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0032 #include "CondFormats/DataRecord/interface/DTStatusFlagRcd.h"
0033
0034 #include <string>
0035 #include <map>
0036 #include <vector>
0037
0038 class DTGeometry;
0039 class DTStatusFlag;
0040
0041 class DTSegmentAnalysisTask : public DQMEDAnalyzer {
0042 public:
0043
0044 DTSegmentAnalysisTask(const edm::ParameterSet& pset);
0045
0046
0047 ~DTSegmentAnalysisTask() override;
0048
0049
0050 void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0051
0052
0053 void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
0054
0055 protected:
0056
0057 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0058
0059 private:
0060
0061 bool detailedAnalysis;
0062
0063
0064 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0065 const DTGeometry* dtGeom;
0066
0067
0068 edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> statusMapToken_;
0069 const DTStatusFlag* statusMap;
0070
0071
0072 edm::EDGetTokenT<DTRecSegment4DCollection> recHits4DToken_;
0073
0074
0075 bool checkNoisyChannels;
0076
0077
0078 void bookHistos(DQMStore::IBooker& ibooker, DTChamberId chamberId);
0079
0080 void fillHistos(DTChamberId chamberId, int nHits, float chi2);
0081
0082
0083 std::map<DTChamberId, std::vector<MonitorElement*> > histosPerCh;
0084 std::map<int, MonitorElement*> summaryHistos;
0085
0086 int nevents;
0087
0088 std::string topHistoFolder;
0089
0090 bool hltDQMMode;
0091
0092 double phiSegmCut;
0093
0094 int nhitsCut;
0095
0096 MonitorElement* nEventMonitor;
0097 };
0098 #endif
0099
0100
0101
0102
0103