Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:12

0001 #ifndef TkStackMeasurementDet_H
0002 #define TkStackMeasurementDet_H
0003 
0004 #include "TrackingTools/MeasurementDet/interface/MeasurementDet.h"
0005 #include "TkPhase2OTMeasurementDet.h"
0006 
0007 #include "Geometry/CommonDetUnit/interface/StackGeomDet.h"
0008 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
0009 
0010 #include "FWCore/Utilities/interface/Visibility.h"
0011 
0012 // FIXME::TkStackMeasurementDet in this moment is just a prototype: to be fixed soon!
0013 
0014 class TkStackMeasurementDet final : public MeasurementDet {
0015 public:
0016   TkStackMeasurementDet(const StackGeomDet* gdet, const PixelClusterParameterEstimator* cpe);
0017   void init(const MeasurementDet* lowerDet, const MeasurementDet* upperDet);
0018 
0019   RecHitContainer recHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent& data) const override;
0020 
0021   const StackGeomDet& specificGeomDet() const { return static_cast<StackGeomDet const&>(fastGeomDet()); }
0022   typedef edm::Ref<edmNew::DetSetVector<Phase2TrackerCluster1D>, Phase2TrackerCluster1D> Phase2TrackerCluster1DRef;
0023 
0024   typedef edmNew::DetSet<Phase2TrackerCluster1D> detset;
0025   typedef detset::const_iterator const_iterator;
0026 
0027   bool measurements(const TrajectoryStateOnSurface& stateOnThisDet,
0028                     const MeasurementEstimator& est,
0029                     const MeasurementTrackerEvent& data,
0030                     TempMeasurements& result) const override;
0031 
0032   const TkPhase2OTMeasurementDet* lowerDet() const { return theLowerDet; }
0033   const TkPhase2OTMeasurementDet* upperDet() const { return theUpperDet; }
0034 
0035   /// return TRUE if both lower and upper components are active
0036   bool isActive(const MeasurementTrackerEvent& data) const override {
0037     return lowerDet()->isActive(data) && upperDet()->isActive(data);
0038   }
0039   bool isEmpty(const Phase2OTMeasurementDetSet& data) const {
0040     return data.empty(lowerDet()->index()) || data.empty(upperDet()->index());
0041   }
0042 
0043   /// return TRUE if at least one of the lower and upper components has badChannels
0044   bool hasBadComponents(const TrajectoryStateOnSurface& tsos, const MeasurementTrackerEvent& data) const override {
0045     return (lowerDet()->hasBadComponents(tsos, data) || upperDet()->hasBadComponents(tsos, data));
0046   }
0047 
0048 private:
0049   const PixelClusterParameterEstimator* thePixelCPE;
0050   const TkPhase2OTMeasurementDet* theLowerDet;
0051   const TkPhase2OTMeasurementDet* theUpperDet;
0052 };
0053 
0054 #endif