File indexing completed on 2024-04-06 12:07:09
0001 #ifndef DTLocalTriggerBaseTask_H
0002 #define DTLocalTriggerBaseTask_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/DQMStore.h"
0021
0022 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0023
0024 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0025
0026 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
0027 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0028 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0029 #include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTPhContainer.h"
0030
0031 #include <vector>
0032 #include <string>
0033 #include <map>
0034
0035 class DTGeometry;
0036 class DTTrigGeomUtils;
0037 class DTChamberId;
0038 class DTRecSegment4D;
0039 class L1MuDTChambPhDigi;
0040 class L1MuDTChambThDigi;
0041 class L1Phase2MuDTPhDigi;
0042 class DTTPGCompareUnit;
0043 class DTTimeEvolutionHisto;
0044
0045 class DTLocalTriggerBaseTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
0046 friend class DTMonitorModule;
0047
0048 public:
0049
0050 DTLocalTriggerBaseTask(const edm::ParameterSet& ps);
0051
0052
0053 ~DTLocalTriggerBaseTask() override;
0054
0055 protected:
0056
0057 void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0058
0059
0060 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0061
0062
0063 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
0064
0065
0066 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
0067
0068 private:
0069
0070 void runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phInTrigs,
0071 std::vector<L1MuDTChambPhDigi> const* phOutTrigs,
0072 std::vector<L1MuDTChambThDigi> const* thTrigs);
0073
0074
0075 void runAB7Analysis(std::vector<L1Phase2MuDTPhDigi> const* phTrigs);
0076
0077
0078 std::string& topFolder(std::string const& type) { return m_baseFolder[type == "TM"]; }
0079
0080 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0081
0082
0083 void bookHistos(DQMStore::IBooker&, const DTChamberId& chamb);
0084
0085
0086 void bookHistos(DQMStore::IBooker&, int wh);
0087
0088
0089 void setQLabels(MonitorElement* me, short int iaxis);
0090 void setQLabelsTheta(MonitorElement* me, short int iaxis);
0091 void setQLabelsPh2(MonitorElement* me, short int iaxis);
0092
0093 int m_nEvents;
0094 int m_nEventsInLS;
0095 int m_nLumis;
0096
0097 std::string m_baseFolder[2];
0098 bool m_tpMode;
0099 bool m_detailedAnalysis;
0100
0101 bool m_processTM;
0102 bool m_processAB7;
0103
0104 int m_targetBXTM;
0105 int m_bestAccRange;
0106
0107 edm::ParameterSet m_params;
0108 DTTrigGeomUtils* m_trigGeomUtils;
0109 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0110 const DTGeometry* geom;
0111
0112 std::vector<std::string> m_types;
0113
0114 std::map<uint32_t, DTTPGCompareUnit> m_compMapIn;
0115 std::map<uint32_t, DTTPGCompareUnit> m_compMapOut;
0116 std::map<uint32_t, std::map<std::string, MonitorElement*> > m_chamberHistos;
0117 std::map<uint32_t, DTTimeEvolutionHisto*> m_trendHistos;
0118 MonitorElement* m_nEventMonitor;
0119
0120 edm::EDGetTokenT<L1MuDTChambPhContainer> m_tm_phiIn_Token;
0121 edm::EDGetTokenT<L1MuDTChambPhContainer> m_tm_phiOut_Token;
0122 edm::EDGetTokenT<L1MuDTChambThContainer> m_tm_theta_Token;
0123 edm::EDGetTokenT<L1Phase2MuDTPhContainer> m_ab7_phi_Token;
0124 };
0125
0126 #endif
0127
0128
0129
0130
0131