source: tags/Mars-V2.3/mgeom/MGeomPix.h

Last change on this file was 9385, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1#ifndef MARS_MGeomPix
2#define MARS_MGeomPix
3
4#ifndef MARS_MGeom
5#include "MGeom.h"
6#endif
7
8class MGeomPix : public MGeom
9{
10public:
11 static const Float_t gsTan60; // tan(60/kRad2Deg);
12 static const Float_t gsTan30; // tan(30/kRad2Deg);
13
14 static const Float_t gsCos60; // cos(60/kRad2Deg);
15 static const Float_t gsSin60; // sin(30/kRad2Deg);
16
17private:
18 Float_t fD; // [mm] the d coordinate of the pixel (dist between two parallel sides)
19
20 Double_t fCosPhi;
21 Double_t fSinPhi;
22
23 // Store fD*fCosPhi ???
24 // Store fD*fSinPhi ???
25 // Store array and check if initialized before needed?
26
27public:
28 MGeomPix(Float_t x=0, Float_t y=0, Float_t d=1, UInt_t s=0, UInt_t aidx=0);
29
30 void Copy(TObject &obj) const
31 {
32 MGeomPix &pix = (MGeomPix&)obj;
33
34 pix.fD = fD;
35
36 MGeom::Copy(obj);
37 TObject::Copy(obj);
38 }
39
40 void SetD(Float_t d=1) { fD=d; fA=d*d*gsTan60/2; }
41 void SetPhi(Double_t phi=0);
42
43 Float_t GetD() const { return fD; } // Distance between two parallel sides
44 Float_t GetL() const { return fD*gsTan30; } // Length of one of the parallel sides
45 Float_t GetT() const { return fD/gsTan60; } // Distance between two opposite edges (traverse)
46
47 Bool_t IsInside(Float_t px, Float_t py) const;
48 void PaintPrimitive(const TAttLine &line, const TAttFill &fill, Double_t scalexy=1, Double_t scaled=1) const;
49
50 void Print(Option_t *opt=NULL) const;
51
52 ClassDef(MGeomPix, 5) // Geometry class describing the geometry of one pixel
53};
54
55#endif
Note: See TracBrowser for help on using the repository browser.