-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTelescopeData.h
148 lines (103 loc) · 6.06 KB
/
TelescopeData.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef Telescope_Data
#define Telescope_Data
#include <TROOT.h>
#include <TRandom3.h>
#include <TH1F.h>
#include <vector>
#include <iostream>
#include <sstream>
#include "ReadConfig.h"
using namespace std;
class TelescopeData {
public:
TelescopeData( ReadConfig *readConfig, Int_t telTID = 0, TRandom3 *generator = NULL, Bool_t debug = kFALSE);
//Trace related Functions
Float_t GetAverageArrivalTime(){return fAveragePhotonArrivalTime;};
//Trigger related functions
Bool_t CherenkovPhotonsInCamera(){return bCherenkovPhotonsInCamera;};
//Display related functions
vector<Int_t>* GetDisplayTraces(){ return iDisplayTraceInPixel; };
vector<Int_t> GetDisplayTrace(Int_t pixelID){return iDisplayTraceInPixel[pixelID]; };
Bool_t GetPixelLowGainSwitch(Int_t pixelID){ return bInLoGain[pixelID]; };
vector<Int_t> GetFADCTrace(Int_t pixelID){ return iFADCTraceInPixel[pixelID]; };
vector<Int_t> GetQDCValues(){return iQDCInPixel; };
vector<Int_t> GetPEInPixels(){return iPEInPixel; };
//Telescope related stuff
Int_t GetTelescopeType(){return iTelType;};
Int_t GetTelescopeID(){return iTelID; };
Int_t GetTelescopeIDinSuperArray(){return iTelIDinSuperArray; };
//trigger stuff
//returns vector with the trigger bits of each group
vector< Bool_t> GetTriggeredGroups(){ return bTriggeredGroups; };
Int_t GetNumTriggeredGroups(){ return iNumTriggeredGroups; };
//time when telescope has triggered
Float_t GetTelescopeTriggerTime(){ return fTelescopeTriggerTime; };
//Returns true if telescope has triggered, false otherwise
Bool_t GetTelescopeTrigger(){ return bTelescopeHasTriggered; };
Bool_t GetGroupTrigger(Int_t iGroupID){return bTriggeredGroups[iGroupID]; };
//Returns a vector with a list of Groups that are in the Trigger cluster
vector<int> GetTriggerCluster(){ return vTriggerCluster; };
//general functions to maintain object
void ResetTraces(); //Sets all vectors and numbers to initial values.
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Variables
//Trace related parameters analog signal
vector<Float_t> *fTraceInPixel;
vector<Float_t> *fTimesInPixel;
vector<Float_t> *fAmplitudesInPixel;
vector<Float_t> *fPileUpAmplitudeForPhoton;
Float_t fAveragePhotonArrivalTime; //Holds the average photon arrival time of all photons in one event
Double_t mean; //trace mean
Bool_t bCherenkovPhotonsInCamera;
Int_t iNumPhotonsInFocalPlane; //The number of photons that made it to the focal plane
Int_t iNumPixels;
Int_t iNumSamplesPerTrace; //the number of samples in the analog trace for each sum group
//FADC
vector<Int_t> *iFADCTraceInPixel;
Int_t iNumFADCSamples;
//Display trace
vector<Bool_t> bInLoGain;
vector<Int_t> *iDisplayTraceInPixel;
Int_t iNumDisplaySamples;
//QDC
vector<Int_t> iQDCInPixel;
vector<Int_t> iPEInPixel; //the number of Cherenkov photoelectrons in each pixel
vector<Float_t> fSumTimeInPixel; //the sum of all the Cherenkov photoelectrons arrival times in each pixel
//Trigger related numbers
Float_t fDiscriminatorThreshold;
Float_t fTriggerTime;
vector<Float_t> fTimeOverThreshold; //TimerOverThreshold for each pixel that triggered;
vector<Bool_t> bTriggeredGroups; //holds the information whether a group has triggered or not;
vector<Float_t> fDiscriminatorTime; //holds the time when the group has triggered;
Float_t fTelescopeTriggerTime; //The time when the telescope triggered
Int_t iNumTriggeredGroups; //holds the number of triggered groups
Bool_t bArrayTriggered; //If telescope has been triggered by the array trigger
Bool_t bTelescopeHasTriggered; //If telescope has triggered
vector<int> vTriggerCluster; //the IDs of the groups that are in the triggered cluster
//Pixel related variables
vector< Float_t > fRelQE;
vector< Float_t > fRelQEwWC; //with Winston cone efficiency
vector< Float_t > fRelGain;
Float_t fRelativeTelescopeGain; //the relative gain of the telescope
Float_t fSigmaElectronicNoise; //the sigma of the electronic noise
Float_t fTransitTimeSpread; //Transit time spread of the photoelectron making it to the output of the photo sensor (RMS) nanoseconds
//Blur optical PSF and optical efficieny
Float_t fWinstonConeEfficiency; //The efficiency of the Winstoncone
Bool_t bBlurPSF;
Float_t fBlurSigma; //sigma in mm by which the optical PSF
//is blured furthery of the Winstoncone
//Other Telescope Data
Float_t TelXpos; //x coordinate of the telescope position, comes from the photon input file
Float_t TelYpos; //y coordinate of the telescope position, comes from the photon input file
Float_t TelZpos; //y coordinate of the telescope position, comes from the photon input file
Float_t OpticsTransitTime; //Transit time for the photons through the optics
private:
void SetParametersFromConfigFile(ReadConfig *readConfig );
void SetupArrays(); //initializes all arrays
Bool_t bDebug;
TRandom3 *rand; //Our random number generator
Int_t iTelID;
Int_t iTelIDinSuperArray;
Int_t iTelType; //What telescope type we have
};
#endif