]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDtrack.h
New class for PID constants and methods. Changes in all related code (T.Kuhr)
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.h
index a635a4d9c21d362a4bb4d4ce3fd6c109c9628ecb..fd4075e636fc04e4df113ae11b05b6e42642b905 100644 (file)
@@ -7,24 +7,39 @@
 
 //-------------------------------------------------------------------------
 //                          Class AliESDtrack
-//   This is the class to deal with during the physical analysis of data
+//   This is the class to deal with during the physics analysis of data
 //      
 //         Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //-------------------------------------------------------------------------
+/*****************************************************************************
+ *  Use GetExternalParameters() and GetExternalCovariance() to access the    *
+ *      track information regardless of its internal representation.         *
+ * This formation is now fixed in the following way:                         *
+ *      external param0:   local Y-coordinate of a track (cm)                *
+ *      external param1:   local Z-coordinate of a track (cm)                *
+ *      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))                                  *
+ *****************************************************************************/
 
 #include <TBits.h>
 #include <TObject.h>
-class TString ; 
+#include "AliPID.h"
 class AliKalmanTrack;
 
+const Int_t kNPlane = 6;
+
 class AliESDtrack : public TObject {
 public:
   AliESDtrack();
   AliESDtrack(const AliESDtrack& track);
-  virtual ~AliESDtrack();  
+  virtual ~AliESDtrack();
+  void SetID(Int_t id) { fID =id;}
+  Int_t GetID(){ return fID;}
   void SetStatus(ULong_t flags) {fFlags|=flags;}
   void ResetStatus(ULong_t flags) {fFlags&=~flags;}
-  Bool_t UpdateTrackParams(AliKalmanTrack *t, ULong_t flags);
+  Bool_t UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags);
+  void SetImpactParameters(Float_t xy,Float_t z) {fD=xy; fZ=z;}
   void SetIntegratedLength(Double_t l) {fTrackLength=l;}
   void SetIntegratedTimes(const Double_t *times);
   void SetESDpid(const Double_t *p);
@@ -35,34 +50,37 @@ public:
   Double_t GetAlpha() const {return fRalpha;}
   void GetExternalParameters(Double_t &x, Double_t p[5]) const;
   void GetExternalCovariance(Double_t cov[15]) const;
+
+  Bool_t GetExternalParametersAt(Double_t x, Double_t p[5]) const;
+  Bool_t GetPxPyPzAt(Double_t x, Double_t p[3]) const;
+  Bool_t GetXYZAt(Double_t x, Double_t r[3]) const;
+
+  void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;}
   Double_t GetIntegratedLength() const {return fTrackLength;}
   void GetIntegratedTimes(Double_t *times) const;
   Double_t GetMass() const;
   Double_t GetP() const;
-  void GetPxPyPz(Double_t *p) const;
-  void GetXYZ(Double_t *r) const;
+  Bool_t GetPxPyPz(Double_t *p) const;
+  Bool_t GetXYZ(Double_t *r) const;
+  void GetCovariance(Double_t cov[21]) const;
   Int_t GetSign() const {return (fRp[4]>0) ? 1 : -1;} 
 
-  void SetConstrainedTrackParams(AliKalmanTrack *t, Double_t chi2);
+  void SetConstrainedTrackParams(const AliKalmanTrack *t, Double_t chi2);
 
   Double_t GetConstrainedAlpha() const {return fCalpha;}
   Double_t GetConstrainedChi2() const {return fCchi2;}
   void GetConstrainedExternalParameters(Double_t &x, Double_t p[5]) const;
   void GetConstrainedExternalCovariance(Double_t cov[15]) const;
 
-  void GetConstrainedPxPyPz(Double_t *p) const;
-  void GetConstrainedXYZ(Double_t *r) const;
+  Bool_t GetConstrainedPxPyPz(Double_t *p) const;
+  Bool_t GetConstrainedXYZ(Double_t *r) const;
 
-  void GetInnerPxPyPz(Double_t *p) const;
-  void GetInnerXYZ(Double_t *r) const;
+  Bool_t GetInnerPxPyPz(Double_t *p) const;
+  Bool_t GetInnerXYZ(Double_t *r) const;
   void GetInnerExternalParameters(Double_t &x, Double_t p[5]) const;//skowron
   void GetInnerExternalCovariance(Double_t cov[15]) const;//skowron
   Double_t GetInnerAlpha() const {return fIalpha;}
   
-  
-  void GetOuterPxPyPz(Double_t *p, TString det) const;
-  void GetOuterXYZ(Double_t *r, TString det) const;
-
   void SetITSpid(const Double_t *p);
   void SetITSChi2MIP(const Float_t *chi2mip);
   void SetITStrack(AliKalmanTrack * track){fITStrack=track;}
@@ -76,29 +94,43 @@ public:
 
   void SetTPCpid(const Double_t *p);
   void GetTPCpid(Double_t *p) const;
+  void SetTPCPoints(Float_t points[4]){for (Int_t i=0;i<4;i++) fTPCPoints[i]=points[i];}
+  void SetKinkIndexes(Int_t points[3]) {for (Int_t i=0;i<3;i++) fKinkIndexes[i] = points[i];}
+  void SetV0Indexes(Int_t points[3]) {for (Int_t i=0;i<3;i++) fV0Indexes[i] = points[i];}
   Float_t GetTPCsignal() const {return fTPCsignal;}
   Float_t GetTPCchi2() const {return fTPCchi2;}
   Int_t GetTPCclusters(Int_t *idx) const;
   Int_t GetTPCLabel() const {return fTPCLabel;}
+  Int_t GetKinkIndex(Int_t i) const { return fKinkIndexes[i];}
+  Int_t GetV0Index(Int_t i) const { return fV0Indexes[i];}
   const TBits& GetTPCClusterMap() const {return fTPCClusterMap;}
   
   void SetTRDpid(const Double_t *p);
   void SetTRDtrack(AliKalmanTrack * track){fTRDtrack=track;}
+  void SetTRDsignals(Float_t dedx, Int_t i) {fTRDsignals[i]=dedx;}
+  void SetTRDTimBin(Int_t timbin, Int_t i) {fTRDTimBin[i]=timbin;}
   void GetTRDpid(Double_t *p) const;
   Float_t GetTRDsignal() const {return fTRDsignal;}
+  Float_t GetTRDsignals(Int_t i) const {return fTRDsignals[i];}
+  Int_t GetTRDTimBin(Int_t i) const {return fTRDTimBin[i];}
   Float_t GetTRDchi2() const {return fTRDchi2;}
   Int_t GetTRDclusters(UInt_t *idx) const;
+  Int_t GetTRDncls() const {return fTRDncls;}
   void    SetTRDpid(Int_t iSpecies, Float_t p);
   Float_t GetTRDpid(Int_t iSpecies) const;
   Int_t GetTRDLabel() const {return fTRDLabel;}
-  void GetTRDExternalParameters(Double_t &x, Double_t p[5], Double_t cov[15]) const;//MI
+  void GetTRDExternalParameters(Double_t &x, Double_t &alpha, Double_t p[5], Double_t cov[15]) const;//MI
   AliKalmanTrack * GetTRDtrack(){return fTRDtrack;}
 
   void SetTOFsignal(Double_t tof) {fTOFsignal=tof;}
   Float_t GetTOFsignal() const {return fTOFsignal;}
   Float_t GetTOFchi2() const {return fTOFchi2;}
   void    SetTOFpid(const Double_t *p);
+  void    SetTOFLabel(const Int_t *p);
   void    GetTOFpid(Double_t *p) const;
+  void    GetTOFLabel(Int_t *p) const;
+  void    GetTOFInfo(Float_t *info) const;
+  void    SetTOFInfo(Float_t *info);
   UInt_t  GetTOFcluster() const {return fTOFindex;}
   void  SetTOFcluster(UInt_t index) {fTOFindex=index;}
   
@@ -147,19 +179,15 @@ public:
     kESDpid=0x40000000,
     kTIME=0x80000000
   }; 
-  enum {
-    kSPECIES=5, // Number of particle species recognized by the PID
-    kSPECIESN=10, //  Number of charged+neutral particle species recognized by the PHOS/EMCAL PID
-    kElectron=0, kMuon=1, kPion=2, kKaon=3, kProton=4, kPhoton=5, 
-    kPi0=6, kNeutron=7, kKaon0=8, kEleCon=9 // PHOS/EMCAL definition
-  };
 protected:
   ULong_t   fFlags;        // Reconstruction status flags 
   Int_t     fLabel;        // Track label
-
-  Float_t   fTrackLength;         // Track length
-  Float_t   fTrackTime[kSPECIES]; // TOFs estimated by the tracking
-  Float_t   fR[kSPECIES];         // combined "detector response probability"
+  Int_t     fID;           // Unique ID of the track
+  Float_t   fTrackLength;  // Track length
+  Float_t   fD;            // Impact parameter in XY-plane
+  Float_t   fZ;            // Impact parameter in Z 
+  Float_t   fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking
+  Float_t   fR[AliPID::kSPECIES];         // combined "detector response probability"
 
   Int_t     fStopVertex;          // Index of stop vertex
 
@@ -181,73 +209,71 @@ protected:
   Double_t fIx;       // x-coordinate of the track reference plane
   Double_t fIp[5];    // external track parameters
   Double_t fIc[15];   // external cov. matrix of the track parameters
+
 //Track parameters at the inner wall of the TRD 
   Double_t fTalpha;   // Track rotation angle
   Double_t fTx;       // x-coordinate of the track reference plane
   Double_t fTp[5];    // external track parameters
   Double_t fTc[15];   // external cov. matrix of the track parameters
 
-//Track parameters at the radius of the PHOS
-  Double_t fOalpha;   // Track rotation angle
-  Double_t fOx;       // x-coordinate of the track reference plane
-  Double_t fOp[5];    // external track parameters
-  Double_t fOc[15];   // external cov. matrix of the track parameters
-
-//Track parameters at the radius of the EMCAL
-  Double_t fXalpha;   // Track rotation angle
-  Double_t fXx;       // x-coordinate of the track reference plane
-  Double_t fXp[5];    // external track parameters
-  Double_t fXc[15];   // external cov. matrix of the track parameters
-
   // ITS related track information
   Float_t fITSchi2;        // chi2 in the ITS
   Float_t fITSchi2MIP[12];     // chi2s in the ITS
   Int_t   fITSncls;        // number of clusters assigned in the ITS
   UInt_t  fITSindex[6];    //! indices of the assigned ITS clusters
   Float_t fITSsignal;      // detector's PID signal
-  Float_t fITSr[kSPECIES]; // "detector response probabilities" (for the PID)
+  Float_t fITSr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
   Int_t   fITSLabel;       // label according TPC
   Float_t fITSFakeRatio;   // ration of fake tracks
-  AliKalmanTrack * fITStrack; //OWNER: pointer to the ITS track -- currently for debug purpose
+  AliKalmanTrack * fITStrack; //OWNER: pointer to the ITS track -- currently for debug purpose
   
   // TPC related track information
   Float_t fTPCchi2;        // chi2 in the TPC
   Int_t   fTPCncls;        // number of clusters assigned in the TPC
-  UInt_t  fTPCindex[180];  //! indices of the assigned TPC clusters
+  Int_t  fTPCindex[180];  //! indices of the assigned TPC clusters
   TBits   fTPCClusterMap;  // Map of clusters, one bit per padrow; 1 if has a cluster on given padrow
   Float_t fTPCsignal;      // detector's PID signal
-  Float_t fTPCr[kSPECIES]; // "detector response probabilities" (for the PID)
+  Float_t fTPCr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
   Int_t   fTPCLabel;       // label according TPC
+  Float_t fTPCPoints[4];   // TPC points -first, max. dens, last and max density
+  Int_t   fKinkIndexes[3]; // array of indexes of posible kink candidates 
+  Int_t   fV0Indexes[3]; // array of indexes of posible kink candidates 
+
   // TRD related track information
   Float_t fTRDchi2;        // chi2 in the TRD
   Int_t   fTRDncls;        // number of clusters assigned in the TRD
   Int_t   fTRDncls0;       // number of clusters assigned in the TRD before first material cross
   UInt_t  fTRDindex[130];   //! indices of the assigned TRD clusters
   Float_t fTRDsignal;      // detector's PID signal
-  Float_t fTRDr[kSPECIES]; // "detector response probabilities" (for the PID)
+  Float_t fTRDsignals[kNPlane];  // TRD signals from all six planes
+  Int_t fTRDTimBin[kNPlane];     // Time bin of Max cluster from all six planes
+  Float_t fTRDr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
   Int_t   fTRDLabel;       // label according TRD
-  AliKalmanTrack * fTRDtrack; //OWNER: pointer to the TRD track -- currently for debug purpose
+  AliKalmanTrack * fTRDtrack; //! OWNER: pointer to the TRD track -- currently for debug purpose
+
   // TOF related track information
   Float_t fTOFchi2;        // chi2 in the TOF
   UInt_t  fTOFindex;       // index of the assigned TOF cluster
   Float_t fTOFsignal;      // detector's PID signal
-  Float_t fTOFr[kSPECIES]; // "detector response probabilities" (for the PID)
+  Float_t fTOFr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
+  Int_t   fTOFLabel[3];       // TOF label 
+  Float_t fTOFInfo[10];       //! TOF informations
 
   // PHOS related track information 
-  Float_t fPHOSpos[3]; //position localised by PHOS in global coordinate system
+  Float_t fPHOSpos[3]; // position localised by PHOS in global coordinate system
   Float_t fPHOSsignal; // energy measured by PHOS
-  Float_t fPHOSr[kSPECIESN]; // PID information from PHOS
+  Float_t fPHOSr[AliPID::kSPECIESN]; // PID information from PHOS
 
   // EMCAL related track information 
   Float_t fEMCALpos[3]; //position localised by EMCAL in global coordinate system
   Float_t fEMCALsignal; // energy measured by EMCAL
-  Float_t fEMCALr[kSPECIESN]; // PID information from EMCAL
+  Float_t fEMCALr[AliPID::kSPECIESN]; // PID information from EMCAL
 
   // HMPID related track information
   Float_t fRICHsignal;     // detector's PID signal (beta for RICH)
-  Float_t fRICHr[kSPECIES];// "detector response probabilities" (for the PID)
+  Float_t fRICHr[AliPID::kSPECIES];// "detector response probabilities" (for the PID)
        
-  ClassDef(AliESDtrack,6)  //ESDtrack 
+  ClassDef(AliESDtrack,11)  //ESDtrack 
 };
 
 #endif