File indexing completed on 2024-09-07 04:34:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef LIGHTRAY_H
0012 #define LIGHTRAY_H
0013
0014 class OpticalObject;
0015 class ALIPlane;
0016
0017 #include "CLHEP/Vector/ThreeVector.h"
0018 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0019
0020 class LightRay {
0021 public:
0022
0023 LightRay();
0024
0025 LightRay(OpticalObject* p1, OpticalObject* p2);
0026 LightRay(CLHEP::Hep3Vector& vec1, CLHEP::Hep3Vector& vec2);
0027 ~LightRay() {}
0028
0029
0030
0031 void startLightRay(OpticalObject* opto);
0032
0033
0034 void intersect(const ALIPlane& plane);
0035
0036
0037 void intersect(const OpticalObject& opto);
0038
0039
0040 void reflect(const ALIPlane& plane);
0041
0042
0043 void refract(const ALIPlane& plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2);
0044
0045
0046 void shiftAndDeviateWhileTraversing(const OpticalObject* opto, char behav);
0047 void shiftAndDeviateWhileTraversing(const OpticalObject* opto,
0048 ALIdouble shiftX,
0049 ALIdouble shiftY,
0050 ALIdouble shiftZ,
0051 ALIdouble deviX,
0052 ALIdouble deviY,
0053 ALIdouble deviZ);
0054
0055
0056
0057 const CLHEP::Hep3Vector& point() const { return _point; }
0058 const CLHEP::Hep3Vector& direction() const { return _direction; }
0059 void dumpData(const ALIstring& str) const;
0060
0061
0062 void setDirection(const CLHEP::Hep3Vector& direc) { _direction = direc; }
0063 void setPoint(const CLHEP::Hep3Vector& point) { _point = point; }
0064
0065 private:
0066
0067
0068 public:
0069 CLHEP::Hep3Vector IntersectWithOptOPlane(const OpticalObject* optoplane);
0070 CLHEP::Hep3Vector IntersectWithPlane(const CLHEP::Hep3Vector& plane_point, const CLHEP::Hep3Vector& plane_normal);
0071
0072
0073 CLHEP::Hep3Vector _direction;
0074 CLHEP::Hep3Vector _point;
0075 };
0076
0077 #endif