FairRoot/PandaRoot
|
#include <PndDiscSensorGridPhotodetector.h>
Classes | |
struct | PixelTraits |
Public Member Functions | |
SensorGridPhotodetector (SensorGridBase *sensor_grid_, bool per_pixel_traits_, double const &pde_init, double const &noise_rate_init, double const &time_res_init) | |
void | SetPixel (int pixel_id, double efficiency, double noise_rate, double time_res_ns) |
void | UseInhomogenityFactor (bool flag) |
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: More... | |
void | GenerateNoise (double const &time_start_ns, double const &time_window_ns, std::vector< std::pair< int, double > > &hits) const |
Generate noise hits. More... | |
virtual double | GetPDE (const double &) const |
Derived classes should override this function and return the average pde of the sensor. More... | |
virtual double | GetInhomegenityFactor (double const &, double const &) const |
Derived classes should override this function to account for spatial PDE deviations (e.g. due to gain inhomgenity) More... | |
double | GetSmearedTime (double const &time_value, PixelInfo const &pixel_info) const |
Apply time smearing. More... | |
int | GenerateNoise (double const &time_start_ns, double const &time_window_ns) |
Reinit noise iterator and return number of noise hits. More... | |
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. More... | |
void | SetDCR (double const &dcr_Hz) |
Set the dark count rate for all pixels to dcr_Hz. More... | |
const SensorGridBase * | GetGrid () |
Protected Member Functions | |
SensorGridPhotodetector () | |
virtual | ~SensorGridPhotodetector () |
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). More... | |
Protected Attributes | |
bool | per_pixel_traits |
bool | use_inhomogenity_factor |
PixelTraits * | pixel_traits |
SensorGridBase * | sensor_grid |
int | noisegen_pixel_number |
double | noisegen_time_start_ns |
double | noisegen_time_window_ns |
int | noisegen_n_hits |
int | noisegen_current_hit |
double | noisegen_current_time_sigma |
Definition at line 20 of file PndDiscSensorGridPhotodetector.h.
SensorGrid::SensorGridPhotodetector::SensorGridPhotodetector | ( | SensorGridBase * | sensor_grid_, |
bool | per_pixel_traits_, | ||
double const & | pde_init, | ||
double const & | noise_rate_init, | ||
double const & | time_res_init | ||
) |
Definition at line 26 of file PndDiscSensorGridPhotodetector.cxx.
References Init().
|
inlineprotected |
Definition at line 28 of file PndDiscSensorGridPhotodetector.h.
|
inlineprotectedvirtual |
Definition at line 29 of file PndDiscSensorGridPhotodetector.h.
int SensorGrid::SensorGridPhotodetector::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:
Detection of a hit.
Definition at line 62 of file PndDiscSensorGridPhotodetector.cxx.
References SensorGrid::PixelInfo::column_on_grid, SensorGrid::SensorGridPhotodetector::PixelTraits::efficiency, GetInhomegenityFactor(), GetPDE(), SensorGrid::PixelInfo::grid_id, per_pixel_traits, SensorGrid::PixelInfo::pixel_number, pixel_traits, SensorGrid::SensorGridBase::PositionToPixel(), SensorGrid::PixelInfo::row_on_grid, sensor_grid, SensorGrid::SensorGridPhotodetector::PixelTraits::time_res_ns, and use_inhomogenity_factor.
Referenced by PndDiscTaskDigitization::Exec().
void SensorGrid::SensorGridPhotodetector::GenerateNoise | ( | double const & | time_start_ns, |
double const & | time_window_ns, | ||
std::vector< std::pair< int, double > > & | hits | ||
) | const |
Generate noise hits.
Generate noise on the sensor.
Definition at line 91 of file PndDiscSensorGridPhotodetector.cxx.
References SensorGrid::SensorGridBase::GetNumberOfPixels(), hit, hits, i, SensorGrid::SensorGridPhotodetector::PixelTraits::noise_rate, per_pixel_traits, pixel_traits, and sensor_grid.
int SensorGrid::SensorGridPhotodetector::GenerateNoise | ( | double const & | time_start_ns, |
double const & | time_window_ns | ||
) |
Reinit noise iterator and return number of noise hits.
Definition at line 115 of file PndDiscSensorGridPhotodetector.cxx.
References noisegen_current_hit, noisegen_n_hits, noisegen_pixel_number, noisegen_time_start_ns, and noisegen_time_window_ns.
|
inline |
Definition at line 71 of file PndDiscSensorGridPhotodetector.h.
References sensor_grid.
Referenced by PndDiscTaskDigitization::Exec().
|
inlinevirtual |
Derived classes should override this function to account for spatial PDE deviations (e.g. due to gain inhomgenity)
This function is used to implement inhomogenitites over the whole sensor, which cannot be treated as single pixel efficiencies, e.g. if the pixels are large compared to the spatial deviation of the inhomogenity.
Definition at line 56 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect().
bool SensorGrid::SensorGridPhotodetector::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.
Definition at line 127 of file PndDiscSensorGridPhotodetector.cxx.
References SensorGrid::SensorGridBase::GetNumberOfPixels(), SensorGrid::SensorGridPhotodetector::PixelTraits::noise_rate, noisegen_current_hit, noisegen_current_time_sigma, noisegen_n_hits, noisegen_pixel_number, noisegen_time_start_ns, noisegen_time_window_ns, per_pixel_traits, pixel_traits, sensor_grid, and SensorGrid::SensorGridPhotodetector::PixelTraits::time_res_ns.
|
inlinevirtual |
Derived classes should override this function and return the average pde of the sensor.
Per pixel deviations of the PDE can be taken into account by including them in a individual pixel efficiency.
Reimplemented in DiscDIRC_Photodetector.
Definition at line 48 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect().
double SensorGrid::SensorGridPhotodetector::GetSmearedTime | ( | double const & | hit_time_ns, |
PixelInfo const & | pixel_info | ||
) | const |
Apply time smearing.
Can be used to smear the time of noise entries. Noise is returned with its true time stamp for dead-time handling and an additional smeared time would increase the array, so it appears to me that it is more handy to smear afterwards. A better way might be a noise iterator which generates one hit at a time (-> implemented, will be tested).
Definition at line 171 of file PndDiscSensorGridPhotodetector.cxx.
References per_pixel_traits, SensorGrid::PixelInfo::pixel_number, pixel_traits, and SensorGrid::SensorGridPhotodetector::PixelTraits::time_res_ns.
|
protected |
Initialization - can also be used in derived class ctors (avoid code duplication).
Definition at line 34 of file PndDiscSensorGridPhotodetector.cxx.
References SensorGrid::SensorGridPhotodetector::PixelTraits::efficiency, SensorGrid::SensorGridBase::GetNumberOfPixels(), i, SensorGrid::SensorGridBase::LockGrid(), SensorGrid::SensorGridPhotodetector::PixelTraits::noise_rate, per_pixel_traits, pixel_traits, sensor_grid, and SensorGrid::SensorGridPhotodetector::PixelTraits::time_res_ns.
Referenced by DiscDIRC_Photodetector::Init(), and SensorGridPhotodetector().
void SensorGrid::SensorGridPhotodetector::SetDCR | ( | double const & | dcr_Hz | ) |
Set the dark count rate for all pixels to dcr_Hz.
Will set the DCR for all pixels to dcr_Hz. The current implementation does not provide the functionality to model statistical fluctuations in the DCR.
Definition at line 185 of file PndDiscSensorGridPhotodetector.cxx.
References SensorGrid::SensorGridBase::GetNumberOfPixels(), i, SensorGrid::SensorGridPhotodetector::PixelTraits::noise_rate, per_pixel_traits, pixel_traits, and sensor_grid.
void SensorGrid::SensorGridPhotodetector::SetPixel | ( | int | pixel_id, |
double | efficiency, | ||
double | noise_rate, | ||
double | time_res_ns | ||
) |
|
inline |
Definition at line 35 of file PndDiscSensorGridPhotodetector.h.
References use_inhomogenity_factor.
|
protected |
Definition at line 83 of file PndDiscSensorGridPhotodetector.h.
Referenced by GenerateNoise(), and GetNoiseHit().
|
protected |
Definition at line 84 of file PndDiscSensorGridPhotodetector.h.
Referenced by GetNoiseHit().
|
protected |
Definition at line 82 of file PndDiscSensorGridPhotodetector.h.
Referenced by GenerateNoise(), and GetNoiseHit().
|
protected |
Definition at line 79 of file PndDiscSensorGridPhotodetector.h.
Referenced by GenerateNoise(), and GetNoiseHit().
|
protected |
Definition at line 80 of file PndDiscSensorGridPhotodetector.h.
Referenced by GenerateNoise(), and GetNoiseHit().
|
protected |
Definition at line 81 of file PndDiscSensorGridPhotodetector.h.
Referenced by GenerateNoise(), and GetNoiseHit().
|
protected |
Definition at line 74 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect(), GenerateNoise(), GetNoiseHit(), GetSmearedTime(), Init(), and SetDCR().
|
protected |
Definition at line 76 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect(), GenerateNoise(), GetNoiseHit(), GetSmearedTime(), Init(), and SetDCR().
|
protected |
Definition at line 77 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect(), GenerateNoise(), GetGrid(), GetNoiseHit(), Init(), and SetDCR().
|
protected |
Definition at line 75 of file PndDiscSensorGridPhotodetector.h.
Referenced by Detect(), and UseInhomogenityFactor().