FairRoot/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 
12 #include <vector>
13 
14 namespace SensorGrid {
15 
16 class SensorGridBase;
17 struct PixelInfo;
18 
19 
21 {
22 private: struct PixelTraits;
23 public:
24  SensorGridPhotodetector(SensorGridBase* sensor_grid_, bool per_pixel_traits_,
25  double const & pde_init, double const & noise_rate_init, double const & time_res_init);
26 
27 protected:
28  SensorGridPhotodetector() {}; // for use in derived classes
30  void Init(SensorGridBase* sensor_grid_, bool per_pixel_traits_, double const & efficiency_init, double const & noise_rate_init, double const & time_res_init);
31 
32 public:
33  // Per pixel data initialization:
34  void SetPixel(int pixel_id, double efficiency, double noise_rate, double time_res_ns);
36 
38  int Detect(double const & hit_pos_x, double const & hit_pos_y, double const & hit_time_ns,
39  double const & wavelength_nm, PixelInfo & pixel_info, double & smeared_time_ns) const;
40 
42  void GenerateNoise(double const & time_start_ns, double const & time_window_ns, std::vector<std::pair<int, double> > & hits) const;
43 
45 
48  virtual double GetPDE(const double & ) const {return 1.0;} //FIXME // wavelength_nm //[R.K.03/2017] unused variable(s)
49 
50 
52 
56  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)
57 
59  double GetSmearedTime(double const & time_value, PixelInfo const & pixel_info) const;
60 
61 
63  int GenerateNoise(double const & time_start_ns, double const & time_window_ns);
64 
66  bool GetNoiseHit(int & pixel_number, double & hit_time_ns, double & smeared_time_ns);
67 
69  void SetDCR(double const & dcr_Hz);
70 
71  const SensorGridBase * GetGrid() {return sensor_grid;}
72 
73 protected:
78  // state of noise generator:
85 };
86 
87 
88 } // namespace SensorGrid
89 
90 #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)
void GenerateNoise(double const &time_start_ns, double const &time_window_ns, std::vector< std::pair< int, double > > &hits) const
Generate noise hits.
void Init(SensorGridBase *sensor_grid_, bool per_pixel_traits_, double const &efficiency_init, double const &noise_rate_init, double const &time_res_init)
Initialization - can also be used in derived class ctors (avoid code duplication).
virtual double GetPDE(const double &) const
Derived classes should override this function and return the average pde of the sensor.
CbmHit * hits[nHits]
Definition: RiemannTest.C:19
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:
double GetSmearedTime(double const &time_value, PixelInfo const &pixel_info) const
Apply time smearing.
virtual double GetInhomegenityFactor(double const &, double const &) const
Derived classes should override this function to account for spatial PDE deviations (e...