source: trunk/MagicSoft/Mars/mgeom/MGeomCam.h@ 2632

Last change on this file since 2632 was 2521, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MGeomCam
2#define MARS_MGeomCam
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef ROOT_TObjArray
8#include <TObjArray.h>
9#endif
10#ifndef ROOT_TArrayF
11#include <TArrayF.h>
12#endif
13
14class MGeomPix;
15
16class MGeomCam : public MParContainer
17{
18private:
19 UInt_t fNumPixels; // Number of pixels in this camera
20 Float_t fMaxRadius; // maximum radius of the camera (eg. for GUI layout)
21
22 Float_t fCamDist; // [m] Average distance of the camera from the mirror
23 Float_t fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees
24
25 TObjArray fPixels; // Array of singel pixels storing the geometry
26
27 TArrayF fPixRatio; // Array storing the ratio between size of pixel idx and pixel 0 (for speed reasons)
28 TArrayF fPixRatioSqrt; // Array storing the square root ratio between size of pixel idx and pixel 0 (for speed reasons)
29
30 UInt_t fNumSectors; // Number of sectors
31
32protected:
33 void CalcPixRatio();
34 void CalcMaxRadius();
35 void CalcNumSectors();
36 void InitOuterRing();
37 void InitGeometry()
38 {
39 CalcNumSectors();
40 CalcMaxRadius();
41 CalcPixRatio();
42 InitOuterRing();
43 }
44
45
46public:
47 MGeomCam();
48 MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL);
49
50 virtual TObject *Clone(const char *newname=NULL) const;
51
52 Float_t GetCameraDist() const { return fCamDist; }
53 Float_t GetConvMm2Deg() const { return fConvMm2Deg; }
54
55 UInt_t GetNumPixels() const { return fNumPixels; }
56 Float_t GetMaxRadius() const { return fMaxRadius; }
57 UInt_t GetNumSectors() const { return fNumSectors; }
58 Float_t GetPixRatio(UInt_t i) const;
59 Float_t GetPixRatioSqrt(UInt_t i) const;
60
61 MGeomPix &operator[](Int_t i);
62 MGeomPix &operator[](Int_t i) const;
63
64 virtual void Print(Option_t *opt=NULL) const;
65
66 ClassDef(MGeomCam, 2) // Geometry base class for the camera
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.