Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-11 04:33:33

0001 #ifndef Validation_RPCRecHits_RPCRecHitValid_h
0002 #define Validation_RPCRecHits_RPCRecHitValid_h
0003 
0004 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"
0006 
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "FWCore/Framework/interface/EventSetup.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "FWCore/Utilities/interface/InputTag.h"
0011 
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 #include "FWCore/ServiceRegistry/interface/Service.h"
0014 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0015 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0016 
0017 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0018 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
0019 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
0020 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0021 #include "SimGeneral/TrackingAnalysis/interface/SimHitTPAssociationProducer.h"
0022 #include "Validation/RPCRecHits/interface/RPCValidHistograms.h"
0023 
0024 #include <string>
0025 
0026 class RPCRecHitValid : public DQMEDAnalyzer {
0027 public:
0028   RPCRecHitValid(const edm::ParameterSet &pset);
0029   ~RPCRecHitValid() override {}
0030 
0031   void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0032   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0033 
0034 private:
0035   typedef edm::PSimHitContainer SimHits;
0036   typedef RPCRecHitCollection RecHits;
0037   typedef TrackingParticleCollection SimParticles;
0038   typedef SimHitTPAssociationProducer::SimHitTPAssociationList SimHitAssoc;
0039 
0040   std::string subDir_;
0041   edm::EDGetTokenT<SimHits> simHitToken_;
0042   edm::EDGetTokenT<RecHits> recHitToken_;
0043   edm::EDGetTokenT<SimParticles> simParticleToken_;
0044   edm::EDGetTokenT<SimHitAssoc> simHitAssocToken_;
0045   edm::EDGetTokenT<reco::MuonCollection> muonToken_;
0046 
0047   edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomToken_;
0048   edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomTokenInRun_;
0049 
0050   typedef MonitorElement *MEP;
0051   RPCValidHistograms h_;
0052 
0053   MEP h_eventCount;
0054 
0055   MEP h_nRPCHitPerSimMuon, h_nRPCHitPerSimMuonBarrel, h_nRPCHitPerSimMuonOverlap, h_nRPCHitPerSimMuonEndcap;
0056   MEP h_nRPCHitPerRecoMuon, h_nRPCHitPerRecoMuonBarrel, h_nRPCHitPerRecoMuonOverlap, h_nRPCHitPerRecoMuonEndcap;
0057   MEP h_simMuonBarrel_pt, h_simMuonOverlap_pt, h_simMuonEndcap_pt, h_simMuonNoRPC_pt;
0058   MEP h_simMuonBarrel_eta, h_simMuonOverlap_eta, h_simMuonEndcap_eta, h_simMuonNoRPC_eta;
0059   MEP h_simMuonBarrel_phi, h_simMuonOverlap_phi, h_simMuonEndcap_phi, h_simMuonNoRPC_phi;
0060   MEP h_recoMuonBarrel_pt, h_recoMuonOverlap_pt, h_recoMuonEndcap_pt, h_recoMuonNoRPC_pt;
0061   MEP h_recoMuonBarrel_eta, h_recoMuonOverlap_eta, h_recoMuonEndcap_eta, h_recoMuonNoRPC_eta;
0062   MEP h_recoMuonBarrel_phi, h_recoMuonOverlap_phi, h_recoMuonEndcap_phi, h_recoMuonNoRPC_phi;
0063   MEP h_simParticleType, h_simParticleTypeBarrel, h_simParticleTypeEndcap;
0064 
0065   MEP h_matchOccupancyBarrel_detId;
0066   MEP h_matchOccupancyEndcap_detId;
0067   MEP h_refOccupancyBarrel_detId;
0068   MEP h_refOccupancyEndcap_detId;
0069   MEP h_allOccupancyBarrel_detId;
0070   MEP h_allOccupancyEndcap_detId;
0071   MEP h_rollAreaBarrel_detId;
0072   MEP h_rollAreaEndcap_detId;
0073 
0074   std::map<int, int> detIdToIndexMapBarrel_, detIdToIndexMapEndcap_;
0075 };
0076 
0077 #endif  // Validation_RPCRecHits_RPCRecHitValid_h