Quasi-Signal Generation Model for Pixelized Detector.
qupid models the charge a traversing particle deposits on a pixelized silicon sensor as an analytic 2D distribution, rather than running a full Geant4/TCAD simulation. It integrates that distribution over a pixel matrix, applies a firing threshold, and studies the resulting cluster size by Monte Carlo. Geometry and units follow ALPIDE-like sensors: lengths in µm (pixel pitch 29.24 × 26.88), signal amplitude in electrons (3.6 eV per electron-hole pair), a typical firing threshold of 250 e⁻.
The signal is an amplitude times a 2D probability density. QPSignalGaussian
takes the density from a mean vector and a covariance matrix, so σx, σy, and a
rotation are all free. A digitizer sums the injected signals and integrates the
analog field over each cell of the pixel matrix; QPDigitizerSquare is a
uniform rectangular grid. Pixels whose integrated signal exceeds the threshold
are the fired pixels, and their count is the cluster size. QPMonteCarlo runs
this chain over randomized events and emits one record per event. Random
numbers come through the QPRandomBase interface; the default implementation,
QPRandom, uses std::mt19937_64.
The supporting linear algebra and math (QPVector, QPMatrix, QPMath —
Gaussian variants, Woods-Saxon, rotation matrices, ellipse geometry) are
hand-written and use nothing beyond the standard library.
- Core (
libqupid): a standard C++17 toolchain, nothing else. The signal model, digitizer, pixel integration, RNG, and Monte Carlo driver all live here. - Visualization (
libqupidVis, fromvis/): ROOT.QPGraphFactoryrenders a digitizer's analog, digital, and thresholded views as ROOTTH2Dhistograms. This module is optional and built only when ROOT is present.
ROOT's TRandom can drive the Monte Carlo in place of QPRandom through the
header-only adapter vis/include/QPRandomTRandom.hpp; only an executable that
includes it links ROOT.
CMake ≥ 3.16.
cmake -B build
cmake --build build -jBy default (QUPID_WITH_ROOT=ON) CMake looks for ROOT and builds libqupidVis
and the ROOT-dependent tests when it is found; if ROOT is missing it builds the
core alone and reports that it did. To leave ROOT out entirely:
cmake -B build -DQUPID_WITH_ROOT=OFF
cmake --build build -jEither way libqupid and the core tests are built. Executables land in the
build directory and write their output (.csv, .root, .pdf) to the current
directory, so run them from there.
The programs in test/ double as usage examples, ordered from primitives to
the full pipeline. test0_VectorMatrix, test3_digitizer, and
test7_montecarlo_csv build and run without ROOT (test7 writes the Monte
Carlo output as CSV). test1, test2, test4, test5, and test6 use ROOT
for plotting or tree output and are built only in the ROOT configuration.
tutorials/ collects short, commented programs, built through the same core /
ROOT split as the tests:
- defining a Gaussian signal and integrating its density (core only);
- a digitizer and the fired-pixel cluster size at a threshold (core only);
- a Monte Carlo run to CSV (core only);
- visualization with
QPGraphFactoryand theTRandomadapter (ROOT).
The API documentation is generated with Doxygen (doc/Doxyfile) and published
to GitHub Pages on each push to master:
https://isaac-kwon.github.io/qupid/. For a ROOT interactive session,
rootlogon.C loads libqupid and libqupidVis and applies the plotting
style.
Ported from the Python version, pyqupid.