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

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