CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HitZCheck.h
Go to the documentation of this file.
1 #ifndef HitZCheck_H
2 #define HitZCheck_H
3 
9 
10 
11 class HitZCheck GCC11_FINAL : public HitRZCompatibility {
12 public:
13  static constexpr Algo me =zAlgo;
14 
16 
18  HitZCheck(const HitRZConstraint & rz, Margin margin = Margin(0,0))
19  : HitRZCompatibility(me), theRZ(rz), theTolerance(margin) { }
20 
21  virtual bool operator() (const float & r, const float & z) const
22  { return range(r).inside(z); }
23 
24  inline Range range(const float & radius) const;
25 
26  virtual HitZCheck * clone() const { return new HitZCheck(*this); }
27 
28  void setTolerance(const Margin & tolerance) { theTolerance = tolerance; }
29 
30 private:
31  HitRZConstraint theRZ;
32  Margin theTolerance;
33 };
34 
35 HitZCheck::Range HitZCheck::range(const float & radius) const
36 {
37  return Range( theRZ.lineLeft().zAtR(radius) - theTolerance.left(),
38  theRZ.lineRight().zAtR(radius) + theTolerance.right());
39 }
40 
41 
42 #endif
virtual HitZCheck * clone() const
Definition: HitZCheck.h:26
virtual Range range(const float &rORz) const =0
TkTrackingRegionsMargin< float > Margin
Definition: HitZCheck.h:15
void setTolerance(const Margin &tolerance)
Definition: HitZCheck.h:28
float float float z
PixelRecoRange< float > Range
bool inside(const T &value) const
Definition: fakeMenu.h:6
#define constexpr
virtual bool operator()(const float &r, const float &z) const =0
Unlimited (trivial) bounds.