PandaRoot
RhoKinVtxFitter.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 RhoKinVtxFitter_H
14 #define RhoKinVtxFitter_H
15 // //
17 // RhoKinVtxFitter //
18 // //
19 // Author: V. Jha 2010 //
20 // //
22 
23 #include "RhoFitterBase.h"
24 #include "RhoCandList.h"
25 
26 #include "TVector3.h"
27 #include "TMatrixDSym.h"
28 #include "TMatrixD.h"
29 #include "TLorentzVector.h"
30 #include "TDecompLU.h"
31 
32 class RhoCandidate;
33 
35  public:
37  virtual ~RhoKinVtxFitter();
38  void AddMassConstraint(double mass);
39  // void AddPointingConstraint(TVector3 pVtx);
40  double GetPull() { return fPull; }
41 
42  void SetNMaxIterations(int nit = 20)
43  {
44  fNMaxIterations = nit;
45  fIterateExact = false;
46  };
47  void SetNIterationsExact(int nit = 2)
48  {
49  fNMaxIterations = nit;
50  fIterateExact = true;
51  };
52  void SetMinDChisq(double m = 0.001) { fMinDChisq = fabs(m); };
53 
54  private:
55  Bool_t FitNode(RhoCandidate *b);
56 
57  void SetMatrices();
58  void ResetMatrices();
59  void ReadMatrix();
60 
61  void ReadKinMatrix();
62  void ReadMassKinMatrix();
63  // void ReadPointingKinMatrix() {ReadPointingKinMatrix(fHeadOfTree);};
64  // void ReadPointingKinMatrix(RhoCandidate* head);
65 
66  Bool_t Compute(RhoCandidate *c);
67  void SetOutput(RhoCandidate *head);
68 
69  void TransportToVertex(TMatrixD &, TMatrixD &, TMatrixD &, TMatrixD &, TMatrixD &);
70  void GetCovariance(TMatrixD &a_cov0, TMatrixD &cov_al_x, TMatrixD &V_vtx, TMatrixD &covS);
71 
72  TMatrixD al0; // original parameters
73  TMatrixD al1; // fitted parameters
74  TMatrixD V_al0; // Covariance matrix for original parameters
75  TMatrixD V_al1; // Covariance matrix for original parameters
76  TMatrixD covC; // Covariance matrix for composite
77 
78  TMatrixD mD; // Matrix of constraint derivitives
79  TMatrixD mE; // Matrix of vertex constraints
80  TMatrixD md; // Vector of evaluated constraints
81  TMatrixD mPull;
82 
83  Int_t fNvar; // Number of variables (=4 for 4 vector)
84  Int_t fNpar; // Number of parameters=Npart*fNvar
85  Int_t fNpart; // Number of particles
86  Int_t fNcon; // Number of constraints
87 
88  Int_t fNc; // countNumber of constraints added
89  Int_t fNiter; // Number of times Solve has been called
90  Int_t fNumKnown; // Number of unknowns
91  Int_t NumCon; // Number of constraints ...
92 
93  int niter;
94  double fChi2Diff;
95  double fPull;
96 
97  // VtxVertex _vertex;
98  TMatrixD vtx_ex;
99  TMatrixD vtx_st;
100 
101  double fMass;
102  // TVector3 fpVtx;
103 
104  int fMassConstraint;
105  // int fPointConstraint;
106 
107  // control abortion of fit
108  double fMinDChisq;
109  int fNMaxIterations;
110  bool fIterateExact;
111 
112  int fnDof;
113  double fchiSquare;
114 
115  ClassDef(RhoKinVtxFitter, 1) // A Kinematic Vertex Fitter
116 };
117 
118 #endif
__m128 m
Definition: P4_F32vec4.h:38
void SetNMaxIterations(int nit=20)
void SetNIterationsExact(int nit=2)
void AddMassConstraint(double mass)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:58
RhoKinVtxFitter(RhoCandidate *b)
virtual ~RhoKinVtxFitter()
void SetMinDChisq(double m=0.001)
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:64