Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunecore
dunecore
DuneCommon
Utility
shiftHistFit.h
Go to the documentation of this file.
1
// shiftHistFit.h
2
//
3
// David Adams
4
// May 2021
5
//
6
// Fit a histogram with a TF1. The fitting is done after shifting the histogram
7
// and function by a specified distance with results presented at the original
8
// position. The goal is to avoid numerical problame that can arise when the
9
// position coordinate, e.g. TPC ticks, reaches large values.
10
//
11
// Call TF1::Fit after suppressing Root logging.
12
// ph - histogram to be fit
13
// pf - fit function
14
// fopt - Root fitting options
15
// spar or ipar - name or index of the position parameter in the fit function
16
// xshift - fit h'(x') = h(x) where x = x' + xshift
17
// Return value is fit status. Include "S" in fopt to get IsValid
18
// from the fit result pointer.
19
20
#ifndef shiftHistFit_H
21
#define shiftHistFit_H
22
23
#include <string>
24
25
class
TH1;
26
class
TF1;
27
28
int
shiftHistFit
(TH1* ph, TF1* pf,
std::string
fopt,
int
ipar,
double
xshift);
29
int
shiftHistFit
(TH1* ph, TF1* pf,
std::string
fopt,
std::string
spar,
double
xshift);
30
31
#endif
shiftHistFit
int shiftHistFit(TH1 *ph, TF1 *pf, std::string fopt, int ipar, double xshift)
Definition:
shiftHistFit.cxx:12
string
std::string string
Definition:
nybbler.cc:12
Generated by
1.8.11