source: branches/MarsMoreSimulationTruth/mmc/MMcFadcHeader.hxx

Last change on this file was 9531, checked in by tbretz, 15 years ago
*** empty log message ***
File size: 5.0 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 TString fElecNoiseFileName;
58 // Name of the file from which the electronic noise used in the
59 // simulation has been read in, if the input card option "fadc_noise_from_file"
60 // of the camera simulation has been chosen.
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 void Print(Option_t *opt=NULL) const;
75
76 void SetShape(Float_t shape){
77 fFadcShape=shape;
78 }
79
80 void SetShapeOuter(Float_t shape){
81 fFadcShapeOuter=shape;
82 }
83
84 void SetLow2High(Float_t l2h){
85 fLow2HighGain=l2h;
86 }
87
88 void SetAmplitud(Float_t amp, Float_t ampout=0.0){
89 fAmplFadc=amp;
90 fAmplFadcOuter=ampout;
91 }
92
93 void SetFwhm(Float_t fwhm, Float_t fwhmout=0.0){
94 fFwhmFadc=fwhm;
95 fFwhmFadcOuter=fwhmout;
96 }
97
98 void SetPedestal(Float_t *mean, Int_t dim){
99 for (Int_t i=0;i<dim;i++)
100 fPedesMean[i]=mean[i];
101 }
102
103 void SetPedestalSigma(Float_t *sigmalo, Float_t *sigmahi, Int_t dim){
104 for (Int_t i=0;i<dim;i++){
105 fPedesSigmaLow[i]=sigmalo[i];
106 fPedesSigmaHigh[i]=sigmahi[i];
107 }
108 }
109
110 void SetElecNoise(Float_t *sigmae, Float_t *sigmad, Int_t dim){
111 for (Int_t i=0;i<dim;i++){
112 fElecNoise[i]=sigmae[i];
113 fDigitalNoise[i]=sigmad[i];
114 }
115 }
116
117 void SetGainFluctuations(Bool_t x) { fGainFluctuations = x; }
118 void SetNoiseGainFluctuations(Bool_t x) { fNoiseGainFluctuations = x; }
119
120 Float_t GetPedestal(UInt_t i) const { return fPedesMean[i]; }
121 Float_t GetPedestalRmsHigh(UInt_t i) const { return fPedesSigmaHigh[i]; }
122 Float_t GetPedestalRmsLow(UInt_t i) const { return fPedesSigmaLow[i]; }
123 Float_t GetElecNoise(UInt_t i) const { return fElecNoise[i]; }
124 Float_t GetDigitalNoise(UInt_t i) const { return fElecNoise[i]; }
125 Float_t GetAmplitud() const { return fAmplFadc; }
126 Float_t GetAmplitudOuter() const { return fAmplFadcOuter; }
127 Float_t GetLow2HighGain() const { return fLow2HighGain; }
128
129 UInt_t GetNumPixel() const { return MFADC_CHANNELS; }
130
131 // MCamEvent
132 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
133 void DrawPixelContent(Int_t num) const { }
134
135 ClassDef(MMcFadcHeader, 10) //Stores Montecarlo Information describing the FADC behaviour
136};
137
138#endif
Note: See TracBrowser for help on using the repository browser.