CMS 3D CMS Logo

LightRay.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  LightRay.h
00003 //CAT: Model
00004 //
00005 //   Utility class that starts reading the system description file
00006 //                and contains the static data 
00007 // 
00008 //   History: v1.0 
00009 //   Pedro Arce
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   //----- construct a default LigthRay
00024   LightRay();
00025 // Make a light ray out of the centre_glob points of two OptO:'source' and 'pointLens'
00026   LightRay( OpticalObject* p1, OpticalObject* p2);
00027   LightRay( Hep3Vector& vec1, Hep3Vector& vec2 );
00028   ~LightRay() {};
00029 
00030 //@@@@@@@@@@@@@@@@@@@@ Methods for each OptO
00031 //----- Make a light ray out of the centre_glob and Z direction of one OptO: 'laser' or 'source'
00032   void startLightRay( OpticalObject* opto );
00033 
00034   //----- Intersect light ray with a plane and change thePoint to the intersection point
00035   void intersect( const ALIPlane& plane);
00036 
00037   //----- Intersect light ray with a OptO (intersect it with its plane perpendicular to Z) and change thePoint to the intersection point
00038   void intersect( const OpticalObject& opto );
00039 
00040   //-----  Intersect the LightRay with a plane and then change the direction from reflection on this plane
00041   void reflect( const ALIPlane& plane);
00042 
00043   //----- Deviate a LightRay because of refraction when it passes from a medium of refraction index  refra_ind1 to a medium of refraction index  refra_ind2
00044   void refract( const ALIPlane plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2);
00045 
00046   //----- shift 
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    // void shiftAndDeviateWhileTraversing( ALIdouble shiftAxis1, ALIdouble shiftAxis2, ALIdouble deviAxis1, ALIdouble deviAxis2 );
00050 
00051 // ACCESS DATA MEMBERS
00052   const Hep3Vector& point() const{
00053       return _point;
00054   } 
00055   const Hep3Vector& direction() const{
00056       return _direction;
00057   } 
00058   void dumpData(const ALIstring& str) const;
00059 
00060  // SET DATA MEMBERS
00061   void setDirection( const Hep3Vector& direc) {
00062        _direction = direc;
00063   } 
00064   void setPoint( const Hep3Vector& point) {
00065        _point = point;
00066   } 
00067   
00068 
00069 private:
00070   //-------------- Methods common to several OptO
00071 // Intersect a LightRay with the X-Y plane of the GlobalVectorFrame of an OptO
00072  public:
00073   Hep3Vector IntersectWithOptOPlane( const OpticalObject* optoplane);
00074   Hep3Vector IntersectWithPlane(const Hep3Vector& plane_point,
00075              const Hep3Vector& plane_normal);
00076 
00077  // private DATA MEMBERS
00078   Hep3Vector _direction;
00079   Hep3Vector _point;
00080 };
00081 
00082 
00083 #endif

Generated on Tue Jun 9 17:23:36 2009 for CMSSW by  doxygen 1.5.4