Public Member Functions | Protected Member Functions | Private Types | List of all members
hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff > Class Template Reference

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

#include <GausFitCache.h>

Inheritance diagram for hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >:
hit::details::CompiledGausFitCacheBaseStruct hit::GausFitCache

Public Member Functions

 CompiledTruncatedGausFitCache (std::string new_name="CompiledTruncatedGausFitCache")
 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 ()
 

Private Types

template<unsigned int NGaus>
using CutOffNGaussianClass = NGaussTruncClass< NGaus, CutOff >
 

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, unsigned int CutOff = 5>
class hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >

A set of TF1 linear sum of truncated Gaussians.


Template Parameters
MaxGausthe maximum number of Gaussians in the stored functions
CutOffnumber of sigmas beyond which the function evaluates as 0

This class stores a predefined number MaxGaus of TF1 from pre-compiled functions. Each function is the linear sum of truncated Gaussians, at most MaxGaus of them,

Definition at line 310 of file GausFitCache.h.

Member Typedef Documentation

template<unsigned int MaxGaus = 10, unsigned int CutOff = 5>
template<unsigned int NGaus>
using hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >::CutOffNGaussianClass = NGaussTruncClass<NGaus, CutOff>
private

Definition at line 314 of file GausFitCache.h.

Constructor & Destructor Documentation

template<unsigned int MaxGaus = 10, unsigned int CutOff = 5>
hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >::CompiledTruncatedGausFitCache ( std::string  new_name = "CompiledTruncatedGausFitCache< MaxGaus, CutOff >")
inline

Constructor: initializes all the functions.

Definition at line 320 of file GausFitCache.h.

320  :
321  details::CompiledGausFitCacheBaseStruct(new_name)
322  {
324  }
static void fill(CompiledGausFitCacheBaseStruct &cache)
Definition: GausFitCache.h:425

Member Function Documentation

template<unsigned int MaxGaus = 10, unsigned int CutOff = 5>
virtual TF1* hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >::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 335 of file GausFitCache.h.

336  { 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, unsigned int CutOff = 5>
virtual unsigned int hit::CompiledTruncatedGausFitCache< MaxGaus, CutOff >::MaxGaussians ( ) const
inlinevirtual

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

Reimplemented from hit::details::CompiledGausFitCacheBaseStruct.

Definition at line 327 of file GausFitCache.h.

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

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

Definition at line 330 of file GausFitCache.h.

330 { return MaxGaus; }

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