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 */
8 class TTreeSRedirector;
12 class AliITSChannelStatus;
13 class AliITSDetTypeRec;
14 class AliITSRecoParam;
15 #include "AliHLTITSTrack.h"
16 #include "AliHLTITSDetector.h"
17 #include "AliHLTITSLayer.h"
19 #include <TObjArray.h>
21 #include "AliITSRecPoint.h"
22 #include "AliTracker.h"
23 #include "AliHLTITSTrack.h"
26 //-------------------------------------------------------------------------
27 class AliITStrackerHLT : public AliTracker {
31 void LoadClusters( std::vector<AliITSRecPoint> clusters );
32 void Reconstruct( std::vector<AliExternalTrackParam> tracksTPC );
33 std::vector< AliHLTITSTrack > &Tracks(){ return fTracks;}
35 Bool_t TransportToX( AliExternalTrackParam *t, double x ) const;
36 Bool_t TransportToPhiX( AliExternalTrackParam *t, double phi, double x ) const;
38 void GetClusterErrors2( Int_t layer, const AliITSRecPoint *cluster, AliHLTITSTrack* track, double &err2Y, double &err2Z ) const ;
41 AliITStrackerHLT(const Char_t *geom);
42 virtual ~AliITStrackerHLT();
43 AliCluster *GetCluster(Int_t index) const;
44 virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
45 virtual Bool_t GetTrackPointTrackingError(Int_t index,
46 AliTrackPoint& p, const AliESDtrack *t);
47 AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const
48 {return fgLayers[layn].GetCluster(ncl);}
49 Int_t GetNumberOfClustersLayer(Int_t layn) const
50 {return fgLayers[layn].GetNumberOfClusters();}
51 Int_t LoadClusters(TTree *cf);
52 void UnloadClusters();
54 Int_t Clusters2Tracks(AliESDEvent *event);
55 Int_t PropagateBack(AliESDEvent *event);
56 Int_t RefitInward(AliESDEvent *event);
59 Double_t GetPredictedChi2MI(AliHLTITSTrack* track, const AliITSRecPoint *cluster,Int_t layer);
60 Int_t UpdateMI(AliHLTITSTrack* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
62 TTreeSRedirector *GetDebugStreamer() {return fDebugStreamer;}
63 static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliHLTITSTrack *t);
66 AliHLTITSLayer & GetLayer(Int_t layer) const;
67 AliHLTITSDetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); }
69 void FollowProlongationTree(AliHLTITSTrack * otrack);
75 const AliITSRecoParam *GetRecoParam(){ 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;
79 void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
80 void CookLabel(AliHLTITSTrack *t,Float_t wrong) const;
82 void SignDeltas(const TObjArray *clusterArray, Float_t zv);
83 void BuildMaterialLUT(TString material);
85 Int_t CorrectForPipeMaterial(AliHLTITSTrack *t, TString direction="inward");
86 Int_t CorrectForShieldMaterial(AliHLTITSTrack *t, TString shield, TString direction="inward");
87 Int_t CorrectForLayerMaterial(AliHLTITSTrack *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
88 void UpdateESDtrack(AliESDtrack *tESD,AliHLTITSTrack* track, ULong_t flags) const;
90 Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliHLTITSTrack *track,
91 Float_t &xloc,Float_t &zloc) const;
95 // method to be used for Plane Efficiency evaluation
99 const AliITSRecoParam *fRecoParam;
101 static AliHLTITSLayer fgLayers[AliITSgeomTGeo::kNLayers];// ITS layers
103 AliESDEvent * fEsd; //! pointer to the ESD event
104 Double_t fSPDdetzcentre[4]; // centres of SPD modules in z
106 Int_t fUseTGeo; // use TGeo to get material budget
108 Float_t fxOverX0Pipe; // material budget
109 Float_t fxTimesRhoPipe; // material budget
110 Float_t fxOverX0Shield[2]; // material budget
111 Float_t fxTimesRhoShield[2]; // material budget
112 Float_t fxOverX0Layer[6]; // material budget
113 Float_t fxTimesRhoLayer[6]; // material budget
115 TTreeSRedirector *fDebugStreamer; //!debug streamer
116 AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD
117 std::vector< AliHLTITSTrack > fTracks;
120 AliITStrackerHLT(const AliITStrackerHLT &tracker);
121 AliITStrackerHLT & operator=(const AliITStrackerHLT &tracker);
122 ClassDef(AliITStrackerHLT,0) //HLT ITS tracker
128 /////////////////////////////////////////////////////////
129 /////////////////////////////////////////////////////////
130 /////////////////////////////////////////////////////////
136 inline void AliITStrackerHLT::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
137 //--------------------------------------------------------------------
138 //This function "cooks" a track label. If label<0, this track is fake.
139 //--------------------------------------------------------------------
140 Int_t tpcLabel=t->GetLabel();
141 if (tpcLabel<0) return;
142 AliTracker::CookLabel(t,wrong);
143 if (tpcLabel!=TMath::Abs(t->GetLabel())){
146 if (tpcLabel !=t->GetLabel()) {
147 t->SetLabel(-tpcLabel);