Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:15

0001 #ifndef RecoLocalTracker_Fake_PixelCluster_Parameter_Estimator_H
0002 #define RecoLocalTracker_Fake_PixelCluster_Parameter_Estimator_H
0003 
0004 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0005 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0006 
0007 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0008 #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h"
0009 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0010 
0011 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0012 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitQuality.h"
0013 #include <tuple>
0014 
0015 #include "RecoLocalTracker/ClusterParameterEstimator/interface/FakeCPE.h"
0016 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
0017 
0018 class PixelFakeCPE final : public PixelClusterParameterEstimator {
0019 public:
0020   PixelFakeCPE() = default;
0021   ~PixelFakeCPE() override = default;
0022 
0023   typedef std::pair<LocalPoint, LocalError> LocalValues;
0024   typedef std::vector<LocalValues> VLocalValues;
0025 
0026   using ReturnType = std::tuple<LocalPoint, LocalError, SiPixelRecHitQuality::QualWordType>;
0027 
0028   // here just to implement it in the clients;
0029   // to be properly implemented in the sub-classes in order to make them thread-safe
0030 
0031   ReturnType getParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const override {
0032     auto const &lv = fakeCPE().map().get(cl, det);
0033     return {lv.first, lv.second, 0};
0034   }
0035 
0036   ReturnType getParameters(const SiPixelCluster &cl,
0037                            const GeomDetUnit &det,
0038                            const LocalTrajectoryParameters &) const override {
0039     return getParameters(cl, det);
0040   }
0041 
0042   void setFakeCPE(FakeCPE *iFakeCPE) { m_fakeCPE = iFakeCPE; }
0043   FakeCPE const &fakeCPE() const { return *m_fakeCPE; }
0044 
0045 private:
0046   FakeCPE const *m_fakeCPE = nullptr;
0047 };
0048 
0049 #endif