Modules/FdSimulation/TelescopeSimulatorKG/Camera.h
Go to the documentation of this file.
1 
9 #ifndef _TelescopeSimulatorKG_Camera_h_
10 #define _TelescopeSimulatorKG_Camera_h_
11 
12 
13 namespace utl {
14  class Photon;
15  class Vector;
16  class RandomEngine;
17 }
18 
19 namespace fdet {
20  class Pixel;
21  class Telescope;
22 }
23 
24 #include "RTResult.h"
25 
26 #include <utl/Point.h>
27 #include <utl/CoordinateSystemPtr.h>
28 
29 #include <string>
30 
31 class TObjArray;
32 
33 namespace TelescopeSimulatorKG {
34 
35  class Camera {
36 
37  Camera();
38  Camera(const Camera&);
39  Camera& operator=(const Camera&);
40 
41  public:
42 
43  Camera(utl::RandomEngine& rndm, const fdet::Telescope& tel);
44 
45  // Shadow of camera simulation
46  RTResult TraceShadow(const utl::Photon& photonIn, const bool doSupport=true);
47 
48 
49  // Simulate Camera
50  RTResult Trace(const utl::Photon& photonIn,
51  utl::Photon& photonOut,
52  int& nreflections,
53  int& col, int& row,
54  double& cosTheta,
55  bool doMercedes=true);
56 
57 
58  TObjArray* Draw(const bool do3D=true);
59 
60  // Compute the hit position of a ray on the camera surface
61  int TraceSurf (const utl::Photon& photonIn, utl::Photon& photonOut,
62  utl::Vector& normal);
63 
64 
65  // Simulate the ray of light with direction n and point p in the
66  // mercedes and PMT system
68  const utl::Photon& photonIn, utl::Photon& photonOut,
69  int& nreflections);
70 
71 
72  // Give the position pf over the focal surface identify the pixel (nx,ny)
73  //int PixelId(const utl::Point& p, int* nx, int* ny);
74  //int PixelId_new(const utl::Vector& pFocal, int& nx, int& ny);
75 
77  eInside = 0,
78  eTopRight = 1,
79  eTopLeft = 2,
80  eLeft = 3,
83  eRight = 6
84  };
85  HexagonDirection Hexagon(double x, double y, double r);
86  int ConstructPlane(const int id, utl::Vector& n, utl::Point& p, const utl::CoordinateSystemPtr& pxlCS);
87 
88  private:
89  void SetMercedesParameter(double height,double width);
91  bool FindPixelId(const utl::Vector& incidentDir, int& row, int& col) const;
92 
93  private:
94 
97 
100 
101  double fRFocal; // curvature radius of focal surface
102  double fMercedesEff;
103 
104  double fSinAx, fSinBx, fSinAy, fSinBy; // side, top and down limits
105 
106  // Mercedes parameters
107  double fD1, fD2, fR1, fR2, fHMerc;
108 
109  //mercedes size parameters (see picture)
110  double fNz, fNt; // z and tangent components of the plane normal.
111 
112  // Variables to control the precision of the normal of the mercedes surface
113  double fSigma;
114 
115 
116  // camera support
118 
119  };
120 
121 } // TelescopeSimulatorKG
122 
123 
124 #endif // _TelescopeSimulatorKG_Camera_h_
125 
126 // Configure (x)emacs for this file ...
127 // Local Variables:
128 // mode:c++
129 // compile-command: "make -C .. -k"
130 // End:
RTResult Trace(const utl::Photon &photonIn, utl::Photon &photonOut, int &nreflections, int &col, int &row, double &cosTheta, bool doMercedes=true)
HexagonDirection Hexagon(double x, double y, double r)
Point object.
Definition: Point.h:32
bool FindPixelId(const utl::Vector &incidentDir, int &row, int &col) const
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
RTResult TraceMerc(const utl::CoordinateSystemPtr &pxlCS, const utl::Photon &photonIn, utl::Photon &photonOut, int &nreflections)
RTResult TraceShadow(const utl::Photon &photonIn, const bool doSupport=true)
Detector description interface for Telescope-related data.
int TraceSurf(const utl::Photon &photonIn, utl::Photon &photonOut, utl::Vector &normal)
Vector object.
Definition: Vector.h:30
int ConstructPlane(const int id, utl::Vector &n, utl::Point &p, const utl::CoordinateSystemPtr &pxlCS)
Camera & operator=(const Camera &)

, generated on Tue Sep 26 2023.