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

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

#include <RooFitPhotopeakPdfs.hpp>

Inheritance diagram for RooLowLinTail:
Collaboration diagram for RooLowLinTail:

Public Member Functions

 RooLowLinTail ()
 Default constructor for ROOT I/O; leaves proxies unbound.
 RooLowLinTail (const char *name, const char *title, RooAbsReal &x, RooAbsReal &mu, RooAbsReal &sigma, RooAbsReal &slope)
 Construct the component and bind its parameters.
 RooLowLinTail (const RooLowLinTail &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 slope_

Detailed Description

Linear tail below the photopeak, convolved with the resolution.

Captures asymmetric low-side tailing that a single exponential describes poorly. The linear factor (1 + slope * (x - mu)) is floored at zero to keep the density non-negative, as RooFit normalisation requires; the TF1 backend in FittingUtils applies no such constraint, so a fit that hits the floor will not agree between the two backends.

Definition at line 225 of file RooFitPhotopeakPdfs.hpp.

Constructor & Destructor Documentation

◆ RooLowLinTail() [1/3]

RooLowLinTail::RooLowLinTail ( )
inline

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

Definition at line 228 of file RooFitPhotopeakPdfs.hpp.

Referenced by clone(), and RooLowLinTail().

◆ RooLowLinTail() [2/3]

RooLowLinTail::RooLowLinTail ( const char * name,
const char * title,
RooAbsReal & x,
RooAbsReal & mu,
RooAbsReal & sigma,
RooAbsReal & slope )

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.
slopeSlope of the linear factor (1 + slope * (x - mu)), in inverse units of the observable.

Definition at line 289 of file RooFitPhotopeakPdfs.cpp.

◆ RooLowLinTail() [3/3]

RooLowLinTail::RooLowLinTail ( const RooLowLinTail & 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 296 of file RooFitPhotopeakPdfs.cpp.

Member Function Documentation

◆ analyticalIntegral()

Double_t RooLowLinTail::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 349 of file RooFitPhotopeakPdfs.cpp.

◆ canComputeBatchWithCuda()

bool RooLowLinTail::canComputeBatchWithCuda ( ) const
inlineoverride

Whether doEval() can consume device-resident buffers.

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

Definition at line 286 of file RooFitPhotopeakPdfs.hpp.

◆ clone()

TObject * RooLowLinTail::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 248 of file RooFitPhotopeakPdfs.hpp.

◆ doEval()

void RooLowLinTail::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 310 of file RooFitPhotopeakPdfs.cpp.

◆ evaluate()

Double_t RooLowLinTail::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 301 of file RooFitPhotopeakPdfs.cpp.

◆ getAnalyticalIntegral()

Int_t RooLowLinTail::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 341 of file RooFitPhotopeakPdfs.cpp.

Member Data Documentation

◆ mu_

RooRealProxy RooLowLinTail::mu_
protected

◆ sigma_

RooRealProxy RooLowLinTail::sigma_
protected

◆ slope_

RooRealProxy RooLowLinTail::slope_
protected

◆ x_

RooRealProxy RooLowLinTail::x_
protected

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