Line data Source code
1 : //========================================================================
2 : // Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3 : // See cxx source for full Copyright notice
4 : //========================================================================
5 :
6 : //=========================================================================
7 : ///
8 : /// \class AliEMCALTracker
9 : /// \brief Steer EMCal-Track matching
10 : ///
11 : /// Implementation of the track matching method between barrel tracks and
12 : /// EMCAL clusters.
13 : /// Besides algorithm implementation, some cuts are required to be set
14 : /// in order to define, for each track, an acceptance window where clusters
15 : /// are searched to find best match (if any).
16 : /// The class accepts as input an ESD container, and works directly on it,
17 : /// simply setting, for each of its tracks, the fEMCALindex flag, for each
18 : /// track which is matched to a cluster.
19 : /// In order to use method, one must launch PropagateBack().
20 : ///
21 : /// \author: A. Pulvirenti <alberto.pulvirenti@ct.infn.it>, Catania
22 : /// \author: Rong Rong Ma, Yale: Adapt to data analysis tools and other fixes.
23 : /// \author: Gustavo Conesa Balbastre <Gustavo.Conesa.Balbastre@cern.ch>, LPSC-IN2P3-CNRS, Run2 fixes
24 : ///
25 : //=========================================================================
26 :
27 : #ifndef ALIEMCALTRACKER_H
28 : #define ALIEMCALTRACKER_H
29 :
30 : #include "AliTracker.h"
31 : #include <TMath.h>
32 : #include <TVector3.h>
33 : class TList;
34 : class TTree;
35 : class TObjArray;
36 : class AliESDEvent;
37 : class AliVCluster;
38 : class AliESDCaloCluster;
39 : class AliEMCALRecPoint;
40 : class AliEMCALGeometry;
41 :
42 : class AliEMCALTracker : public AliTracker
43 : {
44 : public:
45 : AliEMCALTracker();
46 : AliEMCALTracker(const AliEMCALTracker &t);
47 : AliEMCALTracker& operator=(const AliEMCALTracker &source);
48 14 : virtual ~AliEMCALTracker() {Clear();}
49 :
50 : virtual void Clear(Option_t *option="ALL");
51 :
52 0 : virtual Int_t Clusters2Tracks(AliESDEvent*) { return -1 ; }
53 :
54 : void InitParameters();
55 :
56 : virtual Int_t LoadClusters(TTree*);
57 : Int_t LoadClusters(AliESDEvent* esd);
58 : Int_t LoadTracks (AliESDEvent* esd);
59 : virtual Int_t PropagateBack(AliESDEvent* esd);
60 0 : virtual Int_t RefitInward(AliESDEvent*) { return -1 ; }
61 : virtual void UnloadClusters();
62 :
63 0 : virtual AliCluster* GetCluster (Int_t) const { return NULL ; }
64 :
65 0 : void SetCutEta (Double_t value) { fCutEta = value ; }
66 0 : void SetCutPhi (Double_t value) { fCutPhi = value ; }
67 0 : void SetCutPt (Double_t value) { fCutPt = value ; }
68 0 : void SetCutNITS (Double_t value) { fCutNITS = value ; }
69 0 : void SetCutNTPC (Double_t value) { fCutNTPC = value ; }
70 0 : void SetTrackInITS(Bool_t value) { fTrackInITS = value ; }
71 0 : void SetStepLength(Float_t length) { fStep = length; }
72 :
73 : void SetTrackCorrectionMode(Option_t *option);
74 0 : void SetEMCalSurfaceDistance(Double_t d) {fEMCalSurfaceDistance = d;}
75 0 : void SetGeometry (AliEMCALGeometry *geom) { fGeom = geom ; }
76 :
77 : enum { kUnmatched = -99999 };
78 :
79 : //----------------------------------------------------------------------------
80 : //----------------------------------------------------------------------------
81 : class AliEMCALMatchCluster : public TObject
82 : {
83 : public:
84 :
85 : AliEMCALMatchCluster(Int_t ID, AliEMCALRecPoint *recPoint);
86 : AliEMCALMatchCluster(Int_t ID, AliESDCaloCluster *caloCluster);
87 198 : virtual ~AliEMCALMatchCluster() { }
88 :
89 36 : Int_t Index() const {return fIndex;}
90 516 : Double_t X() const {return fX;}
91 516 : Double_t Y() const {return fY;}
92 516 : Double_t Z() const {return fZ;}
93 :
94 : private:
95 : Int_t fIndex; ///< Index of cluster in its native container (ESD or TClonesArray)
96 : Double_t fX; ///< Global X position
97 : Double_t fY; ///< Global Y position
98 : Double_t fZ; ///< Global Z position
99 : };
100 : //----------------------------------------------------------------------------
101 : //----------------------------------------------------------------------------
102 :
103 : private:
104 :
105 : Int_t FindMatchedCluster(AliESDtrack *track);
106 :
107 : enum ETrackCorr {
108 : kTrackCorrNone = 0, ///< Do not correct for energy loss
109 : kTrackCorrMMB = 1, ///< Use MeanMaterialBudget() function to evaluate correction
110 : };
111 :
112 : Double_t fCutPt; ///< Minimum pT cut on tracks
113 : Double_t fCutNITS; ///< Minimum number of track hits in the ITS
114 : Double_t fCutNTPC; ///< Minimum number of track hits in the TPC
115 :
116 : Float_t fStep; ///< Length of each step in propagation
117 : ETrackCorr fTrackCorrMode; ///< Material budget correction mode
118 : Float_t fEMCalSurfaceDistance; ///< EMCal surface distance
119 : Double_t fClusterWindow; ///< Select clusters in the window to be matched to tracks
120 : Double_t fCutEta; ///< cut on eta difference
121 : Double_t fCutPhi; ///< cut on phi difference
122 : Bool_t fITSTrackSA; ///< If no TPC, use ITS Tracks
123 : Bool_t fTrackInITS; ///< Requiere ITS refit with AliVTrack::kITSout
124 :
125 : TObjArray *fTracks; //!<! Collection of tracks
126 : TObjArray *fClusters; //!<! Collection of EMCAL clusters (ESDCaloCluster or EMCALRecPoint)
127 :
128 : AliEMCALGeometry *fGeom; //!<! EMCAL geometry
129 :
130 : /// \cond CLASSIMP
131 90 : ClassDef(AliEMCALTracker, 8) ;
132 : /// \endcond
133 :
134 : };
135 : #endif
|