Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-29 23:10:18

0001 #ifndef DTLocalTriggerSynchTask_H
0002 #define DTLocalTriggerSynchTask_H
0003 
0004 /*
0005  * \file DTLocalTriggerSynchTask.h
0006  *
0007  * \author C. Battilana - CIEMAT
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/DQMEDAnalyzer.h"
0023 
0024 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
0025 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0026 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0027 
0028 // DT trigger
0029 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0030 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0031 
0032 #include <vector>
0033 #include <string>
0034 #include <map>
0035 
0036 class DTGeometry;
0037 class DTChamberId;
0038 class DTRecSegment4D;
0039 class DTTTrigBaseSync;
0040 class DTLocalTrigger;
0041 class L1MuDTChambPhDigi;
0042 class L1MuDTChambThDigi;
0043 
0044 typedef std::array<std::array<std::array<int, 13>, 5>, 6> DTArr3int;
0045 typedef std::array<std::array<std::array<std::array<int, 3>, 13>, 5>, 6> DTArr4int;
0046 
0047 class DTLocalTriggerSynchTask : public DQMEDAnalyzer {
0048   friend class DTMonitorModule;
0049 
0050 public:
0051   /// Constructor
0052   DTLocalTriggerSynchTask(const edm::ParameterSet& ps);
0053 
0054   /// Destructor
0055   ~DTLocalTriggerSynchTask() override;
0056 
0057 protected:
0058   /// Book the histograms
0059   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0060 
0061   ///Beginrun
0062   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0063 
0064   /// Book the histograms
0065   void bookHistos(DQMStore::IBooker&, const DTChamberId& dtCh);
0066 
0067   /// Analyze
0068   void analyze(const edm::Event& event, const edm::EventSetup& context) override;
0069 
0070   std::string& baseDir() { return baseDirectory; }
0071 
0072   const int wheelArrayShift = 3;
0073 
0074 private:
0075   int nevents;
0076 
0077   DTArr3int phCodeBestTM;
0078   DTArr4int phCodeBXTM;
0079   DTArr3int segHitBest;
0080 
0081   float bxTime;
0082   bool rangeInBX;
0083   int nBXLow;
0084   int nBXHigh;
0085   float angleRange;
0086   float minHitsPhi;
0087   int fineDelay;
0088   std::unique_ptr<DTTTrigBaseSync> tTrigSync;
0089 
0090   std::string baseDirectory;
0091 
0092   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0093   const DTGeometry* muonGeom;
0094   std::map<uint32_t, std::map<std::string, MonitorElement*> > triggerHistos;
0095   MonitorElement* tm_IDDataErrorPlot;
0096 
0097   edm::EDGetTokenT<L1MuDTChambPhContainer> tm_Token_;
0098   edm::EDGetTokenT<DTRecSegment4DCollection> seg_Token_;
0099 };
0100 
0101 #endif
0102 
0103 /* Local Variables: */
0104 /* show-trailing-whitespace: t */
0105 /* truncate-lines: t */
0106 /* End: */