CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/RecoTracker/TkTrackingRegions/interface/HitRCheck.h

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