TpcLheTrackCuts.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #ifndef LHE_TRACK_CUTS_H
  2. #define LHE_TRACK_CUTS_H
  3. // *************************************************************************
  4. // Author: Oleg Rogachevsky e-mail: rogach@sunhe.jinr.ru
  5. //
  6. // track cuts and simple fitting
  7. //
  8. // Created: 1-07-07
  9. // Modified:
  10. //
  11. // *************************************************************************
  12. #include "TArrayD.h"
  13. #include "TpcLheCMTrack.h"
  14. #include "TpcLheCMPoint.h"
  15. #include "lhe.h"
  16. class TpcLheTrackCuts {
  17. protected:
  18. // Cuts
  19. Int_t fTrackMinPoints; // minimum number of points on one track
  20. struct Cuts{
  21. Double_t fDelX; // delX from predictor
  22. Double_t fDelY; // delY from predictor
  23. Double_t fBendChi2; // upper cut fo parabolic fitting
  24. Double_t fDeepChi2; // cut for deep angle scattering
  25. Double_t fMaxHitDist; // cut for max dist between 1st and 2nd hits
  26. Double_t fBetaMin; // min dev of bending angle from predictor
  27. };
  28. Cuts fTrackCuts[2];
  29. static TpcLheTrackCuts* fInstance; // Cuts instance
  30. public:
  31. TpcLheTrackCuts(); // default constructor
  32. virtual ~TpcLheTrackCuts(); // destructor
  33. static TpcLheTrackCuts* Instance();
  34. // Setters
  35. void Reset();
  36. void SetHighMomTrackCuts();
  37. void SetLowMomTrackCuts();
  38. // Getters
  39. Double_t GetChi2Bend(Int_t pl);
  40. Double_t GetChi2Deep(Int_t pl);
  41. Double_t GetDelX(Int_t pl);
  42. //Double_t GetDelY(Int_t pl);
  43. // ======================
  44. Bool_t IsGoodGeantTrack(TpcLheTrack *track);
  45. Bool_t IsGoodFoundTrack(TpcLheCMTrack* track);
  46. void CMLineFit(TpcLheCMTrack *track, Double_t *a);
  47. void DeepAngleFit( const TpcLheCMTrack *track, Double_t *a);
  48. void LineFit(TArrayD *x, TArrayD *delx,
  49. TArrayD *y, TArrayD *dely,
  50. Double_t *a, Int_t np);
  51. Double_t const DistFromLine(Double_t Xh, Double_t Yh, Double_t *coeff);
  52. Double_t GetThetPrediction(TpcLheCMTrack *track, Double_t z, Bool_t b);
  53. Double_t GetPhiPrediction(TpcLheCMTrack *track);
  54. Bool_t VerifyTrack(TpcLheCMTrack *track, TpcLheCMPoint *hit, Bool_t back);
  55. // void PredictAngles(TpcLheCMTrack *tr, Bool_t bw);
  56. //Double_t TrackHitAlpha(TpcLheCMTrack *t1, TpcLheCMPoint *hit, Bool_t bw);
  57. //Double_t TrackHitCircleDist(TpcLheCMTrack *t, TpcLheCMPoint *h, Bool_t b);
  58. void Circle3pnts(Double_t x[],Double_t y[], Double_t r[]);
  59. int Circle_Circle_Intersection(double x0, double y0, double r0,
  60. double x1, double y1, double r1,
  61. double *xi, double *yi,
  62. double *xi_prime, double *yi_prime);
  63. Double_t GetMaxDist(Int_t pl);
  64. ClassDef(TpcLheTrackCuts, 1) //
  65. };
  66. //________________________________________________________________
  67. inline Double_t TpcLheTrackCuts::GetMaxDist(Int_t pl) {
  68. //---
  69. return fTrackCuts[pl].fMaxHitDist;
  70. }
  71. #endif