Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-21 22:39:44

0001 #ifndef DTResolutionAnalysisTask_H
0002 #define DTResolutionAnalysisTask_H
0003 
0004 /** \class DTResolutionAnalysis
0005  *  DQM Analysis of 4D DT segments, it produces plots about: <br>
0006  *      - number of segments per event <br>
0007  *      - position of the segments in chamber RF <br>
0008  *      - direction of the segments (theta and phi projections) <br>
0009  *      - reduced chi-square <br>
0010  *  All histos are produce per Chamber
0011  *
0012  *
0013  *  \author G. Cerminara - INFN Torino
0014  */
0015 
0016 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0017 
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0020 #include "FWCore/Framework/interface/EDAnalyzer.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022 
0023 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0024 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0025 
0026 #include "DQMServices/Core/interface/DQMStore.h"
0027 
0028 #include <string>
0029 #include <map>
0030 #include <vector>
0031 
0032 class DTGeometry;
0033 
0034 class DTResolutionAnalysisTask : public DQMOneEDAnalyzer<> {
0035 public:
0036   /// Constructor
0037   DTResolutionAnalysisTask(const edm::ParameterSet& pset);
0038 
0039   /// Destructor
0040   ~DTResolutionAnalysisTask() override;
0041 
0042   /// BookHistograms
0043   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0044 
0045   /// BeginRun
0046   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0047 
0048   /// To reset the MEs
0049   //  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) override;
0050   //  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) final {}
0051 
0052   // Operations
0053   void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
0054 
0055 protected:
0056 private:
0057   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0058   const DTGeometry* dtGeom;
0059 
0060   int prescaleFactor;
0061   int resetCycle;
0062 
0063   u_int32_t thePhiHitsCut;
0064   u_int32_t theZHitsCut;
0065 
0066   // Lable of 4D segments in the event
0067   edm::EDGetTokenT<DTRecSegment4DCollection> recHits4DToken_;
0068 
0069   // Book a set of histograms for a give chamber
0070   void bookHistos(DQMStore::IBooker& ibooker, DTSuperLayerId slId);
0071   // Fill a set of histograms for a give chamber
0072   void fillHistos(DTSuperLayerId slId, float distExtr, float residual);
0073 
0074   std::map<DTSuperLayerId, std::vector<MonitorElement*> > histosPerSL;
0075 
0076   // top folder for the histograms in DQMStore
0077   std::string topHistoFolder;
0078 };
0079 #endif
0080 
0081 /* Local Variables: */
0082 /* show-trailing-whitespace: t */
0083 /* truncate-lines: t */
0084 /* End: */