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

Last change on this file since 1972 was 1965, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.4 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
11class MGeomPix;
12
13class MGeomCam : public MParContainer
14{
15private:
16 UInt_t fNumPixels; // Number of pixels in this camera
17 Float_t fMaxRadius; // maximum radius of the camera (eg. for GUI layout)
18
19 Float_t fCamDist; // [m] Average distance of the camera from the mirror
20 Float_t fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees
21
22 TObjArray *fPixels; // Array of singel pixels storing the geometry
23
24protected:
25 void CalcMaxRadius();
26 void InitOuterRing();
27
28public:
29 MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL);
30 virtual ~MGeomCam();
31
32 virtual TObject *Clone(const char *newname=NULL) const;
33
34 Float_t GetCameraDist() const { return fCamDist; }
35 Float_t GetConvMm2Deg() const { return fConvMm2Deg; }
36
37 UInt_t GetNumPixels() const { return fNumPixels; }
38 Float_t GetMaxRadius() const { return fMaxRadius; }
39 Float_t GetPixRatio(UInt_t i) const;
40
41 MGeomPix &operator[](Int_t i) { return *(MGeomPix*)fPixels->UncheckedAt(i); }
42 MGeomPix &operator[](Int_t i) const { return *(MGeomPix*)fPixels->UncheckedAt(i); }
43
44
45
46 virtual void Print(Option_t *opt=NULL) const;
47
48 ClassDef(MGeomCam, 1) // Geometry base class for the camera
49};
50
51#endif
52
Note: See TracBrowser for help on using the repository browser.