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

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