Hydra
4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
|
Data fit functionalities of Hydra. More...
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... | |
Data fit functionalities of Hydra.
class hydra::FCN |
FCN base class.
class hydra::FCN< Estimator< PDF, Iterator >, true > |
Estimator | estimator base class |
Iterator | iterator pointing to the data |
Iterators | more iterators pointing to weights, cache etc. |
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::UserParameters & | GetParameters () |
const hydra::UserParameters & | GetParameters () const |
PDF & | GetPDF () |
const PDF & | GetPDF () const |
virtual GReal_t | operator() (const std::vector< double > ¶meters) 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 |
typedef Iterator hydra::FCN< Estimator< PDF, Iterator >, true >::iterator |
|
delete |
|
inline |
|
inline |
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
class hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true > |
Estimator | estimator base class |
Iterator | iterator pointing to the data |
Iterators | more iterators pointing to weights, cache etc. |
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::UserParameters & | GetParameters () |
const hydra::UserParameters & | GetParameters () const |
PDF & | GetPDF () |
const PDF & | GetPDF () const |
witerator | GetWBegin () const |
witerator | GetWEnd () const |
virtual GReal_t | operator() (const std::vector< double > ¶meters) 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 > ¶meters) const |
double | Up () const |
witerator | wbegin () const |
witerator | wend () const |
typedef hydra::thrust::zip_iterator<hydra::thrust::tuple<Iterator,Iterators...> > hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::iterator |
typedef hydra::thrust::zip_iterator<hydra::thrust::tuple<Iterators...> > hydra::FCN< Estimator< PDF, Iterator, Iterators... >, true >::witerator |
|
delete |
|
inline |
|
inline |
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
class hydra::FCN< hydra::thrust::tuple< FCN< ESTIMATORS >... >, false > |
Estimators | estimator base classes |
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::UserParameters & | GetParameters () |
virtual double | operator() (std::vector< double > const ¶meters) 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 |
anonymous enum |
|
delete |
|
inline |
|
inline |
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
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:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
class hydra::Pdf |
Class representing probability density functions.
A hydra::Pdf has two components:
FUNCTOR | unnormalized functor, describing the shape. |
INTEGRATOR | integration algorithm or functor for analytical integration, which normalizes the functor. |
class hydra::PDFSumExtendable |
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 \).
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... | |
Parameter & | Coefficient (size_t i) |
const Parameter & | GetCoefficient (size_t i) const |
GReal_t | GetCoefSum () const |
detail::AddPdfFunctor< PDF1, PDF2, PDFs... > | GetFunctor () const |
const functors_tuple_type & | GetFunctors () const |
const pdfs_tuple_type & | GetPDFs () 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 > ¶meters) |
Set the coefficients and parameters of all pdfs. More... | |
Static Public Attributes | |
static constexpr size_t | npdfs = sizeof...(PDFs)+2 |
number of pdfs More... | |
typedef detail::AddPdfBase<PDF1,PDF2,PDFs...>::type hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::base_type |
base class type
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::functor_type |
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
typedef void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::hydra_pdf_type |
typedef void hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::hydra_sum_pdf_tag |
tag
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::PDFSumExtendable< PDF1, PDF2, PDFs >::pdfs_tuple_type |
type of the tuple of pdfs
|
inline |
Ctor for used to build AddPdf usable in extended likelihood fits.
pdf1 | first pdf object, |
pdf2 | second pdf object, |
pdfs | remaining pdfs. |
coef | arrary of Parameters, each parameter correspond to a coefficient |
extend | build 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.
|
inline |
|
inline |
Copy constructor.
|
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.
user_parameters | external std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator.
other |
|
inline |
|
inline |
Print all registered parameters, including its value, range, name etc.
|
inline |
|
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 | std::vector<double> containing the list of parameters passed by ROOT::Minuit2. |
|
static |
number of pdfs
class hydra::PDFSumNonExtendable |
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 \).
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... | |
Parameter & | Coefficient (size_t i) |
const Parameter & | GetCoefficient (size_t i) const |
GReal_t | GetCoefPartialSum () const |
GReal_t | GetCoefSum () const |
detail::AddPdfFunctor< PDF1, PDF2, PDFs... > | GetFunctor () const |
const functors_tuple_type & | GetFunctors () const |
const pdfs_tuple_type & | GetPDFs () 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 > ¶meters) |
Set the coefficients and parameters of all pdfs. More... | |
Static Public Attributes | |
static constexpr size_t | npdfs = sizeof...(PDFs)+2 |
number of pdfs More... | |
typedef detail::AddPdfBase<PDF1,PDF2,PDFs...>::type hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::base_type |
base class type
typedef detail::AddPdfFunctor< PDF1, PDF2, PDFs...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::functor_type |
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
typedef void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::hydra_pdf_type |
typedef void hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::hydra_sum_pdf_tag |
tag
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::PDFSumNonExtendable< PDF1, PDF2, PDFs >::pdfs_tuple_type |
type of the tuple of pdfs
|
inline |
Ctor for used to build AddPdf usable in extended likelihood fits.
pdf1 | first pdf object, |
pdf2 | second pdf object, |
pdfs | remaining pdfs. |
coef | arrary of Parameters, each parameter correspond to a coefficient |
extend | build 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.
|
inline |
Copy constructor.
|
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.
user_parameters | external std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator.
other |
|
inline |
|
inline |
Print all registered parameters, including its value, range, name etc.
|
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 | std::vector<double> containing the list of parameters passed by ROOT::Minuit2. |
|
static |
number of pdfs
class hydra::SPlot |
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
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 Parameter & | GetCoefficient (size_t i) const |
Get the yield corresponding to the PDF i. More... | |
hydra::Eigen::Matrix< double, npdfs, npdfs > | GetCovMatrix () const |
Get the covariance matrix of between the yields of PDFs. More... | |
const functors_tuple_type & | GetFunctors () const |
Get reference to constant of normalized Functor objects. More... | |
hydra::Eigen::Matrix< double, npdfs, npdfs > | GetInverseCovMatrix () const |
const pdfs_tuple_type & | GetPDFs () 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 |
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 |
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::iterator = hydra::thrust::transform_iterator<transformer<W>, Iterator > |
typedef hydra::thrust::tuple<PDF1, PDF2, PDFs...> hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::pdfs_tuple_type |
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::transformer = detail::SWeights<W, typename PDF1::functor_type, typename PDF2::functor_type, typename PDFs::functor_type...> |
using hydra::SPlot< Iterator, PDF1, PDF2, PDFs >::value_type = typename hydra::thrust::iterator_traits<iterator<W> >::value_type |
|
delete |
|
inline |
SPlot constructor.
PDFSumExtendable<PDF1, PDF2, PDFs...> object, already optimized. | |
first | Iterator pointing to the beginning of the data range used to optimize pdf |
last | Iterator pointing to the end of the data range used to optimize pdf . |
|
inline |
SPlot copy constructor.
other |
|
inline |
Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
Get an iterator pointing to beginning of the range of the s-weights corresponding to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
Get an iterator pointing to end of the range of the s-weights.
|
inline |
|
inline |
Get an iterator pointing to end of the range of the s-weights.
|
inline |
|
inline |
Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
Get an iterator pointing to end of the range of the s-weights corresponding to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
|
inline |
Get the covariance matrix of between the yields of PDFs.
|
inline |
Get reference to constant of normalized Functor objects.
|
inline |
|
inline |
Get reference to constant of PDF objects.
|
inline |
Get a range with the s-weights to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
Get a range with the s-weights.
|
inline |
SPlot assignment operator.
other |
|
inline |
Subscript operator to get a range with the s-weights to the PDF i.
hydra | placeholder (_0, _1, ..., _N) |
|
inline |
Subscript operator.
index | i |
|
static |
class hydra::UserParameters |
Class implementing a interface to ROOT::Minuit2::MnUserParameters.
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 |
UserParameters & | operator= (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... | |
|
inline |
|
inline |
Copy constructor.
other |
Add a parameter to be tracked by ROOT::Minuit2.
param | |
update_size |
|
inline |
Get an constant reference to the hold ROOT::Minuit2::MnUserParameters.
|
inline |
Get a constant reference to the hold ROOT::Minuit2::MnUserParameters.
|
inline |
Get a constant reference to the hold std::unique_ptr<ROOT::Minuit2::MnUserParameters>
|
inline |
|
inline |
Assignment operator.
other |
|
inline |
Print the parameters (ROOT::Minuit2)
|
inline |
Print the parameters.
|
inline |
Set the ROOT::Minuit2 state.
state | ROOT::Minuit2::MnUserParameters object. |
|
inline |
|
inline |
Update model parameters errors with the values hold by an ROOT::Minuit2::MinosError object.
minos_error |
|
inline |
Update model parameters with the values hold by an ROOT::Minuit2::FunctionMinimum object.
minimum |
class LogLikelihoodFCN< PDFSumExtendable< 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 \).
var_list | std::array<hydra::Parameter, N > holding the (N_{Pdf} -1) hydra::Parameter yields |
pdf1 | hydra::Pdf object one |
pdf2 | hydra::Pdf object two |
pdfs | ... more 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 \).
var_list | std::array<hydra::Parameter, N > holding the (N_{Pdf} -1) hydra::Parameter yields |
pdf1 | hydra::Pdf object one |
pdf2 | hydra::Pdf object two |
pdfs | ... more pdfs |
|
inline |
#include <LogLikelihoodFCN.h>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
first | iteraror pointing to begin of data range |
last | iteraror pointing to end of data range |
weights | iteraror pointing to begin of weights range |
|
inline |
#include <LogLikelihoodFCN1.inl>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
first | iteraror pointing to begin of data range |
last | iteraror pointing to end of data range |
weights | iteraror pointing to begin of weights range |
|
inline |
#include <LogLikelihoodFCN3.inl>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
first | iteraror pointing to begin of data range |
last | iteraror pointing to end of data range |
weights | iteraror pointing to begin of weights range |
|
inline |
#include <LogLikelihoodFCN.h>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
points | "iterable" storing the data |
weights | "iterables" storing the weights |
|
inline |
#include <LogLikelihoodFCN1.inl>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
points | "iterable" storing the data |
weights | "iterables" storing the weights |
|
inline |
#include <LogLikelihoodFCN3.inl>
Conveniency function to build up loglikehood fcns.
hydra::Pdf object | |
first | iteraror pointing to begin of data range |
last | iteraror pointing to end of data range |
weights | iteraror pointing to begin of weights range |
|
inline |
#include <LogLikelihoodFCN3.inl>
Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.
hydra::PDFSumNonExtendable<Pdfs...> object | |
data | histogram storing the data |
|
inline |
#include <LogLikelihoodFCN.h>
Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.
hydra::Pdf<Functor,Integrator> object. | |
data | histogram storing the data. |
Pdf<FUNCTOR, INTEGRATOR> hydra::make_pdf | ( | FUNCTOR const & | functor, |
INTEGRATOR | integrator | ||
) |
#include <Pdf.h>
Build a hydra::Pdf given a shape described by a functor and a integrator (algorithm or functor).
functor | shape. |
integrator | algorithm or functor. |
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.
|
inline |
#include <LogLikelihoodFCN.h>
Convenience function to build up loglikehood fcns for densely and sparsely binned datasets.
hydra::PDFSumExtendable<Pdfs...> object. | |
data | histogram storing the data. |
hydra::PDFSumNonExtendable<Pdfs...> object | |
data | histogram storing the data |