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

Resolution-smeared step on the low side of the photopeak. More...

#include <RooFitPhotopeakPdfs.hpp>

Inheritance diagram for RooStepShelf:
Collaboration diagram for RooStepShelf:

Public Member Functions

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

Detailed Description

Resolution-smeared step on the low side of the photopeak.

Models events where part of the photon energy escapes the active volume, producing a step-like shelf below the peak, smeared by the detector resolution. Built from a sigmoid in z = (x - mu) / sigma, squared, which gives a shelf that falls smoothly to zero above the centroid.

Definition at line 55 of file RooFitPhotopeakPdfs.hpp.

Constructor & Destructor Documentation

◆ RooStepShelf() [1/3]

RooStepShelf::RooStepShelf ( )
inline

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

Definition at line 58 of file RooFitPhotopeakPdfs.hpp.

Referenced by clone(), and RooStepShelf().

◆ RooStepShelf() [2/3]

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

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.

Definition at line 136 of file RooFitPhotopeakPdfs.cpp.

◆ RooStepShelf() [3/3]

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

Member Function Documentation

◆ analyticalIntegral()

Double_t RooStepShelf::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 190 of file RooFitPhotopeakPdfs.cpp.

◆ canComputeBatchWithCuda()

bool RooStepShelf::canComputeBatchWithCuda ( ) const
inlineoverride

Whether doEval() can consume device-resident buffers.

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

Definition at line 114 of file RooFitPhotopeakPdfs.hpp.

◆ clone()

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

◆ doEval()

void RooStepShelf::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 155 of file RooFitPhotopeakPdfs.cpp.

◆ evaluate()

Double_t RooStepShelf::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 145 of file RooFitPhotopeakPdfs.cpp.

◆ getAnalyticalIntegral()

Int_t RooStepShelf::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 182 of file RooFitPhotopeakPdfs.cpp.

Member Data Documentation

◆ mu_

RooRealProxy RooStepShelf::mu_
protected

◆ sigma_

RooRealProxy RooStepShelf::sigma_
protected

◆ x_

RooRealProxy RooStepShelf::x_
protected

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