]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/info/AliTRDclusterInfo.h
copy TRD performance train to PWG1
[u/mrichter/AliRoot.git] / PWG1 / TRD / info / AliTRDclusterInfo.h
1 #ifndef ALITRDCLUSTERINFO_H
2 #define ALITRDCLUSTERINFO_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7
8 #ifndef Root_TObject
9 #include "TObject.h"
10 #endif
11
12 class AliTRDcluster;
13 class AliTRDclusterInfo : public TObject
14 {
15 public:
16   AliTRDclusterInfo();
17
18   Float_t   GetAnisochronity() const {return fD;}
19   inline void GetCluster(Int_t &det, Float_t &x, Float_t &y, Float_t &z, Float_t &q, Int_t &t, Float_t *cov=0x0) const;
20   void      GetMC(Int_t &pdg, Int_t &label) const{
21       pdg  = fPdg;
22       label= fLbl; }
23   void      GetGlobalPosition(Float_t &yt, Float_t &zt, Float_t &dydx, Float_t &dzdx, Float_t *cov=0x0) const {
24       dydx = fdydx;
25       dzdx = fdzdx;
26       yt   = fYt;
27       zt   = fZt;
28       if(cov) memcpy(cov, fCov, 3*sizeof(Float_t));}
29   Float_t   GetResolution() const {return fdy;}
30   Float_t   GetDriftLength() const {return fXd;}
31   Float_t   GetYDisplacement() const {return fYd;}
32   Float_t   GetTilt() const { return fTilt;}
33
34   void      Print(Option_t *opt="") const;
35
36   void      SetAnisochronity(Float_t d) {fD = d;}
37   void      SetCluster(const AliTRDcluster *c);
38   void      SetMC(Int_t pdg, Int_t label){
39       fPdg  = pdg;
40       fLbl  = label;}
41   void      SetGlobalPosition(Float_t yt, Float_t zt, Float_t dydx, Float_t dzdx, Float_t *cov=0x0) {
42       fdydx = dydx;
43       fdzdx = dzdx;
44       fYt   = yt;
45       fZt   = zt;
46       if(cov) memcpy(fCov, cov, 3*sizeof(Float_t));}
47   void      SetResolution(Float_t dy) {fdy = dy;}
48   void      SetDriftLength(Float_t d) {fXd = d;}
49   void      SetTilt(Float_t t) {fTilt = t;}
50
51 private:
52   UShort_t fDet;   // detector
53   Short_t  fPdg;   // particle code
54   Short_t  fLbl;   // track label (MC)
55   Short_t  fLocalTime; // calibrate drift time
56   Float_t  fQ;     // cluster charge (REC)
57   Float_t  fX;     // x coordinate (REC)
58   Float_t  fY;     // y coordinate (REC)
59   Float_t  fYd;    // displacement from pad center y coordinate
60   Float_t  fZ;     // z coordinate (REC)
61   Float_t  fdydx;  // slope in phi (MC)
62   Float_t  fdzdx;  // slope in theta (MC)
63   Float_t  fXd;    // drift length
64   Float_t  fYt;    // y coordinate (MC)
65   Float_t  fZt;    // z coordinate (MC)
66   Float_t  fCov[3];// covariance matrix in the yz plane (track)
67   Float_t  fCovCl[3];// covariance matrix in the yz plane (cluster)
68   Float_t  fdy;    // difference in y after tilt correction
69   Float_t  fD;     // distance to the anode wire
70   Float_t  fTilt;  // pad tilt;
71
72   ClassDef(AliTRDclusterInfo, 1) // extracted cluster2MC information
73 };
74
75
76 //_________________________________________________
77 inline void AliTRDclusterInfo::GetCluster(Int_t &det, Float_t &x, Float_t &y, Float_t &z, Float_t &q, Int_t &t, Float_t *cov) const
78 {
79   det = fDet;
80   x   = fX;
81   y   = fY;
82   z   = fZ;
83   q   = fQ;
84   t   = fLocalTime;
85   if(cov) memcpy(cov, fCovCl, 3*sizeof(Float_t));
86 }
87
88 #endif
89