qupid 0.2
Quasi-Signal Generation Model for Pixelized Detector
Loading...
Searching...
No Matches
QPGraphFactory Class Reference

Renders a digitizer's analog/digital/thresholded views as ROOT TH2D histograms (libqupidVis). More...

#include </home/runner/work/qupid/qupid/vis/include/QPGraphFactory.hpp>

Public Member Functions

 QPGraphFactory (QPDigitizerBase *digitizer, std::string name)
 
TH2D * AnalogSignal (int ndiv=100)
 ndiv×ndiv sampling of GetAnalogSignal over the matrix.
 
TH2D * DigitalSignal ()
 One bin per pixel, filled with the pixel's integrated digital signal (electrons).
 
TH2D * DigitizedSignal (double threshold=0.1)
 Binary fired-pixel map: 1 where the digital signal exceeds threshold, 0 elsewhere.
 
void DrawDigitalSignalText (TH2D *h=nullptr)
 Draws each pixel's digital value as a TText on the current pad.
 
void DrawPixelLinse (TH2D *h=nullptr)
 Not implemented; the body is empty.
 
QPDigitizerBase * GetDigitizer () const
 

Detailed Description

Renders a digitizer's analog/digital/thresholded views as ROOT TH2D histograms (libqupidVis).

Friend of the digitizer classes. Every histogram is heap-allocated and owned by the caller (subject to the usual ROOT directory ownership rules).

Warning
All three histogram builders take both axis ranges from GetSizeY(), and DrawDigitalSignalText takes the y pixel count from GetNPixelX(): the output is laid out correctly only for square matrices.

Definition at line 17 of file QPGraphFactory.hpp.

Constructor & Destructor Documentation

◆ QPGraphFactory()

QPGraphFactory::QPGraphFactory ( QPDigitizerBase *  digitizer,
std::string  name = "fac1" 
)
Parameters
digitizerdigitizer to render; not owned
nametag used in the histogram names (hfact_<name>_an / _dl / _dd)

Definition at line 8 of file QPGraphFactory.cpp.

Member Function Documentation

◆ AnalogSignal()

TH2D * QPGraphFactory::AnalogSignal ( int  ndiv = 100)

ndiv×ndiv sampling of GetAnalogSignal over the matrix.

Parameters
ndivbins per axis
Returns
caller-owned histogram of the analog signal density

Definition at line 12 of file QPGraphFactory.cpp.

References QPDigitizerBase::GetAnalogSignal(), GetDigitizer(), and QPDigitizerBase::GetSizeY().

◆ DigitalSignal()

TH2D * QPGraphFactory::DigitalSignal ( )

One bin per pixel, filled with the pixel's integrated digital signal (electrons).

Returns
caller-owned histogram of the digital signal

Definition at line 31 of file QPGraphFactory.cpp.

References QPPixelBase::GetDigitalSignal(), GetDigitizer(), QPDigitizerBase::GetNPixelX(), QPDigitizerBase::GetNPixelY(), QPDigitizerBase::GetPixel(), and QPDigitizerBase::GetSizeY().

◆ DigitizedSignal()

TH2D * QPGraphFactory::DigitizedSignal ( double  threshold = 0.1)

Binary fired-pixel map: 1 where the digital signal exceeds threshold, 0 elsewhere.

Parameters
thresholdfiring threshold, electrons
Returns
caller-owned histogram of the thresholded signal

Definition at line 48 of file QPGraphFactory.cpp.

References QPPixelBase::GetDigitalSignal(), GetDigitizer(), QPDigitizerBase::GetNPixelX(), QPDigitizerBase::GetNPixelY(), QPDigitizerBase::GetPixel(), and QPDigitizerBase::GetSizeY().

◆ DrawDigitalSignalText()

void QPGraphFactory::DrawDigitalSignalText ( TH2D *  h = nullptr)

Draws each pixel's digital value as a TText on the current pad.

The text objects are left to the pad.

Parameters
hhistogram whose bin centers position the labels; when nullptr the positions are computed from the digitizer geometry

Definition at line 69 of file QPGraphFactory.cpp.

References QPPixelBase::GetDigitalSignal(), GetDigitizer(), QPDigitizerBase::GetNPixelX(), QPDigitizerBase::GetPixel(), QPDigitizerBase::GetSizeX(), and QPDigitizerBase::GetSizeY().

◆ DrawPixelLinse()

void QPGraphFactory::DrawPixelLinse ( TH2D *  h = nullptr)

Not implemented; the body is empty.

Parameters
hunused

Definition at line 107 of file QPGraphFactory.cpp.

◆ GetDigitizer()

QPDigitizerBase * QPGraphFactory::GetDigitizer ( ) const
inline
Returns
the rendered digitizer; not owned

Definition at line 49 of file QPGraphFactory.hpp.

Referenced by AnalogSignal(), DigitalSignal(), DigitizedSignal(), and DrawDigitalSignalText().


The documentation for this class was generated from the following files: