1 //========================================================================
2 // Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3 // See cxx source for full Copyright notice
4 //========================================================================
6 // Class AliEMCALTracker
7 // -----------------------
8 // Implementation of the track matching method between barrel tracks and
10 // Besides algorithm implementation, some cuts are required to be set
11 // in order to define, for each track, an acceptance window where clusters
12 // are searched to find best match (if any).
13 // The class accepts as input an ESD container, and works directly on it,
14 // simply setting, for each of its tracks, the fEMCALindex flag, for each
15 // track which is matched to a cluster.
16 // In order to use method, one must launch PropagateBack().
18 // ------------------------------------------------------------------------
19 // author: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
20 //=========================================================================
22 #ifndef ALIEMCALTRACKER_H
23 #define ALIEMCALTRACKER_H
25 #include "AliTracker.h"
33 class AliESDCaloCluster;
34 class AliEMCALRecPoint;
35 class AliEMCALGeometry;
37 class AliEMCALTracker : public AliTracker
41 AliEMCALTracker(const AliEMCALTracker &t);
42 AliEMCALTracker& operator=(const AliEMCALTracker &source);
43 virtual ~AliEMCALTracker() {Clear();}
45 virtual void Clear(Option_t *option="ALL");
46 virtual Int_t Clusters2Tracks(AliESDEvent*) {return -1;}
47 void InitParameters();
48 virtual Int_t LoadClusters(TTree*);
49 Int_t LoadClusters(AliESDEvent* esd);
50 Int_t LoadTracks(AliESDEvent* esd);
51 virtual Int_t PropagateBack(AliESDEvent* esd);
52 virtual Int_t RefitInward(AliESDEvent*) {return -1;}
53 virtual void UnloadClusters();
54 virtual AliCluster* GetCluster(Int_t) const {return NULL;}
55 void SetCutEta(Double_t value) {fCutEta=value;}
56 void SetCutPhi(Double_t value) {fCutPhi=value;}
57 void SetGeometry(AliEMCALGeometry *geom) {fGeom=geom;}
58 void SetCutPt(Double_t value) {fCutPt=value;}
59 void SetCutNITS(Double_t value) {fCutNITS=value;}
60 void SetCutNTPC(Double_t value) {fCutNTPC=value;}
61 void SetStepLength(Float_t length) {fStep=length;}
62 void SetTrackCorrectionMode(Option_t *option);
63 void SetEMCalSurfaceDistance(Double_t d) {fEMCalSurfaceDistance = d;}
65 enum { kUnmatched = -99999 };
67 class AliEMCALMatchCluster : public TObject
70 AliEMCALMatchCluster(Int_t ID, AliEMCALRecPoint *recPoint);
71 AliEMCALMatchCluster(Int_t ID, AliESDCaloCluster *caloCluster);
72 virtual ~AliEMCALMatchCluster() { }
73 //----------------------------------------------------------------------------
74 Int_t Index() const {return fIndex;}
75 Double_t X() const {return fX;}
76 Double_t Y() const {return fY;}
77 Double_t Z() const {return fZ;}
79 Int_t fIndex; // index of cluster in its native container (ESD or TClonesArray)
80 Double_t fX; // global X position
81 Double_t fY; // global Y position
82 Double_t fZ; // global Z position
86 Int_t FindMatchedCluster(AliESDtrack *track);
88 kTrackCorrNone = 0, // do not correct for energy loss
89 kTrackCorrMMB = 1, // use MeanMaterialBudget() function to evaluate correction
92 Double_t fCutPt; // mimimum pT cut on tracks
93 Double_t fCutNITS; // mimimum number of track hits in the ITS
94 Double_t fCutNTPC; // mimimum number of track hits in the TPC
96 Float_t fStep; // Length of each step in propagation
97 ETrackCorr fTrackCorrMode; // Material budget correction mode
98 Float_t fEMCalSurfaceDistance; // EMCal surface distance
99 Double_t fClusterWindow; // Select clusters in the window to be matched to tracks
100 Double_t fCutEta; // cut on eta difference
101 Double_t fCutPhi; // cut on phi difference
102 Bool_t fITSTrackSA; // If ITS Tracks
104 TObjArray *fTracks; //! collection of tracks
105 TObjArray *fClusters; //! collection of EMCAL clusters (ESDCaloCluster or EMCALRecPoint)
107 AliEMCALGeometry *fGeom; //! EMCAL geometry
109 ClassDef(AliEMCALTracker, 7) // EMCAL "tracker"