#include <Camera.h>
Public Types | |
enum | HexagonDirection { eInside = 0, eTopRight = 1, eTopLeft = 2, eLeft = 3, eBottomLeft = 4, eBottomRight = 5, eRight = 6, eOutside = 7 } |
Public Member Functions | |
Camera (utl::RandomEngine &rndm, const fdet::Telescope &tel, const bool plotPhotonTracksAtMercedes, const bool simulateMercedesStars, const bool simulateHaloEffects, const bool simulateGhostEffects, const double nPmts) | |
void | ConstructPlane (const int id, utl::Vector &n, utl::Point &p, const utl::CoordinateSystemPtr &pxlCS) |
TObjArray * | Draw (const bool do3D=true) |
HexagonDirection | Hexagon (const double x, const double y, const double r) |
void | SetPhotonTrack (RayTracer::Track *const track) |
RTNext | Trace (const utl::Photon &photonIn, utl::Photon &photonOut, int &nreflections, int &nbackscattered, int &col, int &row) |
RTResult | TraceMerc (const utl::CoordinateSystemPtr &pxlCS, const utl::Photon &photonIn, utl::Photon &photonOut, int &nreflections) |
RTNext | TraceShadow (const utl::Photon &photonIn, utl::Photon &photonOut, const bool doSupport=true) |
bool | TraceSurf (const utl::Photon &photonIn, utl::Photon &photonOut) |
Private Member Functions | |
void | CalculateCameraSupportCoordinateSystem () |
Camera (const Camera &) | |
bool | FindPixelId (const utl::Vector &incidentDir, int &row, int &col) const |
Camera & | operator= (const Camera &) |
void | SetMercedesParameter (const double height, const double width) |
Private Attributes | |
const double | fAir_n = 1.000277 |
utl::CoordinateSystemPtr | fCameraSupportCoordinateSystem |
double | fD1 = 0 |
double | fD2 = 0 |
double | fHMerc = 0 |
const double | fMercedesEff |
double | fNt = 0 |
double | fNz = 0 |
const utl::Point | fOrigin |
RayTracer::Track * | fPhotonTrack = nullptr |
const bool | fPlotPhotonTracksAtMercedes |
const double | fPMT_n |
double | fR1 = 0 |
double | fR2 = 0 |
utl::RandomEngine & | fRandom |
double | fRCurv2 = 0 |
const double | fRFocal |
const double | fSigma |
const bool | fSimulateGhostEffects |
const bool | fSimulateHaloEffects |
const bool | fSimulateMercedesStars |
const fdet::Telescope & | fTel |
utl::CoordinateSystemPtr | fTelCS |
Definition at line 35 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Enumerator | |
---|---|
eInside | |
eTopRight | |
eTopLeft | |
eLeft | |
eBottomLeft | |
eBottomRight | |
eRight | |
eOutside |
Definition at line 71 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Camera::Camera | ( | utl::RandomEngine & | rndm, |
const fdet::Telescope & | tel, | ||
const bool | plotPhotonTracksAtMercedes, | ||
const bool | simulateMercedesStars, | ||
const bool | simulateHaloEffects, | ||
const bool | simulateGhostEffects, | ||
const double | nPmts | ||
) |
Definition at line 61 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References utl::cm, utl::deg, fCameraSupportCoordinateSystem, fD1, fD2, fHMerc, fNt, fNz, fR1, fR2, fRFocal, fTelCS, fdet::Telescope::GetCamera(), fdet::Camera::GetMercedesBase(), fdet::Camera::GetMercedesHeight(), utl::kSqrt3, and sqrt().
|
private |
|
private |
void Camera::ConstructPlane | ( | const int | id, |
utl::Vector & | n, | ||
utl::Point & | p, | ||
const utl::CoordinateSystemPtr & | pxlCS | ||
) |
Definition at line 685 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References utl::deg, ERROR, fD1, fHMerc, fNt, and fNz.
Referenced by TraceMerc().
TObjArray * Camera::Draw | ( | const bool | do3D = true | ) |
Definition at line 723 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References utl::cm, utl::deg, fCameraSupportCoordinateSystem, fHMerc, fR1, fR2, fTel, fTelCS, fdet::Telescope::GetFirstColumn(), fdet::Telescope::GetFirstRow(), fdet::Telescope::GetLastColumn(), fdet::Telescope::GetLastRow(), fdet::Telescope::GetPixel(), fdet::Pixel::GetPixelCoordinateSystem(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), and utl::m.
Referenced by TelescopeSimulatorKG2::RayTracer::~RayTracer().
|
private |
Definition at line 221 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References fTel, fTelCS, fdet::Telescope::GetCamera(), fdet::Camera::GetEta(), fdet::Telescope::GetFirstColumn(), fdet::Telescope::GetFirstRow(), fdet::Telescope::GetLastColumn(), fdet::Telescope::GetLastRow(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), and utl::kSqrt3.
Referenced by Trace().
Camera::HexagonDirection Camera::Hexagon | ( | const double | x, |
const double | y, | ||
const double | r | ||
) |
Definition at line 659 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References eBottomLeft, eBottomRight, eInside, eLeft, eRight, eTopLeft, eTopRight, and utl::kSqrt3.
|
private |
|
inline |
Definition at line 87 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
References fPhotonTrack.
Referenced by TelescopeSimulatorKG2::RayTracer::Trace().
RTNext Camera::Trace | ( | const utl::Photon & | photonIn, |
utl::Photon & | photonOut, | ||
int & | nreflections, | ||
int & | nbackscattered, | ||
int & | col, | ||
int & | row | ||
) |
Definition at line 126 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References TelescopeSimulatorKG2::eBackscattered, TelescopeSimulatorKG2::eCameraShadow, TelescopeSimulatorKG2::eDetected, TelescopeSimulatorKG2::eDrawAndExit, TelescopeSimulatorKG2::eInvalidHitMercedes, TelescopeSimulatorKG2::eInvalidMercedes, TelescopeSimulatorKG2::eLost, TelescopeSimulatorKG2::eMirror, TelescopeSimulatorKG2::eOK, fAir_n, FindPixelId(), fOrigin, fPMT_n, fRandom, fSimulateGhostEffects, fSimulateHaloEffects, fSimulateMercedesStars, fTel, fTelCS, utl::Photon::GetDirection(), utl::RandomEngine::GetEngine(), fdet::Telescope::GetPixel(), fdet::Pixel::GetPixelCoordinateSystem(), utl::Photon::GetPosition(), utl::Photon::GetWeight(), utl::BasicVector< HepVector >::GetZ(), utl::Normalized(), TelescopeSimulatorKG2::RTFunctions::Refraction(), utl::Photon::SetWeight(), TraceMerc(), and TraceSurf().
Referenced by TelescopeSimulatorKG2::RayTracer::Trace().
RTResult Camera::TraceMerc | ( | const utl::CoordinateSystemPtr & | pxlCS, |
const utl::Photon & | photonIn, | ||
utl::Photon & | photonOut, | ||
int & | nreflections | ||
) |
Definition at line 437 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References TelescopeSimulatorKG2::RayTracer::Track::AddPoint(), ConstructPlane(), degree, TelescopeSimulatorKG2::eBackscattered, TelescopeSimulatorKG2::eInvalidHitMercedes, TelescopeSimulatorKG2::eOK, eps, ERROR, fAir_n, fMercedesEff, fPhotonTrack, fPlotPhotonTracksAtMercedes, fPMT_n, fRandom, fSimulateHaloEffects, fTelCS, utl::Photon::GetDirection(), utl::RandomEngine::GetEngine(), utl::Photon::GetPosition(), utl::Photon::GetWeight(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), INFO, TelescopeSimulatorKG2::RTFunctions::LambertDiffusion(), utl::m, utl::mm, TelescopeSimulatorKG2::RTFunctions::Plane(), TelescopeSimulatorKG2::RTFunctions::Reflection(), TelescopeSimulatorKG2::RTFunctions::Refraction(), utl::Photon::SetDirection(), utl::Photon::SetPosition(), and utl::Photon::SetWeight().
Referenced by Trace().
RTNext Camera::TraceShadow | ( | const utl::Photon & | photonIn, |
utl::Photon & | photonOut, | ||
const bool | doSupport = true |
||
) |
Definition at line 279 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References utl::abs(), utl::cm, debug, TelescopeSimulatorKG2::eLens, TelescopeSimulatorKG2::eLost, TelescopeSimulatorKG2::eMirror, fCameraSupportCoordinateSystem, fOrigin, fRCurv2, fTelCS, utl::Photon::GetDirection(), utl::Photon::GetPosition(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), utl::m, utl::mm, G4StationSimulatorOG::p, TelescopeSimulatorKG2::RTFunctions::Plane(), and TelescopeSimulatorKG2::RTFunctions::Sphere().
Referenced by TelescopeSimulatorKG2::RayTracer::Trace().
bool Camera::TraceSurf | ( | const utl::Photon & | photonIn, |
utl::Photon & | photonOut | ||
) |
Definition at line 424 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.cc.
References fOrigin, fRFocal, and TelescopeSimulatorKG2::RTFunctions::Sphere().
Referenced by Trace().
|
private |
Definition at line 105 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace(), and TraceMerc().
|
private |
Definition at line 136 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), Draw(), and TraceShadow().
|
private |
Definition at line 122 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), and ConstructPlane().
|
private |
Definition at line 123 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera().
|
private |
Definition at line 126 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), ConstructPlane(), and Draw().
|
private |
Definition at line 111 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by TraceMerc().
|
private |
Definition at line 130 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), and ConstructPlane().
|
private |
Definition at line 129 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), and ConstructPlane().
|
private |
Definition at line 108 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace(), TraceShadow(), and TraceSurf().
|
private |
Definition at line 142 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by SetPhotonTrack(), and TraceMerc().
|
private |
Definition at line 99 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by TraceMerc().
|
private |
Definition at line 104 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace(), and TraceMerc().
|
private |
Definition at line 124 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
|
private |
Definition at line 125 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
|
private |
Definition at line 97 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace(), and TraceMerc().
|
private |
Definition at line 139 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by TraceShadow().
|
private |
Definition at line 110 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), and TraceSurf().
|
private |
Definition at line 133 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
|
private |
Definition at line 102 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace().
|
private |
Definition at line 101 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace(), and TraceMerc().
|
private |
Definition at line 100 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Trace().
|
private |
Definition at line 98 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Draw(), FindPixelId(), and Trace().
|
private |
Definition at line 107 of file Modules/FdSimulation/TelescopeSimulatorKG2/Camera.h.
Referenced by Camera(), Draw(), FindPixelId(), Trace(), TraceMerc(), and TraceShadow().