source: trunk/MagicSoft/include-Classes/MMcFormat/MMcConfigRunHeader.h@ 1596

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