]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/ESD/AliESDtrack.h
Updates in event mixing code for low-pt code
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDtrack.h
index 3446802f458ac2370f0a474c1fb0de9d4656279b..068d8475c80f92446d18d8eadb3ceadc45dda43a 100644 (file)
 #include <TBits.h>
 #include "AliExternalTrackParam.h"
 #include "AliVTrack.h"
-#include "AliESDTOFcluster.h"
+#include "AliESDTOFCluster.h"
 #include "AliPID.h"
 #include "AliESDfriendTrack.h"
 #include "AliTPCdEdxInfo.h"
 
 class TParticle;
 class AliESDVertex;
-class AliESDEvent;
 class AliKalmanTrack;
 class AliTrackPointArray;
 class TPolyMarker3D;
 class AliDetectorPID;
 class TTreeSRedirector;
+class AliESDEvent;
 
 class AliESDtrack : public AliExternalTrackParam {
 public:
@@ -63,7 +63,7 @@ public:
   void AddCalibObject(TObject * object);     // add calib object to the list
   TObject *  GetCalibObject(Int_t index);    // return calib objct at given position
   void MakeMiniESDtrack();
-  void SetID(Short_t id) { fID =id;}
+  void SetID(Short_t id);
   Int_t GetID() const { return fID;}
   void SetVertexID(Char_t id) { fVertexID=id;}
   Char_t GetVertexID() const { return fVertexID;}
@@ -86,17 +86,18 @@ public:
 
   Double_t GetIntegratedLength() const;
   Double_t GetIntegratedLengthOld() const {return fTrackLength;}
-  void GetIntegratedTimes(Double_t *times) const;
+  void GetIntegratedTimes(Double_t *times, Int_t nspec=AliPID::kSPECIES) const;
   Double_t GetIntegratedTimesOld(Int_t i) const {if(fTrackTime) return fTrackTime[i]; else return 0;};
   Int_t    GetPID(Bool_t tpcOnly=kFALSE)  const;
   Int_t    GetTOFBunchCrossing(Double_t b=0, Bool_t pidTPConly=kTRUE) const;
   Double_t GetMass(Bool_t tpcOnly=kFALSE) const {return AliPID::ParticleMass(GetPID(tpcOnly));}
-  Double_t GetMassForTracking() const {return fMassForTracking;}
-  void     SetMassForTracking(Double_t m) {fMassForTracking = m;}
+  Double_t GetMassForTracking() const;
+  void     SetPIDForTracking(Int_t pid) {fPIDForTracking = pid;}
+  Int_t    GetPIDForTracking() const    {return fPIDForTracking;}
   Double_t M() const;
   Double_t E() const;
   Double_t Y() const;
-
   Bool_t GetConstrainedPxPyPz(Double_t *p) const {
     if (!fCp) return kFALSE;
     return fCp->GetPxPyPz(p);
@@ -161,11 +162,10 @@ public:
   Bool_t GetOuterExternalParameters
         (Double_t &alpha, Double_t &x, Double_t p[5]) const;
   Bool_t GetOuterExternalCovariance(Double_t cov[15]) const;
-
+  
   Bool_t GetOuterHmpExternalParameters
         (Double_t &alpha, Double_t &x, Double_t p[5]) const;
-  Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const;
-
+  Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const; 
   
   Int_t GetNcls(Int_t idet) const;
   Int_t GetClusters(Int_t idet, Int_t *idx) const;
@@ -182,6 +182,9 @@ public:
   void     SetITSchi2Std(Double_t chi2, Int_t step)  { if (step>-1&&step<kNITSchi2Std) fITSchi2Std[step] = chi2;}
   Char_t   GetITSclusters(Int_t *idx) const;
   UChar_t GetITSClusterMap() const {return fITSClusterMap;}
+  void     SetITSClusterMap(UChar_t amap) {fITSClusterMap = amap;}
+
+  Char_t   GetITSNcls() const { return fITSncls;}
   UChar_t GetITSSharedMap() const {return fITSSharedMap;}
   void    SetITSSharedFlag(int lr) {fITSSharedMap |= 0x1<<lr;}
   Bool_t  GetITSFakeFlag()   const {return (fITSSharedMap&BIT(7))!=0;}
@@ -229,6 +232,7 @@ public:
       fTPCsignalTuned = signal;
   }
   void  SetTPCdEdxInfo(AliTPCdEdxInfo * dEdxInfo); 
+  Double_t  GetdEdxInfo(Int_t regionID, Int_t calibID, Int_t qID,Int_t valueID);
 
   AliTPCdEdxInfo * GetTPCdEdxInfo() const {return fTPCdEdxInfo;}
   Double_t GetTPCsignal() const {return fTPCsignal;}
@@ -308,26 +312,31 @@ public:
     return fFriendTrack!=NULL?fFriendTrack->GetTRDtrack():NULL;
   }
 
+  // this are methods for manipulating with TOF clusters/matches
   void    SetTOFclusterArray(Int_t ncluster,Int_t *TOFcluster);
   Int_t   *GetTOFclusterArray() const {return fTOFcluster;}
   Int_t   GetNTOFclusters() const {return fNtofClusters;}
+  void    SuppressTOFMatches();
+  void    ReplaceTOFTrackID(int oldID, int newID);
+  void    ReplaceTOFClusterID(int oldID, int newID);
+  void    ReplaceTOFMatchID(int oldID, int newID);
   void    AddTOFcluster(Int_t icl);
-  void    SortTOFcluster();
-  void    ReMapTOFcluster(Int_t ncl,Int_t *mapping);
+  void    SortTOFcluster(); // RS? Not to be used?
+  void    ReMapTOFcluster(Int_t ncl,Int_t *mapping);  // RS? Not to be used?
 
-  void    SetTOFsignal(Double_t tof) {fTOFsignal=tof;}
+  void    SetTOFsignal(Double_t tof);
   Double_t GetTOFsignal() const;
-  void    SetTOFsignalToT(Double_t ToT) {fTOFsignalToT=ToT;}
+  void    SetTOFsignalToT(Double_t ToT);
   Double_t GetTOFsignalToT() const;
-  void    SetTOFsignalRaw(Double_t tof) {fTOFsignalRaw=tof;}
+  void    SetTOFsignalRaw(Double_t tof);
   Double_t GetTOFsignalRaw() const;
-  void    SetTOFsignalDz(Double_t dz) {fTOFsignalDz=dz;}
+  void    SetTOFsignalDz(Double_t dz);
   Double_t GetTOFsignalDz() const;
-  void    SetTOFsignalDx(Double_t dx) {fTOFsignalDx=dx;}
+  void    SetTOFsignalDx(Double_t dx);
   Double_t GetTOFsignalDx() const;
-  void     SetTOFDeltaBC(Short_t deltaBC) {fTOFdeltaBC=deltaBC;};
+  void     SetTOFDeltaBC(Short_t deltaBC);
   Short_t  GetTOFDeltaBC() const;
-  void     SetTOFL0L1(Short_t l0l1) {fTOFl0l1=l0l1;};
+  void     SetTOFL0L1(Short_t l0l1);
   Short_t  GetTOFL0L1() const;
   Double_t GetTOFchi2() const {return fTOFchi2;};
   void    SetTOFpid(const Double_t *p);
@@ -339,7 +348,7 @@ public:
   Int_t   GetTOFCalChannel() const;
   Int_t   GetTOFcluster() const;
   void    SetTOFcluster(Int_t index) {fTOFindex=index;}
-  void    SetTOFCalChannel(Int_t index) {fTOFCalChannel=index;}
+  void    SetTOFCalChannel(Int_t index);
   Int_t   GetTOFclusterN() const;
   Bool_t  IsTOFHitAlreadyMatched() const;
   void    SetTOFsignalTunedOnData(Double_t signal){fTOFsignalTuned=signal;}
@@ -412,12 +421,14 @@ public:
   Bool_t 
   RelateToVertexBxByBz(const AliESDVertex *vtx, Double_t b[3], Double_t maxd,
                         AliExternalTrackParam *cParam=0);
-  void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;}
+  virtual 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 ;
   const AliESDEvent* GetESDEvent() const {return fESDEvent;}
+  const AliTOFHeader* GetTOFHeader() const;
+  const AliVEvent* GetEvent() const {return (AliVEvent*)fESDEvent;}
   void         SetESDEvent(const AliESDEvent* evt) {fESDEvent = evt;}
 
   // Trasient PID object, is owned by the track
@@ -437,8 +448,39 @@ public:
   // - set lengt of bit fields fTPCClusterMap and fTPCSharedMap to 0
   static void OnlineMode(bool mode) {fgkOnlineMode=mode;}
   static bool OnlineMode() {return fgkOnlineMode;}
-  Double_t GetLengthInActiveZone(const AliExternalTrackParam  *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 ) const;
+  static Double_t GetLengthInActiveZone(const AliExternalTrackParam  *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 );
   Double_t GetLengthInActiveZone( Int_t mode, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 ) const;
+
+  //---------------------------------------------------------------------------
+  //--the calibration interface--
+  //--to be used in online calibration/QA
+  //--should also be implemented in ESD so it works offline as well
+  //-----------
+  virtual Int_t GetTrackParam         ( AliExternalTrackParam &p ) const {p=*this; return 0;}
+  virtual Int_t GetTrackParamRefitted ( AliExternalTrackParam & ) const {return 0;}
+  virtual Int_t GetTrackParamITSOut   ( AliExternalTrackParam & ) const {return 0;}
+
+  Int_t GetTrackParamIp       ( AliExternalTrackParam &p ) const {
+      if(!GetInnerParam()) return -1;
+      p=*GetInnerParam();
+      return 0;}
+
+  Int_t GetTrackParamOp       ( AliExternalTrackParam &p ) const {
+      if(!GetOuterParam()) return -1;
+      p=*GetOuterParam();
+      return 0;}
+
+  Int_t GetTrackParamTPCInner ( AliExternalTrackParam &p ) const {
+      if(!GetTPCInnerParam()) return -1;
+      p=*GetTPCInnerParam();
+      return 0;}
+
+  Int_t GetTrackParamCp       ( AliExternalTrackParam &p ) const {
+      if(!GetConstrainedParam()) return -1;
+      p=*GetConstrainedParam();
+      return 0;}
+
+
 protected:
   
   AliExternalTrackParam *fCp; // Track parameters constrained to the primary vertex
@@ -472,13 +514,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.,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   fMassForTracking;         // mass used for tracking
+  Double32_t   *fR; //! [0.,0.,8] combined "detector response probability"
+  Double32_t   *fITSr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   *fTPCr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   *fTRDr; //! [0.,0.,8] "detector response probabilities" (for the PID)  
+  Double32_t   *fTOFr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+  Double32_t   *fHMPIDr; //! [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?
@@ -560,6 +601,8 @@ protected:
 
   Char_t  fTRDTimBin[kTRDnPlanes];   // Time bin of Max cluster from all six planes
   Char_t  fVertexID; // ID of the primary vertex this track belongs to
+  Char_t  fPIDForTracking;           // mass used for tracking
+
   mutable const AliESDEvent*   fESDEvent; //!Pointer back to event to which the track belongs
   
   mutable Float_t fCacheNCrossedRows; //! Cache for the number of crossed rows
@@ -582,7 +625,7 @@ protected:
   static bool fgkOnlineMode; //! indicate the online mode to skip some of the functionality
 
   AliESDtrack & operator=(const AliESDtrack & );
-  ClassDef(AliESDtrack,70)  //ESDtrack 
+  ClassDef(AliESDtrack,71)  //ESDtrack 
 };