Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:59

0001 #ifndef RecoLocalTracker_Cluster_Parameter_Estimator_H
0002 #define RecoLocalTracker_Cluster_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 template <class T>
0012 class ClusterParameterEstimator {
0013 public:
0014   typedef std::pair<LocalPoint, LocalError> LocalValues;
0015   typedef std::vector<LocalValues> VLocalValues;
0016   virtual LocalValues localParameters(const T&, const GeomDetUnit&) const = 0;
0017   virtual LocalValues localParameters(const T& cluster, const GeomDetUnit& gd, const LocalTrajectoryParameters&) const {
0018     return localParameters(cluster, gd);
0019   }
0020   virtual LocalValues localParameters(const T& cluster,
0021                                       const GeomDetUnit& gd,
0022                                       const TrajectoryStateOnSurface& tsos) const {
0023     return localParameters(cluster, gd, tsos.localParameters());
0024   }
0025   virtual VLocalValues localParametersV(const T& cluster, const GeomDetUnit& gd) const {
0026     VLocalValues vlp;
0027     vlp.push_back(localParameters(cluster, gd));
0028     return vlp;
0029   }
0030   virtual VLocalValues localParametersV(const T& cluster,
0031                                         const GeomDetUnit& gd,
0032                                         const TrajectoryStateOnSurface& tsos) const {
0033     VLocalValues vlp;
0034     vlp.push_back(localParameters(cluster, gd, tsos.localParameters()));
0035     return vlp;
0036   }
0037 
0038   virtual ~ClusterParameterEstimator() {}
0039 
0040   //methods needed by FastSim
0041   virtual void enterLocalParameters(unsigned int id, std::pair<int, int>& row_col, LocalValues pos_err_info) const {}
0042   virtual void enterLocalParameters(uint32_t id, uint16_t firstStrip, LocalValues pos_err_info) const {}
0043   virtual void clearParameters() const {}
0044 };
0045 
0046 #endif