|
qupid 0.2
Quasi-Signal Generation Model for Pixelized Detector
|
Abstract pixel-matrix digitizer: owns the injected signals and the matrix geometry; concrete classes define the pixel layout. More...
#include <QPDigitizerBase.hpp>
Public Member Functions | |
| virtual | ~QPDigitizerBase () |
| Does not delete the injected signals; see the class warning. | |
| virtual void | Delete () |
| Cleanup hook; currently a no-op. | |
| void | InjectSignal (QPSignalBase *signal) |
| Hands a signal to the digitizer, which takes ownership: the default ClearSignal() deletes it. | |
| QPSignalBase * | GetSignal (int i) const |
Borrowed pointer to injected signal i; the digitizer keeps ownership. | |
| int | GetNSignal () const |
| void | ClearSignal (bool removeall=true) |
| Empties the signal store. | |
| virtual double | GetAnalogSignal (const double &x, const double &y) |
| Summed signal density of all injected signals at (x, y), | |
| virtual QPPixelBase * | GetPixel (const int index) |
| Pixel by linear index. | |
| virtual QPPixelBase * | GetPixel (const int i, const int j) |
| Pixel by grid index. | |
| std::deque< QPPixelBase * > | GetFiredPixel (double threshold) |
Builds every pixel and keeps those whose digital signal exceeds threshold; the rest are deleted internally. | |
| int | GetNPixel () const |
| double | GetSizeX () const |
| double | GetSizeY () const |
| int | GetNPixelX () const |
| int | GetNPixelY () const |
Protected Member Functions | |
| QPDigitizerBase (int npix) | |
Protected Attributes | |
| double | fSize [2] |
| matrix extent {x, y}, µm | |
| int | fNpix [2] |
| number of pixels {x, y} | |
Abstract pixel-matrix digitizer: owns the injected signals and the matrix geometry; concrete classes define the pixel layout.
Lengths are in µm, amplitudes and thresholds in electrons.
Definition at line 15 of file QPDigitizerBase.hpp.
|
virtual |
Does not delete the injected signals; see the class warning.
Definition at line 8 of file QPDigitizerBase.cpp.
|
protected |
| npix | total number of pixels |
Definition at line 6 of file QPDigitizerBase.cpp.
|
virtual |
Cleanup hook; currently a no-op.
Definition at line 10 of file QPDigitizerBase.cpp.
| void QPDigitizerBase::InjectSignal | ( | QPSignalBase * | signal | ) |
Hands a signal to the digitizer, which takes ownership: the default ClearSignal() deletes it.
| signal | heap-allocated signal |
Definition at line 12 of file QPDigitizerBase.cpp.
Referenced by QPMonteCarlo::Shoot().
| QPSignalBase * QPDigitizerBase::GetSignal | ( | int | i | ) | const |
Borrowed pointer to injected signal i; the digitizer keeps ownership.
| i | signal index |
i is outside [0, GetNSignal()) Definition at line 25 of file QPDigitizerBase.cpp.
References GetNSignal().
Referenced by GetAnalogSignal(), and QPPixelBase::GetDigitalSignal().
| int QPDigitizerBase::GetNSignal | ( | ) | const |
Definition at line 30 of file QPDigitizerBase.cpp.
Referenced by GetAnalogSignal(), QPPixelBase::GetDigitalSignal(), and GetSignal().
| void QPDigitizerBase::ClearSignal | ( | bool | removeall = true | ) |
Empties the signal store.
| removeall | when true (default), every injected signal is deleted; when false, only the pointers are dropped and ownership returns to the caller |
Definition at line 34 of file QPDigitizerBase.cpp.
Referenced by QPMonteCarlo::Shoot().
|
virtual |
Summed signal density of all injected signals at (x, y), 
| x | evaluation point x, µm |
| y | evaluation point y, µm |
Definition at line 59 of file QPDigitizerBase.cpp.
References GetNSignal(), QPSignalBase::GetSignal(), and GetSignal().
Referenced by QPGraphFactory::AnalogSignal().
|
virtual |
Pixel by linear index.
The base implementation prints a warning and returns nullptr (stand-in for a pure virtual); concrete digitizers return a newly allocated pixel owned by the caller.
| index | linear pixel index |
Reimplemented in QPDigitizerSquare.
Definition at line 16 of file QPDigitizerBase.cpp.
Referenced by QPGraphFactory::DigitalSignal(), QPGraphFactory::DigitizedSignal(), QPGraphFactory::DrawDigitalSignalText(), and GetFiredPixel().
|
virtual |
Pixel by grid index.
Same contract as GetPixel(int): the base prints a warning and returns nullptr; implementations return a caller-owned pixel.
| i | pixel index along x |
| j | pixel index along y |
Reimplemented in QPDigitizerSquare.
Definition at line 20 of file QPDigitizerBase.cpp.
| std::deque< QPPixelBase * > QPDigitizerBase::GetFiredPixel | ( | double | threshold | ) |
Builds every pixel and keeps those whose digital signal exceeds threshold; the rest are deleted internally.
| threshold | firing threshold, electrons |
Definition at line 43 of file QPDigitizerBase.cpp.
References QPPixelBase::GetDigitalSignal(), GetNPixel(), and GetPixel().
Referenced by QPMonteCarlo::Shoot().
|
inline |
Definition at line 68 of file QPDigitizerBase.hpp.
Referenced by GetFiredPixel().
|
inline |
Definition at line 71 of file QPDigitizerBase.hpp.
References fSize.
Referenced by QPGraphFactory::DrawDigitalSignalText().
|
inline |
Definition at line 73 of file QPDigitizerBase.hpp.
References fSize.
Referenced by QPGraphFactory::AnalogSignal(), QPGraphFactory::DigitalSignal(), QPGraphFactory::DigitizedSignal(), and QPGraphFactory::DrawDigitalSignalText().
|
inline |
Definition at line 75 of file QPDigitizerBase.hpp.
References fNpix.
Referenced by QPGraphFactory::DigitalSignal(), QPGraphFactory::DigitizedSignal(), and QPGraphFactory::DrawDigitalSignalText().
|
inline |
Definition at line 77 of file QPDigitizerBase.hpp.
References fNpix.
Referenced by QPGraphFactory::DigitalSignal(), and QPGraphFactory::DigitizedSignal().
|
protected |
matrix extent {x, y}, µm
Definition at line 82 of file QPDigitizerBase.hpp.
Referenced by QPDigitizerSquare::GetPixel(), GetSizeX(), GetSizeY(), and QPDigitizerSquare::QPDigitizerSquare().
|
protected |
number of pixels {x, y}
Definition at line 83 of file QPDigitizerBase.hpp.
Referenced by GetNPixelX(), GetNPixelY(), QPDigitizerSquare::GetPixel(), QPDigitizerSquare::GetPixel(), and QPDigitizerSquare::QPDigitizerSquare().