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