GosSiP  1.32
sipmMC.h
Go to the documentation of this file.
1 #ifndef sipmMC_h
2 #define sipmMC_h
3 
4 #include "HitMatrix.h"
5 #include "PhotonList.h"
6 
7 #include <TROOT.h>
8 #include <TRandom3.h>
9 #include <TGraph.h>
10 #include <TH1.h>
11 #include <TH2.h>
12 #include <TF1.h>
13 #include <TGraphErrors.h>
14 #include <stdlib.h>
15 #include <vector>
16 #include <string>
17 
18 using std::vector;
19 using std::cout;
20 using std::endl;
21 using std::string;
22 
23 struct GCharge
24 {
25  double all;
26  double pe;
27  double dr;
28  double ct;
29  double ap;
30  double enf;
31  double en;
32 };
33 
39 class sipmMC{
40 
41  public:
42 
43  sipmMC();
44  ~sipmMC();
45 
46  int NpixX;
47  int NpixY;
48  double xSipm;
49  double ySipm;
50  double tau_recovery;
51  double PDE;
52  double Pxt;
53  double Pap_s;
54  double Pap_f;
55  double tau_ap_s;
56  double tau_ap_f;
57  double tau_dr;
58  double gain;
59  double ENF;
60  double EN;
61  double signalAmp;
62  double noiseRMS;
63  double jitter;
65  double Generate( PhotonList photons );
66  int GetParaFile( const char* filename );
67  void SetGeometry( string Geometry );
68  void SetGeometry( TH2I* hgeometry );
69  void SetPulseShape( double Tau1, double Tau2 );
70  void SetPulseShape( TF1* pulse_shape );
71  void UpdatePulseShape();
72  void SetSampling( double Sampling );
73  void SetCutoff( double Cutoff );
74  void SetGate( double Gate, bool gateCut=true );
75  void SetPreGate( double preGate );
76  void SetSpectralSensitivity( TGraph* spect );
77  void SetSpectralSensitivity( const char* file );
79  TGraph* GetWaveform();
81  double GetCharge(){ return charge.all; };
83  GCharge GetChargeDecomp(){ return charge; };
85  double GetGate(){ return gate; };
87  TF1* GetPulseShape(){ return f_pulse_shape; };
89  HitMatrix* GetHitMatrix(){ return hitMatrix; };
91  int GetNpix(){ return Npix; };
93  double GetSampling(){ return sampling; };
94 
95  private:
96 
97  TF1* f_pulse_shape;
98  TF1* f_pulse_shape_intern;
99  double pulse_shape_func_max;
100  double pulse_shape_func_range;
101  bool update_pulse_shape;
102 
103  TGraph* g_spectral;
104 
105  int Npix;
106  HitMatrix* hitMatrix;
107  TGraph* g_waveform;
108  TGraph g_pulse_charge;
109  double pulseIntegral;
110  int n_pulse_samples;
111  GCharge charge;
112  double gate;
113  double pre_gate;
114 
115  TRandom3 r;
116  vector<double> hit;
117  PhotonList photonList;
118  TH2I* h_geometry;
119  double sampling;
120  double cutOff;
121  double tau1, tau2;
122 
123  void Reset();
124  void ImportPhotons( PhotonList photons );
125  void InitHitMatrix();
126 };
127 
128 #endif
double tau_ap_s
Definition: sipmMC.h:55
double enf
Definition: sipmMC.h:30
double Pap_f
Definition: sipmMC.h:54
double all
Definition: sipmMC.h:25
double Pap_s
Definition: sipmMC.h:53
double ap
Definition: sipmMC.h:29
Definition: HitMatrix.h:25
double pe
Definition: sipmMC.h:26
TF1 * GetPulseShape()
Definition: sipmMC.h:87
double GetCharge()
Definition: sipmMC.h:81
double EN
Definition: sipmMC.h:60
Definition: PhotonList.h:17
double en
Definition: sipmMC.h:31
Definition: sipmMC.h:39
double tau_ap_f
Definition: sipmMC.h:56
HitMatrix * GetHitMatrix()
Definition: sipmMC.h:89
double GetGate()
Definition: sipmMC.h:85
double jitter
Definition: sipmMC.h:63
double Pxt
Definition: sipmMC.h:52
double PDE
Definition: sipmMC.h:51
double GetSampling()
Definition: sipmMC.h:93
double gain
Definition: sipmMC.h:58
double ySipm
Definition: sipmMC.h:49
int GetNpix()
Definition: sipmMC.h:91
int NpixY
Definition: sipmMC.h:47
double tau_dr
Definition: sipmMC.h:57
GCharge GetChargeDecomp()
Definition: sipmMC.h:83
int NpixX
Definition: sipmMC.h:46
double signalAmp
Definition: sipmMC.h:61
double noiseRMS
Definition: sipmMC.h:62
double ct
Definition: sipmMC.h:28
double ENF
Definition: sipmMC.h:59
double xSipm
Definition: sipmMC.h:48
Definition: sipmMC.h:23
double tau_recovery
Definition: sipmMC.h:50
double dr
Definition: sipmMC.h:27