Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:02:26

0001 #ifndef MeasurementTrackerEventProducer_h
0002 #define MeasurementTrackerEventProducer_h
0003 // user include files
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 #include "FWCore/Framework/interface/stream/EDProducer.h"
0006 
0007 #include "FWCore/Framework/interface/Event.h"
0008 
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "RecoTracker/MeasurementDet/src/TkMeasurementDetSet.h"
0011 #include "DataFormats/Common/interface/ContainerMask.h"
0012 #include "DataFormats/DetId/interface/DetIdCollection.h"
0013 #include "DataFormats/DetId/interface/DetIdVector.h"
0014 #include "DataFormats/SiPixelDetId/interface/PixelFEDChannel.h"
0015 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
0016 #include "DataFormats/TrackerRecHit2D/interface/VectorHit.h"
0017 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
0018 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
0019 
0020 class dso_hidden MeasurementTrackerEventProducer final : public edm::stream::EDProducer<> {
0021 public:
0022   explicit MeasurementTrackerEventProducer(const edm::ParameterSet& iConfig);
0023   ~MeasurementTrackerEventProducer() override {}
0024 
0025   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0026 
0027 private:
0028   void produce(edm::Event&, const edm::EventSetup&) override;
0029 
0030 protected:
0031   void updatePixels(const edm::Event&,
0032                     PxMeasurementDetSet& thePxDets,
0033                     std::vector<bool>& pixelClustersToSkip,
0034                     const TrackerGeometry& trackerGeom,
0035                     const edm::EventSetup& iSetup) const;
0036   void updateStrips(const edm::Event&, StMeasurementDetSet& theStDets, std::vector<bool>& stripClustersToSkip) const;
0037   void updatePhase2OT(const edm::Event&, Phase2OTMeasurementDetSet& thePh2OTDets) const;
0038   //FIXME:: going to be updated soon
0039   void updateStacks(const edm::Event&, Phase2OTMeasurementDetSet& theStDets) const {};
0040 
0041   void getInactiveStrips(const edm::Event& event, std::vector<uint32_t>& rawInactiveDetIds) const;
0042 
0043   edm::ESGetToken<MeasurementTracker, CkfComponentsRecord> measurementTrackerToken_;
0044   edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster>> thePixelClusterLabel;
0045   edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster>> theStripClusterLabel;
0046   edm::EDGetTokenT<edmNew::DetSetVector<Phase2TrackerCluster1D>> thePh2OTClusterLabel;
0047   edm::EDGetTokenT<VectorHitCollection> thePh2OTVectorHitsLabel;
0048   edm::EDGetTokenT<VectorHitCollection> thePh2OTVectorHitsRejLabel;
0049   edm::EDGetTokenT<edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster>>> thePixelClusterMask;
0050   edm::EDGetTokenT<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster>>> theStripClusterMask;
0051 
0052   std::vector<edm::EDGetTokenT<DetIdCollection>> theInactivePixelDetectorLabels;
0053   std::vector<edm::EDGetTokenT<PixelFEDChannelCollection>> theBadPixelFEDChannelsLabels;
0054   edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> pixelCablingMapToken_;
0055   std::vector<edm::EDGetTokenT<DetIdVector>> theInactiveStripDetectorLabels;
0056 
0057   bool selfUpdateSkipClusters_;
0058   bool switchOffPixelsIfEmpty_;
0059   bool isPhase2_;
0060   bool useVectorHits_;
0061 };
0062 
0063 #endif