source: trunk/Mars/mmc/MMcConfigRunHeader.h@ 13449

Last change on this file since 13449 was 8024, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 4.4 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 Float_t fMirrorFraction; // (adimensional, between 0 and 1) Fraction of mirror dish
27 // which is really working.
28
29 // Magic Def Parameters
30 Float_t fFocalDist; // [cm] Focal distance
31 Float_t fParaboloidFocal; // [cm] True focal of the paraboloid on which the mirror centers are placed
32 Float_t fPointSpread; // [cm] Point spread function, sigma in x and y on the camera as simualted in the Reflector
33 Float_t fPointSpreadX; // [cm] Point spread function, sigma in x on the camera adding gaussian in the Camera
34 Float_t fPointSpreadY; // [cm] Point spread function, sigma in y on the camera adding gaussian in the Camera
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 Float_t fMissPointingX; // [deg] Misspointing in deg added in he Camera
40 Float_t fMissPointingY; // [deg] simulation at rho (rotation FoV) = 0.
41
42 Float_t fPmtTimeJitter; // [ns] PMT time jitter (sigma of gaussian), per phe-
43
44 // QE Information
45 UInt_t fNumPMTs;
46 TClonesArray *fPMTs;
47
48 // Light Collection Information (guides , plexiglas, 1st dynode)
49
50 TArrayF fIncidentTheta; // [deg] Angle (0-180 deg) between light
51 // direction and camera plane.
52 TArrayF fLightCollectionFactor;// Inner pixels
53 TArrayF fLightCollectionFactorOuter;// Outer pixels
54
55public:
56 MMcConfigRunHeader(const char *name=NULL, const char *title=NULL);
57 ~MMcConfigRunHeader() { delete fMirrors; delete fPMTs; }
58
59 void SetMagicDef(Float_t radius, Float_t focal, Float_t point,
60 Float_t spot, Float_t camwidth);
61 void SetLightCollection(const TArrayF &theta, const TArrayF &factor,
62 const TArrayF &factor_outer);
63
64 UInt_t GetNumMirror() const { return fNumMirrors; }
65 void InitSizeMirror(UInt_t num) { fMirrors->Expand(num); }
66
67 void SetMirrorFraction(Float_t x) { fMirrorFraction = x; }
68
69 UInt_t GetNumPMTs() const { return fNumPMTs; }
70 void InitSizePMTs(UInt_t num) { fPMTs->Expand(num); }
71
72 Float_t GetPointSpread() const { return fPointSpread; }
73 void SetPointSpread(Float_t x) { fPointSpread = x; }
74
75 Float_t GetPointSpreadX() const { return fPointSpreadX; }
76 void SetPointSpreadX(Float_t x) { fPointSpreadX = x; }
77 Float_t GetPointSpreadY() const { return fPointSpreadY; }
78 void SetPointSpreadY(Float_t x) { fPointSpreadY = x; }
79
80 Float_t GetMissPointingX() const {return fMissPointingX;}
81 void SetMissPointingX(Float_t x) {fMissPointingX=x;}
82
83 Float_t GetMissPointingY() const {return fMissPointingY;}
84 void SetMissPointingY(Float_t x) {fMissPointingY=x;}
85
86 const TArrayF &GetLightCollectionFactor() const {return fLightCollectionFactor; }
87 const TArrayF &GetLightCollectionFactorOuter() const {return fLightCollectionFactorOuter; }
88
89 Float_t GetMirrorFraction() const { return fMirrorFraction; }
90
91 const TArrayF &GetIncidentTheta() const {return fIncidentTheta;}
92
93 void AddMirror(Int_t id)
94 {
95 new ((*fMirrors)[fNumMirrors++]) MGeomMirror(id);
96 }
97
98 void AddPMT(Int_t id)
99 {
100 new ((*fPMTs)[fNumPMTs++]) MGeomPMT(id);
101 }
102
103 MGeomMirror &GetMirror(int i) { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
104 MGeomMirror &GetMirror(int i) const { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
105
106 TClonesArray *GetMirrors() { return fMirrors; }
107
108 MGeomPMT &GetPMT(int i) { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
109 MGeomPMT &GetPMT(int i) const { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
110 void SetPmtTimeJitter(Float_t x) { fPmtTimeJitter = x; }
111 Float_t GetPmtTimeJitter() const { return fPmtTimeJitter; }
112
113 ClassDef(MMcConfigRunHeader, 6) // class for monte carlo configuration information
114};
115
116#endif
117
Note: See TracBrowser for help on using the repository browser.