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

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