Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:38

0001 // -*- C++ -*-
0002 //
0003 // Package:    DQMOffline/Muon
0004 // Class:      MuonIdDQM
0005 //
0006 /*
0007 
0008  Description:  Makes and fills lots of histograms using the various reco::Muon
0009                methods. All code is adapted from Validation/MuonIdentification
0010 
0011 
0012 */
0013 //
0014 // Original Author:  Jacob Ribnik
0015 //         Created:  Wed Apr 18 13:48:08 CDT 2007
0016 //
0017 //
0018 
0019 #ifndef DQMOffline_Muon_MuonIdDQM_h
0020 #define DQMOffline_Muon_MuonIdDQM_h
0021 
0022 // system include files
0023 #include <string>
0024 
0025 // user include files
0026 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
0027 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0028 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0029 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0030 #include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
0031 #include "DataFormats/MuonReco/interface/Muon.h"
0032 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0033 
0034 #include "DQMServices/Core/interface/DQMStore.h"
0035 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0036 
0037 #include "FWCore/Framework/interface/ESHandle.h"
0038 #include "FWCore/Framework/interface/Event.h"
0039 #include "FWCore/Framework/interface/Frameworkfwd.h"
0040 #include "FWCore/Framework/interface/MakerMacros.h"
0041 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0042 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0043 #include "FWCore/ServiceRegistry/interface/Service.h"
0044 
0045 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0046 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0047 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0048 
0049 class MuonIdDQM : public DQMEDAnalyzer {
0050 public:
0051   explicit MuonIdDQM(const edm::ParameterSet&);
0052   ~MuonIdDQM() override;
0053 
0054   /* Operations */
0055   void analyze(const edm::Event&, const edm::EventSetup&) override;
0056   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0057 
0058 private:
0059   virtual void Fill(MonitorElement*, float);
0060 
0061   // ----------member data ---------------------------
0062   edm::EDGetTokenT<reco::MuonCollection> inputMuonCollection_;
0063   edm::EDGetTokenT<DTRecSegment4DCollection> inputDTRecSegment4DCollection_;
0064   edm::EDGetTokenT<CSCSegmentCollection> inputCSCSegmentCollection_;
0065   bool useTrackerMuons_;
0066   bool useGlobalMuons_;
0067   bool useTrackerMuonsNotGlobalMuons_;
0068   bool useGlobalMuonsNotTrackerMuons_;
0069   std::string baseFolder_;
0070 
0071   edm::Handle<reco::MuonCollection> muonCollectionH_;
0072   edm::Handle<DTRecSegment4DCollection> dtSegmentCollectionH_;
0073   edm::Handle<CSCSegmentCollection> cscSegmentCollectionH_;
0074   edm::ESHandle<GlobalTrackingGeometry> geometry_;
0075 
0076   const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> trackingGeomToken_;
0077 
0078   // trackerMuon == 0; globalMuon == 1
0079   MonitorElement* hNumChambers[4];
0080   MonitorElement* hNumMatches[4];
0081   MonitorElement* hNumChambersNoRPC[4];
0082 
0083   // by station
0084   MonitorElement* hDTNumSegments[4][4];
0085   MonitorElement* hDTDx[4][4];
0086   MonitorElement* hDTPullx[4][4];
0087   MonitorElement* hDTDdXdZ[4][4];
0088   MonitorElement* hDTPulldXdZ[4][4];
0089   MonitorElement* hDTDy[4][3];
0090   MonitorElement* hDTPully[4][3];
0091   MonitorElement* hDTDdYdZ[4][3];
0092   MonitorElement* hDTPulldYdZ[4][3];
0093   MonitorElement* hCSCNumSegments[4][4];
0094   MonitorElement* hCSCDx[4][4];
0095   MonitorElement* hCSCPullx[4][4];
0096   MonitorElement* hCSCDdXdZ[4][4];
0097   MonitorElement* hCSCPulldXdZ[4][4];
0098   MonitorElement* hCSCDy[4][4];
0099   MonitorElement* hCSCPully[4][4];
0100   MonitorElement* hCSCDdYdZ[4][4];
0101   MonitorElement* hCSCPulldYdZ[4][4];
0102 
0103   // segment matching "efficiency"
0104   MonitorElement* hSegmentIsAssociatedBool;
0105 };
0106 
0107 #endif