]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFtracker.h
Solution for bug #66136: removed memory leaks in AliTOFtracker* classes
[u/mrichter/AliRoot.git] / TOF / AliTOFtracker.h
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 class TClonesArray;
24 class TObjArray;
25
26 class TH1F;
27 class TH2F;
28
29 class AliESDEvent;
30 class AliESDpid;
31
32 class AliTOFcluster;
33 class AliTOFRecoParam;
34 class AliTOFGeometry;
35
36 class AliTOFtracker : public AliTracker {
37
38 enum {kMaxCluster=77777}; //maximal number of the TOF clusters
39
40 public:
41
42  AliTOFtracker(); 
43
44  virtual ~AliTOFtracker();
45  virtual void GetPidSettings(AliESDpid *esdPID);
46  virtual Int_t Clusters2Tracks(AliESDEvent* /*event*/) {return -1;};
47  virtual Int_t PropagateBack(AliESDEvent * const event);
48  virtual Int_t RefitInward(AliESDEvent* /*event*/) {return -1;};
49  virtual Int_t LoadClusters(TTree * cTree); // Load Clusters
50  virtual void  UnloadClusters();// UnLoad Clusters
51  virtual AliCluster *GetCluster(Int_t index) const
52    {if (index==-1 || index >= fN) return NULL;
53    return (AliCluster *) fClusters[index];};
54  Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
55  void InitCheckHists();
56  void SaveCheckHists();
57  void FillClusterArray(TObjArray* arr) const;
58
59 private:
60
61  AliTOFtracker(const AliTOFtracker &t); //Copy Ctor 
62  AliTOFtracker& operator=(const AliTOFtracker &source); // ass. op.
63
64  Int_t FindClusterIndex(Double_t z) const; // Returns cluster index 
65  void  MatchTracks(Bool_t mLastStep); // Matching Algorithm 
66  void  CollectESD(); // Select starting Set for Matching 
67  Float_t CorrectTimeWalk(Float_t dist,Float_t tof) const; // Time Walk correction
68
69  const AliTOFRecoParam* fkRecoParam;    // Pointer to TOF Recon. Pars
70  AliTOFGeometry*  fGeom;                // Pointer to TOF geometry
71  AliTOFcluster *fClusters[kMaxCluster]; // pointers to the TOF clusters
72
73  Int_t fN;              // Number of Clusters
74  Int_t fNseeds;         // Number of track seeds  
75  Int_t fNseedsTOF;      // TPC BP tracks
76  Int_t fngoodmatch;     // Correctly matched  tracks
77  Int_t fnbadmatch;      // Wrongly matched tracks
78  Int_t fnunmatch;       // Unmatched tracks
79  Int_t fnmatch;         // Total matched tracks
80  
81  TClonesArray* fTracks; //! pointer to the TClonesArray with TOF tracks
82  TObjArray* fSeeds;  //! pointer to the TObjArray with ESD tracks
83  //Digits/Reco QA histos
84
85  TH2F * fHDigClusMap; //Digits QA, Cluster Map 
86  TH1F * fHDigNClus;   //Digits QA, # of clusters on TOF/event
87  TH1F * fHDigClusTime;//Digits QA, Cluster Time (ns)
88  TH1F * fHDigClusToT; //Digits QA, Cluster ToT (ns)
89  TH1F * fHRecNClus; //Reco QA, cluster occupancy in search window
90  TH1F * fHRecDist;//Reco QA, track-TOF cluster closest distance (cm)
91  TH2F * fHRecSigYVsP;//Reco QA, track error in Y at TOF inner surface (cm)
92  TH2F * fHRecSigZVsP; //Reco QA, track error in Z at TOF inner surface (cm)
93  TH2F * fHRecSigYVsPWin;//Reco QA, search window size in Y (cm)
94  TH2F * fHRecSigZVsPWin;//Reco QA, search window size in X (cm)
95  TTree * fCalTree; // Tree for on-the-fly offline Calibration
96  // internal variables in tree for on-the-fly TOF Calibration
97
98  Int_t   fIch; //TOF channel number
99  Float_t fToT; // Time over Threshold, ns
100  Float_t fTime; //TOF time, ps
101  Float_t fExpTimePi; // exp time, Pions
102  Float_t fExpTimeKa; // exp time, Kaons
103  Float_t fExpTimePr; // exp time, Protons
104
105  ClassDef(AliTOFtracker, 5) // TOF tracker 
106 };
107
108 #endif