EnergyFitter.h
Go to the documentation of this file.
1 #ifndef _EnergyFitterKG_EnergyFitter_h_
2 #define _EnergyFitterKG_EnergyFitter_h_
3 
4 #include <fwk/VModule.h>
5 
6 
7 namespace fevt {
8  class Eye;
9 }
10 
11 namespace oBLAS {
12  class lowerTriangularMatrix;
13 }
14 
15 namespace FdProfileReconstructorKG {
16  class CherenkovFluorescenceMatrix;
17 }
18 
19 namespace FdProfileReconstructorKG {
20 
28  class EnergyFitter {
29 
30  public:
31  bool Init();
32  bool Run(fevt::Eye& eye, CherenkovFluorescenceMatrix* const chfl);
33  bool Finish() const { return true; }
34 
35  bool ReFitProfile(const fevt::Eye& eye, CherenkovFluorescenceMatrix* const chfl);
36  double GetXmax() const;
37  double GetX0() const;
38  double GetdEdXmax() const;
39  double GetLambda() const;
40  double GetEmEnergy() const;
41  int GetVerbosity() const { return fVerbosity; }
42  void SetVerbosity(const int iv) { fVerbosity = iv; }
43  void SetYieldRefit(const bool what) { fYieldRefit = what; }
44 
45  private:
46  enum EFitOption {
52  };
53 
58  };
59 
61  eEnergy = 0, // or dEdXmax
63  eX0,
66  };
67 
72  };
73 
74  bool InitializeGHFit(const fevt::Eye&, const int iMode);
75  bool FitProfile(const EFitOption opt);
78  bool UpDateFCM();
79  void CleanUp();
80  void DumpCurrentParameters(const EFitOption) const;
81 
82  // MINUIT fit functions
83  static void dEdXFitFunction(int&, double*, double&, double*, int);
84  static void LightFitFunction(int&, double*, double&, double*, int);
85  static void EnergyFitFunction(int&, double*, double&, double*, int);
86  static double GaisserHillasChi2(const double, const double,
87  const double, const double);
88  static double GaisserHillasLogLike(const double, const double,
89  const double, const double);
90 
91  // dEdX profile
92  static unsigned int fnBins; // number of bins
93  static double* fdEdX; // energy deposit
94  static double* fvdEdX; // its variance
95  static double* fLight; // light at diaphragm (measured)
96  static double* fvLight; // its variance from FdApertureLightFinder
97  static double* fvBackGround; // baseline variance
98  static double* fDepth; // slant depth
99  static double* fChFlDepth;
100 
101  // telescope properties (for Npe calculation)
102  static double fDiaphragmArea;
103  static double fGainVariance;
104  static double fPhotonToPhotoElectron;
105 
106  // cherenkov fluorescence matrix
109 
110  // current GH parameters and their uncertainties
111  double fX0 = 0;
112  double fXmax = 0;
113  double fdEdXmax = 0;
114  double fLambda = 0;
116  double fChisqGH = 0;
117  unsigned int fnDof = 0;
118  double fEem = 0;
119 
120  // options
124  static double fDefX0;
125  static double fDefLambda;
126  static double fVarX0;
127  static double fVarLambda;
128 
129  static double fDefA1;
130  static double fDefA2;
131  static double fVarK;
132 
134  int fVerbosity = 0;
135  bool fYieldRefit = false;
136 
137  };
138 
139 }
140 
141 
142 #endif
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
double fCovariance[eNGHParameters][eNGHParameters]
Definition: EnergyFitter.h:115
static EMinimizationType fMinimizationMethod
Definition: EnergyFitter.h:133
CherenkovFluorescenceMatrix * fChFlPtr
Definition: EnergyFitter.h:107
bool InitializeGHFit(const fevt::Eye &, const int iMode)
static const oBLAS::lowerTriangularMatrix * fChFl
Definition: EnergyFitter.h:108
static double GaisserHillasChi2(const double, const double, const double, const double)
bool FitProfile(const EFitOption opt)
void SetYieldRefit(const bool what)
Definition: EnergyFitter.h:43
void DumpCurrentParameters(const EFitOption) const
bool Run(fevt::Eye &eye, CherenkovFluorescenceMatrix *const chfl)
Calculation of Cherenkov and Fluorescence matrix.
static void EnergyFitFunction(int &, double *, double &, double *, int)
static double GaisserHillasLogLike(const double, const double, const double, const double)
static void LightFitFunction(int &, double *, double &, double *, int)
module to fit Gaisser-Hillas function to energy deposit profile and to derive total shower energy ...
Definition: EnergyFitter.h:28
static void dEdXFitFunction(int &, double *, double &, double *, int)
bool ReFitProfile(const fevt::Eye &eye, CherenkovFluorescenceMatrix *const chfl)

, generated on Tue Sep 26 2023.