GosSiP  1.32
daqMC.h
Go to the documentation of this file.
1 #ifndef daqMC_h
2 #define daqMC_h
3 
4 
5 #include "HitMatrix.h"
6 #include "PhotonSource.h"
7 #include "sipmMC.h"
8 
9 #include <TRandom3.h>
10 #include <TGraph.h>
11 #include <TH1.h>
12 #include <TF1.h>
13 #include <TGraph.h>
14 #include <TGraphErrors.h>
15 #include <TLegend.h>
16 #include <stdlib.h>
17 #include <vector>
18 #include <TROOT.h>
19 #include <string>
20 #include <RQ_OBJECT.h>
21 
22 using std::vector;
23 using std::cout;
24 using std::endl;
25 
27 {
28  TGraphErrors *response;
29  TGraphErrors *resolution;
30  TGraphErrors *responsePE;
31  TGraphErrors *resolutionPE;
32  TGraphErrors *responseDR;
33  TGraphErrors *resolutionDR;
34  TGraphErrors *responseAP;
35  TGraphErrors *resolutionAP;
36  TGraphErrors *responseCT;
37  TGraphErrors *resolutionCT;
38  TGraphErrors *responseENF;
39  TGraphErrors *resolutionENF;
40  TGraphErrors *responseEN;
41  TGraphErrors *resolutionEN;
42 };
43 
47 class daqMC{
48  RQ_OBJECT("daqMC")
49 
50  public:
51 
52  daqMC();
53  ~daqMC();
54 
56  void SetSiPM( sipmMC *mySiPM){ sipm = mySiPM; };
58  void SetPhotonSource( PhotonSource *myPhotonSource ){ photonSource = myPhotonSource; };
59  void Statistic( int N );
60  TGraph* Scope();
61  TH1D* QDCSpectrum( int N );
62  TGraph* ThreshScan( double gate, double tstart, double tstop, double tstep );
63  TH1D* TDCSpectrum( int N );
64  GResonseCurve DynamicRange( int N, double Ngamma_max, double Ngamma_step );
66  double QDC( double charge );
68  void SetQDCChannels( int nChannels ){ h_QDC->SetBins(nChannels,0,nChannels); };
70  void SetPedestal( double Pedestal ){ pedestal = Pedestal; };
72  void SetDiscriMinTime( double mintime ){ discriMinTime = mintime; };
74  void SetDiscriWidth( double width ){ discriWidth = width; };
75 
76  TGraph* Discriminator( TGraph* waveform, double threshold );
78  // void ScanCT( int ); /**<Single pixel scan.*/
79 
80  void Progress( int ); //*SIGNAL*
81 
83  TGraph *g_threshScan;
84  TH1D *h_pe;
85  TH1D *h_dr;
86  TH1D *h_xt;
87  TH1D *h_ap;
88  TH1D *h_QDC;
89  TH1D *h_TDC;
90  // TGraph *g_wf; /**<Oscilloscope waveform*/
91 
92 
93  bool cancel;
94  double progress;
96  private:
97 
98  bool Check();
99 
100  double pedestal;
101 
102  int nTDC_channels;
103 
104  TRandom3 r;
105  HitMatrix* hitMatrix;
106  vector<double> hit;
107  sipmMC* sipm;
108  PhotonSource* photonSource;
109 
110  double discriMinTime;
111  double discriWidth;
112 
113  int plast;
114 
115  TLegend* legend;
116  TLegend* legend2;
117 
118 };
119 
120 #endif
TGraphErrors * responseEN
Definition: daqMC.h:40
TGraphErrors * resolutionEN
Definition: daqMC.h:41
Definition: HitMatrix.h:25
TGraph * g_threshScan
Definition: daqMC.h:83
TH1D * h_QDC
Definition: daqMC.h:88
bool cancel
Definition: daqMC.h:93
void SetPedestal(double Pedestal)
Definition: daqMC.h:70
Definition: daqMC.h:26
Definition: daqMC.h:47
void SetDiscriMinTime(double mintime)
Definition: daqMC.h:72
Definition: sipmMC.h:39
TH1D * h_pe
Definition: daqMC.h:84
TGraphErrors * resolutionPE
Definition: daqMC.h:31
void SetDiscriWidth(double width)
Definition: daqMC.h:74
TH1D * h_TDC
Definition: daqMC.h:89
void SetPhotonSource(PhotonSource *myPhotonSource)
Definition: daqMC.h:58
TH1D * h_xt
Definition: daqMC.h:86
TGraphErrors * resolutionDR
Definition: daqMC.h:33
void SetSiPM(sipmMC *mySiPM)
Definition: daqMC.h:56
TGraphErrors * responseENF
Definition: daqMC.h:38
double progress
Definition: daqMC.h:94
Definition: PhotonSource.h:19
TH1D * h_ap
Definition: daqMC.h:87
TGraphErrors * resolutionENF
Definition: daqMC.h:39
TGraphErrors * responseDR
Definition: daqMC.h:32
TGraphErrors * response
Definition: daqMC.h:28
void SetQDCChannels(int nChannels)
Definition: daqMC.h:68
TGraphErrors * resolutionCT
Definition: daqMC.h:37
TGraphErrors * responsePE
Definition: daqMC.h:30
TH1D * h_dr
Definition: daqMC.h:85
TGraphErrors * resolutionAP
Definition: daqMC.h:35
GResonseCurve responseCurve
Definition: daqMC.h:82
TGraphErrors * resolution
Definition: daqMC.h:29
TGraphErrors * responseCT
Definition: daqMC.h:36
TGraphErrors * responseAP
Definition: daqMC.h:34