source: trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx@ 7634

Last change on this file since 7634 was 7634, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 4.9 KB
Line 
1#ifndef __MMcFadcHeader__
2#define __MMcFadcHeader__
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MCamEvent
8#include "MCamEvent.h"
9#endif
10
11#include "MFadcDefine.h"
12
13//
14// Version 5:
15// Added member fGainFluctuations
16//
17// Version 6:
18// Added member fNoiseGainFluctuations
19//
20// Version 7:
21// Derived class from MCamEvent
22//
23
24class MMcFadcHeader : public MParContainer, public MCamEvent {
25 private:
26
27 Float_t fFadcShape ; // a number that indicate the shape type of
28 // the signal
29 Float_t fFadcShapeOuter; // a number that indicate the shape type of
30 // the signal
31 // = 0 --> a gaussian
32 // = 1 --> from Pulpo set-up
33
34 // NOTE : meaning of fAmplFadc, fAmplFadcOuter changed in camera 0.7,
35 // 30/03/2004: before it was amplitude of (gaussian) pulse, now is
36 // integral of pulse (which may be gaussian or not).
37
38 Float_t fAmplFadc ; // the integral of single phe response [counts]
39 Float_t fFwhmFadc ; // the width of the signal in nsec
40 Float_t fAmplFadcOuter; // the integral of single phe response [counts],
41 // outer pixels
42 Float_t fFwhmFadcOuter; // the width of the signal in nsec, outer
43
44 Float_t fPedesMean[MFADC_CHANNELS] ; // The mean value for the pedestal
45 // of each pixel (channel)
46 Float_t fPedesSigmaHigh[MFADC_CHANNELS] ; // The sigma for the pedestal
47 // of each pixel (channel)
48 Float_t fPedesSigmaLow[MFADC_CHANNELS] ; // The sigma for the pedestal
49 // of each pixel (channel)
50
51 // In camera 0.7, the meaning of fPedesSigmaHigh, fPedesSigmaLow changed:
52 // before it was the rms of the single FADC slice. Now we calculate the
53 // RMS of the distribution of the sum of 14 FADC slices. The value we set
54 // as fPedesSigmaHigh/Low is that RMS divided by sqrt(14). It can be seen
55 // that the fluctuations of the integrated pedestal, when adding n slices
56 // to obtain the pixel signal, with n>~6, is more or less well
57 // approximated by sqrt(n)*RMS(sum_14)slices)/sqrt(14).
58
59
60 Float_t fElecNoise[MFADC_CHANNELS] ; // The rms value in the pedestal
61 // due to the electronics for
62 // each pixel (channel)
63 Float_t fDigitalNoise[MFADC_CHANNELS]; // The rms value in the pedestal
64 // due to the digital for
65 // each pixel (channel)
66 Float_t fLow2HighGain; // low gain factor
67
68 Bool_t fGainFluctuations;
69 // kTRUE if PMT gain fluctuations were simulated for the signal
70 // (=> default in camera simulation)
71
72 Bool_t fNoiseGainFluctuations;
73 // kTRUE if PMT gain fluctuations were simulated for the NSB noise
74 // (=> default in StarResponse program)
75
76
77 public:
78 MMcFadcHeader(const char *name=NULL, const char *title=NULL);
79
80 void Print(Option_t *opt=NULL) const;
81
82 void SetShape(Float_t shape){
83 fFadcShape=shape;
84 }
85
86 void SetShapeOuter(Float_t shape){
87 fFadcShapeOuter=shape;
88 }
89
90 void SetLow2High(Float_t l2h){
91 fLow2HighGain=l2h;
92 }
93
94 void SetAmplitud(Float_t amp, Float_t ampout=0.0){
95 fAmplFadc=amp;
96 fAmplFadcOuter=ampout;
97 }
98
99 void SetFwhm(Float_t fwhm, Float_t fwhmout=0.0){
100 fFwhmFadc=fwhm;
101 fFwhmFadcOuter=fwhmout;
102 }
103
104 void SetPedestal(Float_t *mean, Int_t dim){
105 for (Int_t i=0;i<dim;i++)
106 fPedesMean[i]=mean[i];
107 }
108
109 void SetPedestalSigma(Float_t *sigmalo, Float_t *sigmahi, Int_t dim){
110 for (Int_t i=0;i<dim;i++){
111 fPedesSigmaLow[i]=sigmalo[i];
112 fPedesSigmaHigh[i]=sigmahi[i];
113 }
114 }
115
116 void SetElecNoise(Float_t *sigmae, Float_t *sigmad, Int_t dim){
117 for (Int_t i=0;i<dim;i++){
118 fElecNoise[i]=sigmae[i];
119 fDigitalNoise[i]=sigmad[i];
120 }
121 }
122
123 void SetGainFluctuations(Bool_t x) { fGainFluctuations = x; }
124 void SetNoiseGainFluctuations(Bool_t x) { fNoiseGainFluctuations = x; }
125
126 Float_t GetPedestal(UInt_t i) const { return fPedesMean[i]; }
127 Float_t GetPedestalRmsHigh(UInt_t i) const { return fPedesSigmaHigh[i]; }
128 Float_t GetPedestalRmsLow(UInt_t i) const { return fPedesSigmaLow[i]; }
129 Float_t GetElecNoise(UInt_t i) const { return fElecNoise[i]; }
130 Float_t GetDigitalNoise(UInt_t i) const { return fElecNoise[i]; }
131 Float_t GetAmplitud() const { return fAmplFadc; }
132 Float_t GetAmplitudOuter() const { return fAmplFadcOuter; }
133 Float_t GetLow2HighGain() const { return fLow2HighGain; }
134
135 UInt_t GetNumPixel() const { return MFADC_CHANNELS; }
136
137 // MCamEvent
138 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
139 void DrawPixelContent(Int_t num) const { }
140
141 ClassDef(MMcFadcHeader, 8) //Stores Montecarlo Information describing the FADC behaviour
142};
143
144#endif
Note: See TracBrowser for help on using the repository browser.