Changeset 3387 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 03/03/04 10:14:48 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r3383 r3387 66 66 : fNumPixels(0), fCamDist(0), fConvMm2Deg(0) 67 67 { 68 fName = "MGeomCam"; 69 fTitle = "Storage container for a camera geometry"; 68 70 } 69 71 … … 77 79 { 78 80 fName = name ? name : "MGeomCam"; 79 fTitle = title ? title : "Storage container for 81 fTitle = title ? title : "Storage container for a camera geometry"; 80 82 81 83 // -
trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc
r2521 r3387 128 128 fReflectivity = ref; 129 129 } 130 131 TVector3 MGeomMirror::GetReflection(const TVector3 &star, Double_t dist) 132 { 133 if (fReflector==TRotation()) 134 { 135 fReflector = TRotation(); // unit matrix 136 fReflector.Rotate(TMath::Pi(), GetMirrorNorm()); 137 } 138 139 // Reflect star on the mirror (done by a rotation 140 // around the normal vector of the mirror center 141 TVector3 light(star); 142 light *= fReflector; 143 144 if (dist<0) 145 return light; 146 147 // calculate distance to the camera 148 const TVector3 &pos = GetMirrorCenter(); 149 const Double_t d = (dist - pos.Z()) / light.Z(); 150 151 return light*d + pos; 152 } -
trunk/MagicSoft/Mars/mgeom/MGeomMirror.h
r2568 r3387 10 10 #endif 11 11 12 #ifndef ROOT_T Vector313 #include <T Vector3.h>12 #ifndef ROOT_TRotation 13 #include <TRotation.h> 14 14 #endif 15 15 … … 17 17 { 18 18 private: 19 Int_t fMirrorId; // the Mirror Id19 Int_t fMirrorId; // the Mirror Id 20 20 21 Float_t fFocalDist; // [cm] focal distance of that mirror22 Float_t fSX; // [cm] curvilinear coordinate of mirror's center in X23 Float_t fSY; // [cm] curvilinear coordinate of mirror's center in Y24 Float_t fX; // [cm] x coordinate of the center of the mirror25 Float_t fY; // [cm] y coordinate of the center of the mirror26 Float_t fZ; // [cm] z coordinate of the center of the mirror27 Float_t fThetaN; // polar theta angle of the direction where the mirror points to28 Float_t fPhiN; // polar phi angle of the direction where the mirror points to29 Float_t fXN; // xn coordinate of the normal vector in the center30 Float_t fYN; // yn coordinate of the normal vector in the center31 Float_t fZN; // zn coordinate of the normal vector in the center32 // Note: fXN^2*fYN^2*fZN^2 = 133 Float_t fDeviationX; // [cm] deviation in x of the spot of a single mirror on the camera plane34 Float_t fDeviationY; // [cm] deviation in y of the spot of a single mirror on the camera plane21 Float_t fFocalDist; // [cm] focal distance of that mirror 22 Float_t fSX; // [cm] curvilinear coordinate of mirror's center in X 23 Float_t fSY; // [cm] curvilinear coordinate of mirror's center in Y 24 Float_t fX; // [cm] x coordinate of the center of the mirror 25 Float_t fY; // [cm] y coordinate of the center of the mirror 26 Float_t fZ; // [cm] z coordinate of the center of the mirror 27 Float_t fThetaN; // polar theta angle of the direction where the mirror points to 28 Float_t fPhiN; // polar phi angle of the direction where the mirror points to 29 Float_t fXN; // xn coordinate of the normal vector in the center 30 Float_t fYN; // yn coordinate of the normal vector in the center 31 Float_t fZN; // zn coordinate of the normal vector in the center 32 // Note: fXN^2*fYN^2*fZN^2 = 1 33 Float_t fDeviationX; // [cm] deviation in x of the spot of a single mirror on the camera plane 34 Float_t fDeviationY; // [cm] deviation in y of the spot of a single mirror on the camera plane 35 35 36 TArrayF fWavelength; // List of wavelength 37 TArrayF fReflectivity;// Mirror reflectivity 36 TArrayF fWavelength; // List of wavelength 37 TArrayF fReflectivity; // Mirror reflectivity 38 39 TRotation fReflector; //! Store this for acceleration 38 40 39 41 public: … … 55 57 TVector3 GetMirrorNorm() const { return TVector3(fXN, fYN, fZN); } 56 58 59 TVector3 GetReflection(const TVector3 &star, Double_t dist=-1); 60 57 61 ClassDef(MGeomMirror, 2) // geometry class describing one mirror 58 62 };
Note:
See TracChangeset
for help on using the changeset viewer.