1 | #ifndef MARS_MMcConfigRunHeader
|
---|
2 | #define MARS_MMcConfigRunHeader
|
---|
3 |
|
---|
4 | #ifndef ROOT_TClonesArray
|
---|
5 | #include <TClonesArray.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MGeomMirror
|
---|
9 | #include "MGeomMirror.h"
|
---|
10 | #endif
|
---|
11 | #ifndef MARS_MGeomPMT
|
---|
12 | #include "MGeomPMT.h"
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | class MGeomMirror;
|
---|
16 | class MGeomPMT;
|
---|
17 |
|
---|
18 | class MMcConfigRunHeader : public MParContainer
|
---|
19 | {
|
---|
20 | private:
|
---|
21 | // Mirror Information
|
---|
22 | UShort_t fNumMirrors;
|
---|
23 | Float_t fRadiusMirror;// [cm] Radius of a single mirror
|
---|
24 | TClonesArray *fMirrors; // FIXME: Change TClonesArray away from a pointer?
|
---|
25 |
|
---|
26 | // Magic Def Parameters
|
---|
27 | Float_t fFocalDist; // [cm] Focal distance
|
---|
28 | Float_t fPointSpread; // [cm] Point spread function, sigma in x and y on the camera
|
---|
29 | Float_t fBlackSpot; // [cm] Radius of black spot in the mirror center
|
---|
30 | Float_t fCameraWidth; // [cm] Radius on the camera plain
|
---|
31 | // inside which the phe are kept.
|
---|
32 |
|
---|
33 | // QE Information
|
---|
34 | UInt_t fNumPMTs;
|
---|
35 | TClonesArray *fPMTs;
|
---|
36 |
|
---|
37 | // Light Guides Information
|
---|
38 | TArrayF fIncidentTheta; // [deg]
|
---|
39 | TArrayF fLightGuidesFactor;// []
|
---|
40 |
|
---|
41 | public:
|
---|
42 | MMcConfigRunHeader(const char *name=NULL, const char *title=NULL);
|
---|
43 | ~MMcConfigRunHeader() { delete fMirrors; delete fPMTs; }
|
---|
44 |
|
---|
45 | void SetMagicDef(Float_t radius, Float_t focal, Float_t point,
|
---|
46 | Float_t spot, Float_t camwidth);
|
---|
47 | void SetLightGuides(const TArrayF &theta, const TArrayF &factor);
|
---|
48 |
|
---|
49 | UInt_t GetNumMirror() const { return fNumMirrors; }
|
---|
50 | void InitSizeMirror(UInt_t num) { fMirrors->Expand(num); }
|
---|
51 |
|
---|
52 | UInt_t GetNumPMTs() const { return fNumPMTs; }
|
---|
53 | void InitSizePMTs(UInt_t num) { fPMTs->Expand(num); }
|
---|
54 |
|
---|
55 | Float_t GetPointSpread() const { return fPointSpread; }
|
---|
56 | void SetPointSpread(Float_t x) { fPointSpread = x; }
|
---|
57 |
|
---|
58 | void AddMirror(Int_t id)
|
---|
59 | {
|
---|
60 | new ((*fMirrors)[fNumMirrors++]) MGeomMirror(id);
|
---|
61 | }
|
---|
62 |
|
---|
63 | void AddPMT(Int_t id)
|
---|
64 | {
|
---|
65 | new ((*fPMTs)[fNumPMTs++]) MGeomPMT(id);
|
---|
66 | }
|
---|
67 |
|
---|
68 | MGeomMirror &GetMirror(int i) { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
|
---|
69 | MGeomMirror &GetMirror(int i) const { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
|
---|
70 |
|
---|
71 | MGeomPMT &GetPMT(int i) { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
|
---|
72 | MGeomPMT &GetPMT(int i) const { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
|
---|
73 |
|
---|
74 | ClassDef(MMcConfigRunHeader, 2) // class for monte carlo configuration information
|
---|
75 | };
|
---|
76 |
|
---|
77 | #endif
|
---|
78 |
|
---|