Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
RooFitPhotopeakPdfs.hpp File Reference

Custom RooFit PDF components for gamma-ray photopeak fitting. More...

#include <RooAbsPdf.h>
#include <RooAbsReal.h>
#include <RooFit/EvalContext.h>
#include <RooRealProxy.h>
Include dependency graph for RooFitPhotopeakPdfs.hpp:

Go to the source code of this file.

Classes

class  RooStepShelf
 Resolution-smeared step on the low side of the photopeak. More...
class  RooLowExpTail
 Exponential tail below the photopeak, convolved with the resolution. More...
class  RooLowLinTail
 Linear tail below the photopeak, convolved with the resolution. More...
class  RooHighExpTail
 Exponential tail above the photopeak, convolved with the resolution. More...

Detailed Description

Custom RooFit PDF components for gamma-ray photopeak fitting.

Four RooAbsPdf components modelling the departures from a pure Gaussian seen in semiconductor detectors: a step shelf from energy escaping the active volume, low-energy tails from incomplete charge collection, and a high-energy tail from pileup. They are combined with a Gaussian and a background into a RooAddPdf by RooFitUtils.

Conventions shared by all four:

  • Every component is written in terms of y = x - mu, and every shape parameter is expressed relative to the resolution sigma, so the shapes stay meaningful as the resolution floats.
  • The exponential tails take a dimensionless tau_ratio; the decay constant is tau = tau_ratio * sigma.
  • Densities are floored at 1e-300 rather than being allowed to reach zero. A component that evaluates to exactly zero across the fit range integrates to zero, and RooFit's extended Range() projection then forms a 0/0 ratio and yields NaN. The floor is negligible wherever the real density is not.
  • Non-physical parameters (sigma <= 0, tau_ratio <= 0) yield zero from the scalar path and the density floor from the batch path, rather than raising.
  • Each implements doEval() so a likelihood pass is vectorised over events instead of dispatching a scalar evaluate() per event, and each provides an analytic integral over x so normalisation is not numeric.
  • When built with -DAU_USE_CUDA=ON, canComputeBatchWithCuda() reports true and doEval() dispatches to the kernels in RooFitPhotopeakKernels.hpp whenever RooFit supplies device-resident buffers. In a CPU build it reports false and the OpenMP host loop runs.
Note
These classes carry ROOT dictionaries (see include/LinkDef.h), which is what makes them usable from Cling and PyROOT. The default constructors exist for I/O and leave the proxies unbound; do not evaluate a default-constructed instance.

Definition in file RooFitPhotopeakPdfs.hpp.