All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hit::ICARUShitFitCache Class Reference

Customized function cache for ICARUS hit shape. More...

Inheritance diagram for hit::ICARUShitFitCache:
hit::GausFitCache

Public Member Functions

 ICARUShitFitCache (std::string const &new_name="ICARUShitFitCache")
 Constructor (see base class constructor). More...
 
- 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 TF1 * GetClone (size_t nGaus)
 
virtual std::string FunctionName (size_t nFunc) const
 Returns a name for the function with nFunc base functions. More...
 

Static Public Member Functions

static Double_t fitf (Double_t const *x, Double_t const *par)
 ICARUS hit shape. More...
 

Protected Member Functions

virtual TF1 * CreateFunction (size_t nFunc) const
 Creates and returns the function with specified number of peaks. More...
 

Additional Inherited Members

- Protected Attributes inherited from hit::GausFitCache
std::string name
 name of the cache More...
 
std::vector< TF1 * > funcs
 

Detailed Description

Customized function cache for ICARUS hit shape.

Definition at line 68 of file ICARUSHitFinder_module.cc.

Constructor & Destructor Documentation

hit::ICARUShitFitCache::ICARUShitFitCache ( std::string const &  new_name = "ICARUShitFitCache")
inline

Constructor (see base class constructor).

Definition at line 72 of file ICARUSHitFinder_module.cc.

73  : hit::GausFitCache(new_name)
74  {}
A set of TF1 linear sum of base functions (Gaussians)
Definition: GausFitCache.h:46

Member Function Documentation

virtual TF1* hit::ICARUShitFitCache::CreateFunction ( size_t  nFunc) const
inlineprotectedvirtual

Creates and returns the function with specified number of peaks.

Reimplemented from hit::GausFitCache.

Definition at line 82 of file ICARUSHitFinder_module.cc.

83  {
84  unsigned int const nPeaks = nFunc;
85  std::string const func_name = FunctionName(nFunc);
86  auto* pF = new TF1(func_name.c_str(), fitf, 0.0, 1.0, 1 + nFunc * 5);
87  pF->SetParName(0, "NPeaks");
88  pF->FixParameter(0, (double) nPeaks);
89  return pF;
90  } // CreateFunction()
virtual std::string FunctionName(size_t nFunc) const
Returns a name for the function with nFunc base functions.
static Double_t fitf(Double_t const *x, Double_t const *par)
ICARUS hit shape.
Double_t hit::ICARUShitFitCache::fitf ( Double_t const *  x,
Double_t const *  par 
)
static

ICARUS hit shape.

Definition at line 1364 of file ICARUSHitFinder_module.cc.

1365  {
1366  int const npeaks=(int)(par[0]);
1367  Double_t fitval=0;
1368  for(int jp=0;jp<npeaks;jp++)
1369  fitval += par[5*jp+1]+par[5*jp+2]*TMath::Exp(-(x[0]-par[5*jp+3])/par[5*jp+4])/(1+TMath::Exp(-(x[0]-par[5*jp+3])/par[5*jp+5]));
1370  return fitval;
1371  }
process_name opflash particleana ie x

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