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

Last change on this file since 5365 was 5321, checked in by moralejo, 21 years ago
*** empty log message ***
File size: 4.3 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 Bool_t fGainFluctuations;
55 // kTRUE if PMT gain fluctuations were simulated (=> default in camera simulation)
56
57
58 public:
59 MMcFadcHeader(const char *name=NULL, const char *title=NULL);
60
61 ~MMcFadcHeader();
62
63 void Print(Option_t *opt=NULL) const;
64
65 void SetShape(Float_t shape){
66 fFadcShape=shape;
67 }
68
69 void SetShapeOuter(Float_t shape){
70 fFadcShapeOuter=shape;
71 }
72
73 void SetLow2High(Float_t l2h){
74 fLow2HighGain=l2h;
75 }
76
77 void SetAmplitud(Float_t amp, Float_t ampout=0.0){
78 fAmplFadc=amp;
79 fAmplFadcOuter=ampout;
80 }
81
82 void SetFwhm(Float_t fwhm, Float_t fwhmout=0.0){
83 fFwhmFadc=fwhm;
84 fFwhmFadcOuter=fwhmout;
85 }
86
87 void SetPedestal(Float_t *mean, Int_t dim){
88 for (Int_t i=0;i<dim;i++)
89 fPedesMean[i]=mean[i];
90 }
91
92 void SetPedestalSigma(Float_t *sigmalo, Float_t *sigmahi, Int_t dim){
93 for (Int_t i=0;i<dim;i++){
94 fPedesSigmaLow[i]=sigmalo[i];
95 fPedesSigmaHigh[i]=sigmahi[i];
96 }
97 }
98
99 void SetElecNoise(Float_t *sigmae, Float_t *sigmad, Int_t dim){
100 for (Int_t i=0;i<dim;i++){
101 fElecNoise[i]=sigmae[i];
102 fDigitalNoise[i]=sigmad[i];
103 }
104 }
105
106 void SetGainFluctuations(Bool_t x) { fGainFluctuations = x; }
107
108 Float_t GetPedestal(UInt_t i) const { return fPedesMean[i]; }
109 Float_t GetPedestalRmsHigh(UInt_t i) const { return fPedesSigmaHigh[i]; }
110 Float_t GetPedestalRmsLow(UInt_t i) const { return fPedesSigmaLow[i]; }
111 Float_t GetElecNoise(UInt_t i) const { return fElecNoise[i]; }
112 Float_t GetDigitalNoise(UInt_t i) const { return fElecNoise[i]; }
113 Float_t GetAmplitud() const { return fAmplFadc; }
114 Float_t GetAmplitudOuter() const { return fAmplFadcOuter; }
115 Float_t GetLow2HighGain() const { return fLow2HighGain; }
116
117 UInt_t GetNumPixel() const { return MFADC_CHANNELS; }
118
119 ClassDef(MMcFadcHeader, 5) //Stores Montecarlo Information describing the FADC behaviour
120
121};
122
123#endif
124
Note: See TracBrowser for help on using the repository browser.