A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://multithreadcorner.github.io/Hydra/group__fit.html below:

Hydra: Data fitting

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...
 

Data fit functionalities of Hydra.

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 \).

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...
  ◆ base_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

base class type

◆ functor_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ functors_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

type of the tuple of pdf::functors

◆ hydra_pdf_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ hydra_sum_pdf_tag

template<typename PDF1 , typename PDF2 , typename ... PDFs>

tag

◆ pdfs_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

type of the tuple of pdfs

◆ PDFSumExtendable() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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

Parameters
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.

◆ PDFSumExtendable() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ PDFSumExtendable() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

Copy constructor.

◆ AddUserParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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_parameters external std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters.
◆ Coefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetCoefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetCoefSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetFunctor()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetFunctors()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetPDFs()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ IsExtended()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ operator()() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T1 >

◆ operator()() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T1 , typename T2 >

◆ operator()() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T >

◆ operator=()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

Assignment operator.

Parameters
Returns
◆ PDF()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<unsigned int I>

◆ PrintRegisteredParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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

◆ SetExtended()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ SetParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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
parameters std::vector<double> containing the list of parameters passed by ROOT::Minuit2.
◆ npdfs

template<typename PDF1 , typename PDF2 , typename ... PDFs>

number of pdfs

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 \).

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...
  ◆ base_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

base class type

◆ functor_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ functors_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

type of the tuple of pdf::functors

◆ hydra_pdf_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ hydra_sum_pdf_tag

template<typename PDF1 , typename PDF2 , typename ... PDFs>

tag

◆ pdfs_tuple_type

template<typename PDF1 , typename PDF2 , typename ... PDFs>

type of the tuple of pdfs

◆ PDFSumNonExtendable() [1/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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

Parameters
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.

◆ PDFSumNonExtendable() [2/2]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

Copy constructor.

◆ AddUserParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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_parameters external std::vector<hydra::Parameter*> object holding the list of pointers to functor parameters.
◆ Coefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetCoefficient()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetCoefPartialSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetCoefSum()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetFunctor()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetFunctors()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ GetPDFs()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

◆ operator()() [1/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T1 >

◆ operator()() [2/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T1 , typename T2 >

◆ operator()() [3/3]

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<typename T >

◆ operator=()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

Assignment operator.

Parameters
Returns
◆ PDF()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

template<unsigned int I>

◆ PrintRegisteredParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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

◆ SetParameters()

template<typename PDF1 , typename PDF2 , typename ... PDFs>

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
parameters std::vector<double> containing the list of parameters passed by ROOT::Minuit2.
◆ npdfs

template<typename PDF1 , typename PDF2 , typename ... PDFs>

number of pdfs

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
Returns

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
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.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4