9 #include <evt/ShowerRecData.h>
10 #include <evt/ShowerFRecData.h>
11 #include <evt/GaisserHillas4Parameter.h>
14 #include <fevt/Telescope.h>
15 #include <fevt/Pixel.h>
16 #include <fevt/FEvent.h>
17 #include <fevt/EyeRecData.h>
19 #include <fwk/CentralConfig.h>
21 #include <utl/Reader.h>
22 #include <utl/AugerUnits.h>
23 #include <utl/ErrorLogger.h>
24 #include <utl/MathConstants.h>
25 #include <utl/PhysicalConstants.h>
26 #include <utl/PhysicalFunctions.h>
27 #include <utl/TabulatedFunctionErrors.h>
29 #include <det/Detector.h>
30 #include <fdet/FDetector.h>
31 #include <fdet/Camera.h>
32 #include <fdet/Telescope.h>
33 #include <fdet/Pixel.h>
49 using namespace oBLAS;
53 namespace FdProfileReconstructorKG {
57 EnergyFitter::EMinimizationType EnergyFitter::fMinimizationMethod = eModifiedLeastSquares;
58 EnergyFitter::EParConstraints EnergyFitter::fFixX0 =
eFree;
59 EnergyFitter::EParConstraints EnergyFitter::fFixLambda =
eFree;
60 EnergyFitter::EParConstraints EnergyFitter::fFixkUniv =
eFree;
61 unsigned int EnergyFitter::fnBins = 0;
62 double* EnergyFitter::fdEdX =
nullptr;
63 double* EnergyFitter::fvdEdX =
nullptr;
64 double* EnergyFitter::fLight =
nullptr;
65 double* EnergyFitter::fvLight =
nullptr;
66 double* EnergyFitter::fvBackGround =
nullptr;
67 double* EnergyFitter::fDepth =
nullptr;
68 double* EnergyFitter::fChFlDepth =
nullptr;
69 double EnergyFitter::fDefX0 = 0;
70 double EnergyFitter::fVarX0 = 0;
71 double EnergyFitter::fDefLambda = 0;
72 double EnergyFitter::fVarLambda = 0;
74 double EnergyFitter::fDefA1 = 0;
75 double EnergyFitter::fDefA2 = 0;
76 double EnergyFitter::fVarK = 0;
79 double EnergyFitter::fDiaphragmArea = 0;
80 double EnergyFitter::fGainVariance = 0;
81 double EnergyFitter::fPhotonToPhotoElectron = 0;
91 auto fitStrategy = x0Branch.
GetChild(
"strategy").
Get<
string>();
92 fFixX0 = (fitStrategy ==
"constrained") ? eConstrained : ((fitStrategy ==
"free") ?
eFree :
eFixed);
95 const auto x0RMS = x0Branch.
GetChild(
"sigma").
Get<
double>();
99 fitStrategy = lambdaBranch.
GetChild(
"strategy").
Get<
string>();
100 fFixLambda = (fitStrategy ==
"constrained") ? eConstrained : ((fitStrategy ==
"free") ?
eFree :
eFixed);
103 const double lambdaRMS = lambdaBranch.
GetChild(
"sigma").
Get<
double>();
104 fVarLambda =
Sqr(lambdaRMS / (
g/
cm2));
107 fitStrategy = kUnivBranch.
GetChild(
"strategy").
Get<
string>();
108 fFixkUniv = (fitStrategy ==
"constrained") ? eConstrained : ((fitStrategy ==
"free") ?
eFree :
eFixed);
113 const auto kRMS = kUnivBranch.
GetChild(
"sigma").
Get<
double>();
118 const auto miniMeth = eCalcB.
GetChild(
"minimizationMethod").
Get<
string>();
119 if (miniMeth ==
"maximumLikelihood")
120 fMinimizationMethod = eMaximumLikelihood;
121 else if (miniMeth ==
"leastSquares")
122 fMinimizationMethod = eLeastSquares;
123 else if (miniMeth ==
"modifiedLeastSquares")
124 fMinimizationMethod = eModifiedLeastSquares;
126 if (fVerbosity > -1) {
127 std::ostringstream info;
128 info <<
"\n\t X0 is ";
134 info <<
"fixed at " << fDefX0 <<
" g/cm2\n";
137 info <<
"constrained at " << fDefX0 <<
" +/- " <<
sqrt(fVarX0) <<
" g/cm2\n";
141 info <<
"\t lambda is ";
142 switch (fFixLambda) {
147 info <<
"fixed at " << fDefLambda <<
" g/cm2\n";
150 info <<
"constrained at " << fDefLambda <<
" +/- " <<
sqrt(fVarLambda) <<
" g/cm2\n";
154 info <<
"\t kUniv is ";
160 info <<
"fixed at " << fDefA1 <<
" g/cm2, " << fDefA2 <<
" g/cm2\n";
163 info <<
"constrained at (" << fDefA1 <<
" " << fDefA2 <<
") +/- " <<
sqrt(fVarK) <<
" g/cm2\n";
167 info <<
"\t minimization method: " << miniMeth;
182 if (InitializeGHFit(eye, 0) &&
183 FitProfile(eEnergyDeposit) &&
184 FitProfile(eLightAllParam)) {
186 FillProfilesAtAperture(eye);
188 if (CalculateEnergy(eye)) {
209 EnergyFitter::InitializeGHFit(
const fevt::Eye& eye,
const int iMode)
217 fvBackGround =
nullptr;
219 fChFlDepth =
nullptr;
223 const auto* depthPtr = fChFlPtr->GetDepth();
224 if (!depthPtr || depthPtr->size() < 1)
227 const auto& depth = *depthPtr;
229 fChFlDepth =
new double[depth.size()];
230 for (
unsigned int i = 0, n = depth.size(); i < n; ++i)
231 fChFlDepth[i] = depth[i];
241 fLight =
new double[fnBins];
242 fvLight =
new double[fnBins];
243 fvBackGround =
new double[fnBins];
244 for (
unsigned int i = 0; i < fnBins; ++i) {
245 fLight[i] = lightFlux.GetY(i);
246 fvLight[i] =
Sqr(lightFlux.GetYErr(i));
247 fvBackGround[i] =
Sqr(bgFlux.GetYErr(i));
252 if (!recShower.HasEnergyDeposit())
257 if (fnBins != dedxProf.GetNPoints()) {
259 err <<
"Inconsistent binning dedx/light: " << fnBins
265 fdEdX =
new double[fnBins];
266 fvdEdX =
new double[fnBins];
267 fDepth =
new double[fnBins];
270 const double kXconvert =
g/
cm2;
271 const double kEconvert =
PeV/kXconvert;
272 const double kEconvert2 =
Sqr(kEconvert);
274 for (
unsigned int i = 0; i < fnBins; ++i) {
275 fdEdX[i] = dedxProf.GetY(i) / kEconvert;
276 fvdEdX[i] = dedxProf.GetYErr(i) * dedxProf.GetYErr(i) / kEconvert2;
277 fDepth[i] = dedxProf.GetX(i) / kXconvert;
280 const auto& detFD = det::Detector::GetInstance().GetFDetector();
281 const double referenceLambda = detFD.GetReferenceLambda();
286 double avgPEfactor = 0;
288 for (
auto pIt = tIt->PixelsBegin(ComponentSelector::eHasData),
289 end = tIt->PixelsEnd(ComponentSelector::eHasData);
291 const auto& detPixel = detFD.GetPixel(*pIt);
292 avgPEfactor += detPixel.GetDiaPhoton2PEFactor(referenceLambda);
297 avgPEfactor /= countPix;
299 const auto& detTel = detFD.GetTelescope(*tIt);
300 fDiaphragmArea = detTel.GetDiaphragmArea();
301 fGainVariance = detTel.GetCamera().GetGainVariance();
302 fPhotonToPhotoElectron = avgPEfactor;
311 int nAv = int(
double(fnBins) / kAve);
315 bool firstTime =
true;
318 for (
unsigned int i = 0; i < fnBins - nAv; ++i) {
322 for (
unsigned int j = i; j < i + nAv; ++j) {
323 const double w = 1 / fvdEdX[j];
324 eSum += fdEdX[j] * w;
329 const double eM = eSum / wSum;
330 const double xM = xSum / nAv;
331 if (firstTime || eM > dEdXmax) {
340 ERROR(
"InitializeGHFit - no initial values found! "
341 "Shouldn't happen! This is only a sanity check!");
347 fLambda = fDefLambda;
350 DumpCurrentParameters(eInitialize);
362 const double kXconvert =
g/
cm2;
363 const double kEconvert =
PeV/kXconvert;
366 const unsigned int mSiz = fChFl->size1();
367 ublas::vector<double> dEdX(mSiz);
369 for (
unsigned int i = 0; i < mSiz; ++i) {
370 const double x = fChFlDepth[i] / kXconvert;
371 dEdX(i) =
GaisserHillas(x, fX0, fXmax, fdEdXmax, fLambda) * kEconvert;
374 const auto vFluo = ublas::prod(*fChFlPtr->GetFluorescenceMatrix(), dEdX);
375 const auto vChDir = ublas::prod(*fChFlPtr->GetDirectCherenkovMatrix(), dEdX);
376 const auto vChMScat = ublas::prod(*fChFlPtr->GetMieScatteredCherenkovMatrix(), dEdX);
377 const auto vChRScat = ublas::prod(*fChFlPtr->GetRayleighScatteredCherenkovMatrix(), dEdX);
396 const auto& fluorMSFactors = fChFlPtr->GetFluorescenceMSFactor();
397 const auto& cherMSFactors = fChFlPtr->GetCherenkovMSFactor();
399 for (
unsigned int i = mSiz - fnBins, j = 0; i < mSiz; ++i, ++j) {
400 const double time = lightFlux.GetX(j);
401 const double fl = vFluo(i);
402 fluorTot.PushBack(time, 0, fl, 0);
403 const double fluoMSfac = fluorMSFactors[i];
404 const double scattFluo = fl * (1 - 1/fluoMSfac);
405 fluorDir.PushBack(time, 0, fl - scattFluo, 0);
406 fluorMS.PushBack(time, 0, scattFluo, 0);
407 const double cd = vChDir(i);
408 const double cherMSfac = cherMSFactors[i];
409 const double scattDirCher = cd * (1 - 1/cherMSfac);
410 dirCher.PushBack(time, 0, cd - scattDirCher, 0);
411 const double cms = vChMScat(i);
412 const double scattMieCher = cms * (1 - 1/cherMSfac);
413 scatMCher.PushBack(time, 0, cms - scattMieCher, 0);
414 const double crs = vChRScat(i);
415 const double scattRayCher = crs * (1 - 1/cherMSfac);
416 scatRCher.PushBack(time, 0, crs - scattRayCher, 0);
417 cherMS.PushBack(time, 0, scattDirCher + scattRayCher + scattMieCher, 0);
423 ublas::vector<double> n(mSiz);
425 for (
unsigned int i = 0; i < mSiz - fnBins; ++i) {
426 n(i) = vFluo(i) + vChDir(i) + vChMScat(i) + vChRScat(i);
430 for (
unsigned int i = mSiz - fnBins, j = 0; i < mSiz; ++i, ++j) {
431 n(i) = lightFlux.GetY(j);
432 const double en = lightFlux.GetYErr(j);
441 ERROR(
"SingularMatrixException for CF");
444 const auto& CFinv = *CFinvPtr;
449 cerr <<
"\n recalculating dEdX\n covariance matrix ... " << endl;
453 vector<double> covdEdX(mSiz);
454 for (
unsigned int i = 0; i < mSiz; ++i) {
456 for (
unsigned int k = i; k < mSiz; ++k)
457 sum +=
Sqr(CFinv(k, i)) * Vn(i, i);
460 const auto dEdX2 = ublas::prod(CFinv, n);
462 auto& dedxProf = eyeRecData.GetFRecShower().GetEnergyDeposit();
463 auto& longProf = eyeRecData.GetFRecShower().GetLongitudinalProfile();
464 const double Ecut = eyeRecData.GetFRecShower().GetEnergyCutoff();
466 for (
unsigned int i = 0, j = mSiz - fnBins; i < fnBins; ++i, ++j) {
467 double& eDep = dedxProf.GetY(i);
468 double& eDepErr = dedxProf.GetYErr(i);
469 double& Ne = longProf.GetY(i);
470 double& NeErr = longProf.GetYErr(i);
472 eDepErr =
sqrt(covdEdX[j]);
474 Ne = eDep / dEdXperElectron;
475 NeErr = eDepErr / dEdXperElectron;
482 EnergyFitter::dEdXFitFunction(
int& ,
double* ,
double& f,
487 const double dEdXmax= par[0];
488 const double Xmax = par[1];
489 const double X0 = par[2];
490 const double lambda = par[3];
497 for (
unsigned int i = 0; i < fnBins; ++i) {
498 const double X = fDepth[i];
499 const double dEdX = fdEdX[i];
500 const double vdEdX = fvdEdX[i];
501 const double dedx =
GaisserHillas(X, X0, Xmax, dEdXmax, lambda);
502 const double resid = dEdX - dedx;
503 chisq +=
Sqr(resid) / vdEdX;
507 if (fFixX0 == eConstrained)
508 chisq +=
Sqr(X0 - fDefX0) / fVarX0;
509 if (fFixLambda == eConstrained)
510 chisq +=
Sqr(lambda - fDefLambda) / fVarLambda;
521 EnergyFitter::LightFitFunction(
int& ,
double* ,
double& f,
524 const double dEdXmax = par[0];
525 const double Xmax = par[1];
526 const double X0 = par[2];
527 const double lambda = par[3];
532 f = (fMinimizationMethod == eMaximumLikelihood) ?
533 GaisserHillasLogLike(dEdXmax, Xmax, X0, lambda) :
534 GaisserHillasChi2(dEdXmax, Xmax, X0, lambda);
543 EnergyFitter::EnergyFitFunction(
int& ,
double* ,
double& f,
546 const double Eem = par[0];
547 const double Xmax = par[1];
548 const double X0 = par[2];
549 const double lambda = par[3];
562 f = (fMinimizationMethod == eMaximumLikelihood) ?
563 GaisserHillasLogLike(dEdXmax, Xmax, X0, lambda) :
564 GaisserHillasChi2(dEdXmax, Xmax, X0, lambda);
570 EnergyFitter::GaisserHillasLogLike(
const double dEdXmax,
575 double logLikeSum = 0;
578 const double kXconvert =
g/
cm2;
579 const double kEconvert =
PeV/kXconvert;
580 const double kFluxToPe = fDiaphragmArea * fPhotonToPhotoElectron;
581 const double kFluxToPe2 = kFluxToPe * kFluxToPe;
584 const double maxNpe = 30;
586 const int maxSum = 100;
589 const auto&
m = *fChFl;
590 const unsigned int mSiz =
m.size1();
591 const unsigned int offSet = mSiz - fnBins;
594 vector<double> dedx(mSiz);
595 vector<double> lightSum(fnBins);
597 for (
unsigned int i = 0; i < mSiz; ++i) {
598 const double X = fChFlDepth[i] / kXconvert;
606 for (
unsigned int k = 0; k <= i; ++k)
607 sum += dedx[k] *
m(i, k);
608 lightSum[i - offSet] = sum*kEconvert;
612 double nPeObsTot = 0;
613 double nPeExpTot = 0;
616 for (
unsigned int i = 0; i < fnBins; ++i) {
619 const double nPeBackground = fvBackGround[i] * kFluxToPe2 / (1 + fGainVariance);
620 const double nPeSignalExp = lightSum[i]*kFluxToPe;
621 const double nPeExp = nPeSignalExp + nPeBackground;
622 const double nPeObs = fLight[i] * kFluxToPe + nPeBackground;
628 if (nPeObs < maxNpe) {
630 const double gaussVar = nPeExp * fGainVariance;
632 const double lnNpe = log(nPeExp);
636 for (
int k = 0; k < maxSum; ++k) {
637 const double gaussArg = -0.5*
Sqr(k - nPeObs) / gaussVar;
638 const double lnFaculty =
LogGamma(k + 1);
639 const double expArg = gaussArg - nPeExp + k*lnNpe - lnFaculty;
640 const double value = exp(expArg);
643 logLike = log(sum) - 0.5*log(gaussVar);
648 const double gaussVar = nPeExp * (1 + fGainVariance);
649 logLike = -0.5 *
Sqr(nPeExp - nPeObs) / gaussVar - 0.5 * log(gaussVar);
653 logLikeSum += logLike;
658 const double gaussVar = nPeExpTot * (1 + fGainVariance);
659 logLikeSum +=-0.5 *
Sqr(nPeExpTot - nPeObsTot) / gaussVar - 0.5 * log(gaussVar);
662 if (fFixX0 == eConstrained)
663 logLikeSum += -0.5 * log(fVarX0) - 0.5 *
Sqr(X0 - fDefX0) / fVarX0;
664 if (fFixLambda == eConstrained)
665 logLikeSum += -0.5 * log(fVarLambda) - 0.5 *
Sqr(lambda - fDefLambda) / fVarLambda;
669 if (fFixkUniv == eConstrained) {
670 const double myEta = (Xmax - X0) / lambda;
671 const double myEcal = lambda * dEdXmax *
pow(
kE / myEta, myEta) * TMath::Gamma(myEta + 1);
672 const double fkUniv = myEcal / dEdXmax;
673 const double fkUnivTrue = fDefA1 + fDefA2 * log10(myEcal * 1e15);
675 logLikeSum += -0.5 * log(fVarK) - 0.5 *
Sqr(fkUniv - fkUnivTrue) / fVarK;
678 return -2 * logLikeSum;
684 EnergyFitter::GaisserHillasChi2(
const double dEdXmax,
691 const double kXconvert =
g/
cm2;
692 const double kEconvert =
PeV/kXconvert;
694 const auto&
m = *fChFl;
695 const unsigned int mSiz =
m.size1();
696 const unsigned int offSet = mSiz - fnBins;
698 vector<double> dedx(mSiz);
700 for (
unsigned int i = 0; i < mSiz; ++i) {
701 const double X = fChFlDepth[i] / kXconvert;
708 for (
unsigned int i = 0; i < fnBins; ++i) {
710 const unsigned int j = offSet + i;
713 for (
unsigned int k = 0; k <= j; ++k)
714 lightSum += dedx[k] *
m(j, k);
716 lightSum *= kEconvert;
718 const double resid = lightSum - fLight[i];
721 if (fMinimizationMethod == eModifiedLeastSquares)
722 variance = fvLight[i];
724 const double vLight = lightSum * (1 + fGainVariance) / (fDiaphragmArea * fPhotonToPhotoElectron);
725 const double bgVariance = fvBackGround[i];
726 variance = vLight+bgVariance;
729 chisq +=
Sqr(resid) / variance;
734 if (fFixX0 == eConstrained)
735 chisq +=
Sqr(X0 - fDefX0) / fVarX0;
736 if (fFixLambda == eConstrained)
737 chisq +=
Sqr(lambda - fDefLambda) / fVarLambda;
740 if (fFixkUniv == eConstrained) {
741 double myEta = (Xmax -X0) / lambda;
742 double myEcal = lambda * dEdXmax *
pow(
kE / myEta, myEta) * TMath::Gamma(myEta + 1);
743 double fkUniv = myEcal / dEdXmax;
744 double fkUnivTrue = fDefA1 + fDefA2 * log10(myEcal * 1e15);
746 chisq +=
Sqr(fkUniv - fkUnivTrue) / fVarK;
767 const int npar = eNGHParameters;
768 double arglist[2] = { 0 };
771 TMinuit minuit(npar);
776 minuit.SetFCN(EnergyFitter::dEdXFitFunction);
779 minuit.SetFCN(EnergyFitter::EnergyFitFunction);
782 minuit.SetFCN(EnergyFitter::LightFitFunction);
787 if (option == eLightAllParam && !UpDateFCM())
790 fChFl = fChFlPtr->GetCherenkovFluorescenceMatrix();
794 minuit.SetPrintLevel(0);
795 else if (fVerbosity >= 3)
796 minuit.SetPrintLevel(fVerbosity);
798 minuit.SetPrintLevel(-1);
799 minuit.mnexcm(
"SET NOW", arglist, 0, ierflag);
802 minuit.mnexcm(
"SET ERR", arglist, 1, ierflag);
805 if (option == eLightEnergy)
806 minuit.mnparm(eEnergy,
"Eem", fEem, 0.1*fabs(fEem), 0, 0, ierflag);
808 minuit.mnparm(eEnergy,
"dEdXmax", fdEdXmax, 0.1*fabs(fdEdXmax), 0, 0, ierflag);
809 minuit.mnparm(eXmax,
"Xmax", fXmax, 20, 0, 0, ierflag);
810 minuit.mnparm(
eX0,
"X0", fX0, 10, -1000, fDepth[0], ierflag);
811 minuit.mnparm(
eLambda,
"lambda", fLambda, 5, 10, 150, ierflag);
813 if (fFixLambda ==
eFixed || option == eEnergyDeposit)
815 if (fFixX0 ==
eFixed || option == eEnergyDeposit)
816 minuit.FixParameter(
eX0);
821 minuit.mnexcm(
"MIGRAD", arglist, 2, ierflag);
825 cerr <<
" MIGRAD failed in dEdX fit " << ierflag << endl;
835 minuit.mnstat(amin, edm, errdef, nvpar, nparx, icstat);
842 if (fFixLambda ==
eFree)
845 double p[eNGHParameters] = { 0 };
846 if (option != eLightEnergy)
847 minuit.GetParameter(eEnergy, fdEdXmax, p[eEnergy]);
849 minuit.GetParameter(eEnergy, fEem, p[eEnergy]);
851 minuit.GetParameter(eXmax, fXmax, p[eXmax]);
852 minuit.GetParameter(
eX0, fX0, p[
eX0]);
854 minuit.mnemat(&fCovariance[0][0], eNGHParameters);
856 if (fMinimizationMethod == eMaximumLikelihood) {
857 fChisqGH = GaisserHillasChi2(fdEdXmax, fXmax, fX0, fLambda);
862 if (fVerbosity > -1 )
863 DumpCurrentParameters(option);
875 if (!recShower.HasGHParameters()) {
877 recShower.MakeGHParameters(ghTmp);
881 auto& gh = recShower.GetGHParameters();
882 gh.SetXMax(fXmax*gcm2,
sqrt(fCovariance[eXmax][eXmax])*gcm2);
883 gh.SetNMax(fdEdXmax*
PeV/gcm2,
sqrt(fCovariance[eEnergy][eEnergy])*
PeV/gcm2,
true);
884 gh.SetChiSquare(fChisqGH, fnDof);
894 fEem = GetEmEnergy() /
PeV;
897 ERROR(
"Error calculating gamma function");
898 recShower.SetEmEnergy(0, 0);
899 recShower.SetTotalEnergy(0, 0);
903 if (FitProfile(eLightEnergy)) {
906 const double EemStatVar = fCovariance[eEnergy][eEnergy] *
PeV*
PeV;
907 recShower.SetEmEnergy(fEem,
sqrt(EemStatVar), ShowerFRecData::eStatistical);
917 EnergyFitter::GetEmEnergy()
929 EnergyFitter::UpDateFCM()
931 const double kMaxXmaxDiff = 20;
932 if (std::fabs(fChFlPtr->GetXmax()/(
g/
cm2) - fXmax) > kMaxXmaxDiff &&
934 fChFlPtr->UpdateXmax(fXmax*(
g/
cm2));
946 cout <<
" X0 [g/cm^2] lambda [g/cm^2] "
947 "Xm [g/cm^2] dEdXm [PeV/(g/cm^2)] chi2/ndf \n"
948 " ---------------------------------------------"
949 "------------------------------------------\n"
953 cout <<
" ==> prefit :";
956 cout <<
" ==> final :";
961 cout << setw(12) << fX0
962 << setw(15) << fLambda
964 << setw(17) << fdEdXmax
965 << setw(12) << int(fChisqGH) <<
"/"
976 if (InitializeGHFit(eye, 1) && FitProfile(EnergyFitter::eLightAllParam)) {
986 EnergyFitter::CleanUp()
1000 delete[] fvBackGround;
1001 fvBackGround =
nullptr;
1009 delete[] fChFlDepth;
1010 fChFlDepth =
nullptr;
1016 EnergyFitter::GetXmax()
1025 EnergyFitter::GetdEdXmax()
1034 EnergyFitter::GetX0()
1043 EnergyFitter::GetLambda()
1046 return fLambda*
g/
cm2;
unsigned int GetNPoints() const
bool HasLightFlux(const FdConstants::LightSource source=FdConstants::eTotal) const
Check that light profile for source /par source is present.
constexpr T Sqr(const T &x)
Fluorescence Detector Eye Event.
std::pair< gh::EShapeParameter, double > ShapeParameter
#define INFO(message)
Macro for logging informational messages.
void SetShapeParameter(const gh::EShapeParameter par, const double value, const double error)
Setters.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
double pow(const double x, const unsigned int i)
const lowerTriangularMatrix * GetInverse() const
Class representing a document branch.
double LogGamma(const double x)
TelescopeIterator TelescopesEnd()
first available tel of status eHasData (DEPRECATED)
evt::ShowerFRecData & GetFRecShower()
Reconstructed shower info for this eye.
void GetData(bool &b) const
Overloads of the GetData member template function.
TelescopeIterator TelescopesBegin()
first available tel of status eHasData (DEPRECATED)
double GaisserHillas(const double x, const double x0, const double xMax, const double nMax, const double lambda)
Calculate the Gaisser-Hillas function.
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
Calculation of Cherenkov and Fluorescence matrix.
double EnergyDeposit(const double age, const double enCut)
Parametrization for the average energy deposit per particle.
utl::TabulatedFunctionErrors & GetLightFlux(const FdConstants::LightSource source=fevt::FdConstants::eTotal)
Light flux at diaphragm, photons/m^2 versus time in ns.
double GetIntegral() const
calculate integral
Gaisser Hillas with 4 parameters.
#define ERROR(message)
Macro for logging error messages.
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
utl::TabulatedFunctionErrors & GetEnergyDeposit()
retrieve dE/dX
fevt::EyeRecData & GetRecData()
Reconstructed data for this eye.