ZetaPixel.h
Go to the documentation of this file.
1 #ifndef _ZetaPixel_h_
2 #define _ZetaPixel_h_
3 #include <vector>
4 #include <utl/TabulatedFunction.h>
5 
6 namespace FdEnergyDepositFinderKG {
7 
8  class ZetaPixel {
9 
16  public:
17 
19  ZetaPixel(const unsigned int pixelId,
20  const double xPos, const double yPos,
21  const double sideLength,
22  const double tiltAngle=0.);
23 
25  bool IsInside(const double x, double y) const;
26 
28  std::vector<double> CircleIntersections(const double circleX,
29  const double circleY,
30  const double circleRadius) const;
31 
33  double CalculateInsideArcLength(const double circleX,
34  const double circleY,
35  const double circleRadius) const;
36 
37 
39  const std::vector<double>& GetXCoordinates() const
40  { return fXCoordinates; }
42  const std::vector<double>& GetYCoordinates() const
43  { return fYCoordinates; }
44 
45  double GetCenterX() const { return fCenterX;}
46  double GetCenterY() const { return fCenterY;}
47 
50  mutable double fLightFraction;
51  unsigned int fPixelId;
52 
53  private:
54  ZetaPixel();
55  void CalculateCoordinates();
56  double fCenterX;
57  double fCenterY;
58  double fSideLength;
59  double fTiltAngle;
60  double fCosTiltAngle;
61  double fSinTiltAngle;
62 
63  /*
64 
65  1
66  +
67  / \
68  / \
69  / \
70  / \
71  2 + + 0/6 -----
72  | | ^
73  | | |
74  | + | sideLength
75  | | |
76  | | v
77  3 + + 5 -----
78  \ /
79  \ /
80  \ /
81  \ /
82  +
83  4
84  y ^
85  |
86  |
87  +--->
88  x
89 
90  */
91 
92  std::vector<double> fXCoordinates;
93  std::vector<double> fYCoordinates;
94 
95  };
96 }
97 #endif
Class to hold collection (x,y) points and provide interpolation between them.
const std::vector< double > & GetXCoordinates() const
get x coordinates of corner points (0-6, see sketch below)
Definition: ZetaPixel.h:39
bool IsInside(const double x, double y) const
check if point (x,y) is inside the hexagon
Definition: ZetaPixel.cc:123
const utl::TabulatedFunction & GetArcLengthFunction() const
Definition: ZetaPixel.h:48
std::vector< double > CircleIntersections(const double circleX, const double circleY, const double circleRadius) const
get vector of intersections (phi angle) with a circle with
Definition: ZetaPixel.cc:62
double CalculateInsideArcLength(const double circleX, const double circleY, const double circleRadius) const
calculate arc length of a circle inside hexagon in units of r*2*pi
Definition: ZetaPixel.cc:33
utl::TabulatedFunction fArcLengthFunction
Definition: ZetaPixel.h:49
std::vector< double > fXCoordinates
Definition: ZetaPixel.h:92
std::vector< double > fYCoordinates
Definition: ZetaPixel.h:93
const std::vector< double > & GetYCoordinates() const
get y coordinates of corner points (0-6, see sketch below)
Definition: ZetaPixel.h:42

, generated on Tue Sep 26 2023.