Go to the documentation of this file.00001 #ifndef OuterEstimator_H
00002 #define OuterEstimator_H
00003
00009 #include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
00010 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00011 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00012 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00013 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
00014 #include "RecoTracker/TkTrackingRegions/interface/OuterDetCompatibility.h"
00015 #include "RecoTracker/TkTrackingRegions/interface/OuterHitCompatibility.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017
00018
00019 class OuterEstimator : public MeasurementEstimator {
00020
00021 public:
00022 OuterEstimator(
00023 const OuterDetCompatibility & detCompatibility,
00024 const OuterHitCompatibility & hitCompatibility,
00025 const edm::EventSetup& iSetup)
00026 : theDetCompatibility(detCompatibility),
00027 theHitCompatibility (hitCompatibility) { }
00028 virtual ~OuterEstimator(){}
00029 virtual std::pair<bool,double> estimate(
00030 const TrajectoryStateOnSurface& ts,
00031 const TransientTrackingRecHit& hit)
00032 const {
00033 return theHitCompatibility(&hit) ? std::make_pair(true,1.) : std::make_pair(false,0.) ;
00034 }
00035
00036 virtual std::pair<bool,double> estimate(
00037 const TrajectoryStateOnSurface& ts,
00038 const TrackingRecHit& hit,
00039 const edm::EventSetup& iSetup)
00040 const {
00041 return theHitCompatibility(&hit,iSetup) ? std::make_pair(true,1.) : std::make_pair(false,0.) ;
00042 }
00043
00044 virtual bool estimate(
00045 const TrajectoryStateOnSurface& ts,
00046 const BoundPlane& plane
00047 ) const {
00048 return theDetCompatibility(plane);
00049 }
00050
00051 GlobalPoint center() { return theDetCompatibility.center(); }
00052
00053 virtual OuterEstimator* clone() const {
00054 return new OuterEstimator(*this);
00055 }
00056
00057 virtual MeasurementEstimator::Local2DVector maximalLocalDisplacement(
00058 const TrajectoryStateOnSurface& ts, const BoundPlane& plane) const {
00059 return theDetCompatibility.maximalLocalDisplacement(
00060 ts.globalPosition(),plane);
00061 }
00062
00063 const OuterDetCompatibility & detCompatibility() const
00064 {return theDetCompatibility; }
00065 const OuterHitCompatibility & hitCompatibility() const
00066 {return theHitCompatibility; }
00067
00068 private:
00069 OuterDetCompatibility theDetCompatibility;
00070 OuterHitCompatibility theHitCompatibility;
00071
00072 };
00073 #endif