Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
Data fitting

Data fit functionalities of Hydra. More...

Collaboration diagram for Data fitting:

Files

file  AddPdf.h
 Include this file to get the classes and functions necessary to build-up composed PDF models.
 
file  LogLikelihood.h
 
file  LogLikelihood1.h
 

Data Structures

class  hydra::FCN< T, E >
 FCN base class. More...
 
class  hydra::FCN< Estimator< PDF, Iterator >, true >
 
class  hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >
 
class  hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >
 
struct  hydra::Parameter
 
, More...
 
class  hydra::Pdf< FUNCTOR, INTEGRATOR >
 Class representing probability density functions. More...
 
class  hydra::PDFSumExtendable< PDF1, PDF2, PDFs >
 Class representing a pdf object built summing up other pdfs. More...
 
class  hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >
 Class representing a pdf object built summing a pdf adding other pdfs. More...
 
class  hydra::SPlot< Iterator, PDF1, PDF2, PDFs >
 Implementation of {s}_{Plot} technique for statistical unfolding of sample containing events from different sources. More...
 
class  hydra::UserParameters
 Class implementing a interface to ROOT::Minuit2::MnUserParameters. More...
 
class  LogLikelihoodFCN< PDFSumExtendable< Pdfs::::::>
 ...> More...
 

Functions

template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumNonExtendable< PDF1, PDF2, PDFs... > hydra::add_pdfs (std::array< Parameter, sizeof...(PDFs)+1 >const &var_list, PDF1 const &pdf1, PDF2 const &pdf2, PDFs const &...pdfs)
 Function to build up non-extendable pdfs models. More...
 
template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumExtendable< PDF1, PDF2, PDFs... > hydra::add_pdfs (std::array< Parameter, sizeof...(PDFs)+2 >const &var_list, PDF1 const &pdf1, PDF2 const &pdf2, PDFs const &...pdfs)
 Function to build up extendable pdfs models. More...
 
template<typename... Pdfs, typename Iterator , typename ... Iterators>
std::enable_if< detail::is_iterator< Iterator >::value &&detail::are_iterators< Iterators... >::value, LogLikelihoodFCN< PDFSumExtendable< Pdfs... >, Iterator, Iterators... > >::type hydra::make_loglikehood_fcn (PDFSumExtendable< Pdfs... > const &functor, Iterator first, Iterator last, Iterators... weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename Functor , typename Integrator , typename Iterator , typename ... Iterators>
std::enable_if< detail::is_iterator< Iterator >::value &&detail::are_iterators< Iterators... >::value, LogLikelihoodFCN< Pdf< Functor, Integrator >, Iterator, Iterators... > >::type hydra::make_loglikehood_fcn (Pdf< Functor, Integrator > const &pdf, Iterator first, Iterator last, Iterators... weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename... Pdfs, typename Iterator , typename ... Iterators>
std::enable_if< hydra::detail::is_iterator< Iterator >::value &&detail::are_iterators< Iterators... >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, Iterator, Iterators... > >::type hydra::make_loglikehood_fcn (PDFSumNonExtendable< Pdfs... >const &pdf, Iterator first, Iterator last, Iterators... weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename ... Pdfs, typename Iterable , typename... Iterables>
std::enable_if<(!detail::is_iterator< Iterable >::value) &&((sizeof...(Iterables)==0)||!detail::are_iterators< Iterables... >::value) &&(!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference< Iterable >::type >::value) &&(!hydra::detail::is_hydra_sparse_histogram< typename std::remove_reference< Iterable >::type >::value) &&detail::is_iterable< Iterable >::value &&detail::are_iterables< Iterables... >::value, LogLikelihoodFCN< PDFSumExtendable< Pdfs... >, decltype(std::declval< Iterable >).begin()), decltype(std::declval< Iterables >).begin())... > >::type hydra::make_loglikehood_fcn (PDFSumExtendable< Pdfs... > const &functor, Iterable &&points, Iterables &&...weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename Functor , typename Integrator , typename Iterable , typename ... Iterables>
std::enable_if<(!detail::is_iterator< Iterable >::value) &&((sizeof...(Iterables)==0)||!detail::are_iterators< Iterables... >::value) &&(!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference< Iterable >::type >::value) &&(!hydra::detail::is_hydra_sparse_histogram< typename std::remove_reference< Iterable >::type >::value) &&detail::is_iterable< Iterable >::value &&detail::are_iterables< Iterables... >::value, LogLikelihoodFCN< Pdf< Functor, Integrator >, decltype(std::declval< Iterable >).begin()), decltype(std::declval< Iterables >).begin())... > >::type hydra::make_loglikehood_fcn (Pdf< Functor, Integrator > const &pdf, Iterable &&points, Iterables &&... weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename ... Pdfs, typename Iterable , typename ... Iterables>
std::enable_if<(!detail::is_iterator< Iterable >::value) &&((sizeof...(Iterables)==0)||!detail::are_iterators< Iterables... >::value) &&(!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference< Iterable >::type >::value) &&(!hydra::detail::is_hydra_sparse_histogram< typename std::remove_reference< Iterable >::type >::value) &&hydra::detail::is_iterable< Iterable >::value &&detail::are_iterables< Iterables... >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, decltype(std::declval< Iterable >).begin()), decltype(std::declval< Iterables >).begin())... > >::type hydra::make_loglikehood_fcn (PDFSumNonExtendable< Pdfs... > const &functor, Iterable &&points, Iterables &&... weights)
 Conveniency function to build up loglikehood fcns. More...
 
template<typename ... Pdfs, typename Histogram >
std::enable_if< detail::is_hydra_dense_histogram< Histogram >::value||detail::is_hydra_sparse_histogram< Histogram >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, decltype(std::declval< const Histogram & >).GetBinsCenters().begin()), decltype(std::declval< const Histogram & >).GetBinsContents().begin()) > >::type hydra::make_loglikehood_fcn (PDFSumNonExtendable< Pdfs... > const &functor, Histogram const &points)
 Convenience function to build up loglikehood fcns for densely and sparsely binned datasets. More...
 
template<typename Functor , typename Integrator , typename Histogram >
std::enable_if< detail::is_hydra_dense_histogram< Histogram >::value||detail::is_hydra_sparse_histogram< Histogram >::value, LogLikelihoodFCN< Pdf< Functor, Integrator >, decltype(std::declval< const Histogram >).GetBinsCenters().begin()), decltype(std::declval< const Histogram >).GetBinsContents().begin())> >::type hydra::make_loglikehood_fcn (Pdf< Functor, Integrator > const &pdf, Histogram const &points)
 Convenience function to build up loglikehood fcns for densely and sparsely binned datasets. More...
 
template<typename FUNCTOR , typename INTEGRATOR >
Pdf< FUNCTOR, INTEGRATOR > hydra::make_pdf (FUNCTOR const &functor, INTEGRATOR integrator)
 Build a hydra::Pdf given a shape described by a functor and a integrator (algorithm or functor). More...
 
template<typename ... ESTIMATORS>
FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > hydra::make_simultaneous_fcn (FCN< ESTIMATORS >const &... fcns)
 Convenience function to build up simultaneous fcn simultaneous. More...
 

Variables

template<typename ... Pdfs, typename Histogram >
std::enable_if< detail::is_hydra_dense_histogram< Histogram >::value||detail::is_hydra_sparse_histogram< Histogram >::value, LogLikelihoodFCN< PDFSumExtendable< Pdfs... >, decltype(std::declval< const Histogram & >).GetBinsCenters().begin()), decltype(std::declval< const Histogram & >).GetBinsContents().begin()) > >::type hydra::make_loglikehood_fcn (PDFSumExtendable< Pdfs... > const &pdf, Histogram const &data)
 Convenience function to build up loglikehood fcns for densely and sparsely binned datasets. More...
 

Detailed Description

Data fit functionalities of Hydra.


Data Structure Documentation

◆ hydra::FCN

class hydra::FCN

template<typename T, bool E = detail::is_hydra_estimator<T>::value>
class hydra::FCN< T, E >

FCN base class.

Inheritance diagram for hydra::FCN< T, E >:
Collaboration diagram for hydra::FCN< T, E >:

◆ hydra::FCN< Estimator< PDF, Iterator >, true >

class hydra::FCN< Estimator< PDF, Iterator >, true >

template<template< typename ... > class Estimator, typename PDF, typename Iterator>
class hydra::FCN< Estimator< PDF, Iterator >, true >

Template Parameters
Estimatorestimator base class
Iteratoriterator pointing to the data
Iteratorsmore iterators pointing to weights, cache etc.
Inheritance diagram for hydra::FCN< Estimator< PDF, Iterator >, true >:
Collaboration diagram for hydra::FCN< Estimator< PDF, Iterator >, true >:

Public Types

typedef Iterator iterator
 

Public Member Functions

 FCN ()=delete
 
 FCN (PDF const &pdf, Iterator begin, Iterator end)
 
 FCN (FCN< estimator_type, true > const &other)
 
virtual ~FCN ()=default
 
Iterator begin () const
 
Iterator end () const
 
double ErrorDef () const
 
Iterator GetBegin () const
 
size_t GetDataSize () const
 
Iterator GetEnd () const
 
GReal_t GetErrorDef () const
 
GReal_t GetFcnMaxValue () const
 
hydra::UserParametersGetParameters ()
 
const hydra::UserParametersGetParameters () const
 
PDF & GetPDF ()
 
const PDF & GetPDF () const
 
virtual GReal_t operator() (const std::vector< double > &parameters) const
 
FCN< estimator_type, true > & operator= (FCN< estimator_type, true > const &other)
 
void SetBegin (Iterator begin)
 
void SetEnd (Iterator end)
 
void SetErrorDef (double error)
 
void SetFcnMaxValue (GReal_t fcnMaxValue)
 
void SetParameters (const hydra::UserParameters &userParameters)
 
double Up () const
 

Member Typedef Documentation

◆ iterator

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
typedef Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::iterator

Constructor & Destructor Documentation

◆ FCN() [1/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
hydra::FCN< Estimator< PDF, Iterator >, true >::FCN ( )
delete

◆ FCN() [2/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
hydra::FCN< Estimator< PDF, Iterator >, true >::FCN ( PDF const &  pdf,
Iterator  begin,
Iterator  end 
)
inline

◆ FCN() [3/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
hydra::FCN< Estimator< PDF, Iterator >, true >::FCN ( FCN< estimator_type, true > const &  other)
inline

◆ ~FCN()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
virtual hydra::FCN< Estimator< PDF, Iterator >, true >::~FCN ( )
virtualdefault

Member Function Documentation

◆ begin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::begin ( ) const
inline

◆ end()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::end ( ) const
inline

◆ ErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
double hydra::FCN< Estimator< PDF, Iterator >, true >::ErrorDef ( ) const
inline

◆ GetBegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::GetBegin ( ) const
inline

◆ GetDataSize()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
size_t hydra::FCN< Estimator< PDF, Iterator >, true >::GetDataSize ( ) const
inline

◆ GetEnd()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::GetEnd ( ) const
inline

◆ GetErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
GReal_t hydra::FCN< Estimator< PDF, Iterator >, true >::GetErrorDef ( ) const
inline

◆ GetFcnMaxValue()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
GReal_t hydra::FCN< Estimator< PDF, Iterator >, true >::GetFcnMaxValue ( ) const
inline

◆ GetParameters() [1/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
hydra::UserParameters& hydra::FCN< Estimator< PDF, Iterator >, true >::GetParameters ( )
inline

◆ GetParameters() [2/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
const hydra::UserParameters& hydra::FCN< Estimator< PDF, Iterator >, true >::GetParameters ( ) const
inline

◆ GetPDF() [1/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
PDF& hydra::FCN< Estimator< PDF, Iterator >, true >::GetPDF ( )
inline

◆ GetPDF() [2/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
const PDF& hydra::FCN< Estimator< PDF, Iterator >, true >::GetPDF ( ) const
inline

◆ operator()()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
virtual GReal_t hydra::FCN< Estimator< PDF, Iterator >, true >::operator() ( const std::vector< double > &  parameters) const
inlinevirtual

◆ operator=()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
FCN<estimator_type, true>& hydra::FCN< Estimator< PDF, Iterator >, true >::operator= ( FCN< estimator_type, true > const &  other)
inline

◆ SetBegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
void hydra::FCN< Estimator< PDF, Iterator >, true >::SetBegin ( Iterator  begin)
inline

◆ SetEnd()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
void hydra::FCN< Estimator< PDF, Iterator >, true >::SetEnd ( Iterator  end)
inline

◆ SetErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
void hydra::FCN< Estimator< PDF, Iterator >, true >::SetErrorDef ( double  error)
inline

◆ SetFcnMaxValue()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
void hydra::FCN< Estimator< PDF, Iterator >, true >::SetFcnMaxValue ( GReal_t  fcnMaxValue)
inline

◆ SetParameters()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
void hydra::FCN< Estimator< PDF, Iterator >, true >::SetParameters ( const hydra::UserParameters userParameters)
inline

◆ Up()

template<template< typename ... > class Estimator, typename PDF , typename Iterator >
double hydra::FCN< Estimator< PDF, Iterator >, true >::Up ( ) const
inline

◆ hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >

class hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >

template<template< typename ... > class Estimator, typename PDF, typename Iterator, typename ... Iterators>
class hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >

Template Parameters
Estimatorestimator base class
Iteratoriterator pointing to the data
Iteratorsmore iterators pointing to weights, cache etc.
Inheritance diagram for hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >:
Collaboration diagram for hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >:

Public Types

typedef hydra::thrust::zip_iterator< hydra::thrust::tuple< Iterator, Iterators... > > iterator
 
typedef hydra::thrust::zip_iterator< hydra::thrust::tuple< Iterators... > > witerator
 

Public Member Functions

 FCN ()=delete
 
 FCN (PDF const &pdf, Iterator begin, Iterator end, Iterators ...begins)
 
 FCN (FCN< estimator_type, true > const &other)
 
virtual ~FCN ()=default
 
Iterator begin () const
 
Iterator end () const
 
double ErrorDef () const
 
Iterator GetBegin () const
 
size_t GetDataSize () const
 
Iterator GetEnd () const
 
GReal_t GetErrorDef () const
 
GReal_t GetFcnMaxValue () const
 
hydra::UserParametersGetParameters ()
 
const hydra::UserParametersGetParameters () const
 
PDF & GetPDF ()
 
const PDF & GetPDF () const
 
witerator GetWBegin () const
 
witerator GetWEnd () const
 
virtual GReal_t operator() (const std::vector< double > &parameters) const
 
FCN< estimator_type, true > & operator= (FCN< estimator_type, true > const &other)
 
void SetBegin (Iterator begin)
 
void SetEnd (Iterator end)
 
void SetErrorDef (double error)
 
void SetFcnMaxValue (GReal_t fcnMaxValue)
 
void SetParameters (const hydra::UserParameters &userParameters)
 
void SetPDFParameters (const std::vector< double > &parameters) const
 
double Up () const
 
witerator wbegin () const
 
witerator wend () const
 

Member Typedef Documentation

◆ iterator

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
typedef hydra::thrust::zip_iterator<hydra::thrust::tuple<Iterator,Iterators...> > hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::iterator

◆ witerator

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
typedef hydra::thrust::zip_iterator<hydra::thrust::tuple<Iterators...> > hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::witerator

Constructor & Destructor Documentation

◆ FCN() [1/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::FCN ( )
delete

◆ FCN() [2/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::FCN ( PDF const &  pdf,
Iterator  begin,
Iterator  end,
Iterators ...  begins 
)
inline

◆ FCN() [3/3]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::FCN ( FCN< estimator_type, true > const &  other)
inline

◆ ~FCN()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
virtual hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::~FCN ( )
virtualdefault

Member Function Documentation

◆ begin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
Iterator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::begin ( ) const
inline

◆ end()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
Iterator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::end ( ) const
inline

◆ ErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
double hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::ErrorDef ( ) const
inline

◆ GetBegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
Iterator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetBegin ( ) const
inline

◆ GetDataSize()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
size_t hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetDataSize ( ) const
inline

◆ GetEnd()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
Iterator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetEnd ( ) const
inline

◆ GetErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
GReal_t hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetErrorDef ( ) const
inline

◆ GetFcnMaxValue()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
GReal_t hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetFcnMaxValue ( ) const
inline

◆ GetParameters() [1/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
hydra::UserParameters& hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetParameters ( )
inline

◆ GetParameters() [2/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
const hydra::UserParameters& hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetParameters ( ) const
inline

◆ GetPDF() [1/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
PDF& hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetPDF ( )
inline

◆ GetPDF() [2/2]

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
const PDF& hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetPDF ( ) const
inline

◆ GetWBegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
witerator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetWBegin ( ) const
inline

◆ GetWEnd()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
witerator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::GetWEnd ( ) const
inline

◆ operator()()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
virtual GReal_t hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::operator() ( const std::vector< double > &  parameters) const
inlinevirtual

◆ operator=()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
FCN<estimator_type, true>& hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::operator= ( FCN< estimator_type, true > const &  other)
inline

◆ SetBegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetBegin ( Iterator  begin)
inline

◆ SetEnd()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetEnd ( Iterator  end)
inline

◆ SetErrorDef()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetErrorDef ( double  error)
inline

◆ SetFcnMaxValue()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetFcnMaxValue ( GReal_t  fcnMaxValue)
inline

◆ SetParameters()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetParameters ( const hydra::UserParameters userParameters)
inline

◆ SetPDFParameters()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
void hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::SetPDFParameters ( const std::vector< double > &  parameters) const
inline

◆ Up()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
double hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::Up ( ) const
inline

◆ wbegin()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
witerator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::wbegin ( ) const
inline

◆ wend()

template<template< typename ... > class Estimator, typename PDF , typename Iterator , typename ... Iterators>
witerator hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::wend ( ) const
inline

◆ hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >

class hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >

template<typename ... ESTIMATORS>
class hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >

Template Parameters
Estimatorsestimator base classes
Inheritance diagram for hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >:
Collaboration diagram for hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >:

Public Types

enum  
 

Public Member Functions

 FCN ()=delete
 
 FCN (FCN< ESTIMATORS >const &... fcns)
 
 FCN (FCN< estimator_type, false > const &other)
 
virtual ~FCN ()=default
 
estimator_type & FCNS ()
 
double GetErrorDef () const
 
const estimator_type & GetFCNS () const
 
hydra::UserParameters const & GetParameters () const
 
hydra::UserParametersGetParameters ()
 
virtual double operator() (std::vector< double > const &parameters) const
 
FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > & operator= (FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > const &other)
 
void SetErrorDef (double error)
 
double Up () const
 

Member Enumeration Documentation

◆ anonymous enum

template<typename ... ESTIMATORS>
anonymous enum

Constructor & Destructor Documentation

◆ FCN() [1/3]

template<typename ... ESTIMATORS>
hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::FCN ( )
delete

◆ FCN() [2/3]

template<typename ... ESTIMATORS>
hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::FCN ( FCN< ESTIMATORS >const &...  fcns)
inline

◆ FCN() [3/3]

template<typename ... ESTIMATORS>
hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::FCN ( FCN< estimator_type, false > const &  other)
inline

◆ ~FCN()

template<typename ... ESTIMATORS>
virtual hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::~FCN ( )
virtualdefault

Member Function Documentation

◆ FCNS()

template<typename ... ESTIMATORS>
estimator_type& hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::FCNS ( )
inline

◆ GetErrorDef()

template<typename ... ESTIMATORS>
double hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::GetErrorDef ( ) const
inline

◆ GetFCNS()

template<typename ... ESTIMATORS>
const estimator_type& hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::GetFCNS ( ) const
inline

◆ GetParameters() [1/2]

template<typename ... ESTIMATORS>
hydra::UserParameters const& hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::GetParameters ( ) const
inline

◆ GetParameters() [2/2]

template<typename ... ESTIMATORS>
hydra::UserParameters& hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::GetParameters ( )
inline

◆ operator()()

template<typename ... ESTIMATORS>
virtual double hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::operator() ( std::vector< double > const &  parameters) const
inlinevirtual

◆ operator=()

template<typename ... ESTIMATORS>
FCN<hydra::thrust::tuple<FCN<ESTIMATORS>...>, false >& hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::operator= ( FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > const &  other)
inline

◆ SetErrorDef()

template<typename ... ESTIMATORS>
void hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::SetErrorDef ( double  error)
inline

◆ Up()

template<typename ... ESTIMATORS>
double hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false >::Up ( ) const
inline

◆ hydra::Parameter

struct hydra::Parameter


,

This class represents named parameters that hold information of value, error, limits and implements the interface with ROOT::Minuit2.

hydra::Parameter instances are constructible, assignable and copiable in all backends, and because that the storage to hold the name needs be managed by the user (ex. no std::string support in CUDA). hydra::Parameter overloads the GReal_t operator()() and the arithmetic operators. hydra::Parameter instances can be constructed using named parameter semantic or parameter list semantic:

//using named parameter idiom
.Name(name)
.Value(3.0)
.Error(0.000)
.Limits(1.0, 4.0)
;
//using unnamed parameter idiom
Parameter mean(name, 3.0, 0.000, 1.0, 4.0);
Examples:
basic_fit_range_semantics.inl, binned_extended_logLL_fit.inl, breit_wigner_plus_polynomial.inl, crystal_ball_plus_exponential.inl, dalitz_plot.C, dalitz_plot.inl, double_gaussian_plus_exponential.inl, extended_logLL_fit.inl, fit_convoluted_pdfs.inl, fractional_logLL_fit.inl, gaussian_plus_argus.inl, multidimensional_fit.inl, pseudo_experiment.inl, and splot.inl.
Collaboration diagram for hydra::Parameter:

Public Member Functions

__hydra_host__ __hydra_device__ Parameter ()
 
__hydra_host__ __hydra_device__ Parameter (GReal_t value)
 
 Parameter (GChar_t const *const name, GReal_t value, GReal_t error, GReal_t downlim, GReal_t uplim, GBool_t fixed=0)
 
 Parameter (GChar_t const *name, GReal_t value, GReal_t error, GBool_t fixed=0)
 
 Parameter (std::string const &name, GReal_t value, GBool_t fixed=0)
 
__hydra_host__ __hydra_device__ Parameter (Parameter const &other)
 
__hydra_host__ ParameterError (GReal_t error)
 
__hydra_host__ ParameterFixed (GBool_t flag=1)
 
__hydra_host__ __hydra_device__ GReal_t GetError () const
 
__hydra_host__ __hydra_device__ unsigned int GetIndex () const
 
__hydra_host__ __hydra_device__ GReal_t GetLowerLim () const
 
__hydra_host__ __hydra_device__ GChar_t const * GetName () const
 
__hydra_host__ __hydra_device__ GReal_t GetUpperLim () const
 
__hydra_host__ __hydra_device__ GReal_t GetValue () const
 
__hydra_host__ __hydra_device__ GBool_t HasError () const
 
__hydra_host__ __hydra_device__ GBool_t IsFixed () const
 
__hydra_host__ __hydra_device__ GBool_t IsLimited () const
 
__hydra_host__ ParameterLimits (GReal_t lowlim, GReal_t uplim)
 
__hydra_host__ ParameterName (std::string const &name)
 
__hydra_host__ ParameterName (GChar_t const *name)
 
__hydra_host__ __hydra_device__ operator GReal_t ()
 
__hydra_host__ __hydra_device__ operator GReal_t () const
 
__hydra_host__ __hydra_device__ GReal_t operator() ()
 
__hydra_host__ __hydra_device__ GReal_t operator() () const
 
__hydra_host__ __hydra_device__ Parameteroperator*= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator*= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator+= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator+= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator-= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator-= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator/= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator/= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator= (const GReal_t value)
 
__hydra_host__ void Reset (const std::vector< double > &parameters)
 
__hydra_host__ __hydra_device__ void SetError (GReal_t error)
 
__hydra_host__ __hydra_device__ void SetFixed (GBool_t constant)
 
__hydra_host__ __hydra_device__ void SetHasError (GBool_t nullError)
 
__hydra_host__ __hydra_device__ void SetIndex (unsigned int index)
 
__hydra_host__ __hydra_device__ void SetLimited (GBool_t limited)
 
__hydra_host__ __hydra_device__ void SetLimits (GReal_t lower, GReal_t upper)
 
__hydra_host__ __hydra_device__ void SetLowerLim (GReal_t downLim)
 
__hydra_host__ void SetName (const std::string &name)
 
__hydra_host__ void SetName (const GChar_t *name)
 
__hydra_host__ __hydra_device__ void SetUpperLim (GReal_t upLim)
 
__hydra_host__ __hydra_device__ void SetValue (GReal_t value)
 
__hydra_host__ ParameterValue (GReal_t value)
 

Static Public Member Functions

static __hydra_host__ Parameter Create ()
 
static __hydra_host__ Parameter Create (GChar_t const *name)
 

Constructor & Destructor Documentation

◆ Parameter() [1/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( )
inline

◆ Parameter() [2/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( GReal_t  value)
inline

◆ Parameter() [3/6]

hydra::Parameter::Parameter ( GChar_t const *const  name,
GReal_t  value,
GReal_t  error,
GReal_t  downlim,
GReal_t  uplim,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [4/6]

hydra::Parameter::Parameter ( GChar_t const *  name,
GReal_t  value,
GReal_t  error,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [5/6]

hydra::Parameter::Parameter ( std::string const &  name,
GReal_t  value,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [6/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( Parameter const &  other)
inline

Member Function Documentation

◆ Create() [1/2]

◆ Create() [2/2]

static __hydra_host__ Parameter hydra::Parameter::Create ( GChar_t const *  name)
inlinestatic

◆ Error()

◆ Fixed()

◆ GetError()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetError ( ) const
inline

◆ GetIndex()

__hydra_host__ __hydra_device__ unsigned int hydra::Parameter::GetIndex ( ) const
inline

◆ GetLowerLim()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetLowerLim ( ) const
inline

◆ GetName()

__hydra_host__ __hydra_device__ GChar_t const* hydra::Parameter::GetName ( ) const
inline

◆ GetUpperLim()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetUpperLim ( ) const
inline

◆ GetValue()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetValue ( ) const
inline

◆ HasError()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::HasError ( ) const
inline

◆ IsFixed()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::IsFixed ( ) const
inline

◆ IsLimited()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::IsLimited ( ) const
inline

◆ Limits()

◆ Name() [1/2]

◆ Name() [2/2]

__hydra_host__ Parameter& hydra::Parameter::Name ( GChar_t const *  name)
inline

◆ operator GReal_t() [1/2]

__hydra_host__ __hydra_device__ hydra::Parameter::operator GReal_t ( )
inline

◆ operator GReal_t() [2/2]

__hydra_host__ __hydra_device__ hydra::Parameter::operator GReal_t ( ) const
inline

◆ operator()() [1/2]

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::operator() ( void  )
inline

◆ operator()() [2/2]

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::operator() ( void  ) const
inline

◆ operator*=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator*= ( const GReal_t  value)
inline

◆ operator*=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator*= ( Parameter const &  other)
inline

◆ operator+=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator+= ( const GReal_t  value)
inline

◆ operator+=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator+= ( Parameter const &  other)
inline

◆ operator-=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator-= ( const GReal_t  value)
inline

◆ operator-=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator-= ( Parameter const &  other)
inline

◆ operator/=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator/= ( const GReal_t  value)
inline

◆ operator/=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator/= ( Parameter const &  other)
inline

◆ operator=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator= ( Parameter const &  other)
inline

◆ operator=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator= ( const GReal_t  value)
inline

◆ Reset()

__hydra_host__ void hydra::Parameter::Reset ( const std::vector< double > &  parameters)
inline

◆ SetError()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetError ( GReal_t  error)
inline

◆ SetFixed()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetFixed ( GBool_t  constant)
inline

◆ SetHasError()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetHasError ( GBool_t  nullError)
inline

◆ SetIndex()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetIndex ( unsigned int  index)
inline

◆ SetLimited()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLimited ( GBool_t  limited)
inline

◆ SetLimits()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLimits ( GReal_t  lower,
GReal_t  upper 
)
inline

◆ SetLowerLim()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLowerLim ( GReal_t  downLim)
inline

◆ SetName() [1/2]

__hydra_host__ void hydra::Parameter::SetName ( const std::string &  name)
inline

◆ SetName() [2/2]

__hydra_host__ void hydra::Parameter::SetName ( const GChar_t name)
inline

◆ SetUpperLim()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetUpperLim ( GReal_t  upLim)
inline

◆ SetValue()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetValue ( GReal_t  value)
inline

◆ Value()

◆ hydra::Pdf

class hydra::Pdf

template<typename FUNCTOR, typename INTEGRATOR>
class hydra::Pdf< FUNCTOR, INTEGRATOR >

Class representing probability density functions.

A hydra::Pdf has two components:

Template Parameters
FUNCTORunnormalized functor, describing the shape.
INTEGRATORintegration algorithm or functor for analytical integration, which normalizes the functor.
Collaboration diagram for hydra::Pdf< FUNCTOR, INTEGRATOR >:

◆ hydra::PDFSumExtendable

class hydra::PDFSumExtendable

template<typename PDF1, typename PDF2, typename ... PDFs>
class hydra::PDFSumExtendable< PDF1, PDF2, PDFs >

Class representing a pdf object built summing up other pdfs.

Given N unnormalized pdfs \(F_i\) , this class define a object representing the sum

\[ F_t = \sum_i^N c_i \times F_i \]

The coefficients of the pdfs can represent fractions or yields. If the number of coefficients is equal to the number of pdfs, the coefficients are interpreted as yields. If the number of coefficients is \((N-1)\), the coefficients are interpreted as fractions defined in the interval [0,1]. The coefficient of the last term is calculated as \( c_N=1 -\sum_i^{(N-1)} c_i \).

Inheritance diagram for hydra::PDFSumExtendable< PDF1, PDF2, PDFs >:
Collaboration diagram for hydra::PDFSumExtendable< PDF1, PDF2, PDFs >:

Public Types

typedef detail::AddPdfBase< PDF1, PDF2, PDFs... >::type base_type
 base class type More...
 
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs... > functor_type
 
typedef hydra::thrust::tuple< typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type... > functors_tuple_type
 type of the tuple of pdf::functors More...
 
typedef void hydra_pdf_type
 
typedef void hydra_sum_pdf_tag
 tag More...
 
typedef hydra::thrust::tuple< PDF1, PDF2, PDFs... > pdfs_tuple_type
 type of the tuple of pdfs More...
 

Public Member Functions

 PDFSumExtendable (PDF1 const &pdf1, PDF2 const &pdf2, PDFs const &...pdfs, std::array< Parameter, npdfs > const &coef)
 Ctor for used to build AddPdf usable in extended likelihood fits. More...
 
 PDFSumExtendable (PDF1 const &pdf1, PDF2 const &pdf2, PDFs const &...pdfs, Parameter(&coef)[npdfs])
 
 PDFSumExtendable (PDFSumExtendable< PDF1, PDF2, PDFs... > const &other)
 Copy constructor. More...
 
void AddUserParameters (std::vector< hydra::Parameter *> &user_parameters)
 Add pointers to the functor's parameters to a external list, that will be used later to build the hydra::UserParameters instance that will be passed to ROOT::Minuit2. More...
 
ParameterCoefficient (size_t i)
 
const ParameterGetCoefficient (size_t i) const
 
GReal_t GetCoefSum () const
 
detail::AddPdfFunctor< PDF1, PDF2, PDFs... > GetFunctor () const
 
const functors_tuple_typeGetFunctors () const
 
const pdfs_tuple_typeGetPDFs () const
 
GBool_t IsExtended () const
 
template<typename T1 >
GReal_t operator() (T1 &&t) const
 
template<typename T1 , typename T2 >
GReal_t operator() (T1 &&t, T2 &&cache) const
 
template<typename T >
GReal_t operator() (T *x, T *p)
 
PDFSumExtendable< PDF1, PDF2, PDFs... > & operator= (PDFSumExtendable< PDF1, PDF2, PDFs... > const &other)
 Assignment operator. More...
 
template<unsigned int I>
hydra::thrust::tuple_element< I, pdfs_tuple_type >::type & PDF (hydra::placeholders::placeholder< I >)
 
void PrintRegisteredParameters ()
 Print all registered parameters, including its value, range, name etc. More...
 
void SetExtended (GBool_t extended)
 
void SetParameters (const std::vector< double > &parameters)
 Set the coefficients and parameters of all pdfs. More...
 

Static Public Attributes

static constexpr size_t npdfs = sizeof...(PDFs)+2
 number of pdfs More...
 

Member Typedef Documentation

◆ base_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef detail::AddPdfBase<PDF1,PDF2,PDFs...>::type hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::base_type

base class type

◆ functor_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::functor_type

◆ functors_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple<typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::functors_tuple_type

type of the tuple of pdf::functors

◆ hydra_pdf_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::hydra_pdf_type

◆ hydra_sum_pdf_tag

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::hydra_sum_pdf_tag

tag

◆ pdfs_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::pdfs_tuple_type

type of the tuple of pdfs

Constructor & Destructor Documentation

◆ PDFSumExtendable() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::PDFSumExtendable ( PDF1 const &  pdf1,
PDF2 const &  pdf2,
PDFs const &...  pdfs,
std::array< Parameter, npdfs > const &  coef 
)
inline

Ctor for used to build AddPdf usable in extended likelihood fits.

Parameters
pdf1first pdf object,
pdf2second pdf object,
pdfsremaining pdfs.
coefarrary of Parameters, each parameter correspond to a coefficient
extendbuild pdf to be used in extended fit. Default is true.

Each component pdf is normalized properly before evaluation each time SetParameters(const std::vector<double>& parameters) is called. The sum is normalized also.

◆ PDFSumExtendable() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::PDFSumExtendable ( PDF1 const &  pdf1,
PDF2 const &  pdf2,
PDFs const &...  pdfs,
Parameter(&)  coef[npdfs] 
)
inline

◆ PDFSumExtendable() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::PDFSumExtendable ( PDFSumExtendable< PDF1, PDF2, PDFs... > const &  other)
inline

Copy constructor.

Member Function Documentation

◆ AddUserParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::AddUserParameters ( std::vector< hydra::Parameter *> &  user_parameters)
inline

Add pointers to the functor's parameters to a external list, that will be used later to build the hydra::UserParameters instance that will be passed to ROOT::Minuit2.

Parameters
user_parametersexternal std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters.

◆ Coefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
Parameter& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::Coefficient ( size_t  i)
inline

◆ GetCoefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const Parameter& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::GetCoefficient ( size_t  i) const
inline

◆ GetCoefSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
GReal_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::GetCoefSum ( ) const
inline

◆ GetFunctor()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::GetFunctor ( ) const
inline

◆ GetFunctors()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const functors_tuple_type& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::GetFunctors ( ) const
inline

◆ GetPDFs()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const pdfs_tuple_type& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::GetPDFs ( ) const
inline

◆ IsExtended()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
GBool_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::IsExtended ( ) const
inline

◆ operator()() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T1 >
GReal_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::operator() ( T1 &&  t) const
inline

◆ operator()() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T1 , typename T2 >
GReal_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::operator() ( T1 &&  t,
T2 &&  cache 
) const
inline

◆ operator()() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T >
GReal_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::operator() ( T *  x,
T *  p 
)
inline

◆ operator=()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumExtendable<PDF1, PDF2, PDFs...>& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::operator= ( PDFSumExtendable< PDF1, PDF2, PDFs... > const &  other)
inline

Assignment operator.

Parameters
other
Returns

◆ PDF()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
hydra::thrust::tuple_element<I,pdfs_tuple_type>::type& hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::PDF ( hydra::placeholders::placeholder< I >  )
inline

◆ PrintRegisteredParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::PrintRegisteredParameters ( )
inline

Print all registered parameters, including its value, range, name etc.

◆ SetExtended()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::SetExtended ( GBool_t  extended)
inline

◆ SetParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::SetParameters ( const std::vector< double > &  parameters)
inline

Set the coefficients and parameters of all pdfs.

This method sets the values of all coefficients and parameters of pdfs stored in the PDFSumExtendable object. User should ensure this method is called before the object evaluation.

Parameters
parametersstd::vector<double> containing the list of parameters passed by ROOT::Minuit2.

Field Documentation

◆ npdfs

template<typename PDF1 , typename PDF2 , typename ... PDFs>
constexpr size_t hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::npdfs = sizeof...(PDFs)+2
static

number of pdfs

◆ hydra::PDFSumNonExtendable

class hydra::PDFSumNonExtendable

template<typename PDF1, typename PDF2, typename ... PDFs>
class hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >

Class representing a pdf object built summing a pdf adding other pdfs.

Given N unnormalized pdfs \(F_i\) , this class define a object representing the sum

\[ F_t = \sum_i^N c_i \times F_i \]

The coefficients of the pdfs can represent fractions or yields. If the number of coefficients is equal to the number of pdfs, the coefficients are interpreted as yields. If the number of coefficients is \((N-1)\), the coefficients are interpreted as fractions defined in the interval [0,1]. The coefficient of the last term is calculated as \( c_N=1 -\sum_i^{(N-1)} c_i \).

Inheritance diagram for hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >:
Collaboration diagram for hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >:

Public Types

typedef detail::AddPdfBase< PDF1, PDF2, PDFs... >::type base_type
 base class type More...
 
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs... > functor_type
 
typedef hydra::thrust::tuple< typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type... > functors_tuple_type
 type of the tuple of pdf::functors More...
 
typedef void hydra_pdf_type
 
typedef void hydra_sum_pdf_tag
 tag More...
 
typedef hydra::thrust::tuple< PDF1, PDF2, PDFs... > pdfs_tuple_type
 type of the tuple of pdfs More...
 

Public Member Functions

 PDFSumNonExtendable (PDF1 const &pdf1, PDF2 const &pdf2, PDFs const &...pdfs, std::array< Parameter, npdfs-1 >const &coef)
 Ctor for used to build AddPdf usable in extended likelihood fits. More...
 
 PDFSumNonExtendable (PDFSumNonExtendable< PDF1, PDF2, PDFs... > const &other)
 Copy constructor. More...
 
void AddUserParameters (std::vector< hydra::Parameter *> &user_parameters)
 Add pointers to the functor's parameters to a external list, that will be used later to build the hydra::UserParameters instance that will be passed to ROOT::Minuit2. More...
 
ParameterCoefficient (size_t i)
 
const ParameterGetCoefficient (size_t i) const
 
GReal_t GetCoefPartialSum () const
 
GReal_t GetCoefSum () const
 
detail::AddPdfFunctor< PDF1, PDF2, PDFs... > GetFunctor () const
 
const functors_tuple_typeGetFunctors () const
 
const pdfs_tuple_typeGetPDFs () const
 
template<typename T1 >
GReal_t operator() (T1 &&t) const
 
template<typename T1 , typename T2 >
GReal_t operator() (T1 &&t, T2 &&cache) const
 
template<typename T >
GReal_t operator() (T *x, T *p)
 
PDFSumNonExtendable< PDF1, PDF2, PDFs... > & operator= (PDFSumNonExtendable< PDF1, PDF2, PDFs... > const &other)
 Assignment operator. More...
 
template<unsigned int I>
hydra::thrust::tuple_element< I, pdfs_tuple_type >::type & PDF (hydra::placeholders::placeholder< I >)
 
void PrintRegisteredParameters ()
 Print all registered parameters, including its value, range, name etc. More...
 
void SetParameters (const std::vector< double > &parameters)
 Set the coefficients and parameters of all pdfs. More...
 

Static Public Attributes

static constexpr size_t npdfs = sizeof...(PDFs)+2
 number of pdfs More...
 

Member Typedef Documentation

◆ base_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef detail::AddPdfBase<PDF1,PDF2,PDFs...>::type hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::base_type

base class type

◆ functor_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::functor_type

◆ functors_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple<typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::functors_tuple_type

type of the tuple of pdf::functors

◆ hydra_pdf_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::hydra_pdf_type

◆ hydra_sum_pdf_tag

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::hydra_sum_pdf_tag

tag

◆ pdfs_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::pdfs_tuple_type

type of the tuple of pdfs

Constructor & Destructor Documentation

◆ PDFSumNonExtendable() [1/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::PDFSumNonExtendable ( PDF1 const &  pdf1,
PDF2 const &  pdf2,
PDFs const &...  pdfs,
std::array< Parameter, npdfs-1 >const &  coef 
)
inline

Ctor for used to build AddPdf usable in extended likelihood fits.

Parameters
pdf1first pdf object,
pdf2second pdf object,
pdfsremaining pdfs.
coefarrary of Parameters, each parameter correspond to a coefficient
extendbuild pdf to be used in extended fit. Default is true.

Each component pdf is normalized properly before evaluation each time SetParameters(const std::vector<double>& parameters) is called. The sum is normalized also.

◆ PDFSumNonExtendable() [2/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::PDFSumNonExtendable ( PDFSumNonExtendable< PDF1, PDF2, PDFs... > const &  other)
inline

Copy constructor.

Member Function Documentation

◆ AddUserParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::AddUserParameters ( std::vector< hydra::Parameter *> &  user_parameters)
inline

Add pointers to the functor's parameters to a external list, that will be used later to build the hydra::UserParameters instance that will be passed to ROOT::Minuit2.

Parameters
user_parametersexternal std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters.

◆ Coefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
Parameter& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::Coefficient ( size_t  i)
inline

◆ GetCoefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const Parameter& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetCoefficient ( size_t  i) const
inline

◆ GetCoefPartialSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
GReal_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetCoefPartialSum ( ) const
inline

◆ GetCoefSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
GReal_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetCoefSum ( ) const
inline

◆ GetFunctor()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetFunctor ( ) const
inline

◆ GetFunctors()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const functors_tuple_type& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetFunctors ( ) const
inline

◆ GetPDFs()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
const pdfs_tuple_type& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::GetPDFs ( ) const
inline

◆ operator()() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T1 >
GReal_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::operator() ( T1 &&  t) const
inline

◆ operator()() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T1 , typename T2 >
GReal_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::operator() ( T1 &&  t,
T2 &&  cache 
) const
inline

◆ operator()() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<typename T >
GReal_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::operator() ( T *  x,
T *  p 
)
inline

◆ operator=()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumNonExtendable<PDF1, PDF2, PDFs...>& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::operator= ( PDFSumNonExtendable< PDF1, PDF2, PDFs... > const &  other)
inline

Assignment operator.

Parameters
other
Returns

◆ PDF()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
hydra::thrust::tuple_element<I,pdfs_tuple_type>::type& hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::PDF ( hydra::placeholders::placeholder< I >  )
inline

◆ PrintRegisteredParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::PrintRegisteredParameters ( )
inline

Print all registered parameters, including its value, range, name etc.

◆ SetParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>
void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::SetParameters ( const std::vector< double > &  parameters)
inline

Set the coefficients and parameters of all pdfs.

This method sets the values of all coefficients and parameters of pdfs stored in the PDFSumNonExtendable object. User should ensure this method is called before the object evaluation.

Parameters
parametersstd::vector<double> containing the list of parameters passed by ROOT::Minuit2.

Field Documentation

◆ npdfs

template<typename PDF1 , typename PDF2 , typename ... PDFs>
constexpr size_t hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::npdfs = sizeof...(PDFs)+2
static

number of pdfs

◆ hydra::SPlot

class hydra::SPlot

template<typename Iterator, typename PDF1, typename PDF2, typename ... PDFs>
class hydra::SPlot< Iterator, PDF1, PDF2, PDFs >

Implementation of {s}_{Plot} technique for statistical unfolding of sample containing events from different sources.

The sPlots are applicable in the context extended Likelihood fits, which are performed on the data sample to determine the yields of the various sources.

Reference: Nucl.Instrum.Meth.A555:356-369,2005

Inheritance diagram for hydra::SPlot< Iterator, PDF1, PDF2, PDFs >:
Collaboration diagram for hydra::SPlot< Iterator, PDF1, PDF2, PDFs >:

Public Types

typedef hydra::thrust::tuple< typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type... > functors_tuple_type
 
template<int W>
using iterator = hydra::thrust::transform_iterator< transformer< W >, Iterator >
 
typedef hydra::thrust::tuple< PDF1, PDF2, PDFs... > pdfs_tuple_type
 
template<int W>
using transformer = detail::SWeights< W, typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type... >
 
template<int W>
using value_type = typename hydra::thrust::iterator_traits< iterator< W > >::value_type
 

Public Member Functions

 SPlot ()=delete
 
 SPlot (PDFSumExtendable< PDF1, PDF2, PDFs... > const &pdf, Iterator first, Iterator last)
 SPlot constructor. More...
 
 SPlot (SPlot< Iterator, PDF1, PDF2, PDFs... > const &other)
 SPlot copy constructor. More...
 
template<unsigned int I>
iterator< I > begin (placeholders::placeholder< I >)
 Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i. More...
 
iterator<-1 > begin ()
 Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i. More...
 
Iterator data_begin ()
 Get an iterator pointing to end of the range of the s-weights. More...
 
Iterator data_begin () const
 
Iterator data_end ()
 Get an iterator pointing to end of the range of the s-weights. More...
 
Iterator data_end () const
 
template<unsigned int I>
iterator< I > end (placeholders::placeholder< I >)
 Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i. More...
 
iterator<-1 > end ()
 Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i. More...
 
const ParameterGetCoefficient (size_t i) const
 Get the yield corresponding to the PDF i. More...
 
hydra::Eigen::Matrix< double, npdfs, npdfsGetCovMatrix () const
 Get the covariance matrix of between the yields of PDFs. More...
 
const functors_tuple_typeGetFunctors () const
 Get reference to constant of normalized Functor objects. More...
 
hydra::Eigen::Matrix< double, npdfs, npdfsGetInverseCovMatrix () const
 
const pdfs_tuple_typeGetPDFs () const
 Get reference to constant of PDF objects. More...
 
template<unsigned int I>
hydra::Range< iterator< I > > operator() (placeholders::placeholder< I > p)
 Get a range with the s-weights to the PDF i. More...
 
hydra::Range< iterator<-1 > > operator() ()
 Get a range with the s-weights. More...
 
SPlot< Iterator, PDF1, PDF2, PDFs... > operator= (SPlot< Iterator, PDF1, PDF2, PDFs... > const &other)
 SPlot assignment operator. More...
 
template<unsigned int I>
hydra::Range< iterator< I > > operator[] (placeholders::placeholder< I > p)
 Subscript operator to get a range with the s-weights to the PDF i. More...
 
value_type<-1 > operator[] (size_t i)
 Subscript operator. More...
 

Static Public Attributes

static constexpr size_t npdfs = sizeof...(PDFs)+2
 

Member Typedef Documentation

◆ functors_tuple_type

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple< typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type...> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::functors_tuple_type

◆ iterator

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<int W>
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::iterator = hydra::thrust::transform_iterator<transformer<W>, Iterator >

◆ pdfs_tuple_type

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::pdfs_tuple_type

◆ transformer

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<int W>
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::transformer = detail::SWeights<W, typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type...>

◆ value_type

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<int W>
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::value_type = typename hydra::thrust::iterator_traits<iterator<W> >::value_type

Constructor & Destructor Documentation

◆ SPlot() [1/3]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::SPlot ( )
delete

◆ SPlot() [2/3]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::SPlot ( PDFSumExtendable< PDF1, PDF2, PDFs... > const &  pdf,
Iterator  first,
Iterator  last 
)
inline

SPlot constructor.

Parameters
pdfPDFSumExtendable<PDF1, PDF2, PDFs...> object, already optimized.
firstIterator pointing to the beginning of the data range used to optimize pdf
lastIterator pointing to the end of the data range used to optimize pdf.

◆ SPlot() [3/3]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::SPlot ( SPlot< Iterator, PDF1, PDF2, PDFs... > const &  other)
inline

SPlot copy constructor.

Parameters
other

Member Function Documentation

◆ begin() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
iterator<I> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::begin ( placeholders::placeholder< I >  )
inline

Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
iterator

◆ begin() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
iterator<-1> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::begin ( )
inline

Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
iterator

◆ data_begin() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
Iterator hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::data_begin ( )
inline

Get an iterator pointing to end of the range of the s-weights.

Returns
iterator

◆ data_begin() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
Iterator hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::data_begin ( ) const
inline

◆ data_end() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
Iterator hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::data_end ( )
inline

Get an iterator pointing to end of the range of the s-weights.

Returns
iterator

◆ data_end() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
Iterator hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::data_end ( ) const
inline

◆ end() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
iterator<I> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::end ( placeholders::placeholder< I >  )
inline

Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
iterator

◆ end() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
iterator<-1> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::end ( )
inline

Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
iterator

◆ GetCoefficient()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
const Parameter& hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::GetCoefficient ( size_t  i) const
inline

Get the yield corresponding to the PDF i.

Parameters
iindex of PDF
Returns
hydra::Parameter

◆ GetCovMatrix()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::Eigen::Matrix<double, npdfs, npdfs> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::GetCovMatrix ( ) const
inline

Get the covariance matrix of between the yields of PDFs.

Returns
Eigen::Matrix<double, npdfs, npdfs>

◆ GetFunctors()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
const functors_tuple_type& hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::GetFunctors ( ) const
inline

Get reference to constant of normalized Functor objects.

Returns
hydra::tuple of the Functor objects

◆ GetInverseCovMatrix()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::Eigen::Matrix<double, npdfs, npdfs> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::GetInverseCovMatrix ( ) const
inline

◆ GetPDFs()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
const pdfs_tuple_type& hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::GetPDFs ( ) const
inline

Get reference to constant of PDF objects.

Returns
hydra::tuple of the PDF objects

◆ operator()() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
hydra::Range<iterator<I> > hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::operator() ( placeholders::placeholder< I >  p)
inline

Get a range with the s-weights to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
Range<siterator>

◆ operator()() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
hydra::Range<iterator<-1> > hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::operator() ( void  )
inline

Get a range with the s-weights.

Returns
hydra::Range<iterator>

◆ operator=()

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
SPlot<Iterator, PDF1, PDF2, PDFs...> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::operator= ( SPlot< Iterator, PDF1, PDF2, PDFs... > const &  other)
inline

SPlot assignment operator.

Parameters
other

◆ operator[]() [1/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
template<unsigned int I>
hydra::Range<iterator<I> > hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::operator[] ( placeholders::placeholder< I >  p)
inline

Subscript operator to get a range with the s-weights to the PDF i.

Parameters
hydraplaceholder (_0, _1, ..., _N)
Returns
hydra::Range<iterator>

◆ operator[]() [2/2]

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
value_type<-1> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::operator[] ( size_t  i)
inline

Subscript operator.

Parameters
indexi
Returns
value_type

Field Documentation

◆ npdfs

template<typename Iterator , typename PDF1 , typename PDF2 , typename ... PDFs>
constexpr size_t hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::npdfs = sizeof...(PDFs)+2
static

◆ hydra::UserParameters

class hydra::UserParameters

Class implementing a interface to ROOT::Minuit2::MnUserParameters.

Collaboration diagram for hydra::UserParameters:

Public Member Functions

 UserParameters ()
 
 UserParameters (UserParameters const &other)
 Copy constructor. More...
 
void AddParameter (Parameter *param, GBool_t update_size=1)
 Add a parameter to be tracked by ROOT::Minuit2. More...
 
const ROOT::Minuit2::MnUserParameters & GetMnState () const
 Get an constant reference to the hold ROOT::Minuit2::MnUserParameters. More...
 
ROOT::Minuit2::MnUserParameters & GetMnState ()
 Get a constant reference to the hold ROOT::Minuit2::MnUserParameters. More...
 
const std::unique_ptr< ROOT::Minuit2::MnUserParameters > & GetMnStatePtr () const
 Get a constant reference to the hold std::unique_ptr<ROOT::Minuit2::MnUserParameters> More...
 
const std::vector< Parameter *> & GetVariables () const
 
UserParametersoperator= (UserParameters const &other)
 Assignment operator. More...
 
void PrintMinuitParameters ()
 Print the parameters (ROOT::Minuit2) More...
 
void PrintParameters ()
 Print the parameters. More...
 
void SetMnState (ROOT::Minuit2::MnUserParameters const &state)
 Set the ROOT::Minuit2 state. More...
 
void SetVariables (const std::vector< Parameter *> &variables)
 
void UpdateParameterLimits (ROOT::Minuit2::MinosError const &minos_error)
 Update model parameters errors with the values hold by an ROOT::Minuit2::MinosError object. More...
 
void UpdateParameters (ROOT::Minuit2::FunctionMinimum const &minimum)
 Update model parameters with the values hold by an ROOT::Minuit2::FunctionMinimum object. More...
 

Constructor & Destructor Documentation

◆ UserParameters() [1/2]

hydra::UserParameters::UserParameters ( )
inline

◆ UserParameters() [2/2]

hydra::UserParameters::UserParameters ( UserParameters const &  other)
inline

Copy constructor.

Parameters
other

Member Function Documentation

◆ AddParameter()

void hydra::UserParameters::AddParameter ( Parameter param,
GBool_t  update_size = 1 
)
inline

Add a parameter to be tracked by ROOT::Minuit2.

Parameters
param
update_size

◆ GetMnState() [1/2]

const ROOT::Minuit2::MnUserParameters& hydra::UserParameters::GetMnState ( ) const
inline

Get an constant reference to the hold ROOT::Minuit2::MnUserParameters.

Returns

◆ GetMnState() [2/2]

ROOT::Minuit2::MnUserParameters& hydra::UserParameters::GetMnState ( )
inline

Get a constant reference to the hold ROOT::Minuit2::MnUserParameters.

Returns

◆ GetMnStatePtr()

const std::unique_ptr<ROOT::Minuit2::MnUserParameters>& hydra::UserParameters::GetMnStatePtr ( ) const
inline

Get a constant reference to the hold std::unique_ptr<ROOT::Minuit2::MnUserParameters>

Returns

◆ GetVariables()

const std::vector<Parameter* >& hydra::UserParameters::GetVariables ( ) const
inline

◆ operator=()

UserParameters& hydra::UserParameters::operator= ( UserParameters const &  other)
inline

Assignment operator.

Parameters
other
Returns

◆ PrintMinuitParameters()

void hydra::UserParameters::PrintMinuitParameters ( )
inline

Print the parameters (ROOT::Minuit2)

◆ PrintParameters()

void hydra::UserParameters::PrintParameters ( )
inline

Print the parameters.

◆ SetMnState()

void hydra::UserParameters::SetMnState ( ROOT::Minuit2::MnUserParameters const &  state)
inline

Set the ROOT::Minuit2 state.

Parameters
stateROOT::Minuit2::MnUserParameters object.

◆ SetVariables()

void hydra::UserParameters::SetVariables ( const std::vector< Parameter *> &  variables)
inline

◆ UpdateParameterLimits()

void hydra::UserParameters::UpdateParameterLimits ( ROOT::Minuit2::MinosError const &  minos_error)
inline

Update model parameters errors with the values hold by an ROOT::Minuit2::MinosError object.

Parameters
minos_error

◆ UpdateParameters()

void hydra::UserParameters::UpdateParameters ( ROOT::Minuit2::FunctionMinimum const &  minimum)
inline

Update model parameters with the values hold by an ROOT::Minuit2::FunctionMinimum object.

Parameters
minimum

◆ LogLikelihoodFCN< PDFSumExtendable< Pdfs::::::>

class LogLikelihoodFCN< PDFSumExtendable< Pdfs::::::>

...>

Collaboration diagram for LogLikelihoodFCN< PDFSumExtendable< Pdfs::::::>:

Function Documentation

◆ add_pdfs() [1/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumNonExtendable<PDF1, PDF2, PDFs...> hydra::add_pdfs ( std::array< Parameter, sizeof...(PDFs)+1 >const &  var_list,
PDF1 const &  pdf1,
PDF2 const &  pdf2,
PDFs const &...  pdfs 
)

#include <PDFSumNonExtendable.h>

Function to build up non-extendable pdfs models.

Given N unnormalized pdfs \(F_i\) , this class define a object representing the sum

\[ F_t = \sum_i^N c_i \times F_i \]

The coefficients of the pdfs can represent fractions or yields. If the number of coefficients is equal to the number of pdfs, the coefficients are interpreted as yields. If the number of coefficients is \((N-1)\), the coefficients are interpreted as fractions defined in the interval [0,1]. The coefficient of the last term is calculated as \( c_N=1 -\sum_i^{(N-1)} c_i \).

Parameters
var_liststd::array<hydra::Parameter, N > holding the (N_{Pdf} -1) hydra::Parameter yields
pdf1hydra::Pdf object one
pdf2hydra::Pdf object two
pdfs... more pdfs
Returns

◆ add_pdfs() [2/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>
PDFSumExtendable<PDF1, PDF2, PDFs...> hydra::add_pdfs ( std::array< Parameter, sizeof...(PDFs)+2 >const &  var_list,
PDF1 const &  pdf1,
PDF2 const &  pdf2,
PDFs const &...  pdfs 
)

#include <PDFSumExtendable.h>

Function to build up extendable pdfs models.

Given N unnormalized pdfs \(F_i\) , this class define a object representing the sum

\[ F_t = \sum_i^N c_i \times F_i \]

The coefficients of the pdfs can represent fractions or yields. If the number of coefficients is equal to the number of pdfs, the coefficients are interpreted as yields. If the number of coefficients is \((N-1)\), the coefficients are interpreted as fractions defined in the interval [0,1]. The coefficient of the last term is calculated as \( c_N=1 -\sum_i^{(N-1)} c_i \).

Parameters
var_liststd::array<hydra::Parameter, N > holding the (N_{Pdf} -1) hydra::Parameter yields
pdf1hydra::Pdf object one
pdf2hydra::Pdf object two
pdfs... more pdfs
Returns
Examples:
binned_extended_logLL_fit.inl, breit_wigner_plus_polynomial.inl, crystal_ball_plus_exponential.inl, double_gaussian_plus_exponential.inl, extended_logLL_fit.inl, fit_convoluted_pdfs.inl, fractional_logLL_fit.inl, gaussian_plus_argus.inl, pseudo_experiment.inl, and splot.inl.

◆ make_loglikehood_fcn() [1/8]

template<typename... Pdfs, typename Iterator , typename ... Iterators>
std::enable_if< detail::is_iterator<Iterator>::value && detail::are_iterators<Iterators...>::value,LogLikelihoodFCN< PDFSumExtendable<Pdfs...>, Iterator, Iterators...> >::type hydra::make_loglikehood_fcn ( PDFSumExtendable< Pdfs... > const &  functor,
Iterator  first,
Iterator  last,
Iterators...  weights 
)
inline

#include <LogLikelihoodFCN.h>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
firstiteraror pointing to begin of data range
lastiteraror pointing to end of data range
weightsiteraror pointing to begin of weights range
Returns

◆ make_loglikehood_fcn() [2/8]

template<typename Functor , typename Integrator , typename Iterator , typename ... Iterators>
std::enable_if< detail::is_iterator< Iterator >::value &&detail::are_iterators< Iterators... >::value, LogLikelihoodFCN< Pdf< Functor, Integrator >, Iterator, Iterators... > >::type hydra::make_loglikehood_fcn ( Pdf< Functor, Integrator > const &  pdf,
Iterator  first,
Iterator  last,
Iterators...  weights 
)
inline

#include <LogLikelihoodFCN1.inl>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
firstiteraror pointing to begin of data range
lastiteraror pointing to end of data range
weightsiteraror pointing to begin of weights range
Returns

◆ make_loglikehood_fcn() [3/8]

template<typename... Pdfs, typename Iterator , typename ... Iterators>
std::enable_if< hydra::detail::is_iterator< Iterator >::value &&detail::are_iterators< Iterators... >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, Iterator, Iterators... > >::type hydra::make_loglikehood_fcn ( PDFSumNonExtendable< Pdfs... >const &  pdf,
Iterator  first,
Iterator  last,
Iterators...  weights 
)
inline

#include <LogLikelihoodFCN3.inl>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
firstiteraror pointing to begin of data range
lastiteraror pointing to end of data range
weightsiteraror pointing to begin of weights range
Returns

◆ make_loglikehood_fcn() [4/8]

template<typename ... Pdfs, typename Iterable , typename... Iterables>
std::enable_if< (!detail::is_iterator<Iterable>::value) && ((sizeof...(Iterables)==0) || !detail::are_iterators<Iterables...>::value) && (!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference<Iterable>::type>::value) && (!hydra::detail::is_hydra_sparse_histogram<typename std::remove_reference<Iterable>::type>::value) && detail::is_iterable<Iterable>::value && detail::are_iterables<Iterables...>::value,LogLikelihoodFCN< PDFSumExtendable<Pdfs...>, decltype(std::declval<Iterable>).begin()), decltype(std::declval<Iterables>).begin())...> >::type hydra::make_loglikehood_fcn ( PDFSumExtendable< Pdfs... > const &  functor,
Iterable &&  points,
Iterables &&...  weights 
)
inline

#include <LogLikelihoodFCN.h>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
points"iterable" storing the data
weights"iterables" storing the weights
Returns

◆ make_loglikehood_fcn() [5/8]

template<typename Functor , typename Integrator , typename Iterable , typename ... Iterables>
std::enable_if<(!detail::is_iterator< Iterable >::value) &&((sizeof...(Iterables)==0)||!detail::are_iterators< Iterables... >::value) &&(!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference< Iterable >::type >::value) &&(!hydra::detail::is_hydra_sparse_histogram< typename std::remove_reference< Iterable >::type >::value) &&detail::is_iterable< Iterable >::value &&detail::are_iterables< Iterables... >::value, LogLikelihoodFCN< Pdf< Functor, Integrator >, decltype(std::declval< Iterable >).begin()), decltype(std::declval< Iterables >).begin())... > >::type hydra::make_loglikehood_fcn ( Pdf< Functor, Integrator > const &  pdf,
Iterable &&  points,
Iterables &&...  weights 
)
inline

#include <LogLikelihoodFCN1.inl>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
points"iterable" storing the data
weights"iterables" storing the weights
Returns

◆ make_loglikehood_fcn() [6/8]

template<typename ... Pdfs, typename Iterable , typename ... Iterables>
std::enable_if<(!detail::is_iterator< Iterable >::value) &&((sizeof...(Iterables)==0)||!detail::are_iterators< Iterables... >::value) &&(!hydra::detail::is_hydra_dense_histogram< typename std::remove_reference< Iterable >::type >::value) &&(!hydra::detail::is_hydra_sparse_histogram< typename std::remove_reference< Iterable >::type >::value) &&hydra::detail::is_iterable< Iterable >::value &&detail::are_iterables< Iterables... >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, decltype(std::declval< Iterable >).begin()), decltype(std::declval< Iterables >).begin())... > >::type hydra::make_loglikehood_fcn ( PDFSumNonExtendable< Pdfs... > const &  functor,
Iterable &&  points,
Iterables &&...  weights 
)
inline

#include <LogLikelihoodFCN3.inl>

Conveniency function to build up loglikehood fcns.

Parameters
pdfhydra::Pdf object
firstiteraror pointing to begin of data range
lastiteraror pointing to end of data range
weightsiteraror pointing to begin of weights range
Returns

◆ make_loglikehood_fcn() [7/8]

template<typename ... Pdfs, typename Histogram >
std::enable_if< detail::is_hydra_dense_histogram< Histogram >::value||detail::is_hydra_sparse_histogram< Histogram >::value, LogLikelihoodFCN< PDFSumNonExtendable< Pdfs... >, decltype(std::declval< const Histogram & >).GetBinsCenters().begin()), decltype(std::declval< const Histogram & >).GetBinsContents().begin()) > >::type hydra::make_loglikehood_fcn ( PDFSumNonExtendable< Pdfs... > const &  pdf,
Histogram const &  data 
)
inline

#include <LogLikelihoodFCN3.inl>

Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.

Parameters
pdfhydra::PDFSumNonExtendable<Pdfs...> object
datahistogram storing the data
Returns
hydra::LogLikelihoodFCN instance for hydra::PDFSumNonExtendable<Pdfs...>

◆ make_loglikehood_fcn() [8/8]

template<typename Functor , typename Integrator , typename Histogram >
std::enable_if<detail::is_hydra_dense_histogram<Histogram>::value || detail::is_hydra_sparse_histogram<Histogram>::value,LogLikelihoodFCN< Pdf<Functor,Integrator>, decltype(std::declval<const Histogram>).GetBinsCenters().begin()), decltype( std::declval<const Histogram>).GetBinsContents().begin())> >::type hydra::make_loglikehood_fcn ( Pdf< Functor, Integrator > const &  pdf,
Histogram const &  points 
)
inline

#include <LogLikelihoodFCN.h>

Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.

Parameters
pdfhydra::Pdf<Functor,Integrator> object.
datahistogram storing the data.
Returns
hydra::LogLikelihoodFCN instance hydra::Pdf<Functor,Integrator> for .

◆ make_pdf()

template<typename FUNCTOR , typename INTEGRATOR >
Pdf<FUNCTOR, INTEGRATOR> hydra::make_pdf ( FUNCTOR const &  functor,
INTEGRATOR  integrator 
)

◆ make_simultaneous_fcn()

template<typename ... ESTIMATORS>
FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > hydra::make_simultaneous_fcn ( FCN< ESTIMATORS >const &...  fcns)

#include <FCN3.inl>

Convenience function to build up simultaneous fcn simultaneous.

Examples:
simultaneous_fit.inl.

Variable Documentation

◆ make_loglikehood_fcn

template<typename ... Pdfs, typename Histogram >
std::enable_if<detail::is_hydra_dense_histogram<Histogram>::value || detail::is_hydra_sparse_histogram<Histogram>::value, LogLikelihoodFCN< PDFSumNonExtendable<Pdfs...>, decltype(std::declval<const Histogram&>).GetBinsCenters().begin()), decltype(std::declval<const Histogram&>).GetBinsContents().begin()) > >::type hydra::make_loglikehood_fcn(PDFSumNonExtendable< Pdfs... > const &pdf, Histogram const &data)
inline

#include <LogLikelihoodFCN.h>

Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.

Parameters
pdfhydra::PDFSumExtendable<Pdfs...> object.
datahistogram storing the data.
Returns
hydra::LogLikelihoodFCN instance for hydra::PDFSumExtendable<Pdfs...>.
Parameters
pdfhydra::PDFSumNonExtendable<Pdfs...> object
datahistogram storing the data
Returns
hydra::LogLikelihoodFCN instance for hydra::PDFSumNonExtendable<Pdfs...>
Examples:
basic_fit.inl, basic_fit_range_semantics.inl, binned_extended_logLL_fit.inl, breit_wigner_plus_polynomial.inl, crystal_ball_plus_exponential.inl, dalitz_plot.C, dalitz_plot.inl, double_gaussian_plus_exponential.inl, extended_logLL_fit.inl, fit_convoluted_pdfs.inl, fit_gaussian.C, fit_johnson.C, fractional_logLL_fit.inl, gaussian_plus_argus.inl, multidimensional_fit.inl, pseudo_experiment.inl, simultaneous_fit.inl, and splot.inl.