Logo ROOT  
Reference Guide
RooVoigtian.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id: RooVoigtian.h,v 1.7 2007/07/12 20:30:49 wouter Exp $
5 * Authors: *
6 * TS, Thomas Schietinger, SLAC, schieti@slac.stanford.edu *
7 * *
8 * Copyright (c) 2000-2005, Regents of the University of California *
9 * and Stanford University. All rights reserved. *
10 * *
11 * Redistribution and use in source and binary forms, *
12 * with or without modification, are permitted according to the terms *
13 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
14 *****************************************************************************/
15
16#ifndef ROO_VOIGTIAN
17#define ROO_VOIGTIAN
18
19#include <RooAbsPdf.h>
20#include <RooRealProxy.h>
21
22class RooVoigtian : public RooAbsPdf {
23public:
25 RooVoigtian(const char *name, const char *title,
26 RooAbsReal& _x, RooAbsReal& _mean,
27 RooAbsReal& _width, RooAbsReal& _sigma,
28 bool doFast = false);
29 RooVoigtian(const RooVoigtian& other, const char* name=nullptr) ;
30 TObject* clone(const char* newname) const override { return new RooVoigtian(*this,newname); }
31
32 /// Enable the fast evaluation of the complex error function using look-up
33 /// tables (default is the "slow" CERNlib algorithm).
34 inline void selectFastAlgorithm() { _doFast = true; }
35
36 /// Disable the fast evaluation of the complex error function using look-up
37 /// tables (default is the "slow" CERNlib algorithm).
38 inline void selectDefaultAlgorithm() { _doFast = false; }
39
40protected:
41
46
47 double evaluate() const override ;
48 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
49 inline bool canComputeBatchWithCuda() const override { return true; }
50
51private:
52
53 bool _doFast = false;
54 ClassDefOverride(RooVoigtian,2) // Voigtian PDF (Gauss (x) BreitWigner)
55};
56
57#endif
58
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
char name[80]
Definition: TGX11.cxx:110
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooVoigtian is an efficient implementation of the convolution of a Breit-Wigner with a Gaussian,...
Definition: RooVoigtian.h:22
RooRealProxy x
Definition: RooVoigtian.h:42
void selectDefaultAlgorithm()
Disable the fast evaluation of the complex error function using look-up tables (default is the "slow"...
Definition: RooVoigtian.h:38
bool canComputeBatchWithCuda() const override
Definition: RooVoigtian.h:49
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Voigtian distribution.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooVoigtian.cxx:81
bool _doFast
Definition: RooVoigtian.h:53
void selectFastAlgorithm()
Enable the fast evaluation of the complex error function using look-up tables (default is the "slow" ...
Definition: RooVoigtian.h:34
TObject * clone(const char *newname) const override
Definition: RooVoigtian.h:30
RooRealProxy sigma
Definition: RooVoigtian.h:45
RooRealProxy mean
Definition: RooVoigtian.h:43
RooRealProxy width
Definition: RooVoigtian.h:44
Mother of all ROOT objects.
Definition: TObject.h:41
static void output()