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

Last change on this file since 5475 was 5339, checked in by moralejo, 21 years ago
*** empty log message ***
File size: 4.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
18//////////////////////////////////////////////////////////////////////////////////
19//
20// class MMcConfigRunHeader
21//
22// Authors: O. Blanch, A. Moralejo
23//
24// Container to keep some data on the used MC simulation parameters
25//
26// Version 3: Added member fLightCollectionFactorOuter so that we can store
27// the data on the simulatedlight collection efficiency (light
28// guides + plexiglas +...) as a function of incidence angle for
29// outer and inner pixels independently.
30//
31// Version 4: Added member fMirrorFraction, the "active" fraction of the
32// mirror dish, to account for reflectivity losses, missing
33// mirrors, etc.
34//
35/////////////////////////////////////////////////////////////////////////////////
36
37class MMcConfigRunHeader : public MParContainer
38{
39private:
40 // Mirror Information
41 UShort_t fNumMirrors;
42 Float_t fRadiusMirror;// [cm] Radius of a single mirror
43 TClonesArray *fMirrors; // FIXME: Change TClonesArray away from a pointer?
44
45 Float_t fMirrorFraction; // (adimensional, between 0 and 1) Fraction of mirror dish
46 // which is really working.
47
48 // Magic Def Parameters
49 Float_t fFocalDist; // [cm] Focal distance
50 Float_t fPointSpread; // [cm] Point spread function, sigma in x and y on the camera as simualted in the Reflector
51 Float_t fPointSpreadX; // [cm] Point spread function, sigma in x on the camera adding gaussian in the Camera
52 Float_t fPointSpreadY; // [cm] Point spread function, sigma in y on the camera adding gaussian in the Camera
53 Float_t fBlackSpot; // [cm] Radius of black spot in the mirror center
54 Float_t fCameraWidth; // [cm] Radius on the camera plain
55 // inside which the phe are kept.
56
57 Float_t fMissPointingX; // [deg] Misspointing in deg added in he Camera
58 Float_t fMissPointingY; // [deg] simulation at rho (rotation FoV) = 0.
59
60 // QE Information
61 UInt_t fNumPMTs;
62 TClonesArray *fPMTs;
63
64 // Light Collection Information (guides , plexiglas, 1st dynode)
65
66 TArrayF fIncidentTheta; // [deg] Angle (0-180 deg) between light
67 // direction and camera plane.
68 TArrayF fLightCollectionFactor;// Inner pixels
69 TArrayF fLightCollectionFactorOuter;// Outer pixels
70
71public:
72 MMcConfigRunHeader(const char *name=NULL, const char *title=NULL);
73 ~MMcConfigRunHeader() { delete fMirrors; delete fPMTs; }
74
75 void SetMagicDef(Float_t radius, Float_t focal, Float_t point,
76 Float_t spot, Float_t camwidth);
77 void SetLightCollection(const TArrayF &theta, const TArrayF &factor,
78 const TArrayF &factor_outer);
79
80 UInt_t GetNumMirror() const { return fNumMirrors; }
81 void InitSizeMirror(UInt_t num) { fMirrors->Expand(num); }
82
83 void SetMirrorFraction(Float_t x) { fMirrorFraction = x; }
84
85 UInt_t GetNumPMTs() const { return fNumPMTs; }
86 void InitSizePMTs(UInt_t num) { fPMTs->Expand(num); }
87
88 Float_t GetPointSpread() const { return fPointSpread; }
89 void SetPointSpread(Float_t x) { fPointSpread = x; }
90
91 Float_t GetPointSpreadX() const { return fPointSpreadX; }
92 void SetPointSpreadX(Float_t x) { fPointSpreadX = x; }
93 Float_t GetPointSpreadY() const { return fPointSpreadY; }
94 void SetPointSpreadY(Float_t x) { fPointSpreadY = x; }
95
96 Float_t GetMissPointingX() const {return fMissPointingX;}
97 void SetMissPointingX(Float_t x) {fMissPointingX=x;}
98
99 Float_t GetMissPointingY() const {return fMissPointingY;}
100 void SetMissPointingY(Float_t x) {fMissPointingY=x;}
101
102 TArrayF GetLightCollectionFactor() const {return fLightCollectionFactor; }
103 TArrayF GetLightCollectionFactorOuter() const
104 {return fLightCollectionFactorOuter; }
105
106 Float_t GetMirrorFraction() const { return fMirrorFraction; }
107
108 TArrayF GetIncidentTheta() const {return fIncidentTheta;}
109
110 void AddMirror(Int_t id)
111 {
112 new ((*fMirrors)[fNumMirrors++]) MGeomMirror(id);
113 }
114
115 void AddPMT(Int_t id)
116 {
117 new ((*fPMTs)[fNumPMTs++]) MGeomPMT(id);
118 }
119
120 MGeomMirror &GetMirror(int i) { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
121 MGeomMirror &GetMirror(int i) const { return *(MGeomMirror*)(fMirrors->UncheckedAt(i)); }
122
123 TClonesArray *GetMirrors() { return fMirrors; }
124
125 MGeomPMT &GetPMT(int i) { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
126 MGeomPMT &GetPMT(int i) const { return *(MGeomPMT*)(fPMTs->UncheckedAt(i)); }
127
128 ClassDef(MMcConfigRunHeader, 4) // class for monte carlo configuration information
129};
130
131#endif
132
Note: See TracBrowser for help on using the repository browser.