Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:00

0001 #ifndef Validation_DTRecHits_DTSegment4DQuality_h
0002 #define Validation_DTRecHits_DTSegment4DQuality_h
0003 
0004 /** \class DTSegment4DQuality
0005  *  Basic analyzer class which accesses 4D DTSegments
0006  *  and plots resolution comparing reconstructed and simulated quantities
0007  *
0008  *  Only true 4D segments are considered.
0009  *  Station 4 segments are not looked at.
0010  *  FIXME: Add flag to consider also
0011  *  segments with only phi view? Possible bias?
0012  *
0013  *  Residual/pull plots are filled for the reco segment with alpha closest
0014  *  to the simulated muon direction (defined from muon simhits in the chamber).
0015  *
0016  *  Efficiencies are defined as reconstructed 4D segments with alpha, beta, x,
0017  * y, within 5 sigma relative to the sim muon, with sigmas specified in the
0018  * config. Note that loss of even only one of the two views is considered as
0019  * inefficiency!
0020  *
0021  *  \author S. Bolognesi and G. Cerminara - INFN Torino
0022  */
0023 
0024 #include <map>
0025 #include <string>
0026 #include <vector>
0027 
0028 #include "DQMServices/Core/interface/DQMGlobalEDAnalyzer.h"
0029 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0030 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0031 #include "FWCore/Utilities/interface/InputTag.h"
0032 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0033 
0034 namespace edm {
0035   class ParameterSet;
0036   class Event;
0037   class EventSetup;
0038 }  // namespace edm
0039 
0040 class HRes4DHit;
0041 class HEff4DHit;
0042 namespace dtsegment4d {
0043   struct Histograms;
0044 }
0045 
0046 class DTSegment4DQuality : public DQMGlobalEDAnalyzer<dtsegment4d::Histograms> {
0047 public:
0048   /// Constructor
0049   DTSegment4DQuality(const edm::ParameterSet &pset);
0050 
0051 private:
0052   /// Book the DQM plots
0053   void bookHistograms(DQMStore::IBooker &,
0054                       edm::Run const &,
0055                       edm::EventSetup const &,
0056                       dtsegment4d::Histograms &) const override;
0057 
0058   /// Perform the real analysis
0059   void dqmAnalyze(edm::Event const &, edm::EventSetup const &, dtsegment4d::Histograms const &) const override;
0060 
0061 private:
0062   // Labels to read from event
0063   edm::InputTag simHitLabel_;
0064   edm::InputTag segment4DLabel_;
0065   edm::EDGetTokenT<edm::PSimHitContainer> simHitToken_;
0066   edm::EDGetTokenT<DTRecSegment4DCollection> segment4DToken_;
0067 
0068   //Get DT Geometry
0069   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0070 
0071   // Sigma resolution on position
0072   double sigmaResX_;
0073   double sigmaResY_;
0074 
0075   // Sigma resolution on angle
0076   double sigmaResAlpha_;
0077   double sigmaResBeta_;
0078 
0079   bool doall_;
0080   bool local_;
0081 
0082   // Switch for debug output
0083   bool debug_;
0084 };
0085 
0086 #endif