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

Exponential tail below the photopeak, convolved with the resolution. More...

#include <RooFitPhotopeakPdfs.hpp>

Inheritance diagram for RooLowExpTail:
Collaboration diagram for RooLowExpTail:

Public Member Functions

 RooLowExpTail ()
 Default constructor for ROOT I/O; leaves proxies unbound.
 RooLowExpTail (const char *name, const char *title, RooAbsReal &x, RooAbsReal &mu, RooAbsReal &sigma, RooAbsReal &tau_ratio)
 Construct the component and bind its parameters.
 RooLowExpTail (const RooLowExpTail &other, const char *name=nullptr)
 Copy constructor used by RooFit when cloning a model.
TObject * clone (const char *newname=nullptr) const override
 RooFit clone hook.
Int_t getAnalyticalIntegral (RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
 Advertise the analytic integral over the observable.
Double_t analyticalIntegral (Int_t code, const char *rangeName=nullptr) const override
 Evaluate the analytic integral advertised above.
void doEval (RooFit::EvalContext &ctx) const override
 Batched evaluation over every event in one pass.
bool canComputeBatchWithCuda () const override
 Whether doEval() can consume device-resident buffers.

Protected Member Functions

Double_t evaluate () const override
 Scalar evaluation for a single observable value.

Protected Attributes

RooRealProxy x_
RooRealProxy mu_
RooRealProxy sigma_
RooRealProxy tau_ratio_

Detailed Description

Exponential tail below the photopeak, convolved with the resolution.

Models incomplete charge collection and charge trapping, which move counts from the peak to lower energies. The density is the analytic convolution of a one-sided exponential with a Gaussian, evaluated as exp(a) * erfc(b) in a form that avoids intermediate overflow by folding the two exponentials together and switching to the large-argument expansion of the scaled complementary error function.

Definition at line 139 of file RooFitPhotopeakPdfs.hpp.

Constructor & Destructor Documentation

◆ RooLowExpTail() [1/3]

RooLowExpTail::RooLowExpTail ( )
inline

Default constructor for ROOT I/O; leaves proxies unbound.

Definition at line 142 of file RooFitPhotopeakPdfs.hpp.

Referenced by clone(), and RooLowExpTail().

◆ RooLowExpTail() [2/3]

RooLowExpTail::RooLowExpTail ( const char * name,
const char * title,
RooAbsReal & x,
RooAbsReal & mu,
RooAbsReal & sigma,
RooAbsReal & tau_ratio )

Construct the component and bind its parameters.

Parameters
nameRooFit object name, unique within the workspace.
titleHuman-readable title.
xObservable (energy).
muPeak centroid, in the observable's units.
sigmaGaussian resolution; must be positive.
tau_ratioTail decay constant in units of sigma, so tau = tau_ratio * sigma. Dimensionless and positive.

Definition at line 208 of file RooFitPhotopeakPdfs.cpp.

◆ RooLowExpTail() [3/3]

RooLowExpTail::RooLowExpTail ( const RooLowExpTail & other,
const char * name = nullptr )

Copy constructor used by RooFit when cloning a model.

Parameters
otherInstance to copy.
nameNew object name, or null to keep other's.

Definition at line 215 of file RooFitPhotopeakPdfs.cpp.

Member Function Documentation

◆ analyticalIntegral()

Double_t RooLowExpTail::analyticalIntegral ( Int_t code,
const char * rangeName = nullptr ) const
override

Evaluate the analytic integral advertised above.

Parameters
codeCode returned by getAnalyticalIntegral(); only 1 is supported.
rangeNameNamed range, or null for the full range.
Returns
The integral over the requested range.

Definition at line 268 of file RooFitPhotopeakPdfs.cpp.

◆ canComputeBatchWithCuda()

bool RooLowExpTail::canComputeBatchWithCuda ( ) const
inlineoverride

Whether doEval() can consume device-resident buffers.

Returns
true in a CUDA build, false in a CPU build.

Definition at line 200 of file RooFitPhotopeakPdfs.hpp.

◆ clone()

TObject * RooLowExpTail::clone ( const char * newname = nullptr) const
inlineoverride

RooFit clone hook.

Parameters
newnameName for the clone, or null to reuse this one's.
Returns
A heap-allocated copy; ownership passes to the caller.

Definition at line 162 of file RooFitPhotopeakPdfs.hpp.

◆ doEval()

void RooLowExpTail::doEval ( RooFit::EvalContext & ctx) const
override

Batched evaluation over every event in one pass.

Hoists the parameter-dependent constants out of the loop and writes one density per event. Dispatches to a CUDA kernel when built with CUDA support and handed device-resident buffers; otherwise runs an OpenMP host loop.

Parameters
ctxRooFit evaluation context supplying inputs and the output span.

Definition at line 230 of file RooFitPhotopeakPdfs.cpp.

◆ evaluate()

Double_t RooLowExpTail::evaluate ( ) const
overrideprotected

Scalar evaluation for a single observable value.

Returns
The unnormalised density, floored at 1e-300; zero if the parameters are non-physical.

Definition at line 220 of file RooFitPhotopeakPdfs.cpp.

◆ getAnalyticalIntegral()

Int_t RooLowExpTail::getAnalyticalIntegral ( RooArgSet & allVars,
RooArgSet & analVars,
const char * rangeName = nullptr ) const
override

Advertise the analytic integral over the observable.

Parameters
allVarsVariables RooFit offers to integrate over.
analVarsFilled with those handled analytically.
rangeNameNamed range, or null for the full range.
Returns
1 if the integral over x is available, 0 otherwise.

Definition at line 260 of file RooFitPhotopeakPdfs.cpp.

Member Data Documentation

◆ mu_

RooRealProxy RooLowExpTail::mu_
protected

◆ sigma_

RooRealProxy RooLowExpTail::sigma_
protected

◆ tau_ratio_

RooRealProxy RooLowExpTail::tau_ratio_
protected

◆ x_

RooRealProxy RooLowExpTail::x_
protected

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