source: trunk/MagicSoft/Mars/mgeom/MGeomMirror.h@ 2924

Last change on this file since 2924 was 2568, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.4 KB
Line 
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_TVector3
13#include <TVector3.h>
14#endif
15
16class MGeomMirror : public MParContainer
17{
18private:
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
39public:
40 MGeomMirror(Int_t mir=-1, const char *name=NULL, const char *title=NULL);
41
42 Int_t GetMirrorId() const { return fMirrorId; }
43
44 void SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
45 Float_t curv_y, Float_t lin_x, Float_t lin_y,
46 Float_t lin_z, Float_t theta, Float_t phi,
47 Float_t x_n, Float_t y_n, Float_t z_n);
48 void SetMirrorDeviations(Float_t dev_x, Float_t dev_y);
49
50 void SetReflectivity(const TArrayF &wav, const TArrayF &ref);
51
52 void SetArraySize(Int_t dim) { fWavelength.Set(dim); fReflectivity.Set(dim); }
53
54 TVector3 GetMirrorCenter() const { return TVector3(fX/100, fY/100, fZ/100); }
55 TVector3 GetMirrorNorm() const { return TVector3(fXN, fYN, fZN); }
56
57 ClassDef(MGeomMirror, 2) // geometry class describing one mirror
58};
59
60#endif
61
62
Note: See TracBrowser for help on using the repository browser.