00001 #ifndef HitZCheck_H 00002 #define HitZCheck_H 00003 00007 #include "RecoTracker/TkTrackingRegions/interface/HitRZCompatibility.h" 00008 #include "RecoTracker/TkTrackingRegions/interface/HitRZConstraint.h" 00009 00010 00011 class HitZCheck : public HitRZCompatibility { 00012 public: 00013 00014 typedef TkTrackingRegionsMargin<float> Margin; 00015 00016 HitZCheck() { } 00017 HitZCheck(const HitRZConstraint & rz, Margin margin = Margin(0,0)) 00018 : theRZ(rz), theTolerance(margin) { } 00019 00020 virtual bool operator() (const float & r, const float & z) const 00021 { return range(r).inside(z); } 00022 00023 virtual Range range(const float & radius) const; 00024 00025 virtual HitZCheck * clone() const { return new HitZCheck(*this); } 00026 00027 void setTolerance(const Margin & tolerance) { theTolerance = tolerance; } 00028 00029 private: 00030 HitRZConstraint theRZ; 00031 Margin theTolerance; 00032 }; 00033 #endif