source: tags/Mars-V0.8.2/mgeom/MGeomCam.h

Last change on this file was 2463, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.8 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
38public:
39 MGeomCam();
40 MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL);
41
42 virtual TObject *Clone(const char *newname=NULL) const;
43
44 Float_t GetCameraDist() const { return fCamDist; }
45 Float_t GetConvMm2Deg() const { return fConvMm2Deg; }
46
47 UInt_t GetNumPixels() const { return fNumPixels; }
48 Float_t GetMaxRadius() const { return fMaxRadius; }
49 UInt_t GetNumSectors() const { return fNumSectors; }
50 Float_t GetPixRatio(UInt_t i) const;
51 Float_t GetPixRatioSqrt(UInt_t i) const;
52
53 MGeomPix &operator[](Int_t i);
54 MGeomPix &operator[](Int_t i) const;
55
56 virtual void Print(Option_t *opt=NULL) const;
57
58 ClassDef(MGeomCam, 2) // Geometry base class for the camera
59};
60
61#endif
62
Note: See TracBrowser for help on using the repository browser.