#include "CxxUtils/checker_macros.h"
#include <TF1.h>
#include <memory>
Go to the source code of this file.
◆ ZDCFermiExpFit()
double ZDCFermiExpFit |
( |
const double * |
xvec, |
|
|
const double * |
pvec |
|
) |
| |
|
inline |
Definition at line 1190 of file ZDCFitWrapper.h.
1194 double amp =
pvec[0];
1196 double tau1 =
pvec[2];
1197 double tau2 =
pvec[3];
1200 double tauRatio = tau2 / tau1;
1201 double tauRatioMinunsOne = tauRatio - 1;
1203 double norm = (
std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1204 ( 1 +
std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))));
1206 double deltaT =
t -
t0;
1207 if (deltaT < 0) deltaT = 0;
1209 double expTerm =
std::exp(-deltaT / tau2);
1210 double fermiTerm = 1. / (1. +
std::exp(-(
t -
t0) / tau1));
1212 return amp * expTerm * fermiTerm /
norm +
C;
◆ ZDCFermiExpFitRefl()
double ZDCFermiExpFitRefl |
( |
const double * |
xvec, |
|
|
const double * |
pvec |
|
) |
| |
|
inline |
Definition at line 1215 of file ZDCFitWrapper.h.
1219 double amp =
pvec[0];
1221 double tau1 =
pvec[2];
1222 double tau2 =
pvec[3];
1225 double refldelay =
pvec[5];
1226 double reflFrac =
pvec[6];
1227 double reflwidth =
pvec[7];
1228 double delta =
pvec[8];
1230 double tauRatio = tau2 / tau1;
1231 double tauRatioMinunsOne = tauRatio - 1;
1233 double norm =
std::pow(1. / tauRatioMinunsOne, 1. / (1 + tauRatio)) /
1234 ( 1 +
std::pow(1. / tauRatioMinunsOne, 1. / (1 + 1 / tauRatio))) ;
1236 double deltaT =
t -
t0;
1237 if (deltaT < 0) deltaT = 0;
1242 double expTerm = delta +
std::exp(-deltaT / tau2);
1243 double fermiTerm = 1. / (1. +
std::exp(-(
t -
t0) / tau1));
1245 double deltaTRefl = deltaT - refldelay;
1246 double reflTerm = -reflFrac*amp*
std::exp(-0.5*deltaTRefl*deltaTRefl/reflwidth/reflwidth);
1248 return amp * expTerm * fermiTerm /
norm +
C + reflTerm;