| 1 | #ifndef MARS_MGeomMirror
 | 
|---|
| 2 | #define MARS_MGeomMirror
 | 
|---|
| 3 | 
 | 
|---|
| 4 | #ifndef MARS_MParContainer
 | 
|---|
| 5 | #include "MParContainer.h"
 | 
|---|
| 6 | #endif
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef ROOT_TVector3
 | 
|---|
| 9 | #include <TVector3.h>
 | 
|---|
| 10 | #endif
 | 
|---|
| 11 | 
 | 
|---|
| 12 | #ifndef ROOT_TArrayF
 | 
|---|
| 13 | #include <TArrayF.h>
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | class TRotation;
 | 
|---|
| 17 | class MGeomMirror : public MParContainer
 | 
|---|
| 18 | {
 | 
|---|
| 19 | private:
 | 
|---|
| 20 |     Int_t   fMirrorId;     // the Mirror Id
 | 
|---|
| 21 | 
 | 
|---|
| 22 |     Float_t fFocalDist;    // [cm] focal distance of that mirror
 | 
|---|
| 23 |     Float_t fSX;           // [cm] curvilinear coordinate of mirror's center in X
 | 
|---|
| 24 |     Float_t fSY;           // [cm] curvilinear coordinate of mirror's center in Y
 | 
|---|
| 25 |     Float_t fX;            // [cm] x coordinate of the center of the mirror
 | 
|---|
| 26 |     Float_t fY;            // [cm] y coordinate of the center of the mirror
 | 
|---|
| 27 |     Float_t fZ;            // [cm] z coordinate of the center of the mirror
 | 
|---|
| 28 |     Float_t fThetaN;       // polar theta angle of the direction where the mirror points to
 | 
|---|
| 29 |     Float_t fPhiN;         // polar phi angle of the direction where the mirror points to
 | 
|---|
| 30 |     Float_t fXN;           // xn coordinate of the normal vector in the center
 | 
|---|
| 31 |     Float_t fYN;           // yn coordinate of the normal vector in the center
 | 
|---|
| 32 |     Float_t fZN;           // zn coordinate of the normal vector in the center
 | 
|---|
| 33 |                            // Note: fXN^2*fYN^2*fZN^2 = 1
 | 
|---|
| 34 |     Float_t fDeviationX;   // [cm] deviation in x of the spot of a single mirror on the camera plane
 | 
|---|
| 35 |     Float_t fDeviationY;   // [cm] deviation in y of the spot of a single mirror on the camera plane
 | 
|---|
| 36 | 
 | 
|---|
| 37 |     TArrayF fWavelength;   // List of wavelength
 | 
|---|
| 38 |     TArrayF fReflectivity; // Mirror reflectivity
 | 
|---|
| 39 | 
 | 
|---|
| 40 |     TRotation *fReflector; //! Store this for acceleration
 | 
|---|
| 41 | 
 | 
|---|
| 42 | public:
 | 
|---|
| 43 |     MGeomMirror(Int_t mir=-1, const char *name=NULL, const char *title=NULL);
 | 
|---|
| 44 | 
 | 
|---|
| 45 |     Int_t GetMirrorId() const         { return fMirrorId;   }
 | 
|---|
| 46 | 
 | 
|---|
| 47 |     void  SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
 | 
|---|
| 48 |                            Float_t curv_y, Float_t lin_x, Float_t lin_y,
 | 
|---|
| 49 |                            Float_t lin_z, Float_t theta, Float_t phi,
 | 
|---|
| 50 |                            Float_t x_n, Float_t y_n, Float_t z_n);
 | 
|---|
| 51 |     void  SetMirrorDeviations(Float_t dev_x, Float_t dev_y);
 | 
|---|
| 52 | 
 | 
|---|
| 53 |     void  SetReflectivity(const TArrayF &wav, const TArrayF &ref);
 | 
|---|
| 54 | 
 | 
|---|
| 55 |     void  SetArraySize(Int_t dim) { fWavelength.Set(dim); fReflectivity.Set(dim); }
 | 
|---|
| 56 | 
 | 
|---|
| 57 |     TVector3 GetMirrorCenter() const { return TVector3(fX/100, fY/100, fZ/100); }
 | 
|---|
| 58 |     TVector3 GetMirrorNorm()   const { return TVector3(fXN, fYN, fZN); }
 | 
|---|
| 59 | 
 | 
|---|
| 60 |     TVector3 GetReflection(const TVector3 &star, Double_t dist=-1);
 | 
|---|
| 61 | 
 | 
|---|
| 62 |     ClassDef(MGeomMirror, 2)  // geometry class describing one mirror
 | 
|---|
| 63 | };
 | 
|---|
| 64 | 
 | 
|---|
| 65 | #endif
 | 
|---|
| 66 | 
 | 
|---|
| 67 | 
 | 
|---|