PandaRoot
PndTrkFitter.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDTRKFITTER_H
14 #define PNDTRKFITTER_H
15 
16 #include <vector>
17 #include "TObject.h"
18 
19 class PndTrkFitter : public TObject {
20 
21  public:
22  PndTrkFitter();
23  PndTrkFitter(int verbose);
24  ~PndTrkFitter();
25 
26  void Reset();
27  void SetPointToFit(double x, double y, double sigma);
28  Bool_t StraightLineFit(Double_t &fitm, Double_t &fitp);
29  Double_t StraightLineFitWithChi2(Double_t &fitm, Double_t &fitp);
30 
31  Bool_t ConstrainedStraightLineFit(Double_t x0, Double_t y0, Double_t &fitm, Double_t &fitp);
32 
33  Bool_t ParabolaFit(Double_t &fita, Double_t &fitb, Double_t &fitc);
34 
35  void SetVerbose(int ver) { fVerbose = ver; }
36 
37  private:
38  Double_t fSx, fSy, fSxy, fSxx, fSxxy, fSxxx, fSxxxx, fS1;
39  std::vector<double> fX, fY, fSigma;
40  Int_t fVerbose;
41  ClassDef(PndTrkFitter, 1)
42 };
43 
44 #endif
Bool_t ParabolaFit(Double_t &fita, Double_t &fitb, Double_t &fitc)
Bool_t ConstrainedStraightLineFit(Double_t x0, Double_t y0, Double_t &fitm, Double_t &fitp)
Double_t StraightLineFitWithChi2(Double_t &fitm, Double_t &fitp)
void SetVerbose(int ver)
Definition: PndTrkFitter.h:35
Bool_t StraightLineFit(Double_t &fitm, Double_t &fitp)
void SetPointToFit(double x, double y, double sigma)