Line data Source code
1 : #ifndef ALIITSTRACKERHLT_H
2 : #define ALIITSTRACKERHLT_H
3 : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 :
7 : class TTree;
8 : class TTreeSRedirector;
9 : class AliESDEvent;
10 : class AliESDtrack;
11 :
12 : class AliITSChannelStatus;
13 : class AliITSDetTypeRec;
14 : class AliITSRecoParam;
15 : #include "AliHLTITSTrack.h"
16 : #include "AliHLTITSDetector.h"
17 : #include "AliHLTITSLayer.h"
18 :
19 : #include <TObjArray.h>
20 :
21 : #include "AliITSRecPoint.h"
22 : #include "AliTracker.h"
23 : #include "AliHLTITSTrack.h"
24 :
25 : //-------------------------------------------------------------------------
26 : class AliITStrackerHLT : public AliTracker {
27 : public:
28 :
29 :
30 : void StartLoadClusters( Int_t NClusters );
31 : void LoadCluster( const AliITSRecPoint &cluster);
32 : void Reconstruct( AliExternalTrackParam *tracksTPC, int *tracksTPCLab, int nTPCTracks );
33 :
34 0 : AliHLTITSTrack *Tracks() const { return fTracks;}
35 0 : Int_t NTracks() const { return fNTracks;}
36 0 : AliHLTITSTrack *ITSOutTracks() const { return fITSOutTracks;}
37 0 : Int_t NITSOutTracks() const { return fNITSOutTracks;}
38 :
39 : Bool_t TransportToX( AliExternalTrackParam *t, double x ) const;
40 : Bool_t TransportToPhiX( AliExternalTrackParam *t, double phi, double x ) const;
41 :
42 : AliITStrackerHLT();
43 : AliITStrackerHLT(const Char_t *geom);
44 : virtual ~AliITStrackerHLT();
45 : AliCluster *GetCluster(Int_t index) const;
46 : virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
47 : virtual Bool_t GetTrackPointTrackingError(Int_t index,
48 : AliTrackPoint& p, const AliESDtrack *t);
49 : AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const
50 0 : {return fLayers[layn].GetCluster(ncl);}
51 : Int_t GetNumberOfClustersLayer(Int_t layn) const
52 0 : {return fLayers[layn].GetNumberOfClusters();}
53 : Int_t LoadClusters(TTree *cf);
54 : void UnloadClusters();
55 :
56 : Int_t Clusters2Tracks(AliESDEvent *event);
57 : Int_t PropagateBack(AliESDEvent *event);
58 : Int_t RefitInward(AliESDEvent *event);
59 :
60 :
61 : static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliHLTITSTrack *t);
62 :
63 :
64 : AliHLTITSLayer & GetLayer(Int_t layer) const;
65 0 : AliHLTITSDetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); }
66 :
67 : void FollowProlongationTree(AliHLTITSTrack * otrack);
68 : Int_t FitOutward(AliHLTITSTrack * track );
69 :
70 : void Init();
71 :
72 :
73 : protected:
74 :
75 : const AliITSRecoParam *GetRecoParam() const { return fRecoParam; }
76 : Bool_t ComputeRoad(AliHLTITSTrack* track,Int_t ilayer,Int_t idet,Double_t &zmin,Double_t &zmax,Double_t &ymin,Double_t &ymax) const;
77 :
78 :
79 : void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
80 : void CookLabel(AliHLTITSTrack *t,Float_t wrong) const;
81 :
82 : void BuildMaterialLUT(TString material);
83 :
84 : Int_t CorrectForPipeMaterial(AliHLTITSTrack *t, bool InwardDirection=1);
85 : Int_t CorrectForShieldMaterial(AliHLTITSTrack *t, Int_t shieldindex, bool InwardDirection=1);
86 : Int_t CorrectForLayerMaterial(AliHLTITSTrack *t, Int_t layerindex, bool InwardDirection=1);
87 : void UpdateESDtrack(AliESDtrack *tESD,AliHLTITSTrack* track, ULong_t flags) const;
88 :
89 : Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliHLTITSTrack *track,
90 : Float_t &xloc,Float_t &zloc) const;
91 :
92 : static Bool_t CheckTrack( const AliExternalTrackParam *t );
93 :
94 :
95 : //
96 :
97 : const AliITSRecoParam *fRecoParam; //!
98 :
99 : AliHLTITSLayer* fLayers; //!
100 :
101 : Double_t fSPDdetzcentre[4]; // centres of SPD modules in z
102 :
103 : Int_t fUseTGeo; // use TGeo to get material budget
104 :
105 : Float_t fxOverX0Pipe; // material budget
106 : Float_t fxTimesRhoPipe; // material budget
107 : Float_t fxOverX0Shield[2]; // material budget
108 : Float_t fxTimesRhoShield[2]; // material budget
109 : Float_t fxOverX0Layer[6]; // material budget
110 : Float_t fxTimesRhoLayer[6]; // material budget
111 :
112 : AliHLTITSTrack *fTracks; // array of its-updated tracks
113 : AliHLTITSTrack *fITSOutTracks; // array of tracks, fitted outward with ITS only
114 : int fNTracks;// n tracks
115 : int fNITSOutTracks;// n out tracks
116 : double fLoadTime; //
117 : double fRecoTime; //
118 : int fNEvents; //
119 : AliITSRecPoint *fClusters; //!
120 : int fNClusters; //
121 :
122 : private:
123 : AliITStrackerHLT(const AliITStrackerHLT &tracker);
124 : AliITStrackerHLT & operator=(const AliITStrackerHLT &tracker);
125 6 : ClassDef(AliITStrackerHLT,0) //HLT ITS tracker
126 : };
127 :
128 :
129 :
130 :
131 : /////////////////////////////////////////////////////////
132 : /////////////////////////////////////////////////////////
133 : /////////////////////////////////////////////////////////
134 :
135 :
136 :
137 :
138 :
139 : inline void AliITStrackerHLT::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
140 : //--------------------------------------------------------------------
141 : //This function "cooks" a track label. If label<0, this track is fake.
142 : //--------------------------------------------------------------------
143 0 : Int_t tpcLabel=t->GetLabel();
144 0 : if (tpcLabel<0) return;
145 0 : AliTracker::CookLabel(t,wrong);
146 0 : if (tpcLabel!=TMath::Abs(t->GetLabel())){
147 0 : t->SetFakeRatio(1.);
148 0 : }
149 0 : if (tpcLabel !=t->GetLabel()) {
150 0 : t->SetLabel(-tpcLabel);
151 0 : }
152 0 : }
153 :
154 :
155 :
156 : #endif
|