PandaRoot
PndDiscSensorGridPhotodetector.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------
2 // Author: Oliver Merle (Oliver.Merle@exp2.physik.uni-giessen.de)
3 // Changes: Mustafa Schmidt (Mustafa.A.Schmidt@physik.uni-giessen.de)
4 // Date: 30.11.2015
5 // Description: Class to handle tiled sensors
6 //-------------------------------------------------------------------------
7 
8 #ifndef SensorGridPhotodetector_HH
9 #define SensorGridPhotodetector_HH
10 
11 #include <vector>
12 
13 namespace SensorGrid {
14 
15 class SensorGridBase;
16 struct PixelInfo;
17 
19  private:
20  struct PixelTraits;
21 
22  public:
23  SensorGridPhotodetector(SensorGridBase *sensor_grid_, bool per_pixel_traits_, double const &pde_init, double const &noise_rate_init, double const &time_res_init);
24 
25  protected:
26  SensorGridPhotodetector(){}; // for use in derived classes
28  void Init(SensorGridBase *sensor_grid_, bool per_pixel_traits_, double const &efficiency_init, double const &noise_rate_init, double const &time_res_init);
29 
30  public:
31  // Per pixel data initialization:
32  void SetPixel(int pixel_id, double efficiency, double noise_rate, double time_res_ns);
33  void UseInhomogenityFactor(bool flag) { use_inhomogenity_factor = flag; }
34 
36  int Detect(double const &hit_pos_x, double const &hit_pos_y, double const &hit_time_ns, double const &wavelength_nm, PixelInfo &pixel_info, double &smeared_time_ns) const;
37 
39  void GenerateNoise(double const &time_start_ns, double const &time_window_ns, std::vector<std::pair<int, double>> &hits) const;
40 
42 
45  virtual double GetPDE(const double &) const { return 1.0; } // FIXME // wavelength_nm //[R.K.03/2017] unused variable(s)
46 
48 
52  virtual double GetInhomegenityFactor(double const &, double const &) const { return 1.0; } // FIXME//hit_pos_x hit_pos_y//[R.K.03/2017] unused variable(s)
53 
55  double GetSmearedTime(double const &time_value, PixelInfo const &pixel_info) const;
56 
58  int GenerateNoise(double const &time_start_ns, double const &time_window_ns);
59 
61  bool GetNoiseHit(int &pixel_number, double &hit_time_ns, double &smeared_time_ns);
62 
64  void SetDCR(double const &dcr_Hz);
65 
66  const SensorGridBase *GetGrid() { return sensor_grid; }
67 
68  protected:
71  PixelTraits *pixel_traits;
73  // state of noise generator:
80 };
81 
82 } // namespace SensorGrid
83 
84 #endif // SensorGridPhotodetector_HH
void SetDCR(double const &dcr_Hz)
Set the dark count rate for all pixels to dcr_Hz.
Common base class for sensor grids.
bool GetNoiseHit(int &pixel_number, double &hit_time_ns, double &smeared_time_ns)
Noise hit generator function which has to be called after GenerateNoise() to retrieve the noise hits...
void SetPixel(int pixel_id, double efficiency, double noise_rate, double time_res_ns)
double GetSmearedTime(double const &time_value, PixelInfo const &pixel_info) const
Apply time smearing.
int Detect(double const &hit_pos_x, double const &hit_pos_y, double const &hit_time_ns, double const &wavelength_nm, PixelInfo &pixel_info, double &smeared_time_ns) const
Handle photon detection:
virtual double GetInhomegenityFactor(double const &, double const &) const
Derived classes should override this function to account for spatial PDE deviations (e...
void Init(SensorGridBase *sensor_grid_, bool per_pixel_traits_, double const &efficiency_init, double const &noise_rate_init, double const &time_res_init)
virtual double GetPDE(const double &) const
Derived classes should override this function and return the average pde of the sensor.
void GenerateNoise(double const &time_start_ns, double const &time_window_ns, std::vector< std::pair< int, double >> &hits) const
Generate noise hits.