module to fit Gaisser-Hillas function to energy deposit profile and to derive total shower energy More...
#include <EnergyFitter.h>
Public Member Functions | |
bool | Finish () const |
double | GetdEdXmax () const |
double | GetEmEnergy () const |
double | GetLambda () const |
int | GetVerbosity () const |
double | GetX0 () const |
double | GetXmax () const |
bool | Init () |
bool | ReFitProfile (const fevt::Eye &eye, CherenkovFluorescenceMatrix *const chfl) |
bool | Run (fevt::Eye &eye, CherenkovFluorescenceMatrix *const chfl) |
void | SetVerbosity (const int iv) |
void | SetYieldRefit (const bool what) |
Private Types | |
enum | EFitOption { eInitialize, eEnergyDeposit, eLight2Param, eLightAllParam, eLightEnergy } |
enum | EGHFitParameters { eEnergy = 0, eXmax, eX0, eLambda, eNGHParameters } |
enum | EMinimizationType { eMaximumLikelihood, eLeastSquares, eModifiedLeastSquares } |
enum | EParConstraints { eFree, eFixed, eConstrained } |
Private Member Functions | |
bool | CalculateEnergy (fevt::Eye &) |
void | CleanUp () |
void | DumpCurrentParameters (const EFitOption) const |
void | FillProfilesAtAperture (fevt::Eye &) |
bool | FitProfile (const EFitOption opt) |
bool | InitializeGHFit (const fevt::Eye &, const int iMode) |
bool | UpDateFCM () |
Static Private Member Functions | |
static void | dEdXFitFunction (int &, double *, double &, double *, int) |
static void | EnergyFitFunction (int &, double *, double &, double *, int) |
static double | GaisserHillasChi2 (const double, const double, const double, const double) |
static double | GaisserHillasLogLike (const double, const double, const double, const double) |
static void | LightFitFunction (int &, double *, double &, double *, int) |
Private Attributes | |
CherenkovFluorescenceMatrix * | fChFlPtr = nullptr |
double | fChisqGH = 0 |
double | fCovariance [eNGHParameters][eNGHParameters] = { { 0 } } |
double | fdEdXmax = 0 |
double | fEem = 0 |
double | fLambda = 0 |
unsigned int | fnDof = 0 |
int | fVerbosity = 0 |
double | fX0 = 0 |
double | fXmax = 0 |
bool | fYieldRefit = false |
Static Private Attributes | |
static const oBLAS::lowerTriangularMatrix * | fChFl = nullptr |
static double * | fChFlDepth = nullptr |
static double * | fdEdX = nullptr |
static double | fDefA1 = 0 |
static double | fDefA2 = 0 |
static double | fDefLambda = 0 |
static double | fDefX0 = 0 |
static double * | fDepth = nullptr |
static double | fDiaphragmArea = 0 |
static EParConstraints | fFixkUniv = eFree |
static EParConstraints | fFixLambda = eFree |
static EParConstraints | fFixX0 = eFree |
static double | fGainVariance = 0 |
static double * | fLight = nullptr |
static EMinimizationType | fMinimizationMethod = eModifiedLeastSquares |
static unsigned int | fnBins = 0 |
static double | fPhotonToPhotoElectron = 0 |
static double | fVarK = 0 |
static double | fVarLambda = 0 |
static double | fVarX0 = 0 |
static double * | fvBackGround = nullptr |
static double * | fvdEdX = nullptr |
static double * | fvLight = nullptr |
module to fit Gaisser-Hillas function to energy deposit profile and to derive total shower energy
Definition at line 28 of file EnergyFitter.h.
|
private |
Enumerator | |
---|---|
eInitialize | |
eEnergyDeposit | |
eLight2Param | |
eLightAllParam | |
eLightEnergy |
Definition at line 46 of file EnergyFitter.h.
Enumerator | |
---|---|
eEnergy | |
eXmax | |
eX0 | |
eLambda | |
eNGHParameters |
Definition at line 60 of file EnergyFitter.h.
Enumerator | |
---|---|
eMaximumLikelihood | |
eLeastSquares | |
eModifiedLeastSquares |
Definition at line 54 of file EnergyFitter.h.
Enumerator | |
---|---|
eFree | |
eFixed | |
eConstrained |
Definition at line 68 of file EnergyFitter.h.
|
private |
Definition at line 871 of file EnergyFitter.cc.
References utl::cm2, evt::gh::eLambda, ERROR, evt::gh::eX0, utl::g, gcm2, fevt::EyeRecData::GetFRecShower(), fevt::Eye::GetRecData(), utl::PeV, evt::GaisserHillas4Parameter::SetShapeParameter(), and sqrt().
|
private |
Definition at line 986 of file EnergyFitter.cc.
|
staticprivate |
Definition at line 482 of file EnergyFitter.cc.
References utl::GaisserHillas(), and utl::Sqr().
|
private |
Definition at line 941 of file EnergyFitter.cc.
|
staticprivate |
fits modified Gaisser-Hillas function by foward folding of dEdX profile GH parameters are Eem, lambda, X0 and Xmax
Definition at line 543 of file EnergyFitter.cc.
References evt::gh::eLambda, evt::gh::eX0, and evt::GaisserHillas4Parameter::GetIntegral().
|
private |
Definition at line 360 of file EnergyFitter.cc.
References utl::TabulatedFunctionErrors::Clear(), utl::cm2, fevt::FdConstants::eCherDirect, fevt::FdConstants::eCherMieScattered, fevt::FdConstants::eCherMultScattered, fevt::FdConstants::eCherRayleighScattered, fevt::FdConstants::eFluorDirect, fevt::FdConstants::eFluorMultScattered, fevt::FdConstants::eFluorTotal, utl::EnergyDeposit(), ERROR, fevt::FdConstants::eTotal, utl::g, utl::GaisserHillas(), oBLAS::lowerTriangularMatrix::GetInverse(), fevt::EyeRecData::GetLightFlux(), fevt::Eye::GetRecData(), utl::PeV, utl::s, utl::Sqr(), and sqrt().
|
inline |
Definition at line 33 of file EnergyFitter.h.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::Finish().
|
private |
fits 2/3/4 parameter Gaisser-Hillas function to energy deposit profile (option=eEnergyDeposit) or light profile (eLight2Param or eLightAllParam -> dEdXmax fit, eLightEnergy -> Eem fit)
returns true if successful
Definition at line 763 of file EnergyFitter.cc.
References LDFFinderKG::eFixed, UnivFitterKG::eFree, evt::gh::eLambda, evt::gh::eX0, UnivRecNS::npar, and G4StationSimulatorOG::p.
|
staticprivate |
Definition at line 684 of file EnergyFitter.cc.
References utl::cm2, utl::g, utl::GaisserHillas(), utl::kE, utl::m, utl::PeV, std::pow(), and utl::Sqr().
|
staticprivate |
Definition at line 570 of file EnergyFitter.cc.
References utl::cm2, utl::g, utl::GaisserHillas(), utl::kE, utl::LogGamma(), utl::m, utl::PeV, std::pow(), and utl::Sqr().
double FdProfileReconstructorKG::EnergyFitter::GetdEdXmax | ( | ) | const |
Definition at line 1025 of file EnergyFitter.cc.
References utl::cm2, utl::g, and utl::PeV.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
double FdProfileReconstructorKG::EnergyFitter::GetEmEnergy | ( | ) | const |
Definition at line 917 of file EnergyFitter.cc.
References evt::gh::eLambda, evt::gh::eX0, evt::GaisserHillas4Parameter::GetIntegral(), and utl::PeV.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
double FdProfileReconstructorKG::EnergyFitter::GetLambda | ( | ) | const |
Definition at line 1043 of file EnergyFitter.cc.
References utl::cm2, and utl::g.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
|
inline |
Definition at line 41 of file EnergyFitter.h.
References fVerbosity.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::GetEnergyFitterVerbosity(), and FdProfileReconstructorKG::FdProfileReconstructor::PropagateUncertainties().
double FdProfileReconstructorKG::EnergyFitter::GetX0 | ( | ) | const |
Definition at line 1034 of file EnergyFitter.cc.
References utl::cm2, and utl::g.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
double FdProfileReconstructorKG::EnergyFitter::GetXmax | ( | ) | const |
Definition at line 1016 of file EnergyFitter.cc.
References utl::cm2, and utl::g.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
bool FdProfileReconstructorKG::EnergyFitter::Init | ( | void | ) |
Definition at line 85 of file EnergyFitter.cc.
References utl::cm2, LDFFinderKG::eFixed, UnivFitterKG::eFree, utl::g, utl::Branch::Get(), utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), INFO, utl::Sqr(), and sqrt().
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::Init().
|
private |
initializes GH parameters dEdXmax and Xmax and fills internal depth, light etc. arrays
if iMode=0 starting GH parameters will be guessed from dEdX profile
returns true if successful
Definition at line 209 of file EnergyFitter.cc.
References utl::cm2, fevt::FdConstants::eBackground, ERROR, fevt::FdConstants::eTotal, utl::g, evt::ShowerFRecData::GetEnergyDeposit(), fevt::EyeRecData::GetFRecShower(), fevt::EyeRecData::GetLightFlux(), utl::TabulatedFunction::GetNPoints(), fevt::Eye::GetRecData(), fevt::EyeRecData::HasLightFlux(), utl::PeV, utl::Sqr(), fevt::Eye::TelescopesBegin(), and fevt::Eye::TelescopesEnd().
|
staticprivate |
fits Gaisser-Hillas function by foward folding of dEdX profile GH parameters are dEdXmax, lambda, X0 and Xmax
Definition at line 521 of file EnergyFitter.cc.
bool FdProfileReconstructorKG::EnergyFitter::ReFitProfile | ( | const fevt::Eye & | eye, |
CherenkovFluorescenceMatrix *const | chfl | ||
) |
Definition at line 972 of file EnergyFitter.cc.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::ReFitProfile().
bool FdProfileReconstructorKG::EnergyFitter::Run | ( | fevt::Eye & | eye, |
CherenkovFluorescenceMatrix *const | chfl | ||
) |
Definition at line 178 of file EnergyFitter.cc.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::Run().
|
inline |
Definition at line 42 of file EnergyFitter.h.
References fVerbosity.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::PropagateUncertainties(), and FdProfileReconstructorKG::FdProfileReconstructor::SetEnergyFitterVerbosity().
|
inline |
Definition at line 43 of file EnergyFitter.h.
References fYieldRefit.
Referenced by FdProfileReconstructorKG::FdProfileReconstructor::SetYieldRefit().
|
private |
Definition at line 929 of file EnergyFitter.cc.
|
staticprivate |
Definition at line 108 of file EnergyFitter.h.
|
staticprivate |
Definition at line 99 of file EnergyFitter.h.
|
private |
Definition at line 107 of file EnergyFitter.h.
|
private |
Definition at line 116 of file EnergyFitter.h.
|
private |
Definition at line 115 of file EnergyFitter.h.
|
staticprivate |
Definition at line 93 of file EnergyFitter.h.
|
private |
Definition at line 113 of file EnergyFitter.h.
|
staticprivate |
Definition at line 129 of file EnergyFitter.h.
|
staticprivate |
Definition at line 130 of file EnergyFitter.h.
|
staticprivate |
Definition at line 125 of file EnergyFitter.h.
|
staticprivate |
Definition at line 124 of file EnergyFitter.h.
|
staticprivate |
Definition at line 98 of file EnergyFitter.h.
|
staticprivate |
Definition at line 102 of file EnergyFitter.h.
|
private |
Definition at line 118 of file EnergyFitter.h.
|
staticprivate |
Definition at line 123 of file EnergyFitter.h.
|
staticprivate |
Definition at line 122 of file EnergyFitter.h.
|
staticprivate |
Definition at line 121 of file EnergyFitter.h.
|
staticprivate |
Definition at line 103 of file EnergyFitter.h.
|
private |
Definition at line 114 of file EnergyFitter.h.
|
staticprivate |
Definition at line 95 of file EnergyFitter.h.
|
staticprivate |
Definition at line 133 of file EnergyFitter.h.
|
staticprivate |
Definition at line 92 of file EnergyFitter.h.
|
private |
Definition at line 117 of file EnergyFitter.h.
|
staticprivate |
Definition at line 104 of file EnergyFitter.h.
|
staticprivate |
Definition at line 131 of file EnergyFitter.h.
|
staticprivate |
Definition at line 127 of file EnergyFitter.h.
|
staticprivate |
Definition at line 126 of file EnergyFitter.h.
|
staticprivate |
Definition at line 97 of file EnergyFitter.h.
|
staticprivate |
Definition at line 94 of file EnergyFitter.h.
|
private |
Definition at line 134 of file EnergyFitter.h.
Referenced by GetVerbosity(), and SetVerbosity().
|
staticprivate |
Definition at line 96 of file EnergyFitter.h.
|
private |
Definition at line 111 of file EnergyFitter.h.
|
private |
Definition at line 112 of file EnergyFitter.h.
|
private |
Definition at line 135 of file EnergyFitter.h.
Referenced by SetYieldRefit().