Public Member Functions | Protected Member Functions | List of all members
hit::CompiledGausFitCache< MaxGaus > Class Template Reference

A set of TF1 linear sum of Gaussians. More...

#include <GausFitCache.h>

Inheritance diagram for hit::CompiledGausFitCache< MaxGaus >:
hit::details::CompiledGausFitCacheBaseStruct hit::GausFitCache

Public Member Functions

 CompiledGausFitCache (std::string new_name="CompiledGausFitCache")
 Constructor: initializes all the functions. More...
 
virtual unsigned int MaxGaussians () const
 Returns the maximum number of Gaussians in a function that we support. More...
 
constexpr unsigned int StoredMaxGaussians () const
 Returns the maximum number of Gaussians in a function that we support. More...
 
- Public Member Functions inherited from hit::details::CompiledGausFitCacheBaseStruct
virtual TF1 * GetClone (size_t nGaus)
 Throws an exception (ROOT does not support cloning compiled functions) More...
 
template<>
Double_t ngaus (Double_t const *x, Double_t const *params)
 
- Public Member Functions inherited from hit::GausFitCache
 GausFitCache (std::string new_name="GausFitCache")
 Constructor; optionally set the name of the repository. More...
 
virtual ~GausFitCache ()
 Destructor. More...
 
std::string GetName () const
 Return the name of this cache. More...
 
virtual TF1 * Get (size_t nFunc)
 Returns a function sum of nFunc base functions. More...
 
virtual std::string FunctionName (size_t nFunc) const
 Returns a name for the function with nFunc base functions. More...
 

Protected Member Functions

virtual TF1 * CreateFunction (size_t nGaus) const
 Throws an error, since this class can't create functions run-time. More...
 
- Protected Member Functions inherited from hit::details::CompiledGausFitCacheBaseStruct
template<unsigned int NGaus>
void InitializeCompiledGausFitVector ()
 Returns a vector initialized with multigaussians. More...
 
template<unsigned int NGaus>
void AppendFunction ()
 Adds one function. More...
 
void CannotCreateFunction (size_t nGaus) const
 Throws an error asserting compiled functions can't be cretead run-time. More...
 
template<>
void InitializeCompiledGausFitVector ()
 

Additional Inherited Members

- Public Types inherited from hit::details::CompiledGausFitCacheBaseStruct
template<unsigned int NGaus, unsigned int CutOff>
using NGaussTruncClass = FuncSum< NGaus, gaus_trunc< CutOff >, 3U >
 Class around sum of NGaus Gaussian functions truncated at CutOff sigmas. More...
 
- Static Public Member Functions inherited from hit::details::CompiledGausFitCacheBaseStruct
static Double_t gaus (Double_t const *x, Double_t const *params)
 Single Gaussian function. More...
 
template<unsigned int CutOff>
static Double_t gaus_trunc (Double_t const *x, Double_t const *params)
 
template<unsigned int NGaus>
static Double_t ngaus (Double_t const *x, Double_t const *params)
 
template<unsigned int NGaus, unsigned int CutOff>
static Double_t ngaus_trunc (Double_t const *x, Double_t const *params)
 Sum of NGaus Gaussian functions truncated at CutOff sigmas. More...
 
- Protected Attributes inherited from hit::GausFitCache
std::string name
 name of the cache More...
 
std::vector< TF1 * > funcs
 

Detailed Description

template<unsigned int MaxGaus = 10>
class hit::CompiledGausFitCache< MaxGaus >

A set of TF1 linear sum of Gaussians.


Template Parameters
MaxGausthe maximum number of Gaussians in the stored functions

This class stores a predefined number MaxGaus of TF1 from pre-compiled functions.

Definition at line 277 of file GausFitCache.h.

Constructor & Destructor Documentation

template<unsigned int MaxGaus = 10>
hit::CompiledGausFitCache< MaxGaus >::CompiledGausFitCache ( std::string  new_name = "CompiledGausFitCache< MaxGaus >")
inline

Constructor: initializes all the functions.

Definition at line 282 of file GausFitCache.h.

282  :
283  details::CompiledGausFitCacheBaseStruct(new_name)
284  { InitializeCompiledGausFitVector<MaxGaus>(); }

Member Function Documentation

template<unsigned int MaxGaus = 10>
virtual TF1* hit::CompiledGausFitCache< MaxGaus >::CreateFunction ( size_t  nGaus) const
inlineprotectedvirtual

Throws an error, since this class can't create functions run-time.

Reimplemented from hit::GausFitCache.

Definition at line 294 of file GausFitCache.h.

295  { CannotCreateFunction(nGaus); }
void CannotCreateFunction(size_t nGaus) const
Throws an error asserting compiled functions can&#39;t be cretead run-time.
template<unsigned int MaxGaus = 10>
virtual unsigned int hit::CompiledGausFitCache< MaxGaus >::MaxGaussians ( ) const
inlinevirtual

Returns the maximum number of Gaussians in a function that we support.

Reimplemented from hit::details::CompiledGausFitCacheBaseStruct.

Definition at line 286 of file GausFitCache.h.

286 { return StoredMaxGaussians(); }
constexpr unsigned int StoredMaxGaussians() const
Returns the maximum number of Gaussians in a function that we support.
Definition: GausFitCache.h:289
template<unsigned int MaxGaus = 10>
constexpr unsigned int hit::CompiledGausFitCache< MaxGaus >::StoredMaxGaussians ( ) const
inline

Returns the maximum number of Gaussians in a function that we support.

Definition at line 289 of file GausFitCache.h.

289 { return MaxGaus; }

The documentation for this class was generated from the following file: