]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDtrack.h
Coding rule violations fixed.
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.h
index 5addad74f68f4627dec841f4aa18de7f6b487bad..16ad158f54896de3960418d002d5d3fdfab0f3e8 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef ALIESDTRACK_H
 #define ALIESDTRACK_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *      external param2:   local sine of the track momentum azimuthal angle  *
  *      external param3:   tangent of the track momentum dip angle           *
  *      external param4:   1/pt (1/(GeV/c))                                  *
+ *                                                                           *
+ * The Get*Label() getters return the label of the associated MC particle.   *
+ * The absolute value of this label is the index of the particle within the  *
+ * MC stack. If the label is negative, this track was assigned a certain     *
+ * number of clusters that did not in fact belong to this track.             *
  *****************************************************************************/
 
 #include <TBits.h>
 #include "AliExternalTrackParam.h"
+#include "AliVTrack.h"
 #include "AliPID.h"
 #include "AliESDfriendTrack.h"
 
@@ -32,17 +37,35 @@ class TParticle;
 class AliESDVertex;
 class AliKalmanTrack;
 class AliTrackPointArray;
+class TPolyMarker3D;
 
 class AliESDtrack : public AliExternalTrackParam {
 public:
+  enum {
+    kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
+    kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
+    kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
+    kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
+    kHMPIDout=0x10000,kHMPIDpid=0x20000,
+    kEMCALmatch=0x40000,
+    kTRDbackup=0x80000,
+    kTRDStop=0x20000000,
+    kESDpid=0x40000000,
+    kTIME=0x80000000
+  }; 
+  enum {
+    kTRDnPlanes = 6,
+    kEMCALNoMatch = -4096
+  };
   AliESDtrack();
   AliESDtrack(const AliESDtrack& track);
+  AliESDtrack(const AliVTrack* track);
   AliESDtrack(TParticle * part);
   virtual ~AliESDtrack();
+  virtual void Copy(TObject &obj) const;
   const AliESDfriendTrack *GetFriendTrack() const {return fFriendTrack;}
   void SetFriendTrack(const AliESDfriendTrack *t) {
     delete fFriendTrack; fFriendTrack=new AliESDfriendTrack(*t);
-    // CKB
   }
   void ReleaseESDfriendTrack() { delete fFriendTrack;  fFriendTrack=0; }
   void AddCalibObject(TObject * object);     // add calib object to the list
@@ -57,7 +80,8 @@ public:
   void SetIntegratedTimes(const Double_t *times);
   void SetESDpid(const Double_t *p);
   void GetESDpid(Double_t *p) const;
-  
+  const Double_t *PID() const { return fR; }
+
   Bool_t IsOn(Int_t mask) const {return (fFlags&mask)>0;}
   ULong_t GetStatus() const {return fFlags;}
   Int_t GetLabel() const {return fLabel;}
@@ -87,7 +111,7 @@ public:
   Bool_t GetConstrainedExternalCovariance(Double_t cov[15]) const;
   Double_t GetConstrainedChi2() const {return fCchi2;}
   //
-    
+  
 
 
   Bool_t GetInnerPxPyPz(Double_t *p) const {
@@ -96,6 +120,7 @@ public:
   }
   const AliExternalTrackParam * GetInnerParam() const { return fIp;}
   const AliExternalTrackParam * GetTPCInnerParam() const {return fTPCInner;}
+  Bool_t FillTPCOnlyTrack(AliESDtrack &track);
   Bool_t GetInnerXYZ(Double_t *r) const {
     if (!fIp) return kFALSE;
     return fIp->GetXYZ(r);
@@ -104,6 +129,8 @@ public:
         (Double_t &alpha, Double_t &x, Double_t p[5]) const;
   Bool_t GetInnerExternalCovariance(Double_t cov[15]) const;
  
+  void SetOuterParam(const AliExternalTrackParam *p, ULong_t flags);
+
   const AliExternalTrackParam * GetOuterParam() const { return fOp;}
   Bool_t GetOuterPxPyPz(Double_t *p) const {
     if (!fOp) return kFALSE;
@@ -138,6 +165,7 @@ public:
   AliKalmanTrack *GetITStrack(){
      return fFriendTrack->GetITStrack();
   }
+  Bool_t  HasPointOnITSLayer(Int_t i) const {return TESTBIT(fITSClusterMap,i);}
 
   void    SetTPCpid(const Double_t *p);
   void    GetTPCpid(Double_t *p) const;
@@ -170,29 +198,34 @@ public:
   const TBits& GetTPCSharedMap() const {return fTPCSharedMap;}
   void    SetTPCClusterMap(const TBits amap) {fTPCClusterMap = amap;}
   void    SetTPCSharedMap(const TBits amap) {fTPCSharedMap = amap;}
+
   void    SetTRDpid(const Double_t *p);
   
 // A.Bercuci
   void    SetTRDpidQuality(UChar_t q){fTRDpidQuality = q;}
   UChar_t GetTRDpidQuality() const {return fTRDpidQuality;}
 // end A.Bercuci
+
+  void     SetNumberOfTRDslices(Int_t n);
+  Int_t    GetNumberOfTRDslices() const {return fTRDnSlices/kTRDnPlanes;}
+  void     SetTRDslice(Double_t q, Int_t plane, Int_t slice);
+  Double_t GetTRDslice(Int_t plane, Int_t slice=-1) const;
        
-       void    SetTRDQuality(Float_t quality){fTRDQuality=quality;}
+  void    SetTRDQuality(Float_t quality){fTRDQuality=quality;}
   Double_t GetTRDQuality()const {return fTRDQuality;}
   void    SetTRDBudget(Float_t budget){fTRDBudget=budget;}
   Double_t GetTRDBudget()const {return fTRDBudget;}
-  void    SetTRDsignals(Float_t dedx, Int_t i, Int_t j) {fTRDsignals[i][j]=dedx;}
+
   void    SetTRDTimBin(Int_t timbin, Int_t i) {fTRDTimBin[i]=timbin;}
   void    GetTRDpid(Double_t *p) const;
   Double_t GetTRDsignal() const {return fTRDsignal;}
-  Double_t GetTRDsignals(Int_t iPlane, Int_t iSlice=-1) const { if (iSlice == -1) 
-    return (fTRDsignals[iPlane][0] + fTRDsignals[iPlane][1] + fTRDsignals[iPlane][2])/3.0;
-    return fTRDsignals[iPlane][iSlice];
-  }
+
   Char_t   GetTRDTimBin(Int_t i) const {return fTRDTimBin[i];}
   Double_t GetTRDchi2() const {return fTRDchi2;}
   UChar_t   GetTRDclusters(Int_t *idx) const;
- UChar_t   GetTRDncls() const {return fTRDncls;}
+  UChar_t   GetTRDncls() const {return fTRDncls;}
+  UChar_t   GetTRDncls0() const {return fTRDncls0;}
+  UChar_t   GetTRDtracklets(Int_t *idx) const;
   void    SetTRDpid(Int_t iSpecies, Float_t p);
   Double_t GetTRDpid(Int_t iSpecies) const;
   Int_t   GetTRDLabel() const {return fTRDLabel;}
@@ -240,10 +273,10 @@ public:
      x=fHMPIDtrkX; y=fHMPIDtrkY; th=fHMPIDtrkTheta; ph=fHMPIDtrkPhi;
   }
   void    SetHMPIDmip(Float_t  x, Float_t  y, Int_t q, Int_t nph=0) {
-     fHMPIDmipX=x; fHMPIDmipY=y; fHMPIDqn=1000000*q+nph;
+     fHMPIDmipX=x; fHMPIDmipY=y; fHMPIDqn=1000000*nph+q;
   }
   void    GetHMPIDmip(Float_t &x,Float_t &y,Int_t &q,Int_t &nph) const {
-     x=fHMPIDmipX; y=fHMPIDmipY; q=fHMPIDqn/1000000; nph=fHMPIDqn%1000000;
+     x=fHMPIDmipX; y=fHMPIDmipY; q=fHMPIDqn%1000000; nph=fHMPIDqn/1000000;
   }
   Bool_t  IsHMPID() const {return fFlags&kHMPIDpid;}
 
@@ -258,30 +291,26 @@ public:
   const AliTrackPointArray *GetTrackPointArray() const {
     return fFriendTrack->GetTrackPointArray(); 
   }
-  Bool_t RelateToVertex(const AliESDVertex *vtx, Double_t b, Double_t maxd);
+  Bool_t RelateToVertexTPC(const AliESDVertex *vtx, Double_t b, Double_t maxd,
+                           AliExternalTrackParam *cParam=0);
+  void GetImpactParametersTPC(Float_t &xy,Float_t &z) const {xy=fdTPC; z=fzTPC;}
+  void GetImpactParametersTPC(Float_t p[2], Float_t cov[3]) const {
+    p[0]=fdTPC; p[1]=fzTPC; cov[0]=fCddTPC; cov[1]=fCdzTPC; cov[2]=fCzzTPC;
+  }
+  Double_t GetConstrainedChi2TPC() const {return fCchi2TPC;}
+
+  Bool_t RelateToVertex(const AliESDVertex *vtx, Double_t b, Double_t maxd,
+                        AliExternalTrackParam *cParam=0);
   void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;}
   void GetImpactParameters(Float_t p[2], Float_t cov[3]) const {
     p[0]=fD; p[1]=fZ; cov[0]=fCdd; cov[1]=fCdz; cov[2]=fCzz;
   }
   virtual void Print(Option_t * opt) const ; 
+  //
+  // visualization (M. Ivanov)
+  //
+  void FillPolymarker(TPolyMarker3D *pol, Float_t magf, Float_t minR, Float_t maxR, Float_t stepR);
 
-  enum {
-    kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
-    kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
-    kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
-    kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
-    kHMPIDpid=0x20000,
-    kEMCALmatch=0x40000,
-    kTRDbackup=0x80000,
-    kTRDStop=0x20000000,
-    kESDpid=0x40000000,
-    kTIME=0x80000000
-  }; 
-  enum {
-    kNPlane = 6,
-    kNSlice = 3,
-    kEMCALNoMatch = -4096
-  };
 protected:
   
   AliExternalTrackParam *fCp; // Track parameters constrained to the primary vertex
@@ -305,7 +334,7 @@ protected:
   Int_t     fTOFLabel[3];    // TOF label 
   Int_t     fTOFCalChannel;  // Channel Index of the TOF Signal 
   Int_t     fTOFindex;       // index of the assigned TOF cluster
-  Int_t     fHMPIDqn;         // 1000000*QDC + number of photon clusters
+  Int_t     fHMPIDqn;         // 1000000*number of photon clusters + QDC
   Int_t     fHMPIDcluIdx;     // 1000000*chamber id + cluster idx of the assigned MIP cluster
   Int_t     fEMCALindex;     // index of associated EMCAL cluster (AliESDCaloCluster)
 
@@ -313,12 +342,12 @@ protected:
   Int_t     fKinkIndexes[3]; // array of indexes of posible kink candidates 
   Int_t     fV0Indexes[3];   // array of indexes of posible kink candidates 
 
-  Double32_t   fR[AliPID::kSPECIES]; //[0.,1.,8] combined "detector response probability"
-  Double32_t   fITSr[AliPID::kSPECIES]; //[0.,1.,8] "detector response probabilities" (for the PID)
-  Double32_t   fTPCr[AliPID::kSPECIES]; //[0.,1.,8] "detector response probabilities" (for the PID)
-  Double32_t   fTRDr[AliPID::kSPECIES]; //[0.,1.,8] "detector response probabilities" (for the PID)  
-  Double32_t   fTOFr[AliPID::kSPECIES]; //[0.,1.,8] "detector response probabilities" (for the PID)
-  Double32_t   fHMPIDr[AliPID::kSPECIES];//[0.,1.,8] "detector response probabilities" (for the PID)
+  Double32_t   fR[AliPID::kSPECIES]; //[0.,0.,8] combined "detector response probability"
+  Double32_t   fITSr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   fTPCr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   fTRDr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)  
+  Double32_t   fTOFr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   fHMPIDr[AliPID::kSPECIES];//[0.,0.,8] "detector response probabilities" (for the PID)
 
   Double32_t fHMPIDtrkTheta;//[-2*pi,2*pi,16] theta of the track extrapolated to the HMPID, LORS
   // how much of this is needed?
@@ -327,25 +356,30 @@ protected:
 
   Double32_t   fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking
   Double32_t   fTrackLength;   // Track length
+
+  Double32_t   fdTPC;          // TPC-only impact parameter in XY plane
+  Double32_t   fzTPC;          // TPC-only impact parameter in Z
+  Double32_t   fCddTPC,fCdzTPC,fCzzTPC; // Covariance matrix of the TPC-only impact parameters 
+  Double32_t   fCchi2TPC;      // [0.,0.,8] TPC-only chi2 at the primary vertex
+
   Double32_t   fD;             // Impact parameter in XY plane
   Double32_t   fZ;             // Impact parameter in Z
   Double32_t   fCdd,fCdz,fCzz; // Covariance matrix of the impact parameters 
+  Double32_t   fCchi2;          // [0.,0.,8] chi2 at the primary vertex
 
-  Double32_t   fCchi2; // chi2 at the primary vertex
-  Double32_t   fITSchi2;        // chi2 in the ITS
-  Double32_t   fTPCchi2;        // chi2 in the TPC
-  Double32_t   fTRDchi2;        // chi2 in the TRD
-  Double32_t   fTOFchi2;        // chi2 in the TOF
-  Double32_t fHMPIDchi2;       // chi2 in the HMPID
+  Double32_t   fITSchi2;        // [0.,0.,8] chi2 in the ITS
+  Double32_t   fTPCchi2;        // [0.,0.,8] chi2 in the TPC
+  Double32_t   fTRDchi2;        // [0.,0.,8] chi2 in the TRD
+  Double32_t   fTOFchi2;        // [0.,0.,8] chi2 in the TOF
+  Double32_t fHMPIDchi2;        // [0.,0.,8] chi2 in the HMPID
 
 
-  Double32_t  fITSsignal;      // detector's PID signal
-  Double32_t  fTPCsignal;     // detector's PID signal
-  Double32_t  fTPCsignalS;    // RMS of dEdx measurement
-  Double32_t  fTPCPoints[4];  // TPC points -first, max. dens, last and max density
+  Double32_t  fITSsignal;     // [0.,0.,10] detector's PID signal
+  Double32_t  fTPCsignal;     // [0.,0.,10] detector's PID signal
+  Double32_t  fTPCsignalS;    // [0.,0.,10] RMS of dEdx measurement
+  Double32_t  fTPCPoints[4];  // [0.,0.,10] TPC points -first, max. dens, last and max density
 
   Double32_t fTRDsignal;      // detector's PID signal
-  Double32_t fTRDsignals[kNPlane][kNSlice];  // TRD signals from all six planes in 3 slices each
   Double32_t fTRDQuality;     // trd quality factor for TOF
   Double32_t fTRDBudget;      // trd material budget
 
@@ -361,8 +395,6 @@ protected:
   Double32_t fHMPIDmipY;       // y of the MIP in LORS
 
 
-
-
   UShort_t fTPCncls;       // number of clusters assigned in the TPC
   UShort_t fTPCnclsF;      // number of findable clusters in the TPC
   UShort_t fTPCsignalN;    // number of points used for dEdx
@@ -372,13 +404,17 @@ protected:
   UChar_t fTRDncls;        // number of clusters assigned in the TRD
   UChar_t fTRDncls0;       // number of clusters assigned in the TRD before first material cross
   UChar_t fTRDpidQuality;   // TRD PID quality according to number of planes. 6 is the best
-  Char_t  fTRDTimBin[kNPlane];   // Time bin of Max cluster from all six planes
+
+  Int_t fTRDnSlices;     // number of slices used for PID in the TRD
+  Double32_t *fTRDslices;  //[fTRDnSlices] 
+
+  Char_t  fTRDTimBin[kTRDnPlanes];   // Time bin of Max cluster from all six planes
 
  private:
 
-  AliESDtrack & operator=(const AliESDtrack & ) {return *this;}
+  AliESDtrack & operator=(const AliESDtrack & );
 
-  ClassDef(AliESDtrack,41)  //ESDtrack 
+  ClassDef(AliESDtrack,46)  //ESDtrack 
 };
 
 #endif