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