]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFtracker.h
- AliPhysicsSelection: protected writing of fHistBunchCrossing and fHistTriggerPattern
[u/mrichter/AliRoot.git] / TOF / AliTOFtracker.h
CommitLineData
596a855f 1#ifndef ALITOFTRACKER_H
2#define ALITOFTRACKER_H
0e46b9ae 3
596a855f 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
0e46b9ae 9//----------------------------------------------------------------------//
10// //
11// AliTOFtracker Class //
12// Task: Perform association of the ESD tracks to TOF Clusters //
13// and Update ESD track with associated TOF Cluster parameters //
14// //
15// -- Authors : S. Arcelli, C. Zampolli (Bologna University and INFN) //
16// -- Contacts: Annalisa.De.Caro@cern.ch //
17// -- : Chiara.Zampolli@bo.infn.it //
18// -- : Silvia.Arcelli@bo.infn.it //
19// //
571dda3d 20
596a855f 21#include "AliTracker.h"
596a855f 22
de60fa8a 23#include "TObject.h"
24
25
0e46b9ae 26class TClonesArray;
0841bd02 27class TObjArray;
0e46b9ae 28
5c7c93fa 29class TH1F;
30class TH2F;
31
af885e0f 32class AliESDEvent;
10d100d4 33class AliESDpid;
0e46b9ae 34
571dda3d 35class AliTOFcluster;
e0ddb533 36class AliTOFRecoParam;
0e46b9ae 37class AliTOFGeometry;
596a855f 38
de60fa8a 39class AliTOFtrackPoint : public TObject {
40
41 public:
42
43 AliTOFtrackPoint() :
44 fIndex(0),fDistance(0),fDistanceZ(0),
45 fDistanceY(0),fPropRadius(0),fLength(0) { };
46 AliTOFtrackPoint(Int_t index,Float_t dist,Float_t distZ,
47 Float_t distY,Float_t radius,Float_t length) :
48 TObject(),
49 fIndex(index),fDistance(dist),fDistanceZ(distZ),
50 fDistanceY(distY),fPropRadius(radius),fLength(length) { };
51 AliTOFtrackPoint(const AliTOFtrackPoint & source) :
52 TObject(source),
53 fIndex(source.fIndex),
54 fDistance(source.fDistance),
55 fDistanceZ(source.fDistanceZ),
56 fDistanceY(source.fDistanceY),
57 fPropRadius(source.fPropRadius),
58 fLength(source.fLength) { };
59 AliTOFtrackPoint & operator=(const AliTOFtrackPoint & source)
60 { if (this == &source) return *this;
61 TObject::operator=(source);
62 fDistance=source.fDistance;fDistanceZ=source.fDistanceZ;fDistanceY=source.fDistanceY;
63 fPropRadius=source.fPropRadius;fLength=source.fLength;
64 return *this; };
65
66 Int_t Index() const {return fIndex;} // cluster index
67 Float_t Distance() const {return fDistance;} // distance
68 Float_t DistanceZ() const {return fDistanceZ;} // distance, Z component
69 Float_t DistanceY() const {return fDistanceY;} // distance, Y component
70 Float_t PropRadius() const {return fPropRadius;} // propagation radius at TOF
71 Float_t Length() const {return fLength;} // reconstructed track length at TOF
72
73 private:
74
75 Int_t fIndex; // cluster index
76 Float_t fDistance; // track-cluster distance
77 Float_t fDistanceZ; // Z component of track-cluster distance
78 Float_t fDistanceY; // Y component of track-cluster distance
79 Float_t fPropRadius; // track propagation radius
80 Float_t fLength; // receonstructed track length
81
82 //ClassDef(AliTOFtrackPoint, 1) // TOF matchable cluster
83
84};
74ea065c 85
de60fa8a 86class AliTOFtracker : public AliTracker {
74ea065c 87
de60fa8a 88 public:
596a855f 89
e0ddb533 90 AliTOFtracker();
7aeeaf38 91
5664c6ed 92 virtual ~AliTOFtracker();
10d100d4 93 virtual void GetPidSettings(AliESDpid *esdPID);
5c7c93fa 94 virtual Int_t Clusters2Tracks(AliESDEvent* /*event*/) {return -1;};
26acf84d 95 virtual Int_t PropagateBack(AliESDEvent * const event);
5c7c93fa 96 virtual Int_t RefitInward(AliESDEvent* /*event*/) {return -1;};
97 virtual Int_t LoadClusters(TTree * cTree); // Load Clusters
98 virtual void UnloadClusters();// UnLoad Clusters
21a8ed8d 99 virtual AliCluster *GetCluster(Int_t index) const
100 {if (index==-1 || index >= fN) return NULL;
101 return (AliCluster *) fClusters[index];};
5c7c93fa 102 Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
103 void InitCheckHists();
104 void SaveCheckHists();
128563f6 105 void FillClusterArray(TObjArray* arr) const;
596a855f 106
107private:
596a855f 108
de60fa8a 109 enum {kMaxCluster=77777}; //maximal number of the TOF clusters
110
8a190ba2 111 AliTOFtracker(const AliTOFtracker &t); //Copy Ctor
112 AliTOFtracker& operator=(const AliTOFtracker &source); // ass. op.
113
5c7c93fa 114 Int_t FindClusterIndex(Double_t z) const; // Returns cluster index
115 void MatchTracks(Bool_t mLastStep); // Matching Algorithm
116 void CollectESD(); // Select starting Set for Matching
f31a249f 117 Float_t CorrectTimeWalk(Float_t dist,Float_t tof) const; // Time Walk correction
ff826920 118
f31a249f 119 const AliTOFRecoParam* fkRecoParam; // Pointer to TOF Recon. Pars
3a646035 120 AliTOFGeometry* fGeom; // Pointer to TOF geometry
3a646035 121 AliTOFcluster *fClusters[kMaxCluster]; // pointers to the TOF clusters
5c7c93fa 122
123 Int_t fN; // Number of Clusters
124 Int_t fNseeds; // Number of track seeds
125 Int_t fNseedsTOF; // TPC BP tracks
126 Int_t fngoodmatch; // Correctly matched tracks
127 Int_t fnbadmatch; // Wrongly matched tracks
128 Int_t fnunmatch; // Unmatched tracks
129 Int_t fnmatch; // Total matched tracks
74ea065c 130
5c7c93fa 131 TClonesArray* fTracks; //! pointer to the TClonesArray with TOF tracks
0841bd02 132 TObjArray* fSeeds; //! pointer to the TObjArray with ESD tracks
de60fa8a 133 //Digits/Reco QA histos
134 TObjArray* fTOFtrackPoints; //! pointer to TObjArray of matchable TOF
135 //track points
5c7c93fa 136
137 TH2F * fHDigClusMap; //Digits QA, Cluster Map
138 TH1F * fHDigNClus; //Digits QA, # of clusters on TOF/event
139 TH1F * fHDigClusTime;//Digits QA, Cluster Time (ns)
140 TH1F * fHDigClusToT; //Digits QA, Cluster ToT (ns)
141 TH1F * fHRecNClus; //Reco QA, cluster occupancy in search window
142 TH1F * fHRecDist;//Reco QA, track-TOF cluster closest distance (cm)
143 TH2F * fHRecSigYVsP;//Reco QA, track error in Y at TOF inner surface (cm)
144 TH2F * fHRecSigZVsP; //Reco QA, track error in Z at TOF inner surface (cm)
145 TH2F * fHRecSigYVsPWin;//Reco QA, search window size in Y (cm)
146 TH2F * fHRecSigZVsPWin;//Reco QA, search window size in X (cm)
147 TTree * fCalTree; // Tree for on-the-fly offline Calibration
148 // internal variables in tree for on-the-fly TOF Calibration
149
150 Int_t fIch; //TOF channel number
151 Float_t fToT; // Time over Threshold, ns
152 Float_t fTime; //TOF time, ps
153 Float_t fExpTimePi; // exp time, Pions
154 Float_t fExpTimeKa; // exp time, Kaons
155 Float_t fExpTimePr; // exp time, Protons
156
de60fa8a 157 ClassDef(AliTOFtracker, 6) // TOF tracker
596a855f 158};
159
160#endif