82 std::string str =
name;
85 str.erase(remove(str.begin(),str.end(),
' '),str.end());
91 if (str ==
"exp(-@0/@1)*sin(@0*@2)")
return sinBasisPlus ;
93 if (str ==
"exp(-abs(@0)/@1)*sin(@0*@2)")
return sinBasisSum ;
94 if (str ==
"exp(-@0/@1)*cos(@0*@2)")
return cosBasisPlus ;
96 if (str ==
"exp(-abs(@0)/@1)*cos(@0*@2)")
return cosBasisSum ;
98 if (str ==
"(@0/@1)*(@0/@1)*exp(-@0/@1)")
return quadBasisPlus ;
101 if (str ==
"exp(-abs(@0)/@1)*cosh(@0*@2/2)")
return coshBasisSum;
102 if (str ==
"exp(-@0/@1)*sinh(@0*@2/2)")
return sinhBasisPlus;
104 if (str ==
"exp(-abs(@0)/@1)*sinh(@0*@2/2)")
return sinhBasisSum;
177 if ((basisSign==
Minus &&
x>0) ||
178 (basisSign==
Plus &&
x<0))
return 0 ;
197 double tscaled =
std::abs((
double)
x)/tau;
198 return exp(-tscaled)*tscaled ;
201 double tscaled =
std::abs((
double)
x)/tau;
202 return exp(-tscaled)*tscaled*tscaled;
225 auto xVals = dataMap.
at(
x);
244 const double basisSign =
static_cast<double>((
BasisSign)(
_basisCode - 10 * (basisType - 1) - 2));
351 const double xmin =
x.
min(rangeName);
352 const double xmax =
x.
max(rangeName);
359 if (tau==0)
return 1 ;
363 if ((basisSign !=
Plus) && (
xmin<0)) {
372 if (tau==0)
return 0 ;
374 if (basisSign !=
Minus) {
384 if (basisSign !=
Plus) {
386 if (term > 0.0) term *= -1/tau*
sin(dm*(-
xmin)) - dm*
cos(dm*(-
xmin));
390 return result / (1/(tau*tau) + dm*dm) ;
395 if (tau==0)
return 1 ;
397 if (basisSign !=
Minus) {
403 if (basisSign !=
Plus) {
405 if(term > 0.0) term *= -1/tau*
cos(dm*(-
xmin)) + dm*
sin(dm*(-
xmin));
409 return result / (1/(tau*tau) + dm*dm) ;
413 if (tau==0)
return 0 ;
414 double t_max =
xmax/tau ;
415 return tau*( 1 - (1 + t_max)*
exp(-t_max) ) ;
419 if (tau==0)
return 0 ;
420 double t_max =
xmax/tau ;
421 return tau*( 2 - (2 + (2 + t_max)*t_max)*
exp(-t_max) ) ;
426 if (tau==0)
return 0 ;
428 double taup = 2*tau/(2-tau*dg);
429 double taum = 2*tau/(2+tau*dg);
437 if (tau==0)
return 1 ;
439 double taup = 2*tau/(2-tau*dg);
440 double taum = 2*tau/(2+tau*dg);
471 if (
matchArgs(directVars,generateVars,
x))
return 1 ;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
void removeServer(RooAbsArg &server, bool force=false)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
const RefCountList_t & servers() const
List of all servers of this object.
void addServer(RooAbsArg &server, bool valueProp=true, bool shapeProp=false, std::size_t refCount=1)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooDataSet is a container class to hold unbinned data.
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
bool _ownBasis
Flag indicating ownership of _basis.
Int_t _basisCode
Identifier code for selected basis function.
RooAbsRealLValue & convVar() const
Return the convolution variable of the resolution model.
RooFormulaVar * _basis
Basis function convolved with this resolution model.
const RooFormulaVar & basis() const
RooTemplateProxy< RooAbsRealLValue > x
Dependent/convolution variable.
A simple container to hold a batch of data values.
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
RooTruthModel is an implementation of RooResolution model that provides a delta-function resolution m...
void generateEvent(Int_t code) override
Implement internal generator for observable x, x=0 for all events following definition of delta funct...
double evaluate() const override
Evaluate the truth model: a delta function when used as PDF, the basis function itself,...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Advertise analytical integrals for compiled basis functions and when used as p.d.f without basis func...
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const override
Advertise internal generator for observable x.
void computeBatch(cudaStream_t *, double *output, size_t size, RooFit::Detail::DataMap const &) const override
Base function for computing multiple values of a RooAbsReal.
~RooTruthModel() override
Destructor.
RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &convPdf, const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false) const override
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implement analytical integrals when used as p.d.f and for compiled basis functions.
Int_t basisCode(const char *name) const override
Return basis code for given basis definition string.
void changeBasis(RooFormulaVar *basis) override
Changes associated bases function to 'inBasis'.
const char * GetTitle() const override
Returns title of object.
RVec< PromoteType< T > > cosh(const RVec< T > &v)
RVec< PromoteType< T > > abs(const RVec< T > &v)
RVec< PromoteType< T > > cos(const RVec< T > &v)
RVec< PromoteType< T > > sinh(const RVec< T > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...