]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTracker.h
memory leak in the unpacking of compressed HLT TPC clusters fixed
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTracker.h
CommitLineData
fe17d4cb 1//========================================================================
2// Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3// See cxx source for full Copyright notice
4//========================================================================
5//
6// Class AliEMCALTracker
7// -----------------------
8// Implementation of the track matching method between barrel tracks and
9// EMCAL clusters.
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().
17//
18// ------------------------------------------------------------------------
19// author: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
20//=========================================================================
21
22#ifndef ALIEMCALTRACKER_H
23#define ALIEMCALTRACKER_H
24
25#include "AliTracker.h"
57fa24d9 26#include <TMath.h>
27#include <TVector3.h>
fe17d4cb 28class TList;
c61f0e70 29class TTree;
fe17d4cb 30class TObjArray;
af885e0f 31class AliESDEvent;
8fc351e3 32class AliVCluster;
fe17d4cb 33class AliESDCaloCluster;
34class AliEMCALTrack;
8fc351e3 35class AliExternalTrackParam;
fe17d4cb 36class AliEMCALRecPoint;
c61f0e70 37class AliEMCALGeometry;
fe17d4cb 38
39class AliEMCALTracker : public AliTracker
40{
41public:
42
43 AliEMCALTracker();
44 AliEMCALTracker(const AliEMCALTracker &t);
45 AliEMCALTracker& operator=(const AliEMCALTracker &source);
46
47 virtual ~AliEMCALTracker() {Clear();}
48
49 virtual void Clear(Option_t *option="ALL");
af885e0f 50 virtual Int_t Clusters2Tracks(AliESDEvent*) {return -1;}
8ba062b1 51 void InitParameters();
fe17d4cb 52 virtual Int_t LoadClusters(TTree*);
af885e0f 53 Int_t LoadClusters(AliESDEvent* esd);
54 Int_t LoadTracks(AliESDEvent* esd);
55 virtual Int_t PropagateBack(AliESDEvent* esd);
56 virtual Int_t RefitInward(AliESDEvent*) {return -1;}
fe17d4cb 57 virtual void UnloadClusters();
5970dfe2 58 virtual AliCluster* GetCluster(Int_t) const {return NULL;}
59 void SetCutEta(Double_t value) {fCutEta=value;}
60 void SetCutPhi(Double_t value) {fCutPhi=value;}
c61f0e70 61 void SetGeometry(AliEMCALGeometry *geom) {fGeom=geom;}
5970dfe2 62 void SetCutPt(Double_t value) {fCutPt=value;}
dcd86c5d 63 void SetCutNITS(Double_t value) {fCutNITS=value;}
64 void SetCutNTPC(Double_t value) {fCutNTPC=value;}
5970dfe2 65 void SetStepLength(Float_t length) {fStep=length;}
fe17d4cb 66 void SetTrackCorrectionMode(Option_t *option);
04475328 67
8fc351e3 68 static Bool_t ExtrapolateTrackToEMCalSurface(AliExternalTrackParam *trkParam, Double_t emcalR, Double_t mass, Double_t step, Double_t &eta, Double_t &phi);
69 static Bool_t ExtrapolateTrackToPosition(AliExternalTrackParam *trkParam, Float_t *clsPos, Double_t mass, Double_t step, Double_t &tmpEta, Double_t &tmpPhi);
70 static Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam *trkParam, AliVCluster *cluster, Double_t mass, Double_t step, Double_t &tmpEta, Double_t &tmpPhi);
71
5970dfe2 72 enum { kUnmatched = -99999 };
c61f0e70 73
fe17d4cb 74 class AliEMCALMatchCluster : public TObject
75 {
76 public:
c61f0e70 77 AliEMCALMatchCluster(Int_t ID, AliEMCALRecPoint *recPoint);
78 AliEMCALMatchCluster(Int_t ID, AliESDCaloCluster *caloCluster);
79 virtual ~AliEMCALMatchCluster() { }
80 //----------------------------------------------------------------------------
b9560ae2 81 Int_t Index() const {return fIndex;}
b9560ae2 82 Double_t X() const {return fX;}
83 Double_t Y() const {return fY;}
84 Double_t Z() const {return fZ;}
fe17d4cb 85 private:
86 Int_t fIndex; // index of cluster in its native container (ESD or TClonesArray)
fe17d4cb 87 Double_t fX; // global X position
88 Double_t fY; // global Y position
89 Double_t fZ; // global Z position
90 };
5970dfe2 91
fe17d4cb 92private:
8fc351e3 93 Int_t FindMatchedCluster(AliESDtrack *track);
fe17d4cb 94
95 enum ETrackCorr {
96 kTrackCorrNone = 0, // do not correct for energy loss
97 kTrackCorrMMB = 1, // use MeanMaterialBudget() function to evaluate correction
fe17d4cb 98 };
dcd86c5d 99
5970dfe2 100 Double_t fCutPt; // mimimum pT cut on tracks
101 Double_t fCutNITS; // mimimum number of track hits in the ITS
102 Double_t fCutNTPC; // mimimum number of track hits in the TPC
103
104 Float_t fStep; // Length of each step in propagation
8fc351e3 105 ETrackCorr fTrackCorrMode; // Material budget correction mode
106 Double_t fClusterWindow; // Select clusters in the window to be matched to tracks
5970dfe2 107 Double_t fCutEta; // cut on eta difference
108 Double_t fCutPhi; // cut on phi difference
fe17d4cb 109
c61f0e70 110 TObjArray *fTracks; //! collection of tracks
fe17d4cb 111 TObjArray *fClusters; //! collection of EMCAL clusters (ESDCaloCluster or EMCALRecPoint)
fe17d4cb 112
c61f0e70 113 AliEMCALGeometry *fGeom; //! EMCAL geometry
114
8fc351e3 115 ClassDef(AliEMCALTracker, 5) // EMCAL "tracker"
fe17d4cb 116};
117
118#endif