Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalTracker_StripCluster_Parameter_Estimator_H
0002 #define RecoLocalTracker_StripCluster_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/SiStripCluster/interface/SiStripCluster.h"
0012 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0013 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementPoint.h"
0014 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementError.h"
0015 
0016 #include "CommonTools/Utils/interface/DynArray.h"
0017 #include "FWCore/Utilities/interface/Exception.h"
0018 
0019 /**
0020     A StripClusterParameterEstimator specific for strips
0021    also implements direct access to measurement frame, since that is needed during the track refitting
0022 
0023 **/
0024 
0025 class StripClusterParameterEstimator {
0026 public:
0027   using LocalValues = std::pair<LocalPoint, LocalError>;
0028   using ALocalValues = DynArray<LocalValues>;
0029   using AClusters = DynArray<SiStripCluster const*>;
0030   typedef std::vector<LocalValues> VLocalValues;
0031 
0032   virtual void localParameters(AClusters const& clusters,
0033                                ALocalValues& retValues,
0034                                const GeomDetUnit& gd,
0035                                const LocalTrajectoryParameters& ltp) const {}
0036 
0037   virtual LocalValues localParameters(const SiStripCluster&, const GeomDetUnit&) const {
0038     return std::make_pair(LocalPoint(), LocalError());
0039   }
0040   virtual LocalValues localParameters(const SiStripCluster& cluster,
0041                                       const GeomDetUnit& gd,
0042                                       const LocalTrajectoryParameters&) const {
0043     return localParameters(cluster, gd);
0044   }
0045   virtual LocalValues localParameters(const SiStripCluster& cluster,
0046                                       const GeomDetUnit& gd,
0047                                       const TrajectoryStateOnSurface& tsos) const {
0048     return localParameters(cluster, gd, tsos.localParameters());
0049   }
0050   virtual VLocalValues localParametersV(const SiStripCluster& cluster, const GeomDetUnit& gd) const {
0051     VLocalValues vlp;
0052     vlp.push_back(localParameters(cluster, gd));
0053     return vlp;
0054   }
0055   virtual VLocalValues localParametersV(const SiStripCluster& cluster,
0056                                         const GeomDetUnit& gd,
0057                                         const TrajectoryStateOnSurface& tsos) const {
0058     VLocalValues vlp;
0059     vlp.push_back(localParameters(cluster, gd, tsos.localParameters()));
0060     return vlp;
0061   }
0062 
0063   // used by Validation....
0064   virtual LocalVector driftDirection(const StripGeomDetUnit*) const = 0;
0065 
0066   virtual ~StripClusterParameterEstimator() {}
0067 };
0068 
0069 #endif