MpdMotherFitterPart.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef MPDMOTHERFITTERPART_H
  2. #define MPDMOTHERFITTERPART_H
  3. /// \ingroup rec
  4. /// \class MpdMotherFitterPart
  5. /// \brief Kalman filter mother particle fitter for the MPD detector
  6. /// \brief (using MpdParticle)
  7. ///
  8. /// \author Alexander Zinchenko, LHEP JINR Dubna
  9. class MpdKalmanTrack;
  10. class MpdVertex;
  11. class TVector3;
  12. #include "MpdParticle.h"
  13. #include "FairTask.h"
  14. #include <TMatrixD.h>
  15. #include <vector>
  16. using std::vector;
  17. class TClonesArray;
  18. class MpdMotherFitterPart : public FairTask
  19. {
  20. public:
  21. static MpdMotherFitterPart* Instance(); ///< get singleton instance
  22. static MpdMotherFitterPart* Instance(const char *name, const char *title="FAIR Task"); ///< get singleton instance
  23. virtual void Exec(Option_t * option);
  24. void Reset();
  25. void Register();
  26. //virtual InitStatus ReInit();
  27. //void WeightAtDca(MpdParticle *part, MpdKalmanTrack &track, Double_t *vert); // obtain MpdParticle weight at DCA
  28. Double_t BuildMother(MpdParticle *mother, vector<MpdParticle*> &vDaught); // build mother from daughters
  29. Double_t BuildMother(MpdParticle *mother, vector<MpdKalmanTrack*> &vTracks, vector<MpdParticle*> &vDaught);
  30. Double_t FindVertex(vector<MpdParticle*> vDaught, TVector3 &vtx); // find vertex from daughter tracks
  31. void ComputeAandB(const TMatrixD &xk0, const MpdParticle &part,
  32. TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag = kTRUE); // compute matrices of derivatives
  33. Double_t FieldConst() const { return fieldConst; }
  34. TMatrixD ComputeQmatr(vector<MpdParticle*> vDaught);
  35. void ParamsAtDca(MpdParticle* part);
  36. TMatrixD& GetCovariance() { return fCovar; } //access to covariance matrix
  37. Double_t Chi2Vertex(MpdParticle *part, const MpdVertex *vtx); ///< compute Chi2 w.r.t. vertex
  38. protected:
  39. virtual InitStatus Init();
  40. virtual InitStatus ReInit();
  41. virtual void Finish();
  42. virtual ~MpdMotherFitterPart(); ///< Destructor
  43. private:
  44. MpdMotherFitterPart(); ///< Default ctor
  45. MpdMotherFitterPart(const char *name, const char *title="FAIR Task"); ///< Ctor
  46. static void DestroyInstance () { if (fgMF) delete fgMF; } // automatic deleting
  47. void EvalVertex(vector<MpdParticle*> vDaught); // evaluate vertex from daughter tracks
  48. void Smooth(vector<MpdParticle*> vDaught); // smooth (update track momenta and track lengths)
  49. void ComputeAB0(const TMatrixD &xk0, const MpdParticle &part, TMatrixD &a,
  50. TMatrixD &b, TMatrixD &ck0, Bool_t flag); // compute matrices of derivatives for neutrals
  51. void Proxim(const MpdKalmanTrack &track0, MpdKalmanTrack &track); // adjust track params
  52. private:
  53. static MpdMotherFitterPart* fgMF;
  54. Double_t fieldConst; ///< mag. field constant
  55. Double_t fVtx[3]; ///< decay vertex position
  56. TMatrixD fCovar; ///< covariance matrix
  57. ClassDef(MpdMotherFitterPart,1);
  58. };
  59. #endif