Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:30

0001 #ifndef TrackSplittingMonitor_H
0002 #define TrackSplittingMonitor_H
0003 // -*- C++ -*-
0004 //
0005 // Package:    TrackSplittingMonitor
0006 // Class:      TrackSplittingMonitor
0007 //
0008 /**\class TrackSplittingMonitor TrackSplittingMonitor.cc DQM/TrackingMonitor/src/TrackSplittingMonitor.cc
0009  Monitoring source for general quantities related to tracks.
0010  */
0011 // Original Author:  Nhan Tran
0012 //         Created:  Thu 28 22:45:30 CEST 2008
0013 
0014 #include <fstream>
0015 #include <memory>
0016 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0017 #include "DQMServices/Core/interface/DQMStore.h"
0018 #include "FWCore/Framework/interface/ESHandle.h"
0019 #include "FWCore/Framework/interface/Event.h"
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021 #include "FWCore/Framework/interface/MakerMacros.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 #include "FWCore/ServiceRegistry/interface/Service.h"
0024 #include "FWCore/Utilities/interface/EDGetToken.h"
0025 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0026 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0027 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0028 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0029 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0030 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0031 #include "MagneticField/Engine/interface/MagneticField.h"
0032 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0033 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
0034 
0035 class TProfile;
0036 
0037 #include "DataFormats/MuonReco/interface/Muon.h"
0038 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0039 
0040 class TrackSplittingMonitor : public DQMEDAnalyzer {
0041 public:
0042   explicit TrackSplittingMonitor(const edm::ParameterSet&);
0043   ~TrackSplittingMonitor() override;
0044 
0045   void analyze(const edm::Event&, const edm::EventSetup&) override;
0046   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0047 
0048 private:
0049   void doProfileX(TH2* th2, MonitorElement* me);
0050   void doProfileX(MonitorElement* th2m, MonitorElement* me);
0051 
0052   // ----------member data ---------------------------
0053 
0054   //  unsigned int minTracks_;
0055 
0056   std::string histname;  //for naming the histograms according to algorithm used
0057 
0058   DQMStore* dqmStore_;
0059   edm::ParameterSet conf_;
0060 
0061   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> mfToken_;
0062   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tkGeomToken_;
0063   const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0064   const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomToken_;
0065   const edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomToken_;
0066 
0067   const TrackerGeometry* theGeometry;
0068   const MagneticField* theMagField;
0069   const DTGeometry* dtGeometry;
0070   const CSCGeometry* cscGeometry;
0071   const RPCGeometry* rpcGeometry;
0072 
0073   edm::InputTag splitTracks_;
0074   edm::InputTag splitMuons_;
0075   edm::EDGetTokenT<std::vector<reco::Track> > splitTracksToken_;
0076   edm::EDGetTokenT<std::vector<reco::Muon> > splitMuonsToken_;
0077 
0078   bool plotMuons_;
0079   int pixelHitsPerLeg_;
0080   int totalHitsPerLeg_;
0081   double d0Cut_;
0082   double dzCut_;
0083   double ptCut_;
0084   double norchiCut_;
0085 
0086   // histograms
0087   MonitorElement* ddxyAbsoluteResiduals_tracker_;
0088   MonitorElement* ddzAbsoluteResiduals_tracker_;
0089   MonitorElement* dphiAbsoluteResiduals_tracker_;
0090   MonitorElement* dthetaAbsoluteResiduals_tracker_;
0091   MonitorElement* dptAbsoluteResiduals_tracker_;
0092   MonitorElement* dcurvAbsoluteResiduals_tracker_;
0093 
0094   MonitorElement* ddxyNormalizedResiduals_tracker_;
0095   MonitorElement* ddzNormalizedResiduals_tracker_;
0096   MonitorElement* dphiNormalizedResiduals_tracker_;
0097   MonitorElement* dthetaNormalizedResiduals_tracker_;
0098   MonitorElement* dptNormalizedResiduals_tracker_;
0099   MonitorElement* dcurvNormalizedResiduals_tracker_;
0100 
0101   MonitorElement* ddxyAbsoluteResiduals_global_;
0102   MonitorElement* ddzAbsoluteResiduals_global_;
0103   MonitorElement* dphiAbsoluteResiduals_global_;
0104   MonitorElement* dthetaAbsoluteResiduals_global_;
0105   MonitorElement* dptAbsoluteResiduals_global_;
0106   MonitorElement* dcurvAbsoluteResiduals_global_;
0107 
0108   MonitorElement* ddxyNormalizedResiduals_global_;
0109   MonitorElement* ddzNormalizedResiduals_global_;
0110   MonitorElement* dphiNormalizedResiduals_global_;
0111   MonitorElement* dthetaNormalizedResiduals_global_;
0112   MonitorElement* dptNormalizedResiduals_global_;
0113   MonitorElement* dcurvNormalizedResiduals_global_;
0114 };
0115 #endif