forked from nepomukotte/CARE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFADC.h
79 lines (52 loc) · 2.57 KB
/
FADC.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <TROOT.h>
#include <TRandom3.h>
#include <TH1F.h>
#include <vector>
#include "TelescopeData.h"
#include "TraceGenerator.h"
#include "ReadConfig.h"
#include "Display.h"
using namespace std;
class FADC {
public:
FADC(ReadConfig *readConfig, TraceGenerator *traceGenerator, int telType, TRandom3 *generator,Bool_t debug,Display *display);
//Event handling
void RunFADC(TelescopeData *telData);
void SetDebugInfo(Float_t energy, Int_t telid, Float_t zenith, Float_t azimuth);
void PrintHowOftenTheTraceWasTooShort();
protected:
void DigitizePixel( Int_t PixelID );
void SetParametersFromConfigFile(ReadConfig *readConfig );
//Variables
Bool_t bDebug;
Display *debugDisplay;
TRandom3 *rand; //Our random number generator
TelescopeData *telData;
TraceGenerator *tracegenerator;
Int_t iTelType;
Int_t iNumPixels; //Number of pixels in the camera
Int_t iNumTimesOutOfAnalogueTraceUpperEnd;
Int_t iNumTimesOutOfAnalogueTraceLowerEnd;
//Single PE pulse shape parameters
Float_t fDCtoPEconversion; //the gain calibration constant DC per PE; defined for the amplitude of a single pe pulse
//FADC parameters
Float_t fFADCSamplingWidth; //Sampling time
Int_t iFADCSamples; //Number of samples per trace
Float_t fOffset; //time offset of the trigger from the beginning of the readout window
Int_t iDynamicRange; //the count range of the digitizer
Float_t fFADCconversion; //the conversion of mV to DC
Float_t fHiLoGainThreshold; //dc counts at which the HiLoGain switch is activated
Float_t fLowHiGainRatio; //Gain ratio logain/higain
Float_t fHighGainPedestal; //High Gain Pedestal offset in the FADC
Float_t fLowGainPedestal; //Low Gain Pedestal offset in the FADC
//Event dependent parameters
Float_t fTimeStartFirstSample;
Float_t fTraceSamplingTime; //The sampling time steps for the analog trace
Float_t fTraceLength; //The total length of an analog trace
Float_t fStartSamplingBeforeAverageTime; //the time before the average photon arrival time when the trace gets started to be sampled
//Make Function that allows to scan the position of the Cherenkov pulse in the Trace
Float_t fenergy;
Int_t ftelid;
Float_t fzenith;
Float_t fazimuth;
};