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

Last change on this file since 5138 was 3666, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.8 KB
Line 
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
15class MGeomMirror;
16class MGeomPMT;
17
18class MMcConfigRunHeader : public MParContainer
19{
20private:
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 as simualted in the Reflector
29 Float_t fPointSpreadX; // [cm] Point spread function, sigma in x on the camera adding gaussian in the Camera
30 Float_t fPointSpreadY; // [cm] Point spread function, sigma in y on the camera adding gaussian in the Camera
31 Float_t fBlackSpot; // [cm] Radius of black spot in the mirror center
32 Float_t fCameraWidth; // [cm] Radius on the camera plain
33 // inside which the phe are kept.
34
35 Float_t fMissPointingX; // [deg] Misspointing in deg added in he Camera
36 Float_t fMissPointingY; // [deg] simulation at rho (rotation FoV) = 0.
37
38 // QE Information
39 UInt_t fNumPMTs;
40 TClonesArray *fPMTs;
41
42 // Light Collection Information (guides , plexiglas, 1st dynode)
43
44 TArrayF fIncidentTheta; // [deg] Angle (0-180 deg) between light
45 // direction and camera plane.
46 TArrayF fLightCollectionFactor;// Inner pixels
47 TArrayF fLightCollectionFactorOuter;// Outer pixels
48
49public:
50 MMcConfigRunHeader(const char *name=NULL, const char *title=NULL);
51 ~MMcConfigRunHeader() { delete fMirrors; delete fPMTs; }
52
53 void SetMagicDef(Float_t radius, Float_t focal, Float_t point,
54 Float_t spot, Float_t camwidth);
55 void SetLightCollection(const TArrayF &theta, const TArrayF &factor,
56 const TArrayF &factor_outer);
57
58 UInt_t GetNumMirror() const { return fNumMirrors; }
59 void InitSizeMirror(UInt_t num) { fMirrors->Expand(num); }
60
61 UInt_t GetNumPMTs() const { return fNumPMTs; }
62 void InitSizePMTs(UInt_t num) { fPMTs->Expand(num); }
63
64 Float_t GetPointSpread() const { return fPointSpread; }
65 void SetPointSpread(Float_t x) { fPointSpread = x; }
66
67 Float_t GetPointSpreadX() const { return fPointSpreadX; }
68 void SetPointSpreadX(Float_t x) { fPointSpreadX = x; }
69 Float_t GetPointSpreadY() const { return fPointSpreadY; }
70 void SetPointSpreadY(Float_t x) { fPointSpreadY = x; }
71
72 Float_t GetMissPointingX() const {return fMissPointingX;}
73 void SetMissPointingX(Float_t x) {fMissPointingX=x;}
74
75 Float_t GetMissPointingY() const {return fMissPointingY;}
76 void SetMissPointingY(Float_t x) {fMissPointingY=x;}
77
78 TArrayF GetLightCollectionFactor() const {return fLightCollectionFactor; }
79 TArrayF GetLightCollectionFactorOuter() const
80 {return fLightCollectionFactorOuter; }
81 TArrayF GetIncidentTheta() const {return fIncidentTheta;}
82
83 void AddMirror(Int_t id)
84 {
85 new ((*fMirrors)[fNumMirrors++]) MGeomMirror(id);
86 }
87
88 void AddPMT(Int_t id)
89 {
90 new ((*fPMTs)[fNumPMTs++]) MGeomPMT(id);
91 }
92
93 MGeomMirror &GetMirror(int i) { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
94 MGeomMirror &GetMirror(int i) const { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
95
96 TClonesArray *GetMirrors() { return fMirrors; }
97
98 MGeomPMT &GetPMT(int i) { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
99 MGeomPMT &GetPMT(int i) const { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
100
101 ClassDef(MMcConfigRunHeader, 3) // class for monte carlo configuration information
102};
103
104#endif
105
Note: See TracBrowser for help on using the repository browser.