Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-20 00:21:34

0001 #ifndef DQMOffline_Alignment_TkAlCaRecoMonitor_H
0002 #define DQMOffline_Alignment_TkAlCaRecoMonitor_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    TkAlCaRecoMonitor
0007 // Class:      TkAlCaRecoMonitor
0008 //
0009 /**\class TkAlCaRecoMonitor TkAlCaRecoMonitor.cc
0010    DQM/TrackerMonitorTrack/src/TkAlCaRecoMonitor.cc
0011    Monitoring special quantities related to Tracker Alignment AlCaReco Production.
0012 */
0013 
0014 #include <algorithm>
0015 #include <fstream>
0016 #include <map>
0017 #include <memory>
0018 #include <vector>
0019 
0020 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 #include "DataFormats/JetReco/interface/CaloJet.h"
0023 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 #include "FWCore/Framework/interface/MakerMacros.h"
0027 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0028 #include "FWCore/ServiceRegistry/interface/Service.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 
0034 class TkAlCaRecoMonitor : public DQMEDAnalyzer {
0035 public:
0036   explicit TkAlCaRecoMonitor(const edm::ParameterSet &);
0037   ~TkAlCaRecoMonitor() override = default;
0038 
0039   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0040   void analyze(const edm::Event &, const edm::EventSetup &) override;
0041 
0042 private:
0043   void fillHitmaps(const reco::Track &track, const TrackerGeometry &geometry);
0044   void fillRawIdMap(const TrackerGeometry &geometry);
0045 
0046   // ----------member data ---------------------------
0047   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tkGeomToken_;
0048   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> mfToken_;
0049 
0050   edm::ParameterSet conf_;
0051 
0052   double maxJetPt_;
0053 
0054   // 1D
0055   MonitorElement *invariantMass_;
0056   MonitorElement *sumCharge_;
0057   MonitorElement *TrackQuality_;
0058   MonitorElement *jetPt_;
0059   MonitorElement *minJetDeltaR_;
0060   MonitorElement *minTrackDeltaR_;
0061   MonitorElement *AlCaRecoTrackEfficiency_;
0062   MonitorElement *Hits_perDetId_;
0063   MonitorElement *TrackPtPositive_;
0064   MonitorElement *TrackPtNegative_;
0065   MonitorElement *TrackCurvature_;
0066   // 2D
0067   MonitorElement *Hits_ZvsR_;
0068   MonitorElement *Hits_XvsY_;
0069 
0070   bool fillInvariantMass_;
0071   bool fillRawIdMap_;
0072   bool runsOnReco_;
0073   bool useSignedR_;
0074 
0075   edm::EDGetTokenT<reco::TrackCollection> trackProducer_;
0076   edm::EDGetTokenT<reco::TrackCollection> referenceTrackProducer_;
0077   edm::EDGetTokenT<reco::CaloJetCollection> jetCollection_;
0078   double daughterMass_;
0079   std::map<int, int> binByRawId_;
0080 };
0081 #endif