Customized function cache for ICARUS long hit shape.
More...
|
| ICARUSlongHitFitCache (std::string const &new_name="ICARUSlongHitFitCache") |
| Constructor (see base class constructor). More...
|
|
| 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 Double_t | fitlong (Double_t const *x, Double_t const *par) |
| ICARUS hit shape. More...
|
|
|
virtual TF1 * | CreateFunction (size_t nFunc) const |
| Creates and returns the function with specified number of peaks. More...
|
|
Customized function cache for ICARUS long hit shape.
Definition at line 95 of file ICARUSHitFinder_module.cc.
hit::ICARUSlongHitFitCache::ICARUSlongHitFitCache |
( |
std::string const & |
new_name = "ICARUSlongHitFitCache" | ) |
|
|
inline |
Constructor (see base class constructor).
Definition at line 99 of file ICARUSHitFinder_module.cc.
A set of TF1 linear sum of base functions (Gaussians)
virtual TF1* hit::ICARUSlongHitFitCache::CreateFunction |
( |
size_t |
nFunc | ) |
const |
|
inlineprotectedvirtual |
Creates and returns the function with specified number of peaks.
Reimplemented from hit::GausFitCache.
Definition at line 109 of file ICARUSHitFinder_module.cc.
111 unsigned int const nPeaks = nFunc;
113 auto* pF =
new TF1(func_name.c_str(),
fitlong, 0.0, 1.0, 1 + nFunc * 7);
114 pF->SetParName(0,
"NPeaks");
115 pF->FixParameter(0, (
double) nPeaks);
static Double_t fitlong(Double_t const *x, Double_t const *par)
ICARUS hit shape.
virtual std::string FunctionName(size_t nFunc) const
Returns a name for the function with nFunc base functions.
Double_t hit::ICARUSlongHitFitCache::fitlong |
( |
Double_t const * |
x, |
|
|
Double_t const * |
par |
|
) |
| |
|
static |
ICARUS hit shape.
Definition at line 1372 of file ICARUSHitFinder_module.cc.
1374 auto const nPeaks =
static_cast<std::size_t
>(par[0]);
1375 Double_t fitval = 0.0;
1376 for(std::size_t jp = 0; jp < nPeaks; ++jp) {
1377 Double_t
const* parj = par + (7 * jp);
1378 int const smax = std::floor(parj[6]);
1379 if (smax == 0)
continue;
1380 double const neg_dxj = -(
x[0] - parj[3]);
1381 fitval += (smax + parj[7] * (smax*(smax-1)/2))
1383 parj[1]+parj[2]*
std::exp(neg_dxj/parj[4])
1384 / (1.0 +
std::exp(neg_dxj/parj[5]))
process_name opflash particleana ie x
The documentation for this class was generated from the following file: