File indexing completed on 2023-03-17 10:54:17
0001 #ifndef DTLocalTriggerLutTask_H
0002 #define DTLocalTriggerLutTask_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "DataFormats/Common/interface/Handle.h"
0013 #include "FWCore/Framework/interface/LuminosityBlock.h"
0014
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019
0020 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 #include "FWCore/Utilities/interface/InputTag.h"
0023
0024 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0025 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0026 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0027
0028 #include <vector>
0029 #include <string>
0030 #include <map>
0031 #include <array>
0032
0033 class DTGeometry;
0034 class DTTrigGeomUtils;
0035 class DTChamberId;
0036 class L1MuDTChambPhDigi;
0037
0038 typedef std::array<std::array<std::array<int, 13>, 5>, 6> DTArr3int;
0039 typedef std::array<std::array<std::array<int, 15>, 5>, 6> DTArr3bool;
0040 typedef std::array<std::array<std::array<const L1MuDTChambPhDigi*, 15>, 5>, 6> DTArr3Digi;
0041
0042 class DTLocalTriggerLutTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
0043 friend class DTMonitorModule;
0044
0045 public:
0046
0047 DTLocalTriggerLutTask(const edm::ParameterSet& ps);
0048
0049
0050 ~DTLocalTriggerLutTask() override;
0051
0052
0053 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0054
0055 protected:
0056
0057 void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0058
0059
0060 void searchTMBestIn(std::vector<L1MuDTChambPhDigi> const* trigs);
0061 void searchTMBestOut(std::vector<L1MuDTChambPhDigi> const* trigs);
0062
0063
0064 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0065
0066
0067 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
0068 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) final {}
0069
0070 const int wheelArrayShift = 3;
0071
0072 private:
0073
0074 std::string& topFolder() { return baseFolder; }
0075
0076
0077 void bookHistos(DQMStore::IBooker& ibooker, DTChamberId chId);
0078
0079 private:
0080 int nEvents;
0081 int nLumis;
0082 int nPhiBins, nPhibBins;
0083 double rangePhi, rangePhiB;
0084
0085 std::string baseFolder;
0086 bool detailedAnalysis;
0087 bool overUnderIn;
0088
0089 edm::EDGetTokenT<L1MuDTChambPhContainer> tm_TokenIn_;
0090 edm::EDGetTokenT<L1MuDTChambPhContainer> tm_TokenOut_;
0091 edm::EDGetTokenT<DTRecSegment4DCollection> seg_Token_;
0092
0093 DTArr3int trigQualBestIn;
0094 DTArr3int trigQualBestOut;
0095 DTArr3Digi trigBestIn;
0096 DTArr3Digi trigBestOut;
0097 DTArr3bool track_ok;
0098
0099 edm::ParameterSet parameters;
0100 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0101 const DTGeometry* muonGeom;
0102 DTTrigGeomUtils* trigGeomUtils;
0103
0104 std::map<uint32_t, std::map<std::string, MonitorElement*> > chHistos;
0105 std::map<int, std::map<std::string, MonitorElement*> > whHistos;
0106 };
0107
0108 #endif
0109
0110
0111
0112
0113