]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDtrack.h
New representation of the raw TRD PID signal in ESD (Alex, Yuri)
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.h
index 56d668fda4f47f50193d87135613c137dd901f71..1dd292083e4627abf5489e8f96e364e40cd2d213 100644 (file)
@@ -32,18 +32,36 @@ 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,
+    kHMPIDpid=0x20000,
+    kEMCALmatch=0x40000,
+    kTRDbackup=0x80000,
+    kTRDStop=0x20000000,
+    kESDpid=0x40000000,
+    kTIME=0x80000000
+  }; 
+  enum {
+    kTRDnPlanes = 6,
+    kEMCALNoMatch = -4096
+  };
   AliESDtrack();
   AliESDtrack(const AliESDtrack& 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
   TObject *  GetCalibObject(Int_t index);    // return calib objct at given position
   void MakeMiniESDtrack();
@@ -122,10 +140,14 @@ public:
  
   void    SetITSpid(const Double_t *p);
   void    GetITSpid(Double_t *p) const;
-  Float_t GetITSsignal() const {return fITSsignal;}
-  Float_t GetITSchi2() const {return fITSchi2;}
-  Int_t   GetITSclusters(Int_t *idx) const;
+  Double_t GetITSsignal() const {return fITSsignal;}
+  Double_t GetITSchi2() const {return fITSchi2;}
+  Char_t   GetITSclusters(Int_t *idx) const;
   UChar_t GetITSClusterMap() const {return fITSClusterMap;}
+  void    SetITSModuleIndex(Int_t ilayer,Int_t idx) {fITSModule[ilayer]=idx;}
+  Int_t   GetITSModuleIndex(Int_t ilayer) const {return fITSModule[ilayer];}
+  Bool_t  GetITSModuleIndexInfo(Int_t ilayer,Int_t &idet,Int_t &status,
+                               Float_t &xloc,Float_t &zloc) const;
   Int_t   GetITSLabel() const {return fITSLabel;}
   void    SetITStrack(AliKalmanTrack * track){
      fFriendTrack->SetITStrack(track);
@@ -140,9 +162,9 @@ public:
      for (Int_t i=0;i<4;i++) fTPCPoints[i]=points[i];
   }
   void    SetTPCPointsF(UChar_t  findable){fTPCnclsF = findable;}
-  Int_t   GetTPCNcls() const { return fTPCncls;}
-  Int_t   GetTPCNclsF() const { return fTPCnclsF;}
-  Float_t GetTPCPoints(Int_t i) const {return fTPCPoints[i];}
+  UShort_t   GetTPCNcls() const { return fTPCncls;}
+  UShort_t   GetTPCNclsF() const { return fTPCnclsF;}
+  Double_t GetTPCPoints(Int_t i) const {return fTPCPoints[i];}
   void    SetKinkIndexes(Int_t points[3]) {
      for (Int_t i=0;i<3;i++) fKinkIndexes[i] = points[i];
   }
@@ -152,12 +174,12 @@ public:
   void    SetTPCsignal(Float_t signal, Float_t sigma, UChar_t npoints){ 
      fTPCsignal = signal; fTPCsignalS = sigma; fTPCsignalN = npoints;
   }
-  Float_t GetTPCsignal() const {return fTPCsignal;}
-  Float_t GetTPCsignalSigma() const {return fTPCsignalS;}
+  Double_t GetTPCsignal() const {return fTPCsignal;}
+  Double_t GetTPCsignalSigma() const {return fTPCsignalS;}
   UShort_t GetTPCsignalN() const {return fTPCsignalN;}
-  Float_t GetTPCchi2() const {return fTPCchi2;}
-  Int_t   GetTPCclusters(Int_t *idx) const;
-  Float_t GetTPCdensity(Int_t row0, Int_t row1) const;
+  Double_t GetTPCchi2() const {return fTPCchi2;}
+  UShort_t   GetTPCclusters(Int_t *idx) const;
+  Double_t GetTPCdensity(Int_t row0, Int_t row1) 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];}
@@ -165,31 +187,36 @@ 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;}
-  Float_t GetTRDQuality()const {return fTRDQuality;}
+  void    SetTRDQuality(Float_t quality){fTRDQuality=quality;}
+  Double_t GetTRDQuality()const {return fTRDQuality;}
   void    SetTRDBudget(Float_t budget){fTRDBudget=budget;}
-  Float_t GetTRDBudget()const {return fTRDBudget;}
-  void    SetTRDsignals(Float_t dedx, Int_t i, Int_t j) {fTRDsignals[i][j]=dedx;}
+  Double_t GetTRDBudget()const {return fTRDBudget;}
+
   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 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];
-  }
-  Int_t   GetTRDTimBin(Int_t i) const {return fTRDTimBin[i];}
-  Float_t GetTRDchi2() const {return fTRDchi2;}
-  Int_t   GetTRDclusters(Int_t *idx) const;
-  Int_t   GetTRDncls() const {return fTRDncls;}
+  Double_t GetTRDsignal() const {return fTRDsignal;}
+
+  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   GetTRDncls0() const {return fTRDncls0;}
+  UChar_t   GetTRDtracklets(Int_t *idx) const;
   void    SetTRDpid(Int_t iSpecies, Float_t p);
-  Float_t GetTRDpid(Int_t iSpecies) const;
+  Double_t GetTRDpid(Int_t iSpecies) const;
   Int_t   GetTRDLabel() const {return fTRDLabel;}
 
   void    SetTRDtrack(AliKalmanTrack * track){
@@ -200,14 +227,14 @@ public:
   }
 
   void    SetTOFsignal(Double_t tof) {fTOFsignal=tof;}
-  Float_t GetTOFsignal() const {return fTOFsignal;}
+  Double_t GetTOFsignal() const {return fTOFsignal;}
   void    SetTOFsignalToT(Double_t ToT) {fTOFsignalToT=ToT;}
-  Float_t GetTOFsignalToT() const {return fTOFsignalToT;}
+  Double_t GetTOFsignalToT() const {return fTOFsignalToT;}
   void    SetTOFsignalRaw(Double_t tof) {fTOFsignalRaw=tof;}
-  Float_t GetTOFsignalRaw() const {return fTOFsignalRaw;}
+  Double_t GetTOFsignalRaw() const {return fTOFsignalRaw;}
   void    SetTOFsignalDz(Double_t dz) {fTOFsignalDz=dz;}
-  Float_t GetTOFsignalDz() const {return fTOFsignalDz;}
-  Float_t GetTOFchi2() const {return fTOFchi2;}
+  Double_t GetTOFsignalDz() const {return fTOFsignalDz;}
+  Double_t GetTOFchi2() const {return fTOFchi2;}
   void    SetTOFpid(const Double_t *p);
   void    SetTOFLabel(const Int_t *p);
   void    GetTOFpid(Double_t *p) const;
@@ -221,13 +248,11 @@ public:
 
 // HMPID methodes +++++++++++++++++++++++++++++++++ (kir)
   void    SetHMPIDsignal(Double_t theta) {fHMPIDsignal=theta;}
-  Float_t GetHMPIDsignal() const {return fHMPIDsignal;}
+  Double_t GetHMPIDsignal() const {return fHMPIDsignal;}
   void    SetHMPIDpid(const Double_t *p);
   void    GetHMPIDpid(Double_t *p) const;  
   void    SetHMPIDchi2(Double_t chi2) {fHMPIDchi2=chi2;}
-  Float_t GetHMPIDchi2() const {return fHMPIDchi2;}
-  void    SetHMPIDcluster(Int_t index) {fHMPIDcluIdx=index;}
-  Int_t   GetHMPIDcluster() const {return fHMPIDcluIdx;}
+  Double_t GetHMPIDchi2() const {return fHMPIDchi2;}
   void    SetHMPIDcluIdx(Int_t ch,Int_t idx) {fHMPIDcluIdx=ch*1000000+idx;}
   Int_t   GetHMPIDcluIdx() const {return fHMPIDcluIdx;}
   void    SetHMPIDtrk(Float_t  x, Float_t  y, Float_t  th, Float_t  ph) {
@@ -237,10 +262,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;}
 
@@ -261,122 +286,109 @@ public:
     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 = -999999999
-  };
 protected:
   
-
-  ULong_t   fFlags;         // Reconstruction status flags 
-  Int_t     fLabel;         // Track label
-  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   fCdd,fCdz,fCzz; // Covariance matrix of the impact parameters 
-  Float_t   fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking
-  Float_t   fR[AliPID::kSPECIES]; // combined "detector response probability"
-
-  Int_t   fStopVertex;  // Index of the stop vertex
-
   AliExternalTrackParam *fCp; // Track parameters constrained to the primary vertex
-  Double32_t fCchi2; // chi2 at the primary vertex
-
-
   AliExternalTrackParam *fIp; // Track parameters at the first measured point (TPC)
   AliExternalTrackParam *fTPCInner; // Track parameters at the first measured point (TPC) - first itteration
-
-
   AliExternalTrackParam *fOp; // Track parameters at the last measured point (TPC or TRD) 
+  AliESDfriendTrack *fFriendTrack; //! All the complementary information
 
-  // ITS related track information
-  Float_t fITSchi2;        // chi2 in the ITS
-  Int_t   fITSncls;        // number of clusters assigned in the ITS
-  UChar_t fITSClusterMap;  // map of clusters, one bit per a layer 
-  Float_t fITSsignal;      // detector's PID signal
-  Float_t fITSr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
-  Int_t   fITSLabel;       // label according TPC
-
-  // TPC related track information
-  Float_t  fTPCchi2;       // chi2 in the TPC
-  Int_t    fTPCncls;       // number of clusters assigned in the TPC
-  UShort_t fTPCnclsF;      // number of findable clusters in the TPC
   TBits    fTPCClusterMap; // Map of clusters, one bit per padrow; 1 if has a cluster on given padrow
   TBits    fTPCSharedMap;  // Map of clusters, one bit per padrow; 1 if has a shared cluster on given padrow
-  Float_t  fTPCsignal;     // detector's PID signal
+
+
+
+  ULong_t   fFlags;          // Reconstruction status flags 
+  Int_t     fID;             // Unique ID of the track
+  Int_t     fLabel;          // Track label
+  Int_t     fITSLabel;       // label according ITS
+  Int_t     fITSModule[12];  // modules crossed by the track in the ITS 
+  Int_t     fTPCLabel;       // label according TPC
+  Int_t     fTRDLabel;       // label according TRD
+  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*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)
+
+
+  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 fHMPIDtrkTheta;//[-2*pi,2*pi,16] theta of the track extrapolated to the HMPID, LORS
+  // how much of this is needed?
+  Double32_t fHMPIDtrkPhi;     //[-2*pi,2*pi,16] phi of the track extrapolated to the HMPID, LORS
+  Double32_t fHMPIDsignal;  // HMPID PID signal (Theta ckov, rad)
+
+  Double32_t   fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking
+  Double32_t   fTrackLength;   // Track length
+  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   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;     // [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 fTRDQuality;     // trd quality factor for TOF
+  Double32_t fTRDBudget;      // trd material budget
+
+  Double32_t fTOFsignal;      // detector's PID signal
+  Double32_t fTOFsignalToT;   // detector's ToT signal
+  Double32_t fTOFsignalRaw;   // detector's uncorrected time signal
+  Double32_t fTOFsignalDz;    // local z  of track's impact on the TOF pad 
+  Double32_t fTOFInfo[10];    //! TOF informations
+
+  Double32_t fHMPIDtrkX;       // x of the track impact, LORS 
+  Double32_t fHMPIDtrkY;       // y of the track impact, LORS 
+  Double32_t fHMPIDmipX;       // x of the MIP in LORS
+  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
-  Float_t  fTPCsignalS;    // RMS of dEdx measurement
-  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
+
+  Char_t  fITSncls;        // number of clusters assigned in the ITS
+  UChar_t fITSClusterMap;  // map of clusters, one bit per a layer
   UChar_t fTRDncls;        // number of clusters assigned in the TRD
   UChar_t fTRDncls0;       // number of clusters assigned in the TRD before first material cross
-  Float_t fTRDsignal;      // detector's PID signal
-  Float_t fTRDsignals[kNPlane][kNSlice];  // TRD signals from all six planes in 3 slices each
-  Int_t   fTRDTimBin[kNPlane];   // Time bin of Max cluster from all six planes
-  Float_t fTRDr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
-       // A.Bercuci
-       UChar_t fTRDpidQuality;   // TRD PID quality according to number of planes. 6 is the best
-  Int_t   fTRDLabel;       // label according TRD
-  Float_t fTRDQuality;     // trd quality factor for TOF
-  Float_t fTRDBudget;      // trd material budget
-
-
-  // TOF related track information
-  Float_t fTOFchi2;        // chi2 in the TOF
-  Int_t   fTOFindex;       // index of the assigned TOF cluster
-  Int_t   fTOFCalChannel;  // Channel Index of the TOF Signal 
-  Float_t fTOFsignal;      // detector's PID signal
-  Float_t fTOFsignalToT;   // detector's ToT signal
-  Float_t fTOFsignalRaw;   // detector's uncorrected time signal
-  Float_t fTOFsignalDz;    // local z  of track's impact on the TOF pad 
-  Float_t fTOFr[AliPID::kSPECIES]; // "detector response probabilities" (for the PID)
-  Int_t   fTOFLabel[3];    // TOF label 
-  Float_t fTOFInfo[10];    //! TOF informations
-
-  // HMPID related track information                 (kir)
-  Float_t fHMPIDchi2;       // chi2 in the HMPID
-  Int_t   fHMPIDqn;         // 1000000*QDC + number of photon clusters
-  Int_t   fHMPIDcluIdx;     // 1000000*chamber id + cluster idx of the assigned MIP cluster
-  Float_t fHMPIDsignal;     // HMPID PID signal (Theta ckov, rad)
-  Float_t fHMPIDr[AliPID::kSPECIES];// "detector response probabilities" (for the PID)
-  Float_t fHMPIDtrkTheta;   // theta of the track extrapolated to the HMPID, LORS
-  Float_t fHMPIDtrkPhi;     // phi of the track extrapolated to the HMPID, LORS
-  Float_t fHMPIDtrkX;       // x of the track impact, LORS 
-  Float_t fHMPIDtrkY;       // y of the track impact, LORS 
-  Float_t fHMPIDmipX;       // x of the MIP in LORS
-  Float_t fHMPIDmipY;       // y of the MIP in LORS
-  
-  // EMCAL related track information
-  Int_t fEMCALindex;   // index of associated EMCAL cluster (AliESDCaloCluster)
+  UChar_t fTRDpidQuality;   // TRD PID quality according to number of planes. 6 is the best
 
-  AliESDfriendTrack *fFriendTrack; //! All the complementary information
+  UChar_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,39)  //ESDtrack 
+  ClassDef(AliESDtrack,43)  //ESDtrack 
 };
 
 #endif