PandaRoot
RhoKinFitter.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 RhoKinFitter_H
14 #define RhoKinFitter_H
15 // //
17 // RhoKinFitter //
18 // //
19 // V. Jha 2010 FZ Juelich //
20 // //
22 
23 #include "RhoFitterBase.h"
24 #include "RhoCandList.h"
25 #include "TVector3.h"
26 #include "TMatrixDSym.h"
27 #include "TMatrixD.h"
28 #include "TLorentzVector.h"
29 #include "TDecompLU.h"
30 
31 class RhoCandidate;
32 
33 class RhoKinFitter : public RhoFitterBase {
34  public:
36  virtual ~RhoKinFitter();
37 
38  void Add4MomConstraint(TLorentzVector lv);
39  void AddMomConstraint(TVector3 v);
40  void AddTotEConstraint(double energy);
41  void AddTotMomConstraint(double momentum);
42  void AddMassConstraint(double mass);
43  Bool_t Fit();
44  Bool_t FitAll()
45  {
46  Fatal("RhoKinFitter::FitAll()", "Not applicable. Please use Fit().");
47  return kFALSE;
48  };
49 
50  double Chi2Diff() { return fChi2Diff; }
51  double GetPull() { return fPull; }
52  double Chi2Contribution(const RhoCandidate &) const
53  {
54  Error("RhoKinFitter::Chi2Contribution", "No chi2 contribution available.");
55  return -9999.;
56  };
57 
58  private:
59  void SetMatrices();
60  void ZeroMatrices();
61  void ReadMatrix();
62  void ReadKinMatrix();
63  void ReadMassKinMatrix();
64  void Read4MomKinMatrix();
65  void ReadMomKinMatrix();
66  void ReadTotEKinMatrix();
67  void ReadTotMomKinMatrix();
68  Bool_t Solve();
69  void SetOutput();
70 
71  TMatrixD fAl0; // original parameters
72  TMatrixD fAl1; // fitted parameters
73  TMatrixD fV_al0; // Covariance matrix for original parameters
74  TMatrixD fV_al1; // Covariance matrix for original parameters
75 
76  TMatrixD fmD; // Matrix of constraint derivitives
77  TMatrixD fmE; // Matrix of vertex constraints
78  TMatrixD fmd; // Vector of evaluated constraints
79  TMatrixD fmPull;
80 
81  Int_t fNvar; // Number of variables (=4 for 4 vector)
82  Int_t fNpar; // Number of parameters=Npart*fNvar
83  Int_t fNcon; // Number of constraints
84  Int_t fNc; // countNumber of constraints added
85  Int_t fNiter; // Number of times Solve has been called
86  Int_t fNunKnown; // Number of unknowns
87  Int_t fNumCon; // Number of constraints ...
88 
89  double fMass;
90  TLorentzVector flmm;
91  TVector3 fmm;
92  double fEc;
93  double fMom;
94 
95  int f4MomConstraint;
96  int fMomConstraint;
97  int fTotEConstraint;
98  int fMassConstraint;
99  int fTotMomConstraint;
100 
101  double fChi2Diff;
102  double fPull;
103 
104  ClassDef(RhoKinFitter, 1)
105 };
106 
107 #endif
void AddMomConstraint(TVector3 v)
double Chi2Contribution(const RhoCandidate &) const
Definition: RhoKinFitter.h:52
void AddTotMomConstraint(double momentum)
void AddMassConstraint(double mass)
RhoKinFitter(RhoCandidate *b)
void Add4MomConstraint(TLorentzVector lv)
__m128 v
Definition: P4_F32vec4.h:15
void AddTotEConstraint(double energy)
virtual ~RhoKinFitter()
Bool_t FitAll()
Definition: RhoKinFitter.h:44
double GetPull()
Definition: RhoKinFitter.h:51
Bool_t Fit()
double Chi2Diff()
Definition: RhoKinFitter.h:50
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:64