BmnRoot
Loading...
Searching...
No Matches
BmnMotherFitterPart.h
Go to the documentation of this file.
1#ifndef BMNMOTHERFITTERPART_H
2#define BMNMOTHERFITTERPART_H
3
10
11// class MpdKalmanTrack;
12class CbmStsTrack;
13class CbmVertex;
14// class MpdKalmanFilter;
15class CbmKF;
16class TVector3;
17#include "BmnParticle.h"
18#include "FairTask.h"
19
20#include <TH1D.h>
21#include <TMatrixD.h>
22#include <vector>
23using std::vector;
24
25class TClonesArray;
26
27class BmnMotherFitterPart : public FairTask
28{
29
30 public:
32 static BmnMotherFitterPart* Instance(const char* name,
33 const char* title = "FAIR Task");
34
35 virtual void Exec(Option_t* option);
36
37 void Reset();
38 void Register();
39
40 // virtual InitStatus ReInit();
41 // void WeightAtDca(MpdParticle *part, MpdKalmanTrack &track, Double_t *vert); // obtain MpdParticle weight at DCA
42 Double_t BuildMother(
43 BmnParticle* mother,
44 vector<BmnParticle*>& vDaught); // build mother from daughters
45 // Double_t BuildMother(BmnParticle *mother, vector<CbmStsTrack *> &vTracks,
46 // vector<BmnParticle *> &vDaught);
47 Double_t FindVertex(vector<BmnParticle*> vDaught, TVector3& vtx); // find vertex from daughter tracks
48 Bool_t ComputeAandB(const TMatrixD& xk0,
49 const BmnParticle& part,
50 TMatrixD& a,
51 TMatrixD& b,
52 TMatrixD& ck0,
53 Bool_t flag = kTRUE); // compute matrices of derivatives
54 Double_t FieldConst() const { return fieldConst; }
55 TMatrixD ComputeQmatr(vector<BmnParticle*> vDaught);
56 TMatrixD& GetCovariance() { return fCovar; } // access to covariance matrix
57 Double_t Chi2Vertex(BmnParticle* part, const CbmVertex* vtx);
58
59 protected:
60 virtual InitStatus Init();
61 virtual InitStatus ReInit();
62 virtual void Finish();
63 virtual ~BmnMotherFitterPart();
64
65 private:
67 BmnMotherFitterPart(const char* name, const char* title = "FAIR Task");
68 static void DestroyInstance()
69 {
70 if (fgMF)
71 delete fgMF;
72 } // automatic deleting
73 Bool_t EvalVertex(vector<BmnParticle*> vDaught); // evaluate vertex from daughter tracks
74 Bool_t Smooth(vector<BmnParticle*> vDaught); // smooth (update track momenta and track lengths)
75 Bool_t ComputeAB0(const TMatrixD& xk0,
76 const BmnParticle& part,
77 TMatrixD& a,
78 TMatrixD& b,
79 TMatrixD& ck0,
80 Bool_t flag); // compute matrices of derivatives for neutrals
81 TVector3 Parabola(TVector3& pos0, TVector3& pos1, TVector3& pos2);
82
83 private:
84 static BmnMotherFitterPart* fgMF;
85 Double_t fieldConst;
86 Double_t fVtx[3];
87 TMatrixD fCovar;
88 TH1D* fTestHist;
89
90 // MpdKalmanFilter *fKF;
91 CbmKF* fKF;
92
93 ClassDef(BmnMotherFitterPart, 0);
94};
95#endif
Kalman filter mother particle fitter for the BM@N detector.
virtual ~BmnMotherFitterPart()
Destructor.
Double_t Chi2Vertex(BmnParticle *part, const CbmVertex *vtx)
compute Chi2 w.r.t. vertex
virtual void Exec(Option_t *option)
TMatrixD ComputeQmatr(vector< BmnParticle * > vDaught)
virtual InitStatus ReInit()
Bool_t ComputeAandB(const TMatrixD &xk0, const BmnParticle &part, TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag=kTRUE)
static BmnMotherFitterPart * Instance()
get singleton instance
Double_t BuildMother(BmnParticle *mother, vector< BmnParticle * > &vDaught)
Double_t FieldConst() const
virtual InitStatus Init()
Double_t FindVertex(vector< BmnParticle * > vDaught, TVector3 &vtx)
Definition CbmKF.h:28