84 if (!TString(
"exp(-@0/@1)").CompareTo(name))
return expBasisPlus ;
85 if (!TString(
"exp(@0/@1)").CompareTo(name))
return expBasisMinus ;
86 if (!TString(
"exp(-abs(@0)/@1)").CompareTo(name))
return expBasisSum ;
87 if (!TString(
"exp(-@0/@1)*sin(@0*@2)").CompareTo(name))
return sinBasisPlus ;
88 if (!TString(
"exp(@0/@1)*sin(@0*@2)").CompareTo(name))
return sinBasisMinus ;
89 if (!TString(
"exp(-abs(@0)/@1)*sin(@0*@2)").CompareTo(name))
return sinBasisSum ;
90 if (!TString(
"exp(-@0/@1)*cos(@0*@2)").CompareTo(name))
return cosBasisPlus ;
91 if (!TString(
"exp(@0/@1)*cos(@0*@2)").CompareTo(name))
return cosBasisMinus ;
92 if (!TString(
"exp(-abs(@0)/@1)*cos(@0*@2)").CompareTo(name))
return cosBasisSum ;
93 if (!TString(
"(@0/@1)*exp(-@0/@1)").CompareTo(name))
return linBasisPlus ;
94 if (!TString(
"(@0/@1)*(@0/@1)*exp(-@0/@1)").CompareTo(name))
return quadBasisPlus ;
95 if (!TString(
"exp(-@0/@1)*cosh(@0*@2/2)").CompareTo(name))
return coshBasisPlus;
96 if (!TString(
"exp(@0/@1)*cosh(@0*@2/2)").CompareTo(name))
return coshBasisMinus;
97 if (!TString(
"exp(-abs(@0)/@1)*cosh(@0*@2/2)").CompareTo(name))
return coshBasisSum;
98 if (!TString(
"exp(-@0/@1)*sinh(@0*@2/2)").CompareTo(name))
return sinhBasisPlus;
99 if (!TString(
"exp(@0/@1)*sinh(@0*@2/2)").CompareTo(name))
return sinhBasisMinus;
100 if (!TString(
"exp(-abs(@0)/@1)*sinh(@0*@2/2)").CompareTo(name))
return sinhBasisSum;
159 if ((basisSign==
Minus &&
x>0) ||
160 (basisSign==
Plus &&
x<0))
return 0 ;
180 return exp(-tscaled)*tscaled ;
184 return exp(-tscaled)*tscaled*tscaled;
267 if (tau==0)
return 1 ;
268 if ((basisSign !=
Minus) && (
x.
max(rangeName)>0)) {
269 result += tau*(-
exp(-
x.
max(rangeName)/
tau) - -
exp(-max(0.,
x.
min(rangeName))/tau) ) ;
271 if ((basisSign !=
Plus) && (
x.
min(rangeName)<0)) {
272 result -= tau*(-
exp(-max(0.,
x.
min(rangeName))/tau)) - -tau*
exp(-
x.
max(rangeName)/
tau) ;
280 if (tau==0)
return 0 ;
283 if (basisSign !=
Plus) result -=
exp(
x.
min(rangeName)/
tau)*(-1/tau*
sin(dm*(-
x.
min(rangeName))) - dm*
cos(dm*(-
x.
min(rangeName)))) + dm ;
284 return result / (1/(tau*
tau) + dm*dm) ;
289 if (tau==0)
return 1 ;
292 if (basisSign !=
Plus) result +=
exp(
x.
min(rangeName)/
tau)*(-1/tau*
cos(dm*(-
x.
min(rangeName))) + dm*
sin(dm*(-
x.
min(rangeName)))) + 1/tau ;
293 return result / (1/(tau*
tau) + dm*dm) ;
297 if (tau==0)
return 0 ;
299 return tau*( 1 - (1 + t_max)*
exp(-t_max) ) ;
303 if (tau==0)
return 0 ;
305 return tau*( 2 - (2 + (2 + t_max)*t_max)*
exp(-t_max) ) ;
310 if (tau==0)
return 0 ;
314 if (basisSign !=
Minus) result += 0.5*( taup*(1-
exp(-
x.
max(rangeName)/taup)) - taum*(1-
exp(-
x.
max(rangeName)/taum)) ) ;
315 if (basisSign !=
Plus) result -= 0.5*( taup*(1-
exp(
x.
min(rangeName)/taup)) - taum*(1-
exp(
x.
min(rangeName)/taum)) ) ;
321 if (tau==0)
return 1 ;
325 if (basisSign !=
Minus) result += 0.5*( taup*(1-
exp(-
x.
max(rangeName)/taup)) + taum*(1-
exp(-
x.
max(rangeName)/taum)) ) ;
326 if (basisSign !=
Plus) result += 0.5*( taup*(1-
exp(
x.
min(rangeName)/taup)) + taum*(1-
exp(
x.
min(rangeName)/taum)) ) ;
345 return new RooGenContext(dynamic_cast<const RooAbsPdf&>(convPdf), vars, prototype,
346 auxProto, verbose, &forceDirect) ;
356 if (
matchArgs(directVars,generateVars,
x))
return 1 ;
RooTruthModel is an implementation of RooResolution model that provides a delta-function resolution m...
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
Double_t getVal(const RooArgSet *set=0) const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Advertise analytical integrals for compiled basis functions and when used as p.d.f without basis func...
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implement analytical integrals when used as p.d.f and for compiled basis functions.
RooRealVar & convVar() const
Return the convolution variable of the resolution model.
const RooFormulaVar & basis() const
virtual ~RooTruthModel()
Destructor.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t tau
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &convPdf, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooRealVar represents a fundamental (non-derived) real valued object.
void generateEvent(Int_t code)
Implement internal generator for observable x, x=0 for all events following definition of delta funct...
virtual void changeBasis(RooFormulaVar *basis)
Changes associated bases function to 'inBasis'.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
RooDataSet is a container class to hold unbinned data.
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
Double_t min(const char *rname=0) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t max(const char *rname=0) const
virtual Double_t evaluate() const
Evaluate the truth model: a delta function when used as PDF, the basis function itself, when convoluted with a basis function.
void addServer(RooAbsArg &server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
void removeServer(RooAbsArg &server, Bool_t force=kFALSE)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Advertise internal generator for observable x.
virtual Int_t basisCode(const char *name) const
Return basis code for given basis definition string.
virtual const char * GetTitle() const
Returns title of object.