]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFtrackerMI.h
a01ef91d9daa7f742be93f3474b91dd654a28153
[u/mrichter/AliRoot.git] / TOF / AliTOFtrackerMI.h
1 #ifndef ALITOFTRACKERMI_H
2 #define ALITOFTRACKERMI_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5 // AliTOFtrackerMI Class
6 // Task: Perform association of the ESD tracks to TOF Clusters
7 // and Update ESD track with associated TOF Cluster parameters 
8 //
9 //--------------------------------------------------------------------
10
11 /* $Id$ */
12
13 #include "AliTracker.h"
14 #include "AliTOFpidESD.h"
15 #include "AliESD.h"
16 #include "TClonesArray.h"
17
18 class AliTOFGeometry;
19 class AliTOFtrack;
20 class AliTOFcluster;
21 class TTreeSRedirector;
22
23 class AliTOFtrackerMI : public AliTracker {
24
25 enum {kMaxCluster=77777}; //maximal number of the TOF clusters
26
27 public:
28
29  AliTOFtrackerMI(AliTOFGeometry* geom, Double_t parPID[2]); 
30  AliTOFtrackerMI(const AliTOFtrackerMI &t); //Copy Ctor 
31  //  virtual ~AliTOFtrackerMI() {delete fTOFpid;}
32  virtual ~AliTOFtrackerMI();
33   virtual Int_t Clusters2Tracks(AliESD* /*event*/) {return -1;};
34   virtual Int_t PropagateBack(AliESD* event);
35   virtual Int_t RefitInward(AliESD* /*event*/) {return -1;};
36   virtual Int_t LoadClusters(TTree *dTree); // Loading Clusters from Digits
37   virtual void  UnloadClusters();// UnLoad Clusters
38   virtual AliCluster *GetCluster(Int_t /*index*/) const {return NULL;};
39   void    GetLikelihood(Float_t dy, Float_t dz, const Double_t *cov, AliTOFtrack * track, Float_t & py, Float_t &pz);
40 public:
41  /*  class AliTOFcluster { */
42 /*     friend class AliTOFtrackerMI; */
43 /*   public: */
44 /*     AliTOFcluster(Double_t *h, Int_t *l, Int_t *ind, Int_t idx) { */
45 /*       fR=h[0]; fPhi=h[1]; fZ=h[2]; fTDC=h[3]; fADC=h[4]; */
46 /*       fLab[0]=l[0]; fLab[1]=l[1]; fLab[2]=l[2]; */
47 /*       fIdx=idx; */
48 /*       fdetIndex[0]=ind[0]; */
49 /*       fdetIndex[1]=ind[1]; */
50 /*       fdetIndex[2]=ind[2]; */
51 /*       fdetIndex[3]=ind[3]; */
52 /*       fdetIndex[4]=ind[4]; */
53 /*       fQuality    = -100; */
54 /*     } */
55 /*     void Use() {fADC=-fADC;} */
56
57 /*     Double_t GetR() const {return fR;}  // Cluster Radius */
58 /*     Double_t GetPhi() const {return fPhi;} // Cluster Phi */
59 /*     Double_t GetZ()   const {return fZ;} // Cluster Z */
60 /*     Double_t GetTDC() const {return fTDC;} // Cluster ToF */
61 /*     Double_t GetADC() const {return TMath::Abs(fADC);} // Cluster Charge */
62 /*     Int_t IsUsed() const {return (fADC<0) ? 1 : 0;} // Flagging */
63 /*     Int_t GetLabel(Int_t n) const {return fLab[n];} // Labels of tracks in Cluster */
64 /*     Int_t GetDetInd(Int_t n) const {return fdetIndex[n];} //Cluster Det Indeces */
65 /*     Int_t GetIndex() const {return fIdx;} // Cluster Index */
66
67 /*   private: */
68
69 /*     Int_t fLab[3]; //track labels */
70 /*     Int_t fIdx;    //index of this cluster */
71 /*     Int_t fdetIndex[5]; //Cluster detector Indeces (plate,strip,..) */
72 /*     Double_t fR;   //r-coordinate */
73 /*     Double_t fPhi; //phi-coordinate */
74 /*     Double_t fZ;   //z-coordinate */
75 /*     Double_t fTDC; //TDC count */
76 /*     Double_t fADC; //ADC count */
77 /*     Double_t fQuality;  // quality of the best track */
78 /*   }; */
79
80 private:
81
82   Int_t InsertCluster(AliTOFcluster *c); // Fills TofClusters Array
83   Int_t FindClusterIndex(Double_t z) const; // Returns cluster index 
84   void  MatchTracks(Bool_t mLastStep); // Matching Algorithm 
85   void  MatchTracksMI(Bool_t mLastStep); // Matching Algorithm 
86   void  CollectESD(); // Select starting Set for Matching 
87   void  Init();
88   Float_t GetLinearDistances(AliTOFtrack * track, AliTOFcluster *cluster, Float_t distances[5]);
89   AliTOFGeometry*  fGeom;                 // Pointer to TOF geometry
90   AliTOFpidESD*    fTOFpid;               // Pointer to TOF PID
91   AliTOFcluster *fClusters[kMaxCluster];  // pointers to the TOF clusters
92
93   Bool_t fHoles;         // flag for Geometry Version(w/wo Holes) temporary!
94   Int_t fN;              // Number of Clusters
95   Int_t fNseeds;         // Number of track seeds  
96   Int_t fNseedsTOF;      // TPC BP tracks
97   Int_t fngoodmatch;     // Correctly matched  tracks
98   Int_t fnbadmatch;      // Wrongly matched tracks
99   Int_t fnunmatch;       // Unmatched tracks
100   Int_t fnmatch;         // Total matched tracks
101  
102   Float_t fR;            // Intermediate radius in TOF, used in matching
103   Float_t fTOFHeigth;    // Inner TOF radius for propagation
104   Float_t fdCut;         // Cut on minimum distance track-pad in matching 
105   Float_t fDx;           // Pad Size in X   
106   Float_t fDy;           // Pad Size in Y (== X  TOF convention)
107   Float_t fDz;           // Pad Size in Z 
108   TClonesArray* fTracks; //! pointer to the TClonesArray with TOF tracks
109   TClonesArray* fSeeds;  //! pointer to the TClonesArray with ESD tracks
110   TTreeSRedirector *fDebugStreamer;     //!debug streamer
111   ClassDef(AliTOFtrackerMI, 1) // TOF trackerMI 
112 };
113
114 #endif
115
116