00001 #ifndef Chi2Switching1DEstimator_H_ 00002 #define Chi2Switching1DEstimator_H_ 00003 00014 #include "TrackingTools/DetLayers/interface/MeasurementEstimator.h" 00015 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h" 00016 #include "TrackingTools/KalmanUpdators/interface/Chi2Strip1DEstimator.h" 00017 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h" 00018 00019 class Chi2Switching1DEstimator : public Chi2MeasurementEstimatorBase { 00020 00021 public: 00022 00023 explicit Chi2Switching1DEstimator(double aMaxChi2, double nSigma = 3.) : 00024 Chi2MeasurementEstimatorBase(aMaxChi2,nSigma), 00025 theLocalEstimator(new Chi2MeasurementEstimator(aMaxChi2,nSigma)), 00026 theStripEstimator(new Chi2Strip1DEstimator(aMaxChi2,nSigma)) {}; 00027 00029 virtual std::pair<bool, double> estimate(const TrajectoryStateOnSurface& aTsos, 00030 const TransientTrackingRecHit& aHit) const; 00031 00032 virtual Chi2Switching1DEstimator* clone() const 00033 { 00034 return new Chi2Switching1DEstimator(*this); 00035 } 00036 00037 private: 00039 const Chi2MeasurementEstimator& localEstimator() const { 00040 return *theLocalEstimator; 00041 } 00043 const Chi2Strip1DEstimator& stripEstimator() const { 00044 return *theStripEstimator; 00045 } 00046 00047 private: 00048 DeepCopyPointerByClone<const Chi2MeasurementEstimator> theLocalEstimator; 00049 DeepCopyPointerByClone<const Chi2Strip1DEstimator> theStripEstimator; 00050 00051 }; 00052 #endif //Chi2Switching1DEstimator_H_ 00053 00054 00055