Last change
on this file since 19674 was 19586, checked in by tbretz, 5 years ago |
Propagate the wavelength to the optics to allow for refraction calculation.
|
File size:
1.6 KB
|
Line | |
---|
1 | #ifndef MARS_MReflector
|
---|
2 | #define MARS_MReflector
|
---|
3 |
|
---|
4 | #ifndef MARS_MOptics
|
---|
5 | #include "MOptics.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 MOptics
|
---|
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 | // Helper for I/O
|
---|
31 | MMirror *EvalTokens(TObjArray &arr, Double_t defpsf) const;
|
---|
32 |
|
---|
33 | // MParContainer
|
---|
34 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
35 |
|
---|
36 | public:
|
---|
37 | MReflector(const char *name=NULL, const char *title=NULL);
|
---|
38 |
|
---|
39 | const MMirror **GetFirstPtr() const;
|
---|
40 | const UInt_t GetNumMirrors() const;
|
---|
41 |
|
---|
42 | const MMirror *GetMirror(UInt_t idx) const { return idx>=GetNumMirrors()?0:*(GetFirstPtr()+idx); }
|
---|
43 |
|
---|
44 | Bool_t ReadFile(TString fname, Double_t defpsf=-1);
|
---|
45 | Bool_t WriteFile(TString fname) const;
|
---|
46 |
|
---|
47 | Double_t GetMaxR() const { return fMaxR; }
|
---|
48 | Double_t GetA() const;
|
---|
49 |
|
---|
50 | virtual Bool_t CanHit(const MQuaternion &p) const;
|
---|
51 |
|
---|
52 | Int_t ExecuteOptics(MQuaternion &p, MQuaternion &u, const Short_t &wavelength) const;
|
---|
53 |
|
---|
54 | void SetSigmaPSF(Double_t psf);
|
---|
55 |
|
---|
56 | virtual Bool_t IsValid() const { return fMirrors.GetEntries(); }
|
---|
57 |
|
---|
58 | // TObject
|
---|
59 | void Paint(Option_t *o);
|
---|
60 | void Print(Option_t *o) const;
|
---|
61 |
|
---|
62 | ClassDef(MReflector, 2) // Parameter container storing a collection of several mirrors (reflector)
|
---|
63 | };
|
---|
64 |
|
---|
65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.