test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LightRay.h
Go to the documentation of this file.
1 // COCOA class header file
2 //Id: LightRay.h
3 //CAT: Model
4 //
5 // Utility class that starts reading the system description file
6 // and contains the static data
7 //
8 // History: v1.0
9 // Pedro Arce
10 
11 #ifndef LIGHTRAY_H
12 #define LIGHTRAY_H
13 
14 class OpticalObject;
15 class ALIPlane;
16 
17 #include "CLHEP/Vector/ThreeVector.h"
19 
20 class LightRay
21 {
22 public:
23  //----- construct a default LigthRay
24  LightRay();
25 // Make a light ray out of the centre_glob points of two OptO:'source' and 'pointLens'
27  LightRay( CLHEP::Hep3Vector& vec1, CLHEP::Hep3Vector& vec2 );
28  ~LightRay() {};
29 
30 //@@@@@@@@@@@@@@@@@@@@ Methods for each OptO
31 //----- Make a light ray out of the centre_glob and Z direction of one OptO: 'laser' or 'source'
32  void startLightRay( OpticalObject* opto );
33 
34  //----- Intersect light ray with a plane and change thePoint to the intersection point
35  void intersect( const ALIPlane& plane);
36 
37  //----- Intersect light ray with a OptO (intersect it with its plane perpendicular to Z) and change thePoint to the intersection point
38  void intersect( const OpticalObject& opto );
39 
40  //----- Intersect the LightRay with a plane and then change the direction from reflection on this plane
41  void reflect( const ALIPlane& plane);
42 
43  //----- 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
44  void refract( const ALIPlane& plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2);
45 
46  //----- shift
47  void shiftAndDeviateWhileTraversing( const OpticalObject* opto, char behav );
48  void shiftAndDeviateWhileTraversing( const OpticalObject* opto, ALIdouble shiftX, ALIdouble shiftY, ALIdouble shiftZ, ALIdouble deviX, ALIdouble deviY, ALIdouble deviZ );
49  // void shiftAndDeviateWhileTraversing( ALIdouble shiftAxis1, ALIdouble shiftAxis2, ALIdouble deviAxis1, ALIdouble deviAxis2 );
50 
51 // ACCESS DATA MEMBERS
52  const CLHEP::Hep3Vector& point() const{
53  return _point;
54  }
55  const CLHEP::Hep3Vector& direction() const{
56  return _direction;
57  }
58  void dumpData(const ALIstring& str) const;
59 
60  // SET DATA MEMBERS
61  void setDirection( const CLHEP::Hep3Vector& direc) {
62  _direction = direc;
63  }
64  void setPoint( const CLHEP::Hep3Vector& point) {
65  _point = point;
66  }
67 
68 
69 private:
70  //-------------- Methods common to several OptO
71 // Intersect a LightRay with the X-Y plane of the GlobalVectorFrame of an OptO
72  public:
73  CLHEP::Hep3Vector IntersectWithOptOPlane( const OpticalObject* optoplane);
74  CLHEP::Hep3Vector IntersectWithPlane(const CLHEP::Hep3Vector& plane_point,
75  const CLHEP::Hep3Vector& plane_normal);
76 
77  // private DATA MEMBERS
78  CLHEP::Hep3Vector _direction;
79  CLHEP::Hep3Vector _point;
80 };
81 
82 
83 #endif
CLHEP::Hep3Vector _point
Definition: LightRay.h:79
CLHEP::Hep3Vector IntersectWithPlane(const CLHEP::Hep3Vector &plane_point, const CLHEP::Hep3Vector &plane_normal)
long double ALIdouble
Definition: CocoaGlobals.h:11
void shiftAndDeviateWhileTraversing(const OpticalObject *opto, char behav)
Definition: LightRay.cc:241
void refract(const ALIPlane &plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2)
Definition: LightRay.cc:163
CLHEP::Hep3Vector IntersectWithOptOPlane(const OpticalObject *optoplane)
~LightRay()
Definition: LightRay.h:28
void setDirection(const CLHEP::Hep3Vector &direc)
Definition: LightRay.h:61
void setPoint(const CLHEP::Hep3Vector &point)
Definition: LightRay.h:64
std::vector< double > vec1
Definition: HCALResponse.h:15
const CLHEP::Hep3Vector & point() const
Definition: LightRay.h:52
double p2[4]
Definition: TauolaWrapper.h:90
CLHEP::Hep3Vector _direction
Definition: LightRay.h:78
LightRay()
Definition: LightRay.cc:19
void intersect(const ALIPlane &plane)
Definition: LightRay.cc:101
double p1[4]
Definition: TauolaWrapper.h:89
std::string ALIstring
Definition: CocoaGlobals.h:9
void dumpData(const ALIstring &str) const
Definition: LightRay.cc:382
void startLightRay(OpticalObject *opto)
Definition: LightRay.cc:28
void reflect(const ALIPlane &plane)
Definition: LightRay.cc:142
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
const CLHEP::Hep3Vector & direction() const
Definition: LightRay.h:55