]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALITOFTRACKER_H | |
2 | #define ALITOFTRACKER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
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 | // // | |
20 | ||
21 | #include "AliTracker.h" | |
22 | ||
23 | #include "TObject.h" | |
24 | ||
25 | ||
26 | class TClonesArray; | |
27 | class TObjArray; | |
28 | ||
29 | class TH1F; | |
30 | class TH2F; | |
31 | ||
32 | class AliESDEvent; | |
33 | class AliESDpid; | |
34 | ||
35 | class AliTOFcluster; | |
36 | class AliTOFRecoParam; | |
37 | class AliTOFGeometry; | |
38 | ||
39 | class AliTOFtrackPoint : public TObject { | |
40 | ||
41 | public: | |
42 | ||
43 | AliTOFtrackPoint() : | |
44 | fIndex(0),fDistance(0),fDistanceZ(0), | |
45 | fDistanceY(0),fDistanceX(0),fPropRadius(0),fLength(0) { }; | |
46 | AliTOFtrackPoint(Int_t index,Float_t dist,Float_t distZ, | |
47 | Float_t distY,Float_t distX,Float_t radius,Float_t length) : | |
48 | TObject(), | |
49 | fIndex(index),fDistance(dist),fDistanceZ(distZ), | |
50 | fDistanceY(distY),fDistanceX(distX),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 | fDistanceX(source.fDistanceX), | |
58 | fPropRadius(source.fPropRadius), | |
59 | fLength(source.fLength) { }; | |
60 | AliTOFtrackPoint & operator=(const AliTOFtrackPoint & source) | |
61 | { if (this == &source) return *this; | |
62 | TObject::operator=(source); | |
63 | fDistance=source.fDistance;fDistanceZ=source.fDistanceZ;fDistanceY=source.fDistanceY;fDistanceX=source.fDistanceX; | |
64 | fPropRadius=source.fPropRadius;fLength=source.fLength; | |
65 | return *this; }; | |
66 | ||
67 | Int_t Index() const {return fIndex;} // cluster index | |
68 | Float_t Distance() const {return fDistance;} // distance | |
69 | Float_t DistanceZ() const {return fDistanceZ;} // distance, Z component | |
70 | Float_t DistanceY() const {return fDistanceY;} // distance, Y component | |
71 | Float_t DistanceX() const {return fDistanceX;} // distance, X component | |
72 | Float_t PropRadius() const {return fPropRadius;} // propagation radius at TOF | |
73 | Float_t Length() const {return fLength;} // reconstructed track length at TOF | |
74 | ||
75 | private: | |
76 | ||
77 | Int_t fIndex; // cluster index | |
78 | Float_t fDistance; // track-cluster distance | |
79 | Float_t fDistanceZ; // Z component of track-cluster distance | |
80 | Float_t fDistanceY; // Y component of track-cluster distance | |
81 | Float_t fDistanceX; // X component of track-cluster distance | |
82 | Float_t fPropRadius; // track propagation radius | |
83 | Float_t fLength; // receonstructed track length | |
84 | ||
85 | //ClassDef(AliTOFtrackPoint, 2) // TOF matchable cluster | |
86 | ||
87 | }; | |
88 | ||
89 | class AliTOFtracker : public AliTracker { | |
90 | ||
91 | public: | |
92 | ||
93 | AliTOFtracker(); | |
94 | ||
95 | virtual ~AliTOFtracker(); | |
96 | virtual void GetPidSettings(AliESDpid *esdPID); | |
97 | virtual Int_t Clusters2Tracks(AliESDEvent* /*event*/) {return -1;}; | |
98 | virtual Int_t PropagateBack(AliESDEvent * const event); | |
99 | virtual Int_t RefitInward(AliESDEvent* /*event*/) {return -1;}; | |
100 | virtual Int_t LoadClusters(TTree * cTree); // Load Clusters | |
101 | virtual void UnloadClusters();// UnLoad Clusters | |
102 | virtual AliCluster *GetCluster(Int_t index) const | |
103 | {if (index==-1 || index >= fN) return NULL; | |
104 | return (AliCluster *) fClusters[index];}; | |
105 | Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const; | |
106 | void InitCheckHists(); | |
107 | void SaveCheckHists(); | |
108 | void FillClusterArray(TObjArray* arr) const; | |
109 | ||
110 | private: | |
111 | ||
112 | enum {kMaxCluster=77777}; //maximal number of the TOF clusters | |
113 | ||
114 | AliTOFtracker(const AliTOFtracker &t); //Copy Ctor | |
115 | AliTOFtracker& operator=(const AliTOFtracker &source); // ass. op. | |
116 | ||
117 | Int_t FindClusterIndex(Double_t z) const; // Returns cluster index | |
118 | void MatchTracks(Bool_t mLastStep); // Matching Algorithm | |
119 | void CollectESD(); // Select starting Set for Matching | |
120 | Float_t CorrectTimeWalk(Float_t dist,Float_t tof) const; // Time Walk correction | |
121 | ||
122 | const AliTOFRecoParam* fkRecoParam; // Pointer to TOF Recon. Pars | |
123 | AliTOFGeometry* fGeom; // Pointer to TOF geometry | |
124 | AliTOFcluster *fClusters[kMaxCluster]; // pointers to the TOF clusters | |
125 | ||
126 | Int_t fN; // Number of Clusters | |
127 | Int_t fNseeds; // Number of track seeds | |
128 | Int_t fNseedsTOF; // TPC BP tracks | |
129 | Int_t fngoodmatch; // Correctly matched tracks | |
130 | Int_t fnbadmatch; // Wrongly matched tracks | |
131 | Int_t fnunmatch; // Unmatched tracks | |
132 | Int_t fnmatch; // Total matched tracks | |
133 | ||
134 | TClonesArray* fTracks; //! pointer to the TClonesArray with TOF tracks | |
135 | TObjArray* fSeeds; //! pointer to the TObjArray with ESD tracks | |
136 | //Digits/Reco QA histos | |
137 | TObjArray* fTOFtrackPoints; //! pointer to TObjArray of matchable TOF | |
138 | //track points | |
139 | ||
140 | TH2F * fHDigClusMap; //Digits QA, Cluster Map | |
141 | TH1F * fHDigNClus; //Digits QA, # of clusters on TOF/event | |
142 | TH1F * fHDigClusTime;//Digits QA, Cluster Time (ns) | |
143 | TH1F * fHDigClusToT; //Digits QA, Cluster ToT (ns) | |
144 | TH1F * fHRecNClus; //Reco QA, cluster occupancy in search window | |
145 | TH1F * fHRecDist;//Reco QA, track-TOF cluster closest distance (cm) | |
146 | TH2F * fHRecSigYVsP;//Reco QA, track error in Y at TOF inner surface (cm) | |
147 | TH2F * fHRecSigZVsP; //Reco QA, track error in Z at TOF inner surface (cm) | |
148 | TH2F * fHRecSigYVsPWin;//Reco QA, search window size in Y (cm) | |
149 | TH2F * fHRecSigZVsPWin;//Reco QA, search window size in X (cm) | |
150 | TTree * fCalTree; // Tree for on-the-fly offline Calibration | |
151 | // internal variables in tree for on-the-fly TOF Calibration | |
152 | ||
153 | Int_t fIch; //TOF channel number | |
154 | Float_t fToT; // Time over Threshold, ns | |
155 | Float_t fTime; //TOF time, ps | |
156 | Float_t fExpTimePi; // exp time, Pions | |
157 | Float_t fExpTimeKa; // exp time, Kaons | |
158 | Float_t fExpTimePr; // exp time, Protons | |
159 | ||
160 | ClassDef(AliTOFtracker, 6) // TOF tracker | |
161 | }; | |
162 | ||
163 | #endif |