1#include "QPGraphFactory.hpp"
2#include "QPDigitizerBase.hpp"
3#include "QPPixelBase.hpp"
15 TH2D * h =
new TH2D(TString::Format(
"hfact_%s_an", fName.c_str()),
"AnalogSignal",
16 ndiv, -sizeX/2, sizeX/2, ndiv, -sizeY/2, sizeY/2);
17 for(
int i=1; i<=ndiv; i++){
18 for(
int j=1; j<=ndiv; j++){
19 double x = h->GetXaxis()->GetBinCenter(i);
20 double y = h->GetYaxis()->GetBinCenter(j);
24 h->SetBinContent(i,j,val);
27 h->GetZaxis()->SetRangeUser(0.1, h->GetBinContent(h->GetMaximumBin()));
36 TH2D * h =
new TH2D(TString::Format(
"hfact_%s_dl", fName.c_str()),
"DigitalSignal",
37 ndivX, -sizeX/2, sizeX/2, ndivY, -sizeY/2, sizeY/2);
38 for(
int i=0; i<ndivX; i++){
39 for(
int j=0; j<ndivY; j++){
41 h->SetBinContent(i+1,j+1,val);
44 h->GetZaxis()->SetRangeUser(0.1, h->GetBinContent(h->GetMaximumBin()));
53 TH2D * h =
new TH2D(TString::Format(
"hfact_%s_dd", fName.c_str()),
"DigitizedSignal",
54 ndivX, -sizeX/2, sizeX/2, ndivY, -sizeY/2, sizeY/2);
55 for(
int i=0; i<ndivX; i++){
56 for(
int j=0; j<ndivY; j++){
59 h->SetBinContent(i+1,j+1,1);
61 h->SetBinContent(i+1,j+1,0);
65 h->GetZaxis()->SetRangeUser(0, 1);
77 for(
int i=0; i<binx; i++){
78 for(
int j=0; j<biny; j++){
84 xc = pitx*i + offsetx;
85 yc = pity*j + offsety;
87 xc = h->GetXaxis()->GetBinCenter(i+1);
88 yc = h->GetYaxis()->GetBinCenter(j+1);
95 TText* t =
new TText(xc, yc, TString::Format(
"%.0f", val));
97 t->SetTextColor(kWhite);
Abstract pixel-matrix digitizer: owns the injected signals and the matrix geometry; concrete classes ...
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.
QPGraphFactory(QPDigitizerBase *digitizer, std::string name)
void DrawDigitalSignalText(TH2D *h=nullptr)
Draws each pixel's digital value as a TText on the current pad.
QPDigitizerBase * GetDigitizer() const
TH2D * AnalogSignal(int ndiv=100)
ndiv×ndiv sampling of GetAnalogSignal over the matrix.
TH2D * DigitizedSignal(double threshold=0.1)
Binary fired-pixel map: 1 where the digital signal exceeds threshold, 0 elsewhere.
TH2D * DigitalSignal()
One bin per pixel, filled with the pixel's integrated digital signal (electrons).
void DrawPixelLinse(TH2D *h=nullptr)
Not implemented; the body is empty.
double GetDigitalSignal()
Total collected charge of the pixel: GetDigitalSignalOne summed over every signal injected into the d...