3 #include <utl/TabulatedFunctionErrors.h>
4 #include <evt/GaisserHillas4Parameter.h>
5 #include <utl/ErrorLogger.h>
7 #include <utl/MathConstants.h>
8 #include <utl/Reader.h>
9 #include <utl/AugerException.h>
10 #include <fwk/CentralConfig.h>
11 #include <evt/GaisserHillas4Parameter.h>
12 #include <det/Detector.h>
13 #include <fdet/FDetector.h>
14 #include <fdet/Camera.h>
28 using namespace FdEnergyDepositFinderKG;
37 GaussExp(
const double x,
const double mu,
const double v,
const double tau_sigma)
39 TF1 *fGaussExp_L =
new TF1(
"fGaussExp_L",
"[0] * [3]/2. * exp( [3]/2. * ( 2.*[1] + [3]*[2]*[2] - 2.*(x+[4]) ) ) * TMath::Erfc( ( [1] + [3]*[2]*[2] - (x+[4]) ) / (sqrt(2.)*[2]) )",10.,2000.);
40 const double grammage =
g/(
cm*
cm);
41 const double Lc_e = mu / grammage;
42 const double Lc_sigma_e =
sqrt(v) / grammage;
43 const double Lc_tau = tau_sigma * Lc_sigma_e;
45 fGaussExp_L->SetParameters(1., Lc_e, Lc_sigma_e , 1/Lc_tau, 0.);
46 const double Lc_shift = fGaussExp_L->GetMaximumX() - mu / grammage;
47 fGaussExp_L->SetParameter(4,Lc_shift);
48 double ff = fGaussExp_L->Eval( x / grammage);
50 fGaussExp_L->Delete();
57 unsigned int ProfileFitter::fNdof = 0;
58 vector<double> ProfileFitter::fDepth;
59 vector<double> ProfileFitter::fSize;
60 vector<double> ProfileFitter::fSizeVariance;
62 bool ProfileFitter::fIsConstrained =
false;
64 std::string ProfileFitter::fGaisserHillasType =
"";
66 bool ProfileFitter::fIsUnivConstrained =
false;
68 double ProfileFitter::fVarK = 0;
70 bool ProfileFitter::fEMGLConstrained =
false;
71 double ProfileFitter::fTauOverSigma = 0;
79 double ProfileFitter::fShapeConstraintChi2[3] = { 0, 0, 0 };
81 int ProfileFitter::fAafCorrection = 0;
82 bool ProfileFitter::fUseNoiseBins =
false;
83 vector<vector<double>> ProfileFitter::fErrFuncFactorsBuf;
86 ProfileFitter::ProfileFitter() :
89 for (
int i = 0; i < 3; ++i)
106 if (kUnivBranch.GetChild(
"constrained").Get<
bool>()) {
109 const double kRMS = kUnivBranch.GetChild(
"ksigma").Get<
double>();
116 Branch EMGLConstraintBranch = topBranch.
GetChild(
"ExponentiallyModifiedGaussianLConstraint");
118 if (EMGLConstraintBranch.
GetChild(
"activateEMGLConstraint").
Get<
bool>()) {
122 WARNING(
"The exponentially modified gaussian constraint is defined only for USP Gaisser-Hillas function (L parameter). "
123 "For the other Gaisser-Hillas functions the constraint is always gaussian");
133 WARNING(
"k-constraint used in USP Gaisser-Hillas function - k is a "
134 "function of L and R and should be already constrained"
140 "\t anti-aliasing filter correction is " << (
fAafCorrection ?
"on" :
"off") <<
"\n"
141 "\t use noise bins is " << (
fUseNoiseBins ?
"on" :
"off") <<
'\n';
142 for (
int index = 0; index < 2; ++index) {
150 for (
int i = 0; i < 3; ++i)
168 const fdet::FDetector& detFD = det::Detector::GetInstance().GetFDetector();
170 const unsigned int telId = telIter->GetId();
183 vector<TelescopeDataBin>::const_iterator binIterNoNoise = telIterNoNoise->TelDataBinsBegin();
184 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
185 if (binIter->fMinDepth != 0 || binIter->fMaxDepth != 0) {
186 auto& zp = binIter->GetZetaPixels();
187 for (
unsigned int z = 0, n = zp.size(); z < n; ++z) {
188 zp[z].fLightFraction = binIterNoNoise->GetZetaPixels()[z].fLightFraction;
208 for (
unsigned int i = 0, n = dEdXProfile.
GetNPoints(); i < n; ++i) {
238 ERROR(
"no data to fit!");
260 for (
int i = 0; i < 3; ++i)
264 TMinuit theMinuit(nPar);
269 ERROR(
"too few start parameters for fit");
277 10*
g/
cm2, 0, 0, ierflag);
300 double& value,
double*
const par,
305 fitParameters[i] = par[i];
331 double logLikeSum = 0;
335 const double maxNpe = 30;
337 const int maxSum = 100;
343 if (std::isnan(par[eGHXmax]) || std::isnan(par[eGHnMax]) ||
348 const unsigned int matrixSize = cfMatrix.
GetSize();
352 energyDeposit.
SetSize(matrixSize);
356 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
357 energyDeposit(i) = ghFunction.Eval(binIter->GetMeanDepth());
362 ColumnVector predictedLightFlux = cfMatrix*energyDeposit;
364 double nPeObsTot = 0;
365 double nPeExpTot = 0;
367 double gainVariance = 0;
376 const double kFluxToPe = telIter->GetDiaphragmArea() * telIter->GetPhotonToPhotoElectron();
377 const double kFluxToPe2 = kFluxToPe * kFluxToPe;
378 gainVariance = telIter->GetGainVariance();
380 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
382 const double lightFlux = binIter->fSignal;
383 const double bgVariance = binIter->fBackgroundVariance;
386 const double nPeBackground = bgVariance*kFluxToPe2 / (1 + gainVariance);
387 const double nPeSignalExp = predictedLightFlux(i) * kFluxToPe;
388 const double nPeExp = nPeSignalExp + nPeBackground;
389 const double nPeObs = lightFlux*kFluxToPe + nPeBackground;
395 if (nPeObs < maxNpe) {
397 const double gaussVar = nPeExp*gainVariance;
399 const double lnNpe = log(nPeExp);
403 for (
int k = 0; k < maxSum; ++k) {
404 const double gaussArg = -0.5*
pow(k - nPeObs, 2) / gaussVar;
405 const double lnFaculty =
LogGamma(k + 1);
406 const double expArg = gaussArg - nPeExp + k*lnNpe - lnFaculty;
407 const double value = exp(expArg);
410 logLike = log(sum) - 0.5*log(gaussVar);
413 const double gaussVar = nPeExp*(1 + gainVariance);
414 logLike = -0.5*
pow(nPeExp - nPeObs, 2) / gaussVar - 0.5*log(gaussVar);
417 logLikeSum += logLike;
422 i += telIter->GetTelescopeDataBins().size();
427 const double gaussVar = nPeExpTot*(1 + gainVariance);
428 logLikeSum += -0.5*
pow(nPeExpTot - nPeObsTot, 2) / gaussVar - 0.5*log(gaussVar);
434 const double Xmax = par[
eGHXmax];
435 const double dEdXmax = par[
eGHnMax];
436 const double X0 = ghFunction.GetShapeParameter(
evt::gh::eX0);
438 const double myEta = (Xmax -X0)/lambda;
439 const double myEcal = lambda * dEdXmax *
pow(
kE/myEta,myEta) * TMath::Gamma(myEta+1);
443 for (
int index = 0; index < 2; ++index) {
454 logLikeSum += (log(ff));
459 logLikeSum += (-0.5*log(v) - 0.5*
pow(p[i]-mu, 2)/v);
467 const double fkUniv = myEcal/dEdXmax;
469 logLikeSum +=(-0.5*log(
fVarK) - 0.5*
pow(fkUniv - fkUnivTrue, 2)/
fVarK);
474 return -2 * logLikeSum;
482 double logLikeSum = 0;
486 const double maxNpe = 30;
488 const int maxSum = 100;
494 if (std::isnan(par[eGHXmax]) || std::isnan(par[eGHnMax]) ||
499 const unsigned int matrixSize = cfMatrix.
GetSize();
503 energyDeposit.
SetSize(matrixSize);
507 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
508 energyDeposit(i) = ghFunction.Eval(binIter->GetMeanDepth());
513 ColumnVector predictedLightFlux = cfMatrix*energyDeposit;
515 vector<double> predLF;
516 vector<int> telBinSizes;
517 vector<int> telBinSizesPredictedLightFlux;
524 int lastParentBin = -1;
527 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
529 if (binIter->fParentBin == lastParentBin) {
530 if (binIter->fMinDepth != 0 || binIter->fMaxDepth != 0) {
531 predLF.back() += predictedLightFlux(i);
536 if (binIter->fMinDepth != 0 || binIter->fMaxDepth != 0) {
537 predLF.push_back(predictedLightFlux(i));
543 lastParentBin = binIter->fParentBin;
547 predLF.push_back(predictedLightFlux(i));
553 telBinSizes.push_back(telBinSize);
554 telBinSizesPredictedLightFlux.push_back(k);
559 double gainVariance = 0;
563 vector<double> nPeExpArray(predLF.size(), 0);
569 const double kFluxToPe = telIter->GetDiaphragmArea() * telIter->GetPhotonToPhotoElectron();
571 gainVariance = telIter->GetGainVariance();
573 int lastParentBin = -1;
574 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
576 if (binIter->fParentBin != lastParentBin) {
582 const double nPeSignalExp = predLF[i]*kFluxToPe;
583 const double nPeExp = nPeSignalExp;
584 nPeExpArray[i] = nPeExp;
586 lastParentBin = binIter->fParentBin;
591 i += telIter->GetTelescopeDataBins().size();
599 unsigned int telIndex = 0;
604 unsigned int telBinSize = telBinSizes[t];
609 gainVariance = telIter->GetGainVariance();
613 const unsigned int convTraceSize = telBinSize;
615 const unsigned int origTraceSize = convTraceSize + 2*nSafety;
616 vector<double> originalTrace(origTraceSize, 0.);
617 for (
unsigned int j = 0; j < convTraceSize; j++) {
618 originalTrace[j+nSafety] = nPeExpArray[i+j];
621 vector<double> convolutedTrace(convTraceSize, 0.);
623 DoTimeConvolution(originalTrace, convolutedTrace, nSafety, telIndex, *telIter, predictedLightFlux, predLF, k, i);
625 for (
unsigned int j = 0; j < convTraceSize; ++j) {
626 nPeExpArray[i+j] = convolutedTrace[j];
631 k += telBinSizesPredictedLightFlux[t];
636 double nPeObsTot = 0;
637 double nPeExpTot = 0;
648 const double kFluxToPe = telIter->GetDiaphragmArea() * telIter->GetPhotonToPhotoElectron();
649 const double kFluxToPe2 = kFluxToPe * kFluxToPe;
650 gainVariance = telIter->GetGainVariance();
652 int lastParentBin = -1;
654 for (
auto binIter = telIter->TelDataBinsBegin(); binIter != telIter->TelDataBinsEnd(); ++binIter) {
656 if (binIter->fParentBin != lastParentBin) {
658 const double lightFlux = binIter->fSignal;
659 const double bgVariance = binIter->fBackgroundVariance;
662 const double nPeBackground = bgVariance * kFluxToPe2 / (1 + gainVariance);
663 const double nPeExp = nPeExpArray[i] + nPeBackground;
664 const double nPeObs = lightFlux * kFluxToPe + nPeBackground;
670 if (nPeObs < maxNpe) {
672 const double gaussVar = nPeExp*gainVariance;
674 const double lnNpe = log(nPeExp);
678 for (
int k = 0; k < maxSum; ++k) {
679 const double gaussArg = -0.5 *
pow(k - nPeObs, 2) / gaussVar;
680 const double lnFaculty =
LogGamma(k + 1);
681 const double expArg = gaussArg - nPeExp + k*lnNpe - lnFaculty;
682 const double value = exp(expArg);
685 logLike = log(sum) - 0.5*log(gaussVar);
688 const double gaussVar = nPeExp*(1 + gainVariance);
689 logLike = -0.5*
pow(nPeExp - nPeObs, 2) / gaussVar - 0.5*log(gaussVar);
692 logLikeSum += logLike;
695 lastParentBin = binIter->fParentBin;
701 i += telIter->GetTelescopeDataBins().size();
706 const double gaussVar = nPeExpTot * (1 + gainVariance);
707 logLikeSum += -0.5*
pow(nPeExpTot - nPeObsTot, 2) / gaussVar - 0.5*log(gaussVar);
713 const double Xmax = par[
eGHXmax];
714 const double dEdXmax = par[
eGHnMax];
715 const double X0 = ghFunction.GetShapeParameter(
evt::gh::eX0);
717 const double myEta = (Xmax -X0)/lambda;
718 const double myEcal = lambda * dEdXmax *
pow(
kE/myEta,myEta) * TMath::Gamma(myEta+1);
722 for (
int index = 0; index < 2; ++index) {
732 logLikeSum += (log(ff));
737 logLikeSum += (-0.5*log(v) - 0.5*
pow(p[i]-mu, 2)/v);
745 const double fkUniv = myEcal/dEdXmax;
747 logLikeSum += -0.5*log(
fVarK) - 0.5*
pow(fkUniv - fkUnivTrue, 2) /
fVarK;
752 return -2*logLikeSum;
766 if (std::isnan(par[eGHXmax]) || std::isnan(par[eGHnMax]) ||
770 for (
unsigned int i = 0; i <
fDepth.size(); ++i) {
772 const double y =
fSize[i];
774 const double x =
fDepth[i];
775 const double fx = ghFunction.Eval(x);
778 chi2 +=
pow(y - fx, 2) / vy;
785 const double Xmax = par[
eGHXmax];
786 const double dEdXmax = par[
eGHnMax];
787 const double X0 = ghFunction.GetShapeParameter(
evt::gh::eX0);
789 const double myEta = (Xmax - X0) / lambda;
790 const double myEcal = lambda * dEdXmax *
pow(
kE / myEta, myEta) * TMath::Gamma(myEta+1);
795 for (
int index = 0; index < 2; ++index) {
809 const double addchi2 =
pow(p[i] - mu, 2) / v;
818 const double fkUniv = myEcal/dEdXmax;
820 const double addchi2 =
pow(fkUniv - fkUnivTrue, 2) /
fVarK;
834 double arglist[2] = { 1000, 1 };
835 theMinuit.mnexcm(
"MINIMIZE", arglist, 2, ierflag);
839 cerr <<
" MINIMIZE failed " << ierflag << endl;
843 theMinuit.mnexcm(
"HESSE", arglist, 2, ierflag);
845 double amin, edm, errdef;
846 int nvpar, nparx, icstat;
847 theMinuit.mnstat(amin, edm, errdef, nvpar, nparx, icstat);
857 cerr <<
" ProfileFitter::Minimize(): status from mnstat "
863 cerr <<
" ProfileFitter::Minimize(): parameter mismatch??? " << endl;
869 for (
int i = 0; i < nparx; ++i)
912 theMinuit.SetPrintLevel(0);
916 theMinuit.SetPrintLevel(-1);
917 theMinuit.mnexcm(
"SET NOW", 0 ,0,ierflag);
921 theMinuit.mnexcm(
"SET ERR", &arglist, 1, ierflag);
923 theMinuit.mnexcm(
"SET STRAT", &arglist, 1, ierflag);
946 using namespace evt::gh;
947 ostringstream errMsg;
953 ERROR(
"FillGHParameters() without data!");
981 ERROR(
" cannot calculate energy without fit!");
993 energy = ghPars.GetIntegral();
994 energyError = energy * ghPars.GetIntegralError();
1007 const double tau =
sqrt(log(2.)) / (
kTwoPi * cutoffFrequency);
1009 vector<double> fErrFuncFactors;
1010 fErrFuncFactors.clear();
1012 const double epsilon = 1e-6;
1013 const int maxIter = 50;
1017 double sumESquare = 0;
1019 while (sumE < 1 - epsilon && iter < maxIter) {
1021 const double t1 = (iter - 0.5) * timeBinSize;
1022 const double t2 = (iter + 0.5) * timeBinSize;
1024 const double E1 = 0.5 * erf(t1 / (
sqrt(2.)*tau));
1025 const double E2 = 0.5 * erf(t2 / (
sqrt(2.)*tau));
1026 const double E = E2 - E1;
1028 fErrFuncFactors.push_back(E);
1034 sumESquare += 2*E*E;
1041 if (iter+1 >= maxIter || fErrFuncFactors.empty()) {
1043 msg <<
" Error filling fErrFuncFactors !!! "
1044 << iter <<
' ' << fErrFuncFactors.size();
1055 vector<double>& convolutedTrace,
1056 unsigned int timeOffset,
1057 unsigned int ErrFuncFactorsIndex,
1060 const std::vector<double>& predLF,
1061 const int startBinDense,
1064 const int convolutedTraceSize = convolutedTrace.size();
1065 const int originialTraceSize = originalTrace.size();
1066 vector<double> fErrFuncFactors;
1074 msg <<
" ErrFuncFactorIndex out of range ";
1078 const int nConv = int(fErrFuncFactors.size());
1081 if (originialTraceSize-convolutedTraceSize < 2*(nConv - 1)) {
1084 msg <<
" Trace size mismatch!!! "
1085 << convolutedTraceSize <<
' ' << originialTraceSize <<
' ' << fErrFuncFactors.size();
1091 vector<vector<pair<int, double>>> telDataBinZeta;
1092 int lastParentBin = -1;
1095 for (
unsigned int t = 0; t < telDataBins.size(); ++t) {
1096 if (telDataBins[t].fParentBin == lastParentBin) {
1097 if (telDataBins[t].fMinDepth != 0 || telDataBins[t].fMaxDepth != 0) {
1098 bool noZeta = bool(telDataBinZeta.back().size());
1099 for (
unsigned int z = 0; z < telDataBins[t].GetZetaPixels().size(); ++z) {
1101 telDataBinZeta.back()[z].second += telDataBins[t].GetZetaPixels()[z].fLightFraction * predictedLightFlux(i+startBinDense);
1103 telDataBinZeta.back().push_back(make_pair(telDataBins[t].GetZetaPixels()[z].fPixelId, telDataBins[t].GetZetaPixels()[z].fLightFraction * predictedLightFlux(i+startBinDense)));
1109 vector<pair<int, double>> zetaLF;
1110 if (telDataBins[t].fMinDepth != 0 || telDataBins[t].fMaxDepth != 0) {
1111 for (
unsigned int z = 0; z < telDataBins[t].GetZetaPixels().size(); ++z) {
1112 zetaLF.push_back(make_pair(telDataBins[t].GetZetaPixels()[z].fPixelId, telDataBins[t].GetZetaPixels()[z].fLightFraction * predictedLightFlux(i+startBinDense)));
1116 telDataBinZeta.push_back(zetaLF);
1117 lastParentBin = telDataBins[t].fParentBin;
1120 for (
unsigned int t = 0, nt = telDataBinZeta.size(); t < nt; ++t) {
1121 for (
unsigned int z = 0, nz = telDataBinZeta[t].size(); z < nz; ++z) {
1122 if (predLF[startBin+t] > 0)
1123 telDataBinZeta[t][z].second /= predLF[startBin + t];
1125 telDataBinZeta[t][z].second = 0;
1130 const int tOff = timeOffset;
1131 for (
int i = -nConv + 1; i < nConv; ++i) {
1132 const double w = fErrFuncFactors[
abs(i)];
1133 for (
int tConv = 0; tConv < convolutedTraceSize; ++tConv) {
1134 const int tOrig = tConv + tOff + i;
1137 if (
fAafCorrection == 2 && tOrig >= tOff && tOrig < (convolutedTraceSize + tOff)) {
1139 const int tO = tOrig - tOff;
1140 const int tC = tConv;
1141 for (
unsigned int zO = 0, nO = telDataBinZeta[tO].size(); zO < nO; ++zO) {
1142 for (
unsigned int zC = 0, nC = telDataBinZeta[tC].size(); zC < nC; ++zC) {
1143 if (telDataBinZeta[tO][zO].first == telDataBinZeta[tC][zC].first) {
1144 wzeta += telDataBinZeta[tO][zO].second;
1150 convolutedTrace[tConv] += wzeta * w * originalTrace[tOrig];
double GetShapeParameter(const gh::EShapeParameter par) const
access to all variants of shape parameters (see GaisserHillasTypes.h)
static void PrepareTimeConvolution(const fdet::Telescope &detTel)
unsigned int GetNPoints() const
double fCovariance[eNGHpars][eNGHpars]
double GetFADCBinSize() const
static double GaisserHillasLogLikeConvoluted(const double *const par)
std::string Name(const EOneTwo par) const
parameter name
double CorrCoeff(const EGHFunctionPar i, const EGHFunctionPar j) const
static std::vector< std::vector< double > > fErrFuncFactorsBuf
static double fTauOverSigma
Base class for all exceptions used in the auger offline code.
void SetNMaxXMaxCorrelation(const double rho)
void SetShapePars(const GHShapeParameters &)
static double GaisserHillasLogLike(const double *const par)
evt::gh::EFunctionType Type() const
function type
std::vector< double > fFitParameters
void SetSize(const int n)
Set the size of the vector. Does NOT initialize elements to 0.
static utl::Function fUnivFunction
double GetCutoffFrequency() const
void SetXMax(const double xMax, const double error)
void SetProfileData(const utl::TabulatedFunctionErrors &)
#define INFO(message)
Macro for logging informational messages.
static int fAafCorrection
double Unit(const EOneTwo par) const
parameter unit value
double Step(const EOneTwo par) const
step size for fit
void SetShapeParameter(const gh::EShapeParameter par, const double value, const double error)
Setters.
const Eye & GetEye(const unsigned int eyeId) const
Find eye by numerical Id.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
double pow(const double x, const unsigned int i)
ConstTelDataIterator AllTelDataBegin() const
std::vector< double > fStartParameters
const Camera & GetCamera() const
Get the Camera object that belongs to the telescope.
Detector description interface for FDetector-related data.
unsigned int GetEyeId() const
static void GHFitFunction(int &, double *const, double &, double *const, const int)
std::string GetFunctionTypeName(const EFunctionType type)
static std::string fGaisserHillasType
void SetUnivConstrained(const bool constrained, const utl::Function &func, const double ksigma)
static const CFMatrixCalculator * fCFMatrixData
void SetStartParameters(const evt::GaisserHillas4Parameter &)
Class representing a document branch.
static std::vector< double > fSizeVariance
void InitMinuit(TMinuit &) const
const double & GetYErr(const unsigned int idx) const
double Variance(const EOneTwo par, const double E) const
constraint variance
double LogGamma(const double x)
void SetLightFluxData(const CFMatrixCalculator &cfMatrixData)
ConstTelDataIterator NoiseTelDataEnd() const
unsigned int GetSize() const
double abs(const SVector< n, T > &v)
const LowerTriangularMatrix & GetCFMatrix() const
const Telescope & GetTelescope(const unsigned int telescopeId) const
Find Telescope by numerical Id.
static bool fUseNoiseBins
static std::vector< double > fSize
static GHShapeParameters fGHShapePars
static unsigned int fNdof
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
void SetChiSquare(const double chi, const unsigned int ndof)
static bool fIsConstrained
Base class for inconsistency/illogicality exceptions.
Evaluate functions given in a string. The real work is done by the ExpressionParser class...
const double & GetY(const unsigned int idx) const
void SetNMax(const double nMax, const double error, const bool isEnergyDeposit=false)
double GaussExp(const double x, const double mu, const double v, const double tau_sigma)
static bool fIsUnivConstrained
Detector description interface for Telescope-related data.
double Sigma(const EOneTwo par, const double E) const
constraint sigma
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
ConstTelDataIterator NoiseTelDataBegin() const
static void DoTimeConvolution(const std::vector< double > &originalTrace, std::vector< double > &convolutedTrace, unsigned int timeOffset, unsigned int ErrFuncFactorsIndex, const TelescopeData &telData, const ColumnVector &predictedLightFlux, const std::vector< double > &predLF, const int startBinDense, const int startBin)
const double & GetX(const unsigned int idx) const
const std::vector< TelescopeDataBin > & GetTelescopeDataBins() const
void SetCorrelationNMaxShapeParameter(const gh::EShapeParameter par, const double rho)
static double fShapeConstraintChi2[3]
static const CFMatrixCalculator * fCFMatrixDataDense
static std::vector< double > fDepth
double Min(const EOneTwo par) const
minimum value for fit
double Mean(const EOneTwo par, const double E) const
constraint mean
static bool fEMGLConstrained
static double GaisserHillasChi2(const double *const par)
double Max(const EOneTwo par) const
maximum value for fit
void GetEnergy(double &energy, double &energyError) const
double GetIntegral() const
calculate integral
gh::EFunctionType GetFunctionType() const
Gaisser Hillas with 4 parameters.
void SetCorrelationShapeParameters(const double rho)
void SetCorrelationXMaxShapeParameter(const gh::EShapeParameter par, const double rho)
#define ERROR(message)
Macro for logging error messages.
ConstTelDataIterator AllTelDataEnd() const
void FillGHParameters(evt::GaisserHillas4Parameter &ghPars) const
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
static EFitFunctionType fFunctionType
std::string UnitName(const EOneTwo par) const
parameter unit name