Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DQMOffline_Alignment_DiMuonVertexMonitor_H
0002 #define DQMOffline_Alignment_DiMuonVertexMonitor_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    DiMuonVertexMonitor
0007 // Class:      DiMuonVertexMonitor
0008 //
0009 /**\class DiMuonVertexMonitor DiMuonVertexMonitor.cc
0010    DQM/TrackerMonitorTrack/src/DiMuonVertexMonitor.cc
0011    Monitoring  quantities related to the DiMuon vertex during Tracker Alignment AlCaReco Production
0012 */
0013 
0014 // system includes
0015 #include <string>
0016 
0017 // user includes
0018 #include "DQMOffline/Alignment/interface/DiLeptonPlotHelpers.h"
0019 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 #include "FWCore/Framework/interface/Event.h"
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 #include "DataFormats/TrackReco/interface/Track.h"
0026 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0027 #include "DataFormats/VertexReco/interface/Vertex.h"
0028 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0029 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
0030 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0031 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
0032 
0033 class DiMuonVertexMonitor : public DQMEDAnalyzer {
0034 public:
0035   explicit DiMuonVertexMonitor(const edm::ParameterSet &);
0036   ~DiMuonVertexMonitor() override = default;
0037 
0038   static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0039 
0040   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0041   void analyze(const edm::Event &, const edm::EventSetup &) override;
0042 
0043 private:
0044   const reco::Vertex *findClosestVertex(const TransientVertex aTransVtx, const reco::VertexCollection *vertices) const;
0045 
0046   // ----------member data ---------------------------
0047   const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> ttbESToken_;
0048 
0049   //used to select what tracks to read from configuration file
0050   const edm::EDGetTokenT<reco::TrackCollection> tracksToken_;
0051   //used to select what vertices to read from configuration file
0052   const edm::EDGetTokenT<reco::VertexCollection> vertexToken_;
0053 
0054   const std::string motherName_;
0055   const std::string MEFolderName_;  // Top-level folder name
0056   const bool useClosestVertex_;
0057 
0058   std::pair<float, float> massLimits_; /* for the mass plot x-range */
0059   const float maxSVdist_;
0060 
0061   // vertex quantities
0062   MonitorElement *hSVProb_;
0063   MonitorElement *hSVChi2_;
0064   MonitorElement *hSVNormChi2_;
0065 
0066   MonitorElement *hSVDist_;
0067   MonitorElement *hSVDistErr_;
0068   MonitorElement *hSVDistSig_;
0069   MonitorElement *hSVCompatibility_;
0070 
0071   MonitorElement *hSVDist3D_;
0072   MonitorElement *hSVDist3DErr_;
0073   MonitorElement *hSVDist3DSig_;
0074   MonitorElement *hSVCompatibility3D_;
0075 
0076   MonitorElement *hCosPhi_;
0077   MonitorElement *hCosPhi3D_;
0078   MonitorElement *hCosPhiInv_;
0079   MonitorElement *hCosPhiInv3D_;
0080   MonitorElement *hCosPhiUnbalance_;
0081   MonitorElement *hCosPhi3DUnbalance_;
0082   MonitorElement *hInvMass_;
0083   MonitorElement *hCutFlow_;
0084 
0085   // 2D histograms of pointing angle vs variable
0086   edm::ParameterSet CosPhi3DConfiguration_;
0087   DiLepPlotHelp::PlotsVsKinematics CosPhi3DPlots_ = DiLepPlotHelp::PlotsVsKinematics(DiLepPlotHelp::MM);
0088 
0089   // 2D histograms of 3D PV-SV distance vs variable
0090   edm::ParameterSet SVDistConfiguration_;
0091   DiLepPlotHelp::PlotsVsKinematics SVDistPlots_ = DiLepPlotHelp::PlotsVsKinematics(DiLepPlotHelp::MM);
0092 
0093   // 2D histograms of 3D PV-SV distance significance vs variable
0094   edm::ParameterSet SVDistSigConfiguration_;
0095   DiLepPlotHelp::PlotsVsKinematics SVDistSigPlots_ = DiLepPlotHelp::PlotsVsKinematics(DiLepPlotHelp::MM);
0096 
0097   // 2D histograms of PV-SV transverse distance vs variable
0098   edm::ParameterSet SVDist3DConfiguration_;
0099   DiLepPlotHelp::PlotsVsKinematics SVDist3DPlots_ = DiLepPlotHelp::PlotsVsKinematics(DiLepPlotHelp::MM);
0100 
0101   // 2D histograms of PV-SV transverse distance significance vs variable
0102   edm::ParameterSet SVDist3DSigConfiguration_;
0103   DiLepPlotHelp::PlotsVsKinematics SVDist3DSigPlots_ = DiLepPlotHelp::PlotsVsKinematics(DiLepPlotHelp::MM);
0104 
0105   // impact parameters information
0106   MonitorElement *hdxy_;
0107   MonitorElement *hdz_;
0108   MonitorElement *hdxyErr_;
0109   MonitorElement *hdzErr_;
0110   MonitorElement *hIP2d_;
0111   MonitorElement *hIP3d_;
0112   MonitorElement *hIP2dsig_;
0113   MonitorElement *hIP3dsig_;
0114 };
0115 #endif