]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrackK.h
Removed data/methods related to mapping segmentations:
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackK.h
index 8eea8e2252b1a83dbc46075054add0410950fba3..00a9f74ec786779ea7c940551a52ca5114c41204 100644 (file)
@@ -6,30 +6,37 @@
 /*$Id$*/
 // Revision of includes 07/05/2004
 
-#include <TObject.h>
+/// \ingroup rec
+/// \class AliMUONTrackK
+/// \brief Kalman track in MUON arm of ALICE
+///
+/// \author: Alexander Zinchenko, JINR Dubna
 
-class TMatrixD;
-class AliMUONEventReconstructor;
+class TArrayD;
 class TClonesArray;
 class TObjArray;
-class AliMUONSegment;
-class AliMUON;
+#include <TMatrixDfwd.h>
+#include <TObject.h>
+
+class AliMUONEventRecoCombi;
 class AliMUONHitForRec;
+class AliMUONSegment;
+class AliMUONTrackReconstructor;
+#include "AliMUONTrack.h" 
 
-class AliMUONTrackK : public TObject {
+class AliMUONTrackK : public AliMUONTrack {
 
  public:
 
   AliMUONTrackK(); // Default constructor
   virtual ~AliMUONTrackK(); // Destructor
 
-  //AliMUONTrackK(const AliMUONEventReconstructor *EventReconstructor, const AliMUONHitForRec *hitForRec); // Constructor
-  AliMUONTrackK(AliMUONEventReconstructor *EventReconstructor, TClonesArray *hitForRec); // Constructor
+  AliMUONTrackK(AliMUONTrackReconstructor *TrackReconstructor, TClonesArray *hitForRec); // Constructor
   AliMUONTrackK(AliMUONSegment *segment); // Constructor from a segment
 
   // Pointer to hits on track
-  TObjArray* GetHitOnTrack(void) const {return fTrackHitsPtr;} // ptr. to hits on track
-  Int_t GetNTrackHits(void) const {return fNTrackHits;} // hits on track
+  TObjArray* GetTrackHits(void) const {return fTrackHits;} // ptr. to hits on track
+  Int_t GetNTrackHits(void) const {return fNmbTrackHits;} // hits on track
   Double_t GetTrackQuality(void) const {return fChi2;} // track quality
   TMatrixD* GetTrackParameters(void) const {return fTrackPar;} // track parameters
   Double_t GetZ(void) const {return fPosition;} // Z-coordinate of track 
@@ -48,7 +55,17 @@ class AliMUONTrackK : public TObject {
   void Kill(void); // kill track candidate
   void Branson(void); // Branson correction
   void GoToZ(Double_t zEnd); // propagate track to given Z
-  void GoToVertex(void); // propagate track to the vertex
+  void GoToVertex(Int_t iflag); // propagate track to the vertex
+  Bool_t Smooth(void); // apply smoother
+  Double_t GetChi2PerPoint(Int_t iPoint) const; // return Chi2 at point
+  void Print(FILE *lun) const; // print track information
+  void Print(const char* /*opt*/) const {return;} // print track information
+  AliMUONHitForRec* GetHitLastOk(void); // get hit before the skipped one
+  Int_t GetStation0(void); // return seed station number
+  Int_t DebugLevel(void) const {return fgDebug;} // return debug level
+  void SetDebugLevel(Int_t iDebug) {fgDebug = iDebug;} // set debug level
+  void FillMUONTrack(void); // set track parameters as for AliMUONTrack
+  void SetTrackParam(AliMUONTrackParam *trackParam, TMatrixD *par, Double_t z); // fill AliMUONTrackParam object
 
   // What is necessary for sorting TClonesArray's
   Bool_t IsSortable() const { return kTRUE; }
@@ -58,51 +75,78 @@ class AliMUONTrackK : public TObject {
 
  protected:
 
-  AliMUONTrackK (const AliMUONTrackK& source); // copy constructor
   AliMUONTrackK& operator=(const AliMUONTrackK& source); // assignment operator
 
  private:
  
-  static Int_t fgNOfPoints; // number of points in event
-  static AliMUON *fgMUON; // pointer to MUON module  
-  static AliMUONEventReconstructor *fgEventReconstructor; // pointer to event reconstructor
-  static TClonesArray *fgHitForRec; // pointer to hits
-
-  AliMUONSegment *fStartSegment; // seed segment  
-  Double_t fPosition; // Z-coordinate of track
-  Double_t fPositionNew; //! Z-coordinate of track
-  Double_t fChi2; // Chi2 of track
-  TObjArray *fTrackHitsPtr; // pointer to hits on track
-  Int_t fNTrackHits; // number of points on track
-  Int_t fTrackDir; // track direction (+(-) towards high (low) z)
-  Bool_t fBPFlag; // backpropagation flag (TRUE if backpropagation)
-  Int_t fRecover; // recover flag (!=0 if recovery procedure was applied)
-  AliMUONHitForRec *fSkipHit; // hit to skip during recovery procedure
-
-  TMatrixD *fTrackPar; // track parameters
-  TMatrixD *fTrackParNew; //! track parameters
-  TMatrixD *fCovariance; // covariance matrix
-  TMatrixD *fWeight; //! weight matrix (inverse of covariance)
+  static Int_t fgDebug; ///< debug level
+  static Int_t fgNOfPoints; ///< number of points in event
+  //static AliMUON *fgMUON; ///< pointer to MUON module  
+  static AliMUONTrackReconstructor *fgTrackReconstructor; ///< pointer to event reconstructor
+  static TClonesArray *fgHitForRec; ///< pointer to hits
+  static AliMUONEventRecoCombi *fgCombi; ///< pointer to combined cluster/track finder
+
+  AliMUONSegment *fStartSegment; ///< seed segment  
+  Double_t fPosition; ///< Z-coordinate of track
+  Double_t fPositionNew; //!< Z-coordinate of track
+  Double_t fChi2; ///< Chi2 of track
+  TObjArray *fTrackHits; ///< pointer to hits on track
+  Int_t fNmbTrackHits; ///< number of points on track
+  Int_t fTrackDir; ///< track direction (+(-) towards high (low) z)
+  Bool_t fBPFlag; ///< backpropagation flag (TRUE if backpropagation)
+  Int_t fRecover; ///< recover flag (!=0 if recovery procedure was applied)
+  AliMUONHitForRec *fSkipHit; ///< hit to skip during recovery procedure
+
+  TMatrixD *fTrackPar; ///< track parameters
+  TMatrixD *fTrackParNew; //!< track parameters
+  TMatrixD *fCovariance; ///< covariance matrix
+  TMatrixD *fWeight; //!< weight matrix (inverse of covariance)
+
+  // For smoother
+  TObjArray *fParExtrap; //!< extrapolated track parameters
+  TObjArray *fParFilter; //!< filtered track parameters
+  TObjArray *fParSmooth; //!< smoothed track parameters
+
+  TObjArray *fCovExtrap; //!< extrapolated covariance matrices
+  TObjArray *fCovFilter; //!< filtered covariance matrices
+
+  TObjArray *fJacob; //!< Jacobian matrices
+  Int_t fNSteps;     //!< number of the track propagation points
+  TArrayD *fSteps;   //!< Z-coordinates of the track propagation points
+  TArrayD *fChi2Array; //!< measurements' contributions to the track Chi2
+  TArrayD *fChi2Smooth;//!< measurements' contributions to the smoothed track Chi2
 
   // Functions
 
+  AliMUONTrackK (const AliMUONTrackK& source); // copy constructor
   void EvalCovariance(Double_t dZ);
   void ParPropagation(Double_t zEnd);
-  void WeightPropagation(Double_t zEnd);
+  void WeightPropagation(Double_t zEnd, Bool_t smooth);
   void MSThin(Int_t sign);
   void MSLine(Double_t dZ, Double_t X0);
-  Bool_t FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int_t iFB, AliMUONHitForRec *&hitAdd);
+  Bool_t FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int_t iFB, AliMUONHitForRec *&hitAdd, Int_t iz);
   void TryPoint(TMatrixD &point, const TMatrixD &pointWeight, TMatrixD &trackParTmp, Double_t &dChi2);
   void SetGeantParam(Double_t *VGeant3, Int_t iFB);
   void GetFromGeantParam(Double_t *VGeant3, Int_t iFB);
-  void Recover(void);
+  Bool_t Recover(void);
+  void AddMatrices(AliMUONTrackK *trackK, Double_t dChi2, AliMUONHitForRec *hitAdd);
+  void CreateMatrix(TObjArray *objArray) const;
+  void RemoveMatrices(Double_t zEnd);
+  void RemoveMatrices(AliMUONTrackK* trackK);
+  void Outlier();
+  void SortHits(Int_t iflag, TObjArray *array);
+  void DropBranches(Int_t imax, TObjArray *hits);
+  void DropBranches(AliMUONSegment *segment);
+  Bool_t ExistDouble(AliMUONHitForRec *hit);
+  Bool_t ExistDouble(void);
 
   private:
    // Some constants
-   static const Int_t fgkSize; // number of track parameters
-   static const Int_t fgkNSigma; //4; // acceptance window width in sigmas
-   static const Int_t fgkTriesMax; // max number of attempts to find exact position during tracking
-   static const Double_t fgkEpsilon; // tracking precision (cm)
+   static const Int_t fgkSize; ///< number of track parameters
+   static const Int_t fgkNSigma; ///< 4; acceptance window width in sigmas
+   static const Double_t fgkChi2max; ///< 25; chi2 cut in smoother for outlier detection
+   static const Int_t fgkTriesMax; ///< max number of attempts to find exact position during tracking
+   static const Double_t fgkEpsilon; ///< tracking precision (cm)
 
   ClassDef(AliMUONTrackK,0) // Kalman track in MUON arm of ALICE
     };