Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Validation_MuonDTDigis_h
0002 #define Validation_MuonDTDigis_h
0003 
0004 /** \class MuonDTDigis
0005  *  Analyse the the muon-drift-tubes digitizer.
0006  *
0007  *  \authors: R. Bellan
0008  */
0009 #include "FWCore/Framework/interface/ESHandle.h"
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include <FWCore/Framework/interface/Event.h>
0012 
0013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "FWCore/ServiceRegistry/interface/Service.h"
0016 
0017 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0018 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0019 
0020 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0021 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0022 #include "Geometry/DTGeometry/interface/DTLayer.h"
0023 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0024 
0025 #include "DataFormats/DTDigi/interface/DTDigi.h"
0026 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0027 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0028 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0029 
0030 #include "SimMuon/DTDigitizer/interface/Histograms.h"
0031 
0032 #include <vector>
0033 
0034 #include <DQMServices/Core/interface/DQMEDAnalyzer.h>
0035 #include <DQMServices/Core/interface/DQMStore.h>
0036 
0037 class TH1F;
0038 class TFile;
0039 class PSimHit;
0040 class hDigis;
0041 
0042 namespace edm {
0043   class ParameterSet;
0044   class Event;
0045   class EventSetup;
0046 }  // namespace edm
0047 
0048 class MuonDTDigis : public DQMEDAnalyzer {
0049 public:
0050   // Constructor
0051   explicit MuonDTDigis(const edm::ParameterSet &pset);
0052 
0053   // Destructor
0054   ~MuonDTDigis() override;
0055 
0056 protected:
0057   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0058   // Analysis
0059   void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0060 
0061   hDigis *WheelHistos(int wheel);
0062 
0063 private:
0064   typedef std::map<DTWireId, std::vector<const PSimHit *>> DTWireIdMap;
0065 
0066   edm::EDGetTokenT<edm::PSimHitContainer> SimHitToken_;
0067   edm::EDGetTokenT<DTDigiCollection> DigiToken_;
0068   //Get DT Geometry
0069   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0070   const DTGeometry *muonGeom;
0071 
0072   // Switch for debug output
0073   bool verbose_;
0074 
0075   // Monitor elements
0076   MonitorElement *meDigiTimeBox_;
0077   MonitorElement *meDigiTimeBox_wheel2m_;
0078   MonitorElement *meDigiTimeBox_wheel1m_;
0079   MonitorElement *meDigiTimeBox_wheel0_;
0080   MonitorElement *meDigiTimeBox_wheel1p_;
0081   MonitorElement *meDigiTimeBox_wheel2p_;
0082   MonitorElement *meDigiEfficiency_;
0083   MonitorElement *meDigiEfficiencyMu_;
0084   MonitorElement *meDoubleDigi_;
0085   MonitorElement *meSimvsDigi_;
0086   MonitorElement *meWire_DoubleDigi_;
0087 
0088   MonitorElement *meMB1_sim_occup_;
0089   MonitorElement *meMB1_digi_occup_;
0090   MonitorElement *meMB2_sim_occup_;
0091   MonitorElement *meMB2_digi_occup_;
0092   MonitorElement *meMB3_sim_occup_;
0093   MonitorElement *meMB3_digi_occup_;
0094   MonitorElement *meMB4_sim_occup_;
0095   MonitorElement *meMB4_digi_occup_;
0096 
0097   std::vector<MonitorElement *> meDigiTimeBox_SL_;
0098   MonitorElement *meDigiHisto_;
0099 
0100   //  TH1F *DigiTimeBox;
0101   //  TFile *file_more_plots;
0102 
0103   std::unique_ptr<hDigis> hDigis_global;
0104   std::unique_ptr<hDigis> hDigis_W0;
0105   std::unique_ptr<hDigis> hDigis_W1;
0106   std::unique_ptr<hDigis> hDigis_W2;
0107   std::unique_ptr<hHits> hAllHits;
0108 };
0109 
0110 #endif