Line | |
---|
1 | #ifndef MARS_MReflector
|
---|
2 | #define MARS_MReflector
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TObjArray
|
---|
9 | #include <TObjArray.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MQuaternion;
|
---|
13 | class MMirror;
|
---|
14 |
|
---|
15 | class MReflector : public MParContainer
|
---|
16 | {
|
---|
17 | private:
|
---|
18 | //Simple Array // 5.1s
|
---|
19 | TObjArray fMirrors; // 6.1s (Pointer)
|
---|
20 | //TObjArray fMirrors; // 6.1s (GetObjectRef)
|
---|
21 | //TObjArray fMirrors; // 8.3s (Next)
|
---|
22 | //TObjArray fMirrors; // 10.1s (UncheckedAt)
|
---|
23 | //TList fMirrors; // 10.7s
|
---|
24 | //TOrdCollection fMirrors; // 23.4s
|
---|
25 |
|
---|
26 | Double_t fMaxR;
|
---|
27 |
|
---|
28 | void InitMaxR();
|
---|
29 |
|
---|
30 | public:
|
---|
31 | MReflector(const char *name=NULL, const char *title=NULL);
|
---|
32 |
|
---|
33 | const MMirror **GetFirstPtr() const;
|
---|
34 | const UInt_t GetNumMirrors() const;
|
---|
35 |
|
---|
36 | const MMirror *GetMirror(UInt_t idx) const { return idx>=GetNumMirrors()?0:*(GetFirstPtr()+idx); }
|
---|
37 |
|
---|
38 | Bool_t ReadFile(TString fname);
|
---|
39 |
|
---|
40 | Double_t GetMaxR() const { return fMaxR; }
|
---|
41 |
|
---|
42 | virtual Bool_t CanHit(const MQuaternion &p) const;
|
---|
43 |
|
---|
44 | Int_t ExecuteReflector(MQuaternion &p, MQuaternion &u) const;
|
---|
45 |
|
---|
46 | void Paint(Option_t *o);
|
---|
47 |
|
---|
48 | ClassDef(MReflector, 0) // Parameter container storing a collection of several mirrors (reflector)
|
---|
49 | };
|
---|
50 |
|
---|
51 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.