1 #ifndef ALITOFTRACKERV2_H
2 #define ALITOFTRACKERV2_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //------------------------------------------------------------------//
11 // AliTOFtrackerV2 Class //
12 // Task: Perform association of the ESD tracks to TOF Clusters //
13 // and Update ESD track with associated TOF Cluster parameters //
15 // -- Authors : A. De Caro (Centro Studi e Ricerche E.Fermi) //
16 // -- Contacts: Annalisa.De.Caro@cern.ch //
18 //------------------------------------------------------------------//
20 #include "AliTracker.h"
21 #include "AliTOFcluster.h"
22 #include "AliESDTOFCluster.h"
29 class AliTOFRecoParam;
31 class AliTOFtrackerV2 : public AliTracker {
37 virtual ~AliTOFtrackerV2();
38 virtual void GetPidSettings(AliESDpid *esdPID);
39 virtual Int_t Clusters2Tracks(AliESDEvent* /*event*/) {return -1;};
40 virtual Int_t PropagateBack(AliESDEvent * const event);
41 virtual Int_t RefitInward(AliESDEvent* /*event*/) {return -1;};
42 virtual Int_t LoadClusters(TTree * cTree); // Load Clusters
43 virtual void UnloadClusters();// UnLoad Clusters
44 Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
45 Int_t GetNumberOfMatchedTOFtracks() const {return fnmatch;}
46 virtual AliCluster *GetCluster(Int_t index) const
47 {//Int_t index = fWrittenInPos[indexOr]; // indexOr should refer to the clusters written in ESD
48 if (index==-1 || index >= fN) return NULL;
49 return (AliCluster *) &(fClusters[index]);};
53 void MergeClusters(Int_t i,Int_t j);
55 enum {kMaxCluster=77777}; //maximal number of the TOF clusters
57 AliTOFtrackerV2(const AliTOFtrackerV2 &t); //Copy Ctor
58 AliTOFtrackerV2& operator=(const AliTOFtrackerV2 &source); // ass. op.
60 Int_t FindClusterIndex(Double_t z) const; // Returns cluster index
61 void MatchTracks(); // Matching Algorithm
62 void CollectESD(); // Select starting Set for Matching
63 Float_t CorrectTimeWalk(Float_t dist,Float_t tof) const; // Time Walk correction
65 const AliTOFRecoParam* fkRecoParam; // Pointer to TOF Recon. Pars
67 Int_t fN; // Number of Clusters
68 Int_t fNseeds; // Number of track seeds
69 Int_t fNseedsTOF; // TPC BP tracks
70 Int_t fnunmatch; // Unmatched tracks
71 Int_t fnmatch; // Total matched tracks
73 TObjArray* fSeeds; //! pointer to the TObjArray with ESD tracks
74 AliTOFcluster *fClusters[kMaxCluster]; //! pointers to the TOF cluster
75 TClonesArray *fClustersESD; //! base line for ESD clusters
76 TClonesArray *fHitsESD; //! filter list of TOF hits for ESD
77 Int_t fWrittenInPos[kMaxCluster]; //! the position where the cluster is already written
79 AliESDEvent *fEvent; //! pointer to the event
81 Int_t fNsteps; //! number of propagation steps
82 Double_t *fTimesAr[AliPID::kSPECIESC]; //! array to compute expected times for each propagation step
83 Float_t *fTrackPos[4]; //! array to compute pos for each propation step
85 ClassDef(AliTOFtrackerV2, 2) // TOF tracker