MarlinTPC  1.2.0
SimpleMinimizerResidualsFunction.h
1 #ifndef SIMPLE_MIMINIZER_RESIDUALS_FUNCTION_H
2 #define SIMPLE_MINIMIZER_RESIDUALS_FUNCTION_H 1
3 
4 #include <Minuit2/FCNBase.h>
5 #include <EVENT/Track.h>
6 #include <TrackFitterBase.h>
7 
8 namespace marlintpc
9 {
10 
17 class SimpleMinimizerResidualsFunction : public ROOT::Minuit2::FCNBase
18 {
19 
20  public:
21  SimpleMinimizerResidualsFunction(const EVENT::Track * const t, TrackFitterBase const * f) ;
23  virtual double Up() const
24  {
25  return theErrorDef;
26  }
27  virtual double operator()(const std::vector<double>&) const;
28  void SetErrorDef(double def)
29  {
30  theErrorDef = def;
31  }
32 
33  private:
34 
35  const EVENT::Track * const track;
36  TrackFitterBase const * fitter;
37  double theErrorDef;
38 };
39 
40 }//namespace marlintpc
41 
42 #endif //SIMPLE_MINIMIZER_RESIDUALS_FUNCTION_H
The Minuit2 fitter function to calculate the squared sum of the residuals.
Definition: SimpleMinimizerResidualsFunction.h:17
The TrackFitterBase is a virtual class from which the actual track fitters are derived.
Definition: TrackFitterBase.h:44