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 RooRealVar;
23
24class RooVoigtian : public RooAbsPdf {
25public:
27 RooVoigtian(const char *name, const char *title,
28 RooAbsReal& _x, RooAbsReal& _mean,
29 RooAbsReal& _width, RooAbsReal& _sigma,
30 bool doFast = false);
31 RooVoigtian(const RooVoigtian& other, const char* name=nullptr) ;
32 TObject* clone(const char* newname) const override { return new RooVoigtian(*this,newname); }
33 inline ~RooVoigtian() override { }
34
35// These methods allow the user to select the fast evaluation
36// of the complex error function using look-up tables
37// (default is the "slow" CERNlib algorithm)
38
39 inline void selectFastAlgorithm() { _doFast = true; }
40 inline void selectDefaultAlgorithm() { _doFast = false; }
41
42protected:
43
48
49 double evaluate() const override ;
50 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
51 inline bool canComputeBatchWithCuda() const override { return true; }
52
53private:
54
55 bool _doFast;
56 ClassDefOverride(RooVoigtian,2) // Voigtian PDF (Gauss (x) BreitWigner)
57};
58
59#endif
60
#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
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
RooVoigtian is an efficient implementation of the convolution of a Breit-Wigner with a Gaussian,...
Definition: RooVoigtian.h:24
RooRealProxy x
Definition: RooVoigtian.h:44
void selectDefaultAlgorithm()
Definition: RooVoigtian.h:40
bool canComputeBatchWithCuda() const override
Definition: RooVoigtian.h:51
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:67
bool _doFast
Definition: RooVoigtian.h:55
~RooVoigtian() override
Definition: RooVoigtian.h:33
void selectFastAlgorithm()
Definition: RooVoigtian.h:39
TObject * clone(const char *newname) const override
Definition: RooVoigtian.h:32
RooRealProxy sigma
Definition: RooVoigtian.h:47
RooRealProxy mean
Definition: RooVoigtian.h:45
RooRealProxy width
Definition: RooVoigtian.h:46
Mother of all ROOT objects.
Definition: TObject.h:41
static void output()