SphericalFitFunction.h
Go to the documentation of this file.
1 #ifndef _RdSphericalFit_SphericalFitFunction_h_
2 #define _RdSphericalFit_SphericalFitFunction_h_
3 
4 #include <fwk/LocalCoordinateSystem.h>
5 
6 #include <utl/CoordinateSystemPtr.h>
7 #include <utl/Vector.h>
8 #include <utl/Minou.h>
9 
10 #include <vector>
11 
12 namespace RdSphericalFit {
13 
14  struct StationFitData {
15  double signalTime;
16  double signalTimeErr;
18  };
19 
20 
22 
23  public:
24  SphericalFitFunction( const std::vector<StationFitData>& stationData,
25  const std::vector<utl::Minou::ParameterDef>& pars,
26  const utl::CoordinateSystemPtr& localCS,
27  const double tmean) :
28  fStationData(stationData),
29  fLocalCS(localCS),
30  ftmean(tmean)
31  {
32  GetParameterDefs() = pars;
33  }
34 
35  double operator()(const std::vector<double>& pars) const;
36  double GetChi2(const std::vector<double>& pars);
37  int GetNDF();
38 
39  private:
40  const std::vector<StationFitData>& fStationData;
42  const double ftmean;
43 
44  // fit parameters
45  mutable double fRadius = 0;
46  mutable double fTheta = 0;
47  mutable double fPhi = 0;
48  mutable double fGamma = 1;
49 
50  void
51  UpdateParameters(const std::vector<double>& pars)
52  const
53  {
54  fRadius = pars[0];
55  fTheta = pars[1];
56  fPhi = pars[2];
57  fGamma = pars[3];
58  }
59  };
60 
61 }
62 
63 
64 #endif
SphericalFitFunction(const std::vector< StationFitData > &stationData, const std::vector< utl::Minou::ParameterDef > &pars, const utl::CoordinateSystemPtr &localCS, const double tmean)
const utl::CoordinateSystemPtr & fLocalCS
double GetChi2(const std::vector< double > &pars)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
std::vector< ParameterDef > & GetParameterDefs()
Definition: Minou.h:97
Vector object.
Definition: Vector.h:30
const std::vector< StationFitData > & fStationData
double operator()(const std::vector< double > &pars) const

, generated on Tue Sep 26 2023.