Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef LIGHTRAY_H
00012 #define LIGHTRAY_H
00013
00014 class OpticalObject;
00015 class ALIPlane;
00016
00017 #include "CLHEP/Vector/ThreeVector.h"
00018 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00019
00020 class LightRay
00021 {
00022 public:
00023
00024 LightRay();
00025
00026 LightRay( OpticalObject* p1, OpticalObject* p2);
00027 LightRay( CLHEP::Hep3Vector& vec1, CLHEP::Hep3Vector& vec2 );
00028 ~LightRay() {};
00029
00030
00031
00032 void startLightRay( OpticalObject* opto );
00033
00034
00035 void intersect( const ALIPlane& plane);
00036
00037
00038 void intersect( const OpticalObject& opto );
00039
00040
00041 void reflect( const ALIPlane& plane);
00042
00043
00044 void refract( const ALIPlane plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2);
00045
00046
00047 void shiftAndDeviateWhileTraversing( const OpticalObject* opto, char behav );
00048 void shiftAndDeviateWhileTraversing( const OpticalObject* opto, ALIdouble shiftX, ALIdouble shiftY, ALIdouble shiftZ, ALIdouble deviX, ALIdouble deviY, ALIdouble deviZ );
00049
00050
00051
00052 const CLHEP::Hep3Vector& point() const{
00053 return _point;
00054 }
00055 const CLHEP::Hep3Vector& direction() const{
00056 return _direction;
00057 }
00058 void dumpData(const ALIstring& str) const;
00059
00060
00061 void setDirection( const CLHEP::Hep3Vector& direc) {
00062 _direction = direc;
00063 }
00064 void setPoint( const CLHEP::Hep3Vector& point) {
00065 _point = point;
00066 }
00067
00068
00069 private:
00070
00071
00072 public:
00073 CLHEP::Hep3Vector IntersectWithOptOPlane( const OpticalObject* optoplane);
00074 CLHEP::Hep3Vector IntersectWithPlane(const CLHEP::Hep3Vector& plane_point,
00075 const CLHEP::Hep3Vector& plane_normal);
00076
00077
00078 CLHEP::Hep3Vector _direction;
00079 CLHEP::Hep3Vector _point;
00080 };
00081
00082
00083 #endif