Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:10

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/ESHandle.h"
0021 
0022 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0023 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0024 
0025 #include "DQMServices/Core/interface/DQMStore.h"
0026 
0027 #include <string>
0028 #include <map>
0029 #include <vector>
0030 
0031 class DTGeometry;
0032 
0033 class DTResolutionAnalysisTask : public DQMOneEDAnalyzer<> {
0034 public:
0035   /// Constructor
0036   DTResolutionAnalysisTask(const edm::ParameterSet& pset);
0037 
0038   /// Destructor
0039   ~DTResolutionAnalysisTask() override;
0040 
0041   /// BookHistograms
0042   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0043 
0044   /// BeginRun
0045   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0046 
0047   /// To reset the MEs
0048   //  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) override;
0049   //  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) final {}
0050 
0051   // Operations
0052   void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
0053 
0054 protected:
0055 private:
0056   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0057   const DTGeometry* dtGeom;
0058 
0059   int prescaleFactor;
0060   int resetCycle;
0061 
0062   u_int32_t thePhiHitsCut;
0063   u_int32_t theZHitsCut;
0064 
0065   // Lable of 4D segments in the event
0066   edm::EDGetTokenT<DTRecSegment4DCollection> recHits4DToken_;
0067 
0068   // Book a set of histograms for a give chamber
0069   void bookHistos(DQMStore::IBooker& ibooker, DTSuperLayerId slId);
0070   // Fill a set of histograms for a give chamber
0071   void fillHistos(DTSuperLayerId slId, float distExtr, float residual);
0072 
0073   std::map<DTSuperLayerId, std::vector<MonitorElement*> > histosPerSL;
0074 
0075   // top folder for the histograms in DQMStore
0076   std::string topHistoFolder;
0077 };
0078 #endif
0079 
0080 /* Local Variables: */
0081 /* show-trailing-whitespace: t */
0082 /* truncate-lines: t */
0083 /* End: */