1 | #ifndef MARS_MGeomMirror
|
---|
2 | #define MARS_MGeomMirror
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayF
|
---|
9 | #include <TArrayF.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TRotation
|
---|
13 | #include <TRotation.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class MGeomMirror : public MParContainer
|
---|
17 | {
|
---|
18 | private:
|
---|
19 | Int_t fMirrorId; // the Mirror Id
|
---|
20 |
|
---|
21 | 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 |
|
---|
36 | TArrayF fWavelength; // List of wavelength
|
---|
37 | TArrayF fReflectivity; // Mirror reflectivity
|
---|
38 |
|
---|
39 | TRotation fReflector; //! Store this for acceleration
|
---|
40 |
|
---|
41 | public:
|
---|
42 | MGeomMirror(Int_t mir=-1, const char *name=NULL, const char *title=NULL);
|
---|
43 |
|
---|
44 | Int_t GetMirrorId() const { return fMirrorId; }
|
---|
45 |
|
---|
46 | void SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
|
---|
47 | Float_t curv_y, Float_t lin_x, Float_t lin_y,
|
---|
48 | Float_t lin_z, Float_t theta, Float_t phi,
|
---|
49 | Float_t x_n, Float_t y_n, Float_t z_n);
|
---|
50 | void SetMirrorDeviations(Float_t dev_x, Float_t dev_y);
|
---|
51 |
|
---|
52 | void SetReflectivity(const TArrayF &wav, const TArrayF &ref);
|
---|
53 |
|
---|
54 | void SetArraySize(Int_t dim) { fWavelength.Set(dim); fReflectivity.Set(dim); }
|
---|
55 |
|
---|
56 | TVector3 GetMirrorCenter() const { return TVector3(fX/100, fY/100, fZ/100); }
|
---|
57 | TVector3 GetMirrorNorm() const { return TVector3(fXN, fYN, fZN); }
|
---|
58 |
|
---|
59 | TVector3 GetReflection(const TVector3 &star, Double_t dist=-1);
|
---|
60 |
|
---|
61 | ClassDef(MGeomMirror, 2) // geometry class describing one mirror
|
---|
62 | };
|
---|
63 |
|
---|
64 | #endif
|
---|
65 |
|
---|
66 |
|
---|