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;
423 theTF1->SetNpx(1000);
431 float tau1,
float tau2,
float period,
float bI);
433 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
445 if (std::isnan(time))
return 0;
466 else throw std::runtime_error(
"Fit parameter does not exist.");
474 double constant = theTF1->GetParameter(4);
476 if (amp > 1e-6)
return constant / amp;
480 virtual double operator()(
const double *
x,
const double *p)
override{
511 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
533 else throw std::runtime_error(
"Fit parameter does not exist.");
539 double amp = theTF1->GetParameter(0);
540 if (amp <= 0)
return -1;
542 double C = theTF1->GetParameter(2);
546 virtual double operator() (
const double *
x,
const double *p)
override
552 double deltaT =
x[0] -
t0;
575 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
580 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
584 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
598 virtual float GetPreT0()
const override {
return 0;}
615 else throw std::runtime_error(
"Fit parameter does not exist.");
624 double amp = theTF1->GetParameter(0);
625 if (amp <= 0)
return -1;
627 double preAmp = theTF1->GetParameter(2);
628 double preT0 = theTF1->GetParameter(3);
630 double deltaTPre = maxTime - preT0;
633 return background / (amp + background);
636 virtual double operator() (
const double *
x,
const double *p)
override
642 double preAmp = p[2];
646 double deltaT = t -
t0;
647 double deltaTPre = t - preT0;
660 return C + pulse1 + pulse2;
680 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
686 double ampMin, ampMax;
689 double initialAmp = std::min<double>(std::max<double>(amp, ampMin), ampMax);
695 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
726 else throw std::runtime_error(
"Fit parameter does not exist.");
735 double amp = theTF1->GetParameter(0);
736 if (amp <= 0)
return -1;
738 double preAmp = theTF1->GetParameter(2);
739 double preT0 = theTF1->GetParameter(3);
741 double deltaTPre = maxTime - preT0;
744 return background / (amp + background);
747 virtual double operator() (
const double *
x,
const double *p)
override
755 double preAmp = p[4];
764 double deltaT = t -
t0;
765 double deltaTPre = t - preT0;
776 return C + pulse1 + pulse2;
793 float defExpTau,
float fixExpTau);
796 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
801 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 0.5));
825 else throw std::runtime_error(
"Fit parameter does not exist.");
833 double amp = theTF1->GetParameter(0);
834 if (amp <= 0)
return -1;
836 double preAmp = theTF1->GetParameter(2);
837 double preT0 = theTF1->GetParameter(3);
839 double deltaTPre = maxTime - preT0;
842 return background / (amp + background);
845 virtual double operator() (
const double *
x,
const double *p)
override
851 double expAmp = p[2];
852 double expTau = p[3];
853 double expSqrtTau = p[4];
856 double deltaT = t -
t0;
864 if (t > 0 && std::abs(expSqrtTau)>1e-6) expPre = expAmp * (std::exp(-t/expTau-expSqrtTau*std::sqrt(t)) - std::exp(-tRef/expTau));
865 else expPre = expAmp * (std::exp(-t/expTau) - std::exp(-tRef/expTau));
867 return C + pulse + expPre;
883 float defExpTau,
float fixExpTau);
886 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
891 GetWrapperTF1()->SetParameter(4, std::max(amp, (
float) 0.5));
906 float fitT0 = theTF1->GetParameter(1);
908 float tau1 = theTF1->GetParameter(2);
909 float tau2 = theTF1->GetParameter(3);
913 if (tau2 > tau1) fitT0 += tau1 * std::log(tau2 / tau1 - 1.0);
924 else throw std::runtime_error(
"Fit parameter does not exist.");
930 double amp = theTF1->GetParameter(0);
931 if (amp <= 0)
return -1;
935 double expAmp = theTF1->GetParameter(4);
936 double expTau = theTF1->GetParameter(5);
937 double bexpSqrt = theTF1->GetParameter(6);
940 double expPre = expAmp * (std::exp(-maxTime/expTau - bexpSqrt*maxTime*maxTime) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
942 return expPre / (amp + expPre);
945 virtual double operator() (
const double *
x,
const double *p)
override
955 double expAmp = p[4];
956 double expTau = p[5];
957 double bexpSqrt = p[6];
958 double reflFrac = p[7];
967 double deltaT = t -
t0;
976 expPre = expAmp * (std::exp(-t/expTau - bexpSqrt*t*t) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
978 return pulse + expPre;
984 static const std::map<std::string, std::vector<ZDCFitWrapper::FitParameter>>
s_ConfigParamMap;
1000 if (std::isnan(tsubtr)) {
1016 float defExpTau,
float fixExpTau);
1018 float tau1,
float tau2,
float period = 0,
float bI = -1);
1021 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1026 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 0.5));
1035 if (std::isnan(timeMax))
return 0;
1049 if (std::isnan(timeMax)) {
1067 throw std::runtime_error(
"Fit parameter does not exist.");
1073 double amp = theTF1->GetParameter(0);
1074 if (amp < 1e-6)
return -1;
1078 double expAmp = theTF1->GetParameter(2);
1079 double expTau = theTF1->GetParameter(3);
1080 double bexpSqrt = theTF1->GetParameter(4);
1083 double expPre = expAmp * (std::exp(-maxTime/expTau - bexpSqrt*maxTime*maxTime) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
1085 if (amp + expPre > 0) {
1086 return expPre / (amp + expPre);
1100 double expAmp = p[2];
1101 double expTau = p[3];
1102 double bexpSqrt = p[4];
1104 double period = p[6];
1105 double inductA = p[7];
1106 double inductB = p[8];
1115 double deltaT = t -
t0;
1124 expPre = expAmp * (std::exp(-t/expTau - bexpSqrt*t*t) - std::exp(-tRef/expTau - bexpSqrt*tRef*tRef));
1126 return pulse +
C + expPre;
1132 static const std::map<std::string, std::vector<ZDCFitWrapper::FitParameter>>
s_ConfigParamMap;
1161 float tau1,
float tau2);
1165 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1171 double ampMin, ampMax;
1174 double initialAmp = std::min<double>(std::max<double>(amp, ampMin), ampMax);
1180 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1218 throw std::runtime_error(
"Fit parameter does not exist.");
1227 double amp = theTF1->GetParameter(0);
1228 if (amp < 1e-6)
return -1;
1230 double preAmp = theTF1->GetParameter(2);
1231 double preT0 = theTF1->GetParameter(3);
1233 double deltaTPre = maxTime - preT0;
1236 if (amp + background > 1e-6)
return background / (amp + background);
1246 double preAmp = p[2];
1247 double preT0 = p[3];
1249 double period = p[5];
1260 double deltaT = t -
t0;
1261 double deltaTPre = t - preT0;
1272 return C + pulse1 + pulse2;
1295 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1315 else throw std::runtime_error(
"Fit parameter does not exist.");
1321 double amp = theTF1->GetParameter(0);
1322 if (amp <= 0)
return -1;
1324 double slope = theTF1->GetParameter(2);
1326 double background = slope *
GetTime();
1327 return background / amp;
1334 double deltaT =
x[0] -
t0;
1336 double bckgd = p[2] *
x[0] + p[3];
1340 return expFermi + bckgd;
1358 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1365 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1369 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1405 else throw std::runtime_error(
"Fit parameter does not exist.");
1414 double amp = theTF1->GetParameter(0);
1415 if (amp <= 0)
return -1;
1417 double preAmp = theTF1->GetParameter(2);
1418 double preT0 = theTF1->GetParameter(3);
1419 double slope = theTF1->GetParameter(4);
1421 double deltaTPre = maxTime - preT0;
1423 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1426 return background / amp;
1435 double preAmp = p[2];
1436 double preT0 = p[3];
1437 double linSlope = p[4];
1439 double deltaT = t -
t0;
1440 double deltaTPre = t - preT0;
1451 double bckgd = linSlope * (t - deltaPresamp) + p[5];
1453 return pulse1 + pulse2 + bckgd;
1473 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1477 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1479 GetWrapperTF1()->SetParameter(6, std::max(std::abs(expamp), (
float) 1.5));
1485 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1521 else throw std::runtime_error(
"Fit parameter does not exist.");
1530 double amp = theTF1->GetParameter(0);
1531 if (amp <= 0)
return -1;
1533 double preAmp = theTF1->GetParameter(2);
1534 double preT0 = theTF1->GetParameter(3);
1535 double slope = theTF1->GetParameter(4);
1537 double deltaTPre = maxTime - preT0;
1539 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1542 return background / amp;
1551 double preAmp = p[2];
1552 double preT0 = p[3];
1553 double linSlope = p[4];
1554 double linConst = p[5];
1555 double expamp = p[6];
1557 double deltaT = t -
t0;
1558 double deltaTPre = t - preT0;
1568 double linBG = linSlope * (t - deltaPresamp) + linConst;
1569 double expBG = expamp * std::exp(-(t) /
m_tau2) - expamp;
1571 return pulse1 + pulse2 + linBG + expBG;
1587 ZDCFitGeneralPulse(
const std::string& tag,
float tmin,
float tmax,
float tau1,
float tau2);
1590 virtual void DoInitialize(
float initialAmp,
float initialT0,
float ampMin,
float ampMax)
override;
1596 GetWrapperTF1()->SetParameter(2, std::max(amp, (
float) 1.5));
1598 GetWrapperTF1()->SetParameter(6, std::max(std::abs(expamp), (
float) 1.5));
1600 if (fixPrePulseToZero) {
1609 virtual void SetPrePulseT0Range(
float tmin,
float tmax)
override;
1610 virtual void SetPostPulseT0Range(
float tmin,
float tmax,
float initialPostT0)
override;
1653 else throw std::runtime_error(
"Fit parameter does not exist.");
1662 double amp = theTF1->GetParameter(0);
1663 if (amp <= 0)
return -1;
1664 double preAmp = theTF1->GetParameter(2);
1665 double preT0 = theTF1->GetParameter(3);
1666 double slope = theTF1->GetParameter(4);
1668 double deltaTPre = maxTime - preT0;
1670 double background = slope * maxTime + preAmp *
m_norm * (
m_expFermiFunc->operator()(deltaTPre) -
1673 return background / amp;
1682 double preAmp = p[2];
1683 double preT0 = p[3];
1684 double linSlope = p[4];
1685 double linConst = p[5];
1686 double expamp = p[6];
1687 double postAmp = p[7];
1688 double postT0 = p[8];
1690 double deltaT = t -
t0;
1691 double deltaTPre = t - preT0;
1692 double deltaTPost = t - postT0;
1703 double linBG = linSlope * t + linConst;
1706 return pulse1 + pulse2 + pulse3 + linBG + expBG;
1712 float fitT0 = theTF1->GetParameter(1);
1714 float tau1 = theTF1->GetParameter(2);
1715 float tau2 = theTF1->GetParameter(3);
1719 double corrT0 = fitT0;
1720 if (tau2 > tau1) corrT0 += tau1 * std::log(tau2 / tau1 - 1.0);
1722 double deltaT = std::max<double>(tau2, theTF1->GetParameter(5)/2);
1723 double tmin = corrT0 - deltaT/2;
1724 double tmax = corrT0 + deltaT;
1726 return theTF1->GetMaximumX(tmin, tmax, 1e-5, 20,
false);
1734 double amp =
pvec[0];
1736 double tau1 =
pvec[2];
1737 double tau2 =
pvec[3];
1740 double tauRatio = tau2 / tau1;
1741 double tauRatioMinunsOne = tauRatio - 1;
1743 double norm = (std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1744 ( 1 + std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))));
1746 double deltaT = t -
t0;
1747 if (deltaT < 0) deltaT = 0;
1749 double expTerm = std::exp(-deltaT / tau2);
1750 double fermiTerm = 1. / (1. + std::exp(-(t -
t0) / tau1));
1752 return amp * expTerm * fermiTerm / norm +
C;
1759 double amp =
pvec[0];
1761 double tau1 =
pvec[2];
1762 double tau2 =
pvec[3];
1765 double refldelay =
pvec[5];
1766 double reflFrac =
pvec[6];
1767 double reflwidth =
pvec[7];
1768 double delta =
pvec[8];
1770 double tauRatio = tau2 / tau1;
1771 double tauRatioMinunsOne = tauRatio - 1;
1773 double norm = std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1774 ( 1 + std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))) ;
1776 double deltaT = t -
t0;
1777 if (deltaT < 0) deltaT = 0;
1782 double expTerm = delta + std::exp(-deltaT / tau2);
1783 double fermiTerm = 1. / (1. + std::exp(-(t -
t0) / tau1));
1785 double deltaTRefl = deltaT - refldelay;
1786 double reflTerm = -reflFrac*amp*std::exp(-0.5*deltaTRefl*deltaTRefl/reflwidth/reflwidth);
1788 return amp * expTerm * fermiTerm / norm +
C + reflTerm;
1795 double amp =
pvec[0];
1797 double tau1 =
pvec[2];
1798 double tau2 =
pvec[3];
1801 double period =
pvec[5];
1802 double Acos =
pvec[6];
1803 double Bsin =
pvec[7];
1804 double bI =
pvec[8];
1805 double delta =
pvec[9];
1807 double twoPiOverPeriod = 2.0*
M_PI/period;
1809 double deltaT = t -
t0;
1810 double deltaTInduct = deltaT;
1811 double expTerm = 1, fermiTerm = 1, inductTerm = 1;
1814 inductTerm = (1.0 + exp(-bI*deltaTInduct)*(Acos*std::cos(deltaTInduct*twoPiOverPeriod) +
1815 Bsin*std::sin(deltaTInduct*twoPiOverPeriod)));
1816 expTerm = delta + std::exp(-deltaT / tau2)*inductTerm;
1818 if (deltaT/tau1 < 7) fermiTerm = 1. / (1. + std::exp(-deltaT / tau1));
1820 return amp * expTerm * fermiTerm +
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