source: branches/MarsMoreSimulationTruth/msimreflector/MMirrorHex.h@ 20042

Last change on this file since 20042 was 14150, checked in by tbretz, 12 years ago
Addeda hexagonal mirror rotated by 15deg
File size: 1.5 KB
Line 
1#ifndef MARS_MMirrorHex
2#define MARS_MMirrorHex
3
4#ifndef MARS_MMirror
5#include "MMirror.h"
6#endif
7
8class MMirrorHex : public MMirror
9{
10protected:
11 const static Double_t fgCos30;
12 const static Double_t fgCos60;
13 const static Double_t fgSin60;
14
15 Double_t fD; // half diameter D or better distance between opposite sides
16 Double_t fMaxR;
17
18 void SetD(Double_t d) { fD=d/2; fMaxR=fD/fgCos30; }
19
20public:
21 MMirrorHex() { SetD(24.75); }
22
23 // MMirror
24 Double_t GetMaxR() const { return fMaxR; }
25 Double_t GetA() const;
26 Double_t GetD() const { return fD; }
27
28 Bool_t CanHit(const MQuaternion &p) const;
29 Bool_t HasHit(const MQuaternion &p) const;
30
31 Int_t ReadM(const TObjArray &tok);
32 void WriteM(std::ostream &out) const;
33
34 // TObject
35 void Paint(Option_t *);
36 void Print(Option_t *) const;
37
38 ClassDef(MMirrorHex, 1) // A spherical hexagon type mirror
39};
40
41class MMirrorHex90 : public MMirrorHex
42{
43public:
44 MMirrorHex90() : MMirrorHex() { }
45
46 // MMirror
47 Bool_t HasHit(const MQuaternion &p) const;
48
49 // TObject
50 void Paint(Option_t *);
51
52 ClassDef(MMirrorHex90, 1) // A spherical hexagon type mirror (MMirrorHex rotated by 90deg)
53};
54
55class MMirrorHex15 : public MMirrorHex
56{
57public:
58 MMirrorHex15() : MMirrorHex() { }
59
60 // MMirror
61 Bool_t HasHit(const MQuaternion &p) const;
62
63 // TObject
64 void Paint(Option_t *);
65
66 ClassDef(MMirrorHex15, 1) // A spherical hexagon type mirror (MMirrorHex rotated by 15deg)
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.