]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCTrack.h
Bugfix, comparison of string -sorted was not correct.
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCTrack.h
index 1fa76f33c30a72891af4bcc1e15b933df264da7a..5c1f8f37d8d9f158977c415f91ece28458c166a8 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef ALIHLTTPCTRACK_H
 #define ALIHLTTPCTRACK_H
 
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               *
 
 /** @file   AliHLTTPCTrack.h
     @author Anders Vestbo, Uli Frankenfeld, maintained by Matthias Richter
@@ -26,6 +27,8 @@ class AliHLTTPCSpacePointData;
  * It was originally separated from the offline TPC track class, but in
  * order to adjust the output format to the offline ESD, AliHLTTPCTrack
  * now inherits from AliHLTtrack.
+ *
+ * @ingroup alihlt_tpc
  */
 class AliHLTTPCTrack : public AliTPCtrack {
 
@@ -39,6 +42,7 @@ class AliHLTTPCTrack : public AliTPCtrack {
    * @param track   pointer to source track
    */
   virtual void Copy(AliHLTTPCTrack* track);
+  using AliTPCtrack::Copy;  //TODO: Check if "virtual void Copy(TObject*)" does what it is supposed to do.
 
   /**
    * Compare two tracks by the number of hits
@@ -47,6 +51,7 @@ class AliHLTTPCTrack : public AliTPCtrack {
    *        -1 if this < track
    */
   virtual Int_t Compare(const AliHLTTPCTrack *track) const;
+  using AliTPCtrack::Compare;  //TODO: Check if "virtual Int_t Compare(TObject*)" does what it is supposed to do.
 
   /**
    * Fit the assigned spacepoints to a helix.
@@ -62,10 +67,11 @@ class AliHLTTPCTrack : public AliTPCtrack {
   Bool_t GetCrossingPoint(Int_t padrow,Float_t *xyz);
   Double_t GetDistance(Double_t /*x0*/,Double_t /*x1*/){return 0;}
   void UpdateToFirstPoint();
-  void GetClosestPoint(AliHLTTPCVertex *vertex,Double_t &closest_x,Double_t &closest_y,Double_t &closest_z);
+  void GetClosestPoint(AliHLTTPCVertex *vertex,Double_t &closestX,Double_t &closestY,Double_t &closestZ);
   void Rotate(Int_t slice,Bool_t tolocal=kFALSE);
   Bool_t IsLocal() const {return fIsLocal;}
-  void Print() const;
+  virtual void Print(Option_t* option = "") const;
+  using AliTPCtrack::Print;
 
   // getter
   Double_t GetFirstPointX() const {return fFirstPoint[0];}
@@ -91,7 +97,9 @@ class AliHLTTPCTrack : public AliTPCtrack {
   Double_t GetPterr() const {return fPterr;}
   Double_t GetPsierr() const {return fPsierr;}
   Double_t GetTglerr() const {return fTanlerr;}
-  
+  Double_t GetZ0err() const {return fZ0err;}
+  Double_t GetY0err() const {return fY0err;}
+
   Double_t GetKappa() const {return fKappa;}
   Double_t GetRadius() const {return fRadius;}
   Double_t GetCenterX() const {return fCenterX;}
@@ -112,7 +120,9 @@ class AliHLTTPCTrack : public AliTPCtrack {
   Int_t GetCharge() const {return fQ;}
   Int_t GetMCid() const {return fMCid;}
   Double_t GetLength() const {return fLength;}
-
+  Double_t GetLengthXY() const ;
+  Double_t GetLengthTot() const;
+  
   Int_t GetFirstRow() const {return fRowRange[0];}
   Int_t GetLastRow()  const {return fRowRange[1];}
   Int_t GetSector()   const {return fSector;}
@@ -124,7 +134,7 @@ class AliHLTTPCTrack : public AliTPCtrack {
   void SetMCid(Int_t f) {fMCid = f;}
   void SetFirstPoint(Double_t f,Double_t g,Double_t h) {fFirstPoint[0]=f; fFirstPoint[1]=g; fFirstPoint[2]=h;}
   void SetLastPoint(Double_t f,Double_t g,Double_t h) {fLastPoint[0]=f; fLastPoint[1]=g; fLastPoint[2]=h;}
-  void SetHits(Int_t nhits,UInt_t *hits) {memcpy(fHitNumbers,hits,nhits*sizeof(UInt_t));}
+  void SetHits(Int_t nhits,UInt_t *hits);
   void SetPhi0(Double_t f) {fPhi0 = f;}
   void SetPsi(Double_t f) {fPsi = f;}
   void SetR0(Double_t f) {fR0 = f;}
@@ -135,6 +145,7 @@ class AliHLTTPCTrack : public AliTPCtrack {
   void SetPterr(Double_t f) {fPterr = f;}
   void SetPsierr(Double_t f) {fPsierr = f;}
   void SetZ0err(Double_t f) {fZ0err = f;}
+  void SetY0err(Double_t f) {fY0err = f;}  
   void SetTglerr(Double_t f) {fTanlerr = f;}
   void SetKappa(Double_t f) {fKappa = f;}
   void SetNHits(Int_t f) {fNHits = f;}
@@ -155,6 +166,16 @@ class AliHLTTPCTrack : public AliTPCtrack {
    */
   int Convert2AliKalmanTrack();
 
+  /**
+   * Check the structure members to be within reasonable limits.
+   */
+  int CheckConsistency();
+
+  /**
+   * Check consistency of a double member
+   */
+  int CheckDoubleMember(double* pMember, double def, const char* name) const;
+
  private:
 
   Int_t fNHits; //Number of hits
@@ -181,6 +202,7 @@ class AliHLTTPCTrack : public AliTPCtrack {
   Double_t fPterr;   //error in pt
   Double_t fPsierr;  //error in psi
   Double_t fZ0err;   //error in first point
+  Double_t fY0err;   //error in first point
   Double_t fTanlerr; //error in tanl
 
   Double_t fPhi0; //azimuthal angle of the first point
@@ -196,7 +218,8 @@ class AliHLTTPCTrack : public AliTPCtrack {
   Bool_t fIsLocal; //Track given in local coordinates.
 
   Float_t fPID; //pid 
-  UInt_t fHitNumbers[159]; //Array of hit numbers for this track
+  static const int fgkHitArraySize=159; // size of hit array
+  UInt_t fHitNumbers[fgkHitArraySize]; //Array of hit numbers for this track
 
   Bool_t IsPoint(Bool_t ispoint) {fIsPoint = ispoint;return fIsPoint;}