5#ifndef ZDCANALYSIS_ZDCFITWRAPPER_H
6#define ZDCANALYSIS_ZDCFITWRAPPER_H
111 ZDCFitWrapper(
const std::shared_ptr<TF1>& wrapperTF1,
const std::vector<FitParameter>& defaultParamSet) :
131 void Initialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax);
132 void Initialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax,
float fitTmin,
float fitTmax,
float fitTRef);
144 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax) = 0;
274 ZDCFitExpFermiVariableTaus(
const std::string& tag,
float tmin,
float tmax,
bool fixTau1,
bool fixTau2,
float tau1,
float tau2);
276 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
288 float fitT0 = theTF1->GetParameter(1);
290 float tau1 = theTF1->GetParameter(2);
291 float tau2 = theTF1->GetParameter(3);
295 if (tau2 > tau1) fitT0 += tau1 * std::log(tau2 / tau1 - 1.0);
304 else throw std::runtime_error(
"Fit parameter does not exist.");
310 double amp = theTF1->GetParameter(0);
311 double constant = theTF1->GetParameter(4);
313 if (amp > 0)
return constant / amp;
317 virtual double operator()(
const double *
x,
const double *p)
override{
344 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
356 float fitT0 = theTF1->GetParameter(1);
358 float tau1 = theTF1->GetParameter(2);
359 float tau2 = theTF1->GetParameter(3);
363 if (tau2 > tau1) fitT0 += tau1 * std::log(tau2 / tau1 - 1.0);
372 else throw std::runtime_error(
"Fit parameter does not exist.");
378 double amp = theTF1->GetParameter(0);
379 double constant = theTF1->GetParameter(4);
381 if (amp > 0)
return constant / amp;
385 virtual double operator()(
const double *
x,
const double *p)
override{
395 static const std::map<std::string, std::vector<ZDCFitWrapper::FitParameter>>
s_ConfigParamMap;
414 theTF1->SetNpx(1000);
421 ZDCFitExpFermiVariableTausInduct(
const std::string& tag,
const std::string & paramSet,
float tmin,
float tmax,
bool fixTau1,
bool fixTau2,
float tau1,
float tau2);
423 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
435 if (std::isnan(time))
return 0;
456 else throw std::runtime_error(
"Fit parameter does not exist.");
464 double constant = theTF1->GetParameter(4);
466 if (amp > 1e-6)
return constant / amp;
470 virtual double operator()(
const double *
x,
const double *p)
override{
501 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
523 else throw std::runtime_error(
"Fit parameter does not exist.");
529 double amp = theTF1->GetParameter(0);
530 if (amp <= 0)
return -1;
532 double C = theTF1->GetParameter(2);
536 virtual double operator() (
const double *
x,
const double *p)
override
542 double deltaT =
x[0] -
t0;
565 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
570 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
574 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
588 virtual float GetPreT0()
const override {
return 0;}
605 else throw std::runtime_error(
"Fit parameter does not exist.");
614 double amp = theTF1->GetParameter(0);
615 if (amp <= 0)
return -1;
617 double preAmp = theTF1->GetParameter(2);
618 double preT0 = theTF1->GetParameter(3);
620 double deltaTPre = maxTime - preT0;
623 return background / (amp + background);
626 virtual double operator() (
const double *
x,
const double *p)
override
632 double preAmp = p[2];
636 double deltaT = t -
t0;
637 double deltaTPre = t - preT0;
650 return C + pulse1 + pulse2;
670 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
676 double ampMin, ampMax;
679 double initialAmp = std::min<double>(std::max<double>(amp, ampMin), ampMax);
685 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
716 else throw std::runtime_error(
"Fit parameter does not exist.");
725 double amp = theTF1->GetParameter(0);
726 if (amp <= 0)
return -1;
728 double preAmp = theTF1->GetParameter(2);
729 double preT0 = theTF1->GetParameter(3);
731 double deltaTPre = maxTime - preT0;
734 return background / (amp + background);
737 virtual double operator() (
const double *
x,
const double *p)
override
745 double preAmp = p[4];
754 double deltaT = t -
t0;
755 double deltaTPre = t - preT0;
766 return C + pulse1 + pulse2;
783 float defExpTau,
float fixExpTau);
786 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
791 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 0.5));
815 else throw std::runtime_error(
"Fit parameter does not exist.");
823 double amp = theTF1->GetParameter(0);
824 if (amp <= 0)
return -1;
826 double preAmp = theTF1->GetParameter(2);
827 double preT0 = theTF1->GetParameter(3);
829 double deltaTPre = maxTime - preT0;
832 return background / (amp + background);
835 virtual double operator() (
const double *
x,
const double *p)
override
841 double expAmp = p[2];
842 double expTau = p[3];
843 double expSqrtTau = p[4];
846 double deltaT = t -
t0;
854 if (t > 0 && std::abs(expSqrtTau)>1e-6) expPre = expAmp * (std::exp(-t/expTau-expSqrtTau*std::sqrt(t)) - std::exp(-tRef/expTau));
855 else expPre = expAmp * (std::exp(-t/expTau) - std::exp(-tRef/expTau));
857 return C + pulse + expPre;
873 float defExpTau,
float fixExpTau);
876 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
881 GetWrapperTF1()->SetParameter(4, std::max(amp, (
float) 0.5));
896 float fitT0 = theTF1->GetParameter(1);
898 float tau1 = theTF1->GetParameter(2);
899 float tau2 = theTF1->GetParameter(3);
903 if (tau2 > tau1) fitT0 += tau1 * std::log(tau2 / tau1 - 1.0);
914 else throw std::runtime_error(
"Fit parameter does not exist.");
920 double amp = theTF1->GetParameter(0);
921 if (amp <= 0)
return -1;
925 double expAmp = theTF1->GetParameter(4);
926 double expTau = theTF1->GetParameter(5);
927 double bexpSqrt = theTF1->GetParameter(6);
930 double expPre = expAmp * (std::exp(-maxTime/expTau - bexpSqrt*maxTime*maxTime) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
932 return expPre / (amp + expPre);
935 virtual double operator() (
const double *
x,
const double *p)
override
945 double expAmp = p[4];
946 double expTau = p[5];
947 double bexpSqrt = p[6];
948 double reflFrac = p[7];
957 double deltaT = t -
t0;
966 expPre = expAmp * (std::exp(-t/expTau - bexpSqrt*t*t) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
968 return pulse + expPre;
974 static const std::map<std::string, std::vector<ZDCFitWrapper::FitParameter>>
s_ConfigParamMap;
990 if (std::isnan(tsubtr)) {
1002 float defExpTau,
float fixExpTau);
1004 float tau1,
float tau2);
1007 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1012 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 0.5));
1031 if (std::isnan(timeMax))
return -100;
1047 throw std::runtime_error(
"Fit parameter does not exist.");
1053 double amp = theTF1->GetParameter(0);
1054 if (amp < 1e-6)
return -1;
1058 double expAmp = theTF1->GetParameter(2);
1059 double expTau = theTF1->GetParameter(3);
1060 double bexpSqrt = theTF1->GetParameter(4);
1063 double expPre = expAmp * (std::exp(-maxTime/expTau - bexpSqrt*maxTime*maxTime) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
1065 return expPre / (amp + expPre);
1075 double expAmp = p[2];
1076 double expTau = p[3];
1077 double bexpSqrt = p[4];
1079 double period = p[6];
1080 double inductA = p[7];
1081 double inductB = p[8];
1090 double deltaT = t -
t0;
1099 expPre = expAmp * (std::exp(-t/expTau - bexpSqrt*t*t) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
1101 return pulse +
C + expPre;
1107 static const std::map<std::string, std::vector<ZDCFitWrapper::FitParameter>>
s_ConfigParamMap;
1133 float tau1,
float tau2);
1137 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1143 double ampMin, ampMax;
1146 double initialAmp = std::min<double>(std::max<double>(amp, ampMin), ampMax);
1152 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1190 throw std::runtime_error(
"Fit parameter does not exist.");
1199 double amp = theTF1->GetParameter(0);
1200 if (amp < 1e-6)
return -1;
1202 double preAmp = theTF1->GetParameter(2);
1203 double preT0 = theTF1->GetParameter(3);
1205 double deltaTPre = maxTime - preT0;
1208 return background / (amp + background);
1217 double preAmp = p[2];
1218 double preT0 = p[3];
1220 double period = p[5];
1231 double deltaT = t -
t0;
1232 double deltaTPre = t - preT0;
1243 return C + pulse1 + pulse2;
1266 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1286 else throw std::runtime_error(
"Fit parameter does not exist.");
1292 double amp = theTF1->GetParameter(0);
1293 if (amp <= 0)
return -1;
1295 double slope = theTF1->GetParameter(2);
1297 double background = slope *
GetTime();
1298 return background / amp;
1305 double deltaT =
x[0] -
t0;
1307 double bckgd = p[2] *
x[0] + p[3];
1311 return expFermi + bckgd;
1329 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1336 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1340 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1376 else throw std::runtime_error(
"Fit parameter does not exist.");
1385 double amp = theTF1->GetParameter(0);
1386 if (amp <= 0)
return -1;
1388 double preAmp = theTF1->GetParameter(2);
1389 double preT0 = theTF1->GetParameter(3);
1390 double slope = theTF1->GetParameter(4);
1392 double deltaTPre = maxTime - preT0;
1394 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1397 return background / amp;
1406 double preAmp = p[2];
1407 double preT0 = p[3];
1408 double linSlope = p[4];
1410 double deltaT = t -
t0;
1411 double deltaTPre = t - preT0;
1422 double bckgd = linSlope * (t - deltaPresamp) + p[5];
1424 return pulse1 + pulse2 + bckgd;
1444 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1448 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1450 GetWrapperTF1()->SetParameter(6, std::max(std::abs(expamp), (
float) 1.5));
1456 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1492 else throw std::runtime_error(
"Fit parameter does not exist.");
1501 double amp = theTF1->GetParameter(0);
1502 if (amp <= 0)
return -1;
1504 double preAmp = theTF1->GetParameter(2);
1505 double preT0 = theTF1->GetParameter(3);
1506 double slope = theTF1->GetParameter(4);
1508 double deltaTPre = maxTime - preT0;
1510 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1513 return background / amp;
1522 double preAmp = p[2];
1523 double preT0 = p[3];
1524 double linSlope = p[4];
1525 double linConst = p[5];
1526 double expamp = p[6];
1528 double deltaT = t -
t0;
1529 double deltaTPre = t - preT0;
1539 double linBG = linSlope * (t - deltaPresamp) + linConst;
1540 double expBG = expamp * std::exp(-(t) /
m_tau2) - expamp;
1542 return pulse1 + pulse2 + linBG + expBG;
1558 ZDCFitGeneralPulse(
const std::string& tag,
float tmin,
float tmax,
float tau1,
float tau2);
1561 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1567 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1569 GetWrapperTF1()->SetParameter(6, std::max(std::abs(expamp), (
float) 1.5));
1571 if (fixPrePulseToZero) {
1580 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1581 virtual void SetPostPulseT0Range(
float tmin,
float tmax,
float initialPostT0)
override;
1624 else throw std::runtime_error(
"Fit parameter does not exist.");
1633 double amp = theTF1->GetParameter(0);
1634 if (amp <= 0)
return -1;
1635 double preAmp = theTF1->GetParameter(2);
1636 double preT0 = theTF1->GetParameter(3);
1637 double slope = theTF1->GetParameter(4);
1639 double deltaTPre = maxTime - preT0;
1641 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1644 return background / amp;
1653 double preAmp = p[2];
1654 double preT0 = p[3];
1655 double linSlope = p[4];
1656 double linConst = p[5];
1657 double expamp = p[6];
1658 double postAmp = p[7];
1659 double postT0 = p[8];
1661 double deltaT = t -
t0;
1662 double deltaTPre = t - preT0;
1663 double deltaTPost = t - postT0;
1674 double linBG = linSlope * t + linConst;
1677 return pulse1 + pulse2 + pulse3 + linBG + expBG;
1683 float fitT0 = theTF1->GetParameter(1);
1685 float tau1 = theTF1->GetParameter(2);
1686 float tau2 = theTF1->GetParameter(3);
1690 double corrT0 = fitT0;
1691 if (tau2 > tau1) corrT0 += tau1 * std::log(tau2 / tau1 - 1.0);
1693 double deltaT = theTF1->GetParameter(5)/8;
1694 double tmin = corrT0 - deltaT;
1695 double tmax = corrT0 + deltaT;
1697 return theTF1->GetMaximumX(tmin, tmax, 1e-4, 20,
false);
1705 double amp =
pvec[0];
1707 double tau1 =
pvec[2];
1708 double tau2 =
pvec[3];
1711 double tauRatio = tau2 / tau1;
1712 double tauRatioMinunsOne = tauRatio - 1;
1714 double norm = (std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1715 ( 1 + std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))));
1717 double deltaT = t -
t0;
1718 if (deltaT < 0) deltaT = 0;
1720 double expTerm = std::exp(-deltaT / tau2);
1721 double fermiTerm = 1. / (1. + std::exp(-(t -
t0) / tau1));
1723 return amp * expTerm * fermiTerm / norm +
C;
1730 double amp =
pvec[0];
1732 double tau1 =
pvec[2];
1733 double tau2 =
pvec[3];
1736 double refldelay =
pvec[5];
1737 double reflFrac =
pvec[6];
1738 double reflwidth =
pvec[7];
1739 double delta =
pvec[8];
1741 double tauRatio = tau2 / tau1;
1742 double tauRatioMinunsOne = tauRatio - 1;
1744 double norm = std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1745 ( 1 + std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))) ;
1747 double deltaT = t -
t0;
1748 if (deltaT < 0) deltaT = 0;
1753 double expTerm = delta + std::exp(-deltaT / tau2);
1754 double fermiTerm = 1. / (1. + std::exp(-(t -
t0) / tau1));
1756 double deltaTRefl = deltaT - refldelay;
1757 double reflTerm = -reflFrac*amp*std::exp(-0.5*deltaTRefl*deltaTRefl/reflwidth/reflwidth);
1759 return amp * expTerm * fermiTerm / norm +
C + reflTerm;
1766 double amp =
pvec[0];
1768 double tau1 =
pvec[2];
1769 double tau2 =
pvec[3];
1772 double period =
pvec[5];
1773 double Acos =
pvec[6];
1774 double Bsin =
pvec[7];
1775 double bI =
pvec[8];
1776 double delta =
pvec[9];
1778 double twoPiOverPeriod = 2.0*
M_PI/period;
1780 double deltaT = t -
t0;
1781 double norm = 1, expTerm = 1, fermiTerm = 1, inductTerm = 1;
1784 inductTerm = (1.0 + exp(-bI*deltaT)*(Acos*std::cos(deltaT*twoPiOverPeriod) +
1785 Bsin*std::sin(deltaT*twoPiOverPeriod)))/(1+Acos);
1786 expTerm = delta + std::exp(-deltaT / tau2)*inductTerm;
1788 if (deltaT/tau1 < 7) fermiTerm = 1. / (1. + std::exp(-deltaT / tau1));
1790 return amp * expTerm * fermiTerm * inductTerm/ norm +
C;
double ZDCFermiExpFit(const double *xvec, const double *pvec)
double getInductFuncTimeMax(const TF1 *theTF1)
double ZDCFermiExpFitRefl(const double *xvec, const double *pvec)
double ZDCFermiExpFitInduct(const double *xvec, const double *pvec)
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
virtual float GetPreAmp() const override
virtual float GetTau1() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetBkgdMaxFraction() const override
virtual float GetPostAmp() const override
virtual float GetExpAmp() const override
virtual float GetTime() const override
virtual void SetPostPulseT0Range(float, float, float) override
virtual float GetAmpError() const override
virtual float GetPreT0() const override
virtual float GetTau2() const override
virtual float GetPostT0() const override
ZDCFitComplexPrePulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
virtual void SetInitialPrePulse(float amp, float t0, float expamp, bool) override
unsigned int GetPreT0ParIndex() const override
std::shared_ptr< TF1 > m_expFermiFunc
virtual float GetAmplitude() const override
virtual unsigned int GetNumShapeParameters() const override
ZDCFitExpFermiFixedTaus(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
virtual float GetAmplitude() const override
virtual float GetBkgdMaxFraction() const override
~ZDCFitExpFermiFixedTaus()
virtual float GetTau1() const override
virtual float GetTime() const override
virtual float GetAmpError() const override
virtual unsigned int GetNumShapeParameters() const override
virtual float GetShapeParameter(size_t index) const override
std::shared_ptr< TF1 > m_expFermiFunc
virtual float GetTau2() const override
virtual float GetExpTau() const override
virtual unsigned int GetNumShapeParameters() const override
std::shared_ptr< TF1 > m_expFermiInductFunc
virtual float GetTime() const override
virtual float GetTau1() const override
virtual float GetTau2() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetExpAmp() const override
static const std::map< std::string, std::vector< ZDCFitWrapper::FitParameter > > s_ConfigParamMap
virtual void SetInitialExpPulse(float amp) override
virtual float GetAmpError() const override
std::shared_ptr< TF1 > m_expFermiPreFunc
ZDCFitExpFermiInductPreExp(const std::string &tag, float tmin, float tmax, float tau1, float tau2, float defExpTau, float fixExpTau)
virtual float GetAmplitude() const override
virtual float GetBkgdMaxFraction() const override
~ZDCFitExpFermiInductPreExp()
virtual void DoFinalize() override
virtual float GetPostT0() const override
virtual void SetPostPulseT0Range(float, float, float) override
virtual float GetExpAmp() const override
static const std::map< std::string, std::vector< ZDCFitWrapper::FitParameter > > s_ConfigParamMap
virtual float GetPreT0() const override
virtual float GetTime() const override
virtual float GetBkgdMaxFraction() const override
virtual float GetPostAmp() const override
ZDCFitExpFermiInductPrePulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
std::shared_ptr< TF1 > m_expFermiPreFunc
std::shared_ptr< TF1 > m_expFermiInductFunc
virtual void DoFinalize() override
virtual float GetPreAmp() const override
virtual unsigned int GetNumShapeParameters() const override
virtual float GetAmplitude() const override
~ZDCFitExpFermiInductPrePulse()
virtual float GetTau1() const override
virtual void SetInitialPrePulse(float amp, float t0, float, bool) override
virtual float GetAmpError() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetTau2() const override
virtual unsigned int GetPreT0ParIndex() const override
virtual float GetTau1() const override
~ZDCFitExpFermiLHCfPreExp()
virtual float GetExpTau() const override
virtual float GetTau2() const override
virtual unsigned int GetNumShapeParameters() const override
std::shared_ptr< TF1 > m_expFermiLHCfFunc
std::shared_ptr< TF1 > m_expFermiLHCfPreFunc
virtual float GetShapeParameter(size_t index) const override
virtual float GetTime() const override
virtual float GetBkgdMaxFraction() const override
virtual float GetExpAmp() const override
ZDCFitExpFermiLHCfPreExp(const std::string &tag, float tmin, float tmax, float tau1, float tau2, float defExpTau, float fixExpTau)
virtual float GetAmplitude() const override
virtual float GetAmpError() const override
virtual void SetInitialExpPulse(float amp) override
virtual unsigned int GetPreT0ParIndex() const override
std::shared_ptr< TF1 > m_expFermiPreFunc
virtual float GetBkgdMaxFraction() const override
virtual float GetAmpError() const override
virtual unsigned int GetNumShapeParameters() const override
~ZDCFitExpFermiLHCfPrePulse()
virtual float GetExpAmp() const override
virtual float GetTau2() const override
std::shared_ptr< TF1 > m_expFermiLHCfFunc
virtual float GetPreT0() const override
virtual void SetPostPulseT0Range(float, float, float) override
virtual float GetPostT0() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetTime() const override
virtual float GetPreAmp() const override
ZDCFitExpFermiLHCfPrePulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
virtual float GetTau1() const override
virtual float GetPostAmp() const override
virtual float GetAmplitude() const override
virtual void SetInitialPrePulse(float amp, float t0, float, bool) override
std::shared_ptr< TF1 > m_expFermiFunc
virtual float GetBkgdMaxFraction() const override
~ZDCFitExpFermiLinearFixedTaus()
virtual float GetAmpError() const override
virtual float GetTime() const override
virtual unsigned int GetNumShapeParameters() const override
ZDCFitExpFermiLinearFixedTaus(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
virtual float GetTau1() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetTau2() const override
virtual float GetAmplitude() const override
virtual unsigned int GetNumShapeParameters() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetPreT0() const override
virtual float GetPostAmp() const override
virtual float GetBkgdMaxFraction() const override
virtual float GetAmplitude() const override
virtual void SetInitialPrePulse(float amp, float t0, float, bool) override
virtual float GetPostT0() const override
virtual float GetPreAmp() const override
virtual float GetTau1() const override
unsigned int GetPreT0ParIndex() const override
virtual float GetExpAmp() const override
virtual float GetTime() const override
virtual void SetPostPulseT0Range(float, float, float) override
virtual float GetAmpError() const override
virtual float GetTau2() const override
ZDCFitExpFermiLinearPrePulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
std::shared_ptr< TF1 > m_expFermiFunc
~ZDCFitExpFermiLinearPrePulse()
virtual float GetExpAmp() const override
virtual unsigned int GetNumShapeParameters() const override
virtual float GetTau1() const override
virtual float GetAmpError() const override
std::shared_ptr< TF1 > m_expFermiFunc
virtual float GetShapeParameter(size_t index) const override
std::shared_ptr< TF1 > m_expFermiPreFunc
virtual float GetBkgdMaxFraction() const override
virtual float GetAmplitude() const override
virtual void SetInitialExpPulse(float amp) override
virtual float GetExpTau() const override
ZDCFitExpFermiPreExp(const std::string &tag, float tmin, float tmax, float tau1, float tau2, float defExpTau, float fixExpTau)
virtual float GetTime() const override
virtual float GetTau2() const override
~ZDCFitExpFermiPrePulse()
std::shared_ptr< TF1 > m_expFermiPreFunc
virtual float GetPostT0() const override
virtual float GetExpAmp() const override
virtual float GetTau1() const override
virtual float GetAmplitude() const override
virtual float GetAmpError() const override
virtual float GetBkgdMaxFraction() const override
virtual unsigned int GetNumShapeParameters() const override
std::shared_ptr< TF1 > m_expFermiFunc
virtual void SetInitialPrePulse(float amp, float t0, float, bool) override
virtual void SetPostPulseT0Range(float, float, float) override
virtual float GetPreT0() const override
virtual float GetPostAmp() const override
virtual unsigned int GetPreT0ParIndex() const override
ZDCFitExpFermiPrePulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
virtual float GetTime() const override
virtual float GetPreAmp() const override
virtual float GetTau2() const override
virtual float GetShapeParameter(size_t index) const override
virtual void DoFinalize() override
static const std::map< std::string, std::vector< ZDCFitWrapper::FitParameter > > s_ConfigParamMap
virtual float GetTime() const override
virtual float GetTau1() const override
ZDCFitExpFermiVariableTausInduct(const std::string &tag, float tmin, float tmax, bool fixTau1, bool fixTau2, float tau1, float tau2)
virtual double operator()(const double *x, const double *p) override
virtual float GetTau2() const override
virtual float GetShapeParameter(size_t index) const override
virtual unsigned int GetNumShapeParameters() const override
void FixDelta(float value)
virtual float GetAmplitude() const override
virtual float GetAmpError() const override
virtual float GetBkgdMaxFraction() const override
virtual float GetTime() const override
virtual double operator()(const double *x, const double *p) override
virtual float GetAmplitude() const override
ZDCFitExpFermiVariableTausLHCf(const std::string &tag, float tmin, float tmax, bool fixTau1, bool fixTau2, float tau1, float tau2)
virtual float GetShapeParameter(size_t index) const override
virtual float GetBkgdMaxFraction() const override
virtual float GetTau1() const override
virtual float GetAmpError() const override
virtual float GetTau2() const override
virtual unsigned int GetNumShapeParameters() const override
ZDCFitExpFermiVariableTausRun3(const std::string &tag, float tmin, float tmax, bool fixTau1, bool fixTau2, float tau1, float tau2)
virtual float GetTime() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetTau2() const override
virtual float GetAmplitude() const override
virtual double operator()(const double *x, const double *p) override
virtual float GetTau1() const override
ZDCFitExpFermiVariableTaus(const std::string &tag, float tmin, float tmax, bool fixTau1, bool fixTau2, float tau1, float tau2)
virtual float GetBkgdMaxFraction() const override
virtual unsigned int GetNumShapeParameters() const override
virtual float GetAmpError() const override
virtual float GetPreAmp() const override
virtual float GetAmpError() const override
virtual float GetPostT0() const override
virtual float GetPreT0() const override
virtual float GetAmplitude() const override
virtual float GetTau2() const override
unsigned int GetPreT0ParIndex() const override
virtual float GetPostAmp() const override
std::shared_ptr< TF1 > m_expFermiFunc
virtual unsigned int GetNumShapeParameters() const override
virtual float GetShapeParameter(size_t index) const override
virtual float GetExpAmp() const override
virtual float GetTime() const override
virtual void SetInitialPrePulse(float amp, float t0, float expamp, bool fixPrePulseToZero) override
virtual float GetBkgdMaxFraction() const override
virtual float GetTau1() const override
ZDCFitGeneralPulse(const std::string &tag, float tmin, float tmax, float tau1, float tau2)
void setDefaultValue(float value)
std::tuple< std::string, float, bool, float, float, float, bool, float > ParameterDescriptor
FitParameter(const ParameterDescriptor &inData)
ParameterDescriptor m_parData
float constrainValue() const
void setFixed(float fixedValue)
float defaultValue() const
bool constrainFixed() const
virtual float GetTau1() const =0
void Initialize(float initialAmp, float initialT0, float ampMin, float ampMax)
virtual float GetBkgdMaxFraction() const =0
void OverrideParameterSet(const std::vector< FitParameter > ¶meterSet)
virtual TF1 * GetWrapperTF1RawPtr() const
virtual void doUnconstrainFit()=0
virtual std::shared_ptr< TF1 > GetWrapperTF1()
virtual float GetAmpError() const =0
virtual float GetTime() const =0
std::vector< FitParameter > m_parameterSet
virtual float GetShapeParameter(size_t index) const =0
virtual void DoFinalize()
virtual float GetTau2() const =0
bool HaveParameterSet() const
virtual const TF1 * GetWrapperTF1() const
void LoadDefaultParameterSet(const std::vector< FitParameter > ¶meterSet)
ZDCFitWrapper(const std::shared_ptr< TF1 > &wrapperTF1, const std::vector< FitParameter > &defaultParamSet)
virtual void SetT0FitLimits(float tMin, float tMax)=0
ZDCFitWrapper(const std::shared_ptr< TF1 > &wrapperTF1)
virtual float GetAmplitude() const =0
void SetAmpMinMax(float minAmp, float maxAmp)
virtual unsigned int GetNumShapeParameters() const =0
virtual void DoInitialize(float initialAmp, float initialT0, float ampMin, float ampMax)=0
virtual double operator()(const double *x, const double *p)=0
float GetTMinAdjust() const
void SetT0Range(float t0Min, float t0Max)
virtual void doConstrainFit()=0
const FitParameter & GetParameterDescr(const std::string &name)
std::shared_ptr< TF1 > m_wrapperTF1
virtual float GetExpAmp() const =0
virtual float GetExpTau() const =0
ZDCPreExpFitWrapper(std::shared_ptr< TF1 > wrapperTF1, const std::vector< FitParameter > &defaultParamSet)
virtual void SetInitialExpPulse(float expamp)=0
float getDefaultExpTau() const
ZDCPreExpFitWrapper(std::shared_ptr< TF1 > wrapperTF1, float defaultExpTau, bool fixTau)
virtual float GetPreAmp() const =0
virtual void SetPostPulseT0Range(float tmin, float tmax, float initialPostT0)=0
virtual unsigned int GetPreT0ParIndex() const =0
virtual float GetPreT0() const =0
virtual float GetPostT0() const =0
ZDCPrePulseFitWrapper(std::shared_ptr< TF1 > wrapperTF1, const std::vector< FitParameter > &defaultParamSet)
virtual float GetExpAmp() const =0
virtual void SetPrePulseT0Range(float tmin, float tmax)=0
virtual void SetInitialPrePulse(float amp, float t0, float expamp, bool fixPrePulseToZero)=0
ZDCPrePulseFitWrapper(std::shared_ptr< TF1 > wrapperTF1)
virtual float GetPostAmp() const =0