Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:20

0001 #ifndef SiPixelHitEfficiencySource_H
0002 #define SiPixelHitEfficiencySource_H
0003 
0004 // Package: SiPixelMonitorTrack
0005 // Class:   SiPixelHitEfficiencySource
0006 //
0007 // class SiPixelHitEfficiencySource SiPixelHitEfficiencySource.h
0008 //       DQM/SiPixelMonitorTrack/interface/SiPixelHitEfficiencySource.h
0009 //
0010 // Description:    <one line class summary>
0011 // Implementation: <Notes on implementation>
0012 //
0013 //
0014 // Original Authors: Romain Rougny & Luca Mucibello
0015 //         Created: Mar Nov 10 13:29:00 CET 2009
0016 
0017 #include "DQM/SiPixelMonitorTrack/interface/SiPixelHitEfficiencyModule.h"
0018 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0019 #include "DQMServices/Core/interface/DQMStore.h"
0020 
0021 // Files added for monitoring track quantities
0022 #include "Alignment/OfflineValidation/interface/TrackerValidationVariables.h"
0023 #include "Alignment/TrackerAlignment/interface/TrackerAlignableId.h"
0024 #include "DataFormats/TrackerCommon/interface/PixelBarrelName.h"
0025 #include "DataFormats/SiPixelDetId/interface/PixelBarrelNameUpgrade.h"
0026 #include "DataFormats/TrackerCommon/interface/PixelEndcapName.h"
0027 #include "DataFormats/SiPixelDetId/interface/PixelEndcapNameUpgrade.h"
0028 #include "DataFormats/TrackReco/interface/Track.h"
0029 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0030 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0031 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0032 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
0033 #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h"
0034 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
0035 
0036 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0037 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0038 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0039 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0040 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
0041 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
0042 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
0043 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0044 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
0045 
0046 #include <cstdint>
0047 
0048 class SiPixelHitEfficiencySource : public DQMEDAnalyzer {
0049 public:
0050   explicit SiPixelHitEfficiencySource(const edm::ParameterSet &);
0051   ~SiPixelHitEfficiencySource() override;
0052 
0053   void dqmBeginRun(const edm::Run &r, edm::EventSetup const &iSetup) override;
0054   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0055   void analyze(const edm::Event &, const edm::EventSetup &) override;
0056   virtual void fillClusterProbability(int, int, bool, double);
0057 
0058 private:
0059   edm::ParameterSet pSet_;
0060   edm::InputTag src_;
0061   // edm::InputTag tracksrc_;
0062   edm::EDGetTokenT<reco::VertexCollection> vertexCollectionToken_;
0063   edm::EDGetTokenT<TrajTrackAssociationCollection> tracksrc_;
0064   edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster>> clusterCollectionToken_;
0065 
0066   edm::EDGetTokenT<MeasurementTrackerEvent> measurementTrackerEventToken_;
0067 
0068   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopoToken_;
0069   edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomToken_;
0070   edm::ESGetToken<MeasurementTracker, CkfComponentsRecord> measurementTrackerToken_;
0071   edm::ESGetToken<Chi2MeasurementEstimatorBase, TrackingComponentsRecord> chi2MeasurementEstimatorBaseToken_;
0072   edm::ESGetToken<Propagator, TrackingComponentsRecord> propagatorToken_;
0073   edm::ESGetToken<PixelClusterParameterEstimator, TkPixelCPERecord> pixelClusterParameterEstimatorToken_;
0074   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopoTokenBeginRun_;
0075   edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomTokenBeginRun_;
0076 
0077   bool applyEdgeCut_;
0078   double nSigma_EdgeCut_;
0079 
0080   bool debug_;
0081   bool modOn;
0082   // barrel:
0083   bool ladOn, layOn, phiOn;
0084   // forward:
0085   bool ringOn, bladeOn, diskOn;
0086 
0087   bool firstRun;
0088 
0089   std::map<uint32_t, SiPixelHitEfficiencyModule *> theSiPixelStructure;
0090 
0091   std::string vtxsrc_;
0092   int nmissing, nvalid;
0093 
0094   int nvtx_;
0095   int vtxntrk_;
0096   double vtxD0_;
0097   double vtxX_;
0098   double vtxY_;
0099   double vtxZ_;
0100   double vtxndof_;
0101   double vtxchi2_;
0102 
0103   bool isUpgrade;
0104 
0105   // MEs for cluster probability
0106   MonitorElement *meClusterProbabilityL1_Plus_;
0107   MonitorElement *meClusterProbabilityL1_Minus_;
0108 
0109   MonitorElement *meClusterProbabilityL2_Plus_;
0110   MonitorElement *meClusterProbabilityL2_Minus_;
0111 
0112   MonitorElement *meClusterProbabilityL3_Plus_;
0113   MonitorElement *meClusterProbabilityL3_Minus_;
0114 
0115   MonitorElement *meClusterProbabilityD1_Plus_;
0116   MonitorElement *meClusterProbabilityD1_Minus_;
0117 
0118   MonitorElement *meClusterProbabilityD2_Plus_;
0119   MonitorElement *meClusterProbabilityD2_Minus_;
0120 };
0121 
0122 #endif