CMS 3D CMS Logo

HitEtaCheck.h
Go to the documentation of this file.
1 #ifndef HitEtaCheck_H
2 #define HitEtaCheck_H
3 
14 
15 class HitEtaCheck final : public HitRZCompatibility {
16 public:
17  static constexpr Algo me = etaAlgo;
18 
19  HitEtaCheck(bool inbarrel, const HitRZConstraint::Point& point, float cotLeftLine, float cotRightLine)
20  : HitRZCompatibility(me), isBarrel(inbarrel), theRZ(HitRZConstraint(point, cotLeftLine, point, cotRightLine)) {}
21 
22  bool operator()(const float& r, const float& z) const override {
23  const auto& lineLeft = theRZ.lineLeft();
24  const auto& lineRight = theRZ.lineRight();
25  float cotHit = (lineLeft.origin().z() - z) / (lineLeft.origin().r() - r);
26  return lineRight.cotLine() < cotHit && cotHit < lineLeft.cotLine();
27  }
28 
29  Range range(const float& rORz) const override {
30  return (isBarrel) ? HitZCheck(theRZ).range(rORz) : HitRCheck(theRZ).range(rORz);
31  }
32  HitEtaCheck* clone() const override { return new HitEtaCheck(*this); }
33 
34 private:
35  bool isBarrel;
37 };
38 #endif
bool operator()(const float &r, const float &z) const override
Definition: HitEtaCheck.h:22
static constexpr Algo me
Definition: HitEtaCheck.h:17
Range range(const float &radius) const override
Definition: HitZCheck.h:33
const Line & lineLeft() const
HitEtaCheck(bool inbarrel, const HitRZConstraint::Point &point, float cotLeftLine, float cotRightLine)
Definition: HitEtaCheck.h:19
bool isBarrel
Definition: HitEtaCheck.h:35
float cotLine() const
HitEtaCheck * clone() const override
Definition: HitEtaCheck.h:32
Range range(const float &z) const override
Definition: HitRCheck.h:33
const Line & lineRight() const
Range range(const float &rORz) const override
Definition: HitEtaCheck.h:29
Definition: fakeMenu.h:6
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
HitRZConstraint theRZ
Definition: HitEtaCheck.h:36