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